Skip to content

Commit

Permalink
feat: channel map
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Feb 14, 2023
1 parent 67d6995 commit be328f8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/token-metadata/src/ibc/channels.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
export enum CanonicalChannelToDestinationChannel {
CosmosHub = 'channel-1',
Evmos = 'channel-83',
Osmosis = 'channel-8',
Terra = 'channel-4',
Axelar = 'channel-84',
Persistence = 'channel-82',
Chihuahua = 'channel-76',
SecretNetwork = 'channel-88',
Juno = 'channel-78',
Stride = 'channel-89',
Crescent = 'channel-23',
Sommelier = 'channel-93',
}

/**
* We can't use this approach because the channels can overlap between chains
* For example for Secret -> Injective we have channel-23 and we have the same
Expand Down Expand Up @@ -40,6 +55,7 @@ export const canonicalChannelsToChainMapFromInjective = {
'channel-13': { chainA: 'Injective', chainB: '' },
'channel-93': { chainA: 'Injective', chainB: 'Sommelier' },
}

export const canonicalChannelsToChainMapToInjective = {
'channel-220': { chainA: 'CosmosHub', chainB: 'Injective' },
'channel-122': { chainA: 'Osmosis', chainB: 'Injective' },
Expand Down Expand Up @@ -73,3 +89,15 @@ export const canonicalChannelIds = [
'channel-90',
'channel-93',
]

export const channelIbcDenomToBaseDenomMap = {
[CanonicalChannelToDestinationChannel.Osmosis]: {
inj: 'ibc/64BA6E31FE887D66C6F8F31C7B1A80C7CA179239677B4088BB55F5EA07DBE273',
},
[CanonicalChannelToDestinationChannel.Crescent]: {
inj: 'ibc/5A76568E079A31FA12165E4559BA9F1E9D4C97F9C2060B538C84DCD503815E30',
},
[CanonicalChannelToDestinationChannel.Persistence]: {
inj: 'ibc/D64E84758BCA42602C27E9ED2DB8F4EFDAE6A1E311CF404B516D45FEDF319D73',
},
}

0 comments on commit be328f8

Please sign in to comment.