Icrc metadata inconsistency

Hi community!

We are trying to integrate ICRC wallets on Taggr.
Recently icrc1_metadata has been changed on some ledger canisters. It’s missing logo parameter. Do you know how to find logo, for example on CHAT ledger canister ?

Examples with metadata containing logo:

2 Likes

Wow! Indeed, I just had a look, and I’m unable to fetch the logos for OC, Ghost, Yarl, Kinic, Yuku, Motoko, Alice, Gold, Catalyze and Boom logos through the SNS Aggregator which periodically retrieves information from the related SNS. I’ll ask the team if this is expected.

Meanwhile, if you just need logos, the images, you can find them in OISY’s repo, for example. We have a job that imports them, but we handle them statically and commit them through PRs, which is why they are still there.

Update: it’s expected :point_right: Icrc metadata inconsistency - #5 by aterga

1 Like

Thanks @peterparker . As a workaround i added a fallback to icpSwap api https://wqfao-piaaa-aaaag-qj5ba-cai.raw.icp0.io/cngnf-vqaaa-aaaar-qag4q-cai

2 Likes

IIUC, when updating the ledger state from the post_upgrade, if any metadata is set in the UpgradeArgs, then the existing metadata is replaced by whatever is set in the UpgradeArgs. This is also the case when using a ManageLedgerParameters proposal for SNSs, where the metadata in the LedgerUpgradeArgs is constructed using only the provided parameters (in particular, existing metadata which is not modified in the proposal is not set to the current metadata values in the ledger), which would then overwrite the metadata in the ledger. So I’m wondering if the flow for the aforementioned ledgers may have been something like the following:

  1. The logo is set, either initially or in a subsequent ledger canister upgrade
  2. Some other metadata parameters are changed, e.g., in a ManageLedgerParameters proposal, but the logo is not (re)specified, leading to it being removed/not set
1 Like

Hi @aligatorr89,

It seems that some SNSs unset their ledger logo by adopting either a “Manage SNS metadata” or a “Manage ledger parameters” proposal.

I’ll bring this up with the Governance team to make sure we agree this is a bug, in which case we’ll propose a fix for it in the next week or so.

In the meantime, we recommend all SNSs without a logo to submit a Manage ledger parameters proposal to set just the logo; it’s safe to omit other fields as (unlike the ledger logo, they won’t be overwritten unless explicitly specified).

PS. OpenChat is a different case. We think many old SNSs simply never have set a ledger logo, as they were launched before the new “1-proposal” SNS initialization flow, and never explicitly proposed a ledger logo (all frontends had to fall back to fetch their SNS’s main logo anyway). However, if you notice evidence that some SNS launched via the 1-proposal flow (i.e., using a CreateServiceNervousSystem NNS proposal), did not overwrite their ledger logo using “Manage SNS metadata” or “Manage ledger parameters”, and currently don’t have a ledger logo, then please let us know!

4 Likes

Thanks @aterga,
I think logo is a required attribute based on documentation. But it is least important for the wallet integration, and we can use other sources to obtain it.
Most important attributes are

  • name, symbol
  • decimals (very sensitive and important to have correct)
  • fee

These cannot be accidentally unset.

Thank you all for support! You created great ecosystem to build on.

2 Likes

Most important parameters are always set, which is all that matters. Thanks @peterparker !

1 Like

Yes, currently it is. Although, when, e.g., OpenChat was launched, the process and the requirements were a bit different - that’s why they never had to set the Ledger logo, I think.

I agree, and the fix for the ledger logo being sometimes unset is in the makings.

2 Likes