subscan-explorer / assets-info

Subscan assets info
19 stars 44 forks source link

Adding ERC20 metadata for Foregin Assets #62

Closed alistair-singh closed 2 days ago

alistair-singh commented 1 week ago

Hi,

I am from the Snowbridge team. We recently launched on Polkadot and have bridged over server assets. We need to sync asset metadata for these bridged tokens on Subscan as users are looking for their tokens and cannot find them. There is also an issue of the correct decimals being displayed to the User.

See this example for WETH: https://assethub-polkadot.subscan.io/foreign_assets/f1846f14a52715c2a09df52ef8f077c52977dcfd

I have opened this PR to add the metadata for WETH, but there is no way to set decimals. https://github.com/subscan-explorer/assets-info/pull/61

Also, do we have to do this process for each token that we register? Is there some way that this can be automated by pulling the metadata directly from Ethereum? The erc20 contract address forms part of the multi-location id used to identify the token on polkadot asset hub foreginAssets pallet.

Please advise

freehere107 commented 1 week ago

@alistair-singh Can you set metadata for this foreign token? If there is this data on the chain, we will automatically update the decimals field. for example https://assethub-polkadot.subscan.io/event?module=foreignassets&event_id=MetadataSet

alistair-singh commented 1 week ago

The metadata on the Ethereum side of the bridge is the canonical version of the metadata. We can only do this for very common assets such as WETH. But we cannot do this for every asset bridged. Is there some way we can get an automated process in place to get this data from onchain Ethereum?

freehere107 commented 1 week ago

This is also a solution at present, we will support it after the next update

alistair-singh commented 4 days ago

This is also a solution at present, we will support it after the next update

Do you have a tracking issue we can follow?

freehere107 commented 3 days ago

@alistair-singh https://assethub-polkadot.subscan.io/foreign_assets/f1846f14a52715c2a09df52ef8f077c52977dcfd metadata has been update