diff --git a/src/components/ChainSelector/index.tsx b/src/components/ChainSelector/index.tsx index d8d01fc..e9e5f01 100644 --- a/src/components/ChainSelector/index.tsx +++ b/src/components/ChainSelector/index.tsx @@ -119,6 +119,24 @@ const SUPPORTED_CHAIN_MAP: Record = { head: 8, tail: 8 }, + [SupportedChain.Axelar]: { + chain: SupportedChain.Axelar, + name: 'Axelar', + image: StargazeChainLogo, + supportedWallets: [CosmosWalletType.Keplr], + toChains: [SupportedChain.Terra], + head: 8, + tail: 8 + }, + [SupportedChain.Terra]: { + chain: SupportedChain.Terra, + name: 'Terra', + image: StargazeChainLogo, + supportedWallets: [CosmosWalletType.Keplr], + toChains: [SupportedChain.Axelar], + head: 8, + tail: 8 + }, [SupportedChain.Iris]: { chain: SupportedChain.Iris, name: 'Iris', diff --git a/src/constants/cosmos-chains.ts b/src/constants/cosmos-chains.ts index ab77547..65fe77f 100644 --- a/src/constants/cosmos-chains.ts +++ b/src/constants/cosmos-chains.ts @@ -90,11 +90,37 @@ const chihuahua: CosmosChainInfo = { supportZeroFee: false }; +const axelar: CosmosChainInfo = { + chainId: 'axelar-dojo-1', + lcd: 'https://lcd-axelar.cosmostation.io', + bech32Prefix: 'axelar', + path: [44, 118, 0, 0, 0], + denom: 'uaxl', + ibcChannels: { + [SupportedCosmosChain.Terra]: 'channel-0' + }, + supportZeroFee: false +}; + +const terra: CosmosChainInfo = { + chainId: 'columbus-5', + lcd: 'https://lcd.terra.dev', + bech32Prefix: 'terra', + path: [44, 118, 0, 0, 0], + denom: 'uluna', + ibcChannels: { + [SupportedCosmosChain.Axelar]: 'channel-19' + }, + supportZeroFee: false +}; + const chainInfoMap: Record = { gravityBridge, cosmos, osmosis, stargaze, + axelar, + terra, cheqd, iris, chihuahua diff --git a/src/constants/tokens/axelar-terra-tokens.json b/src/constants/tokens/axelar-terra-tokens.json new file mode 100644 index 0000000..8eac141 --- /dev/null +++ b/src/constants/tokens/axelar-terra-tokens.json @@ -0,0 +1,9 @@ +{ + "ibc/4627AD2524E3E0523047E35BB76CC90E37D9D57ACF14F0FCBCEB2480705F3CB8": { + "name": "Luna", + "denom": "ibc/4627AD2524E3E0523047E35BB76CC90E37D9D57ACF14F0FCBCEB2480705F3CB8", + "symbol": "LUNA", + "decimals": 6, + "logoURI": "https://raw.githubusercontent.com/cosmostation/cosmostation_token_resource/master/coin_image/tokens/token-stargaze.svg" + } +} diff --git a/src/constants/tokens/index.ts b/src/constants/tokens/index.ts index 4b10f04..154b9a1 100644 --- a/src/constants/tokens/index.ts +++ b/src/constants/tokens/index.ts @@ -1,3 +1,4 @@ +import axelarToTerraTokens from 'constants/tokens/axelar-terra-tokens.json'; import cheqdToGravityBridgeTokens from 'constants/tokens/cheqd-gb-tokens.js'; import cosmosToGravityBridgeTokens from 'constants/tokens/cosmos-gb-tokens'; import gravityBridgeToCheqdTokens from 'constants/tokens/gb-cheqd-tokens'; @@ -9,6 +10,7 @@ import gravityBridgeToStargazeTokens from 'constants/tokens/gb-stargaze-tokens.j import irisToGravityBridgeTokens from 'constants/tokens/iris-gb-tokens.json'; import osmosisToGravityBridgeTokens from 'constants/tokens/osmosis-gb-tokens.json'; import stargazeToGravityBridgeTokens from 'constants/tokens/stargaze-gb-tokens.json'; +import terraToAxelarTokens from 'constants/tokens/terra-axelar-tokens.json'; import chihuahuaToGravityBridgeTokens from 'constants/tokens/chihuahua-gb-tokens'; import gravityBridgeToChihuahuaTokens from 'constants/tokens/gb-chihuahua-tokens'; import { SupportedChain } from 'types'; @@ -41,6 +43,12 @@ export const ibcTokenFromToMap: Record = [SupportedCosmosChain.Osmosis]: undefined, [SupportedCosmosChain.Stargaze]: undefined, [SupportedCosmosChain.Cosmos]: undefined, + [SupportedCosmosChain.Axelar]: undefined, + [SupportedCosmosChain.Terra]: undefined, [SupportedCosmosChain.Cheqd]: undefined, [SupportedCosmosChain.Iris]: undefined, [SupportedCosmosChain.Chihuahua]: undefined diff --git a/src/services/util/chain-helper.ts b/src/services/util/chain-helper.ts index f15406c..faaad5d 100644 --- a/src/services/util/chain-helper.ts +++ b/src/services/util/chain-helper.ts @@ -6,6 +6,8 @@ const nameMap: Record = { [SupportedChain.Osmosis]: 'Osmosis', [SupportedChain.Stargaze]: 'Stargaze', [SupportedChain.Cosmos]: 'Cosmos', + [SupportedChain.Axelar]: 'Axelar', + [SupportedChain.Terra]: 'Terra', [SupportedChain.Cheqd]: 'cheqd', [SupportedChain.Iris]: 'Iris', [SupportedChain.Chihuahua]: 'Chihuahua' @@ -17,6 +19,8 @@ const txLinkMap: Record = { [SupportedChain.Osmosis]: 'https://www.mintscan.io/osmosis/txs', [SupportedChain.Stargaze]: 'https://www.mintscan.io/stargaze/txs', [SupportedChain.Cosmos]: 'https://www.mintscan.io/cosmos/txs', + [SupportedChain.Axelar]: 'https://www.mintscan.io/axelar/txs', + [SupportedChain.Terra]: 'https://finder.terra.money/mainnet/tx', [SupportedChain.Cheqd]: 'https://explorer.cheqd.io/transactions', [SupportedChain.Iris]: 'https://www.mintscan.io/iris/txs', [SupportedChain.Chihuahua]: 'https://www.mintscan.io/chihuahua/txs' @@ -30,7 +34,9 @@ const accountLinkMap: Record = { [SupportedChain.Cosmos]: 'https://www.mintscan.io/cosmos/account', [SupportedChain.Cheqd]: 'https://explorer.cheqd.io/accounts', [SupportedChain.Iris]: 'https://www.mintscan.io/iris/account', - [SupportedChain.Chihuahua]: 'https://www.mintscan.io/chihuahua/account' + [SupportedChain.Chihuahua]: 'https://www.mintscan.io/chihuahua/account', + [SupportedChain.Axelar]: 'https://www.mintscan.io/axelar/account', + [SupportedChain.Terra]: 'https://finder.terra.money/mainnet/address' }; const broadcastSourceMap: Record = { @@ -40,7 +46,9 @@ const broadcastSourceMap: Record = { [SupportedChain.Cosmos]: BroadcastSource.Lcd, [SupportedChain.Cheqd]: BroadcastSource.Wallet, [SupportedChain.Iris]: BroadcastSource.Lcd, - [SupportedChain.Chihuahua]: BroadcastSource.Lcd + [SupportedChain.Chihuahua]: BroadcastSource.Lcd, + [SupportedChain.Axelar]: BroadcastSource.Lcd, + [SupportedChain.Terra]: BroadcastSource.Wallet }; function getChainName (chain: SupportedChain): string { diff --git a/src/types.ts b/src/types.ts index d5e9f48..a7ef432 100644 --- a/src/types.ts +++ b/src/types.ts @@ -20,6 +20,8 @@ export enum SupportedChain { Cosmos = 'cosmos', Cheqd = 'cheqd', Iris = 'iris', + Axelar = 'axelar', + Terra = 'terra', Chihuahua = 'chihuahua' } @@ -32,8 +34,10 @@ export enum SupportedCosmosChain { Osmosis = 'osmosis', Stargaze = 'stargaze', Cosmos = 'cosmos', - Cheqd = 'cheqd', + Axelar = 'axelar', Iris = 'iris', + Terra = 'terra', + Cheqd = 'cheqd', Chihuahua = 'chihuahua' }