Skip to content

Commit

Permalink
Merge pull request #65 from InjectiveLabs/feat/add-xion-testnet-ibc-b…
Browse files Browse the repository at this point in the history
…ridge

chore: add xion to testnet bridge
  • Loading branch information
shane-moore authored Jul 24, 2024
2 parents 73239e6 + 6d0a54d commit 3c41195
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions layer/data/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const CosmosChainId = {
[Network.Andromeda]: 'andromeda-1',
[Network.Saga]: 'ssc-1',
[Network.Fetch]: 'fetchhub-4',
[Network.XionTestnet]: 'xion-testnet-1',


// networks below are disabled
[Network.Canto]: 'canto_7700-1',
Expand Down Expand Up @@ -241,6 +243,15 @@ export const cosmosTestnetChannels: Record<string, CosmosChannel> = {
bToAChannelId: 'channel-1',
bToAClientId: '07-tendermint-1',
port: 'transfer'
},
[Network.XionTestnet]: {
aChainId: CosmosChainId[Network.XionTestnet],
bChainId: CosmosChainId[Network.Injective],
aToBChannelId: 'channel-487',
aToBClientId: '',
bToAChannelId: 'channel-489',
bToAClientId: '',
port: 'transfer'
}
}

Expand Down
4 changes: 2 additions & 2 deletions layer/data/ibc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const canonicalChannelsToChainList = [
{ channelId: 'channel-183', chainA: 'Injective', chainB: 'Gateway' },
{ channelId: 'channel-213', chainA: 'Injective', chainB: 'Andromeda' },
{ channelId: 'channel-261', chainA: 'Injective', chainB: 'Saga' },
{ channelId: 'channel-283', chainA: 'Injective', chainB: 'fetchhub-4' }
{ channelId: 'channel-283', chainA: 'Injective', chainB: 'fetchhub-4' },
]

export const canonicalChannelIds = [
Expand Down Expand Up @@ -82,5 +82,5 @@ export const canonicalChannelIds = [
'channel-183',
'channel-213',
'channel-261',
'channel-283'
'channel-283',
]
1 change: 1 addition & 0 deletions layer/types/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ export enum Network {
CosmosHubTestnet = 'cosmosHub-testnet',
Andromeda = 'andromeda',
Saga = 'saga',
XionTestnet = 'xion-testnet'
}
4 changes: 4 additions & 0 deletions layer/utils/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export const getNetworkFromAddress = (address: string): Network => {
return Network.Kujira
case address.startsWith('saga'):
return Network.Saga
case address.startsWith('xion'):
return Network.XionTestnet
default:
return Network.Injective
}
Expand Down Expand Up @@ -197,6 +199,8 @@ const getTestNetworkExplorerUrl = (network: Network): string => {
return 'https://www.mintscan.io/persistence-testnet'
case Network.Osmosis:
return 'https://www.mintscan.io/osmosis-testnet'
case Network.XionTestnet:
return 'https://explorer.burnt.com/xion-testnet-1'
case Network.Kava:
return 'https://www.mintscan.io/kava-testnet'
case Network.Noble:
Expand Down

0 comments on commit 3c41195

Please sign in to comment.