chain-registry icon indicating copy to clipboard operation
chain-registry copied to clipboard

Create script to generate full assetlist (including ibc assets) for all chains based on ibc.json and all chains' native assetlists

Open sunnya97 opened this issue 3 years ago • 8 comments

sunnya97 avatar Dec 23 '21 17:12 sunnya97

this is very much in progress :) will track some tasks here

  • [x] update to the latest structure that @JeremyParish69 and @pyramation discussed
  • [x] add cw20 assets
  • [ ] ensure pstake case is covered

@JeremyParish69 I think everything is covered except where pstake is involved. I pinged you on slack to figure out how to calculate the ibc/denom for that one

pyramation avatar Aug 19 '22 22:08 pyramation

new transition object:

https://github.com/cosmology-tech/chain-registry/blob/7b1714a8a4afe11fd7dc893d1e5790997731d2f8/packages/osmosis/src/asset_list.ts#L1998-L2010

so instead of ibc object, we are using transition to make a bit more general for when we need to describe wrapping in tokens, bridging, IBC sends, or other transitions

pyramation avatar Aug 20 '22 02:08 pyramation

here is an example of cw20: https://github.com/cosmology-tech/chain-registry/blob/7b1714a8a4afe11fd7dc893d1e5790997731d2f8/packages/osmosis/src/asset_list.ts#L4685-L4701

pyramation avatar Aug 20 '22 02:08 pyramation

I like the idea of generalizing the bridge transfer mechanisms. I think "transition" is maybe a bit vague, so potentially a new name for that. Let's try filling out what an Axelar bridged asset would look like in the transition struct format?

sunnya97 avatar Aug 20 '22 09:08 sunnya97

I like the idea of generalizing the bridge transfer mechanisms. I think "transition" is maybe a bit vague, so potentially a new name for that. Let's try filling out what an Axelar bridged asset would look like in the transition struct format?

How about instead of "transition", we could try "trace"? Inspired by what IRIS Foundation came up with here: https://github.com/irisnet/iob-registry/blob/main/coins/cosmos.json

JeremyParish69 avatar Aug 20 '22 19:08 JeremyParish69

trace or traces could work well

open to ideas — I just want to make sure we avoid names like origin or source that could potentially flip the meaning or confuse users about how to interpret the path. traces doesn't seem to do that so I'm fine with it 👍🏻

pyramation avatar Aug 20 '22 19:08 pyramation

I like the idea of generalizing the bridge transfer mechanisms. I think "transition" is maybe a bit vague, so potentially a new name for that. Let's try filling out what an Axelar bridged asset would look like in the transition struct format?

And here are Axelar assets with traces (and ethereum assets also have traces where applicable): https://github.com/cosmos/chain-registry/pull/558

JeremyParish69 avatar Aug 20 '22 20:08 JeremyParish69

awesome — I've updated the npm module https://github.com/cosmology-tech/chain-registry/blob/main/packages/osmosis/src/asset_list.ts#L32-L43 so we can see how it looks/feels

pyramation avatar Aug 23 '22 18:08 pyramation