diff --git a/packages/web/config/chain-infos.ts b/packages/web/config/chain-infos.ts index c03708d020..506d9801a7 100644 --- a/packages/web/config/chain-infos.ts +++ b/packages/web/config/chain-infos.ts @@ -2301,6 +2301,13 @@ chainInfos.push({ coinGeckoId: "polkadot", coinImageUrl: "/tokens/dot.svg", }, + { + coinDenom: "WBNB", + coinMinimalDenom: "wbnb-wei", + coinDecimals: 18, + coinGeckoId: "wbnb", + coinImageUrl: "/tokens/wbnb.svg", + }, ], feeCurrencies: [ { diff --git a/packages/web/config/ibc-assets.ts b/packages/web/config/ibc-assets.ts index 864f88f89f..4c0c56e9d0 100644 --- a/packages/web/config/ibc-assets.ts +++ b/packages/web/config/ibc-assets.ts @@ -31,13 +31,16 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: IS_TESTNET ? "channel-312" : "channel-208", destChannelId: IS_TESTNET ? "channel-22" : "channel-3", coinMinimalDenom: IS_TESTNET ? "uausdc" : "uusdc", - sourceChainNameOverride: IS_TESTNET ? "Ropsten Ethereum" : "Ethereum", + sourceChainNameOverride: IS_TESTNET ? "Goerli Ethereum" : "Ethereum", isVerified: true, originBridgeInfo: { bridge: "axelar" as const, wallets: ["metamask" as const, "walletconnect" as const], method: "deposit-address" as const, - sourceChains: [AxelarSourceChainConfigs.usdc.ethereum], + sourceChains: [ + AxelarSourceChainConfigs.usdc.ethereum, + AxelarSourceChainConfigs.usdc.moonbeam + ], }, }, { @@ -47,7 +50,7 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: IS_TESTNET ? "channel-312" : "channel-208", destChannelId: IS_TESTNET ? "channel-22" : "channel-3", coinMinimalDenom: "weth-wei", - sourceChainNameOverride: IS_TESTNET ? "Ropsten Ethereum" : "Ethereum", + sourceChainNameOverride: IS_TESTNET ? "Goerli Ethereum" : "Ethereum", isVerified: true, originBridgeInfo: { bridge: "axelar" as const, @@ -61,24 +64,28 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "wbtc-satoshi", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=wbtc-satoshi", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=wbtc-satoshi", sourceChainNameOverride: "Ethereum", isVerified: true, + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.wbtc.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "dai-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=dai-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=dai-wei", sourceChainNameOverride: "Ethereum", isVerified: true, + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.dai.ethereum], + }, }, { counterpartyChainId: "cosmoshub-4", @@ -94,6 +101,20 @@ export const IBCAssetInfos: (IBCAsset & { coinMinimalDenom: "basecro", isVerified: true, }, + { + counterpartyChainId: "axelar-dojo-1", + sourceChannelId: "channel-208", + destChannelId: "channel-3", + coinMinimalDenom: "wbnb-wei", + sourceChainNameOverride: "Binance Smart Chain", + isVerified: false, + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.wbnb.binance], + }, + }, { counterpartyChainId: "juno-1", sourceChannelId: "channel-42", @@ -106,12 +127,14 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "dot-planck", - depositUrlOverride: - "https://satellite.money/?source=moonbeam&destination=osmosis&asset_denom=dot-planck", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=moonbeam&asset_denom=dot-planck", sourceChainNameOverride: "Moonbeam", isVerified: true, + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.dot.moonbeam], + }, }, { counterpartyChainId: "evmos_9001-2", @@ -472,22 +495,26 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "uusdt", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=uusdt", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=uusdt", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.usdt.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "frax-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=frax-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=frax-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.frax.ethereum], + }, }, { counterpartyChainId: "gravity-bridge-3", @@ -623,12 +650,14 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "link-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=link-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=link-wei", sourceChainNameOverride: "Ethereum", isVerified: true, + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.link.ethereum], + }, }, { counterpartyChainId: "genesis_29-2", @@ -641,89 +670,105 @@ export const IBCAssetInfos: (IBCAsset & { sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "aave-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=aave-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=aave-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.aave.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "ape-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=ape-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=ape-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.ape.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "axs-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=axs-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=axs-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.axs.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "mkr-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=mkr-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=mkr-wei", sourceChainNameOverride: "Ethereum", isVerified: true, + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.mkr.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "rai-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=rai-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=rai-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.rai.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "shib-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=shib-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=shib-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.shib.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "uni-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=uni-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=uni-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.uni.ethereum], + }, }, { counterpartyChainId: "axelar-dojo-1", sourceChannelId: "channel-208", destChannelId: "channel-3", coinMinimalDenom: "xcn-wei", - depositUrlOverride: - "https://satellite.money/?source=ethereum&destination=osmosis&asset_denom=xcn-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=ethereum&asset_denom=xcn-wei", sourceChainNameOverride: "Ethereum", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.xcn.ethereum], + }, }, { counterpartyChainId: "kaiyo-1", @@ -779,16 +824,20 @@ export const IBCAssetInfos: (IBCAsset & { "ki1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctmsd9kgha", }, { - counterpartyChainId: "axelar-dojo-1", - sourceChannelId: "channel-208", - destChannelId: "channel-3", - coinMinimalDenom: "wglmr-wei", - depositUrlOverride: - "https://satellite.money/?source=moonbeam&destination=osmosis&asset_denom=wglmr-wei", - withdrawUrlOverride: - "https://satellite.money/?source=osmosis&destination=moonbeam&asset_denom=wglmr-wei", - sourceChainNameOverride: "Moonbeam", - }, + counterpartyChainId: IS_TESTNET + ? "axelar-testnet-lisbon-3" + : "axelar-dojo-1", + sourceChannelId: IS_TESTNET ? "channel-312" : "channel-208", + destChannelId: IS_TESTNET ? "channel-22" : "channel-3", + coinMinimalDenom: IS_TESTNET ? "wdev-wei" : "wglmr-wei", + sourceChainNameOverride: IS_TESTNET ? "Moonbase Alpha" : "Moonbeam", + originBridgeInfo: { + bridge: "axelar" as const, + wallets: ["metamask" as const, "walletconnect" as const], + method: "deposit-address" as const, + sourceChains: [AxelarSourceChainConfigs.wglmr.moonbeam], + }, + }, { counterpartyChainId: "juno-1", sourceChannelId: "channel-169", diff --git a/packages/web/integrations/axelar/source-chain-config.ts b/packages/web/integrations/axelar/source-chain-config.ts index 7c1ca64d0c..7054a429b6 100644 --- a/packages/web/integrations/axelar/source-chain-config.ts +++ b/packages/web/integrations/axelar/source-chain-config.ts @@ -11,55 +11,197 @@ export const SourceChainConfigs: { usdc: { ethereum: { id: IS_TESTNET - ? ("Ropsten Test Network" as const) + ? ("ethereum-2" as const) : ("Ethereum" as const), erc20ContractAddress: IS_TESTNET - ? "0x526f0A95EDC3DF4CBDB7bb37d4F7Ed451dB8e369" + ? "0x254d06f33bDc5b8ee05b2ea472107E300226659A" : "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // test: 'aUSDC' on metamask/etherscan logoUrl: "/networks/ethereum.svg", transferFeeMinAmount: IS_TESTNET ? "150000" : "10500000", // From https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee }, - bnbChain: { - id: "Binance" as const, - erc20ContractAddress: "0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3", - logoUrl: "/networks/binance.svg", - transferFeeMinAmount: IS_TESTNET ? "150000" : "1500000", - }, avalanche: { id: "Avalanche" as const, - erc20ContractAddress: "0xfaB550568C688d5D8A52C7d794cb93Edc26eC0eC", + erc20ContractAddress: IS_TESTNET + ? "0x57F1c63497AEe0bE305B8852b354CEc793da43bB" + : "0xfaB550568C688d5D8A52C7d794cb93Edc26eC0eC", logoUrl: "/networks/avalanche.svg", transferFeeMinAmount: IS_TESTNET ? "150000" : "1500000", }, - polygon: { - id: "Polygon" as const, - erc20ContractAddress: "0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed", - logoUrl: "/networks/polygon.svg", + binance: { + id: "binance" as const, + erc20ContractAddress: IS_TESTNET + ? "0xc2fA98faB811B785b81c64Ac875b31CC9E40F9D2" + : "0x4268B8F0B87b6Eae5d897996E6b845ddbD99Adf3", + logoUrl: "/networks/binance.svg", transferFeeMinAmount: IS_TESTNET ? "150000" : "1500000", }, fantom: { id: "Fantom" as const, - erc20ContractAddress: "0x1B6382DBDEa11d97f24495C9A90b7c88469134a4", + erc20ContractAddress: IS_TESTNET + ? "0x75Cc4fDf1ee3E781C1A3Ee9151D5c6Ce34Cf5C61" + : "0x1B6382DBDEa11d97f24495C9A90b7c88469134a4", logoUrl: "/networks/fantom.svg", transferFeeMinAmount: IS_TESTNET ? "150000" : "1500000", }, moonbeam: { id: "Moonbeam" as const, - erc20ContractAddress: "0xCa01a1D0993565291051daFF390892518ACfAD3A", + erc20ContractAddress: IS_TESTNET + ? "0xD1633F7Fb3d716643125d6415d4177bC36b7186b" + : "0xCa01a1D0993565291051daFF390892518ACfAD3A", logoUrl: "/networks/moonbeam.svg", transferFeeMinAmount: IS_TESTNET ? "150000" : "1500000", }, + polygon: { + id: "Polygon" as const, + erc20ContractAddress: IS_TESTNET + ? "0x2c852e740B62308c46DD29B982FBb650D063Bd07" + : "0x750e4C4984a9e0f12978eA6742Bc1c5D248f40ed", + logoUrl: "/networks/polygon.svg", + transferFeeMinAmount: IS_TESTNET ? "150000" : "1500000", + }, }, weth: { ethereum: { id: IS_TESTNET - ? ("Ropsten Test Network" as const) + ? ("ethereum-2" as const) : ("Ethereum" as const), erc20ContractAddress: IS_TESTNET - ? "0xc778417E063141139Fce010982780140Aa0cD5Ab" + ? "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6" : "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", logoUrl: "/networks/ethereum.svg", - transferFeeMinAmount: IS_TESTNET ? "60000000000000" : "6300000000000000", + transferFeeMinAmount: IS_TESTNET ? "100000000000000" : "6300000000000000", + }, + }, + wglmr: { + moonbeam: { + id: "Moonbeam" as const, + erc20ContractAddress: IS_TESTNET + ? "0x1436aE0dF0A8663F18c0Ec51d7e2E46591730715" + : "0xAcc15dC74880C9944775448304B263D191c6077F", + logoUrl: "/networks/moonbeam.svg", + transferFeeMinAmount: IS_TESTNET ? "40000000000000000" : "2000000000000000000", + }, + }, + wbtc: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "50000", + }, + }, + dai: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x6B175474E89094C44Da98b954EedeAC495271d0F", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "10000000000000000000", + }, + }, + dot: { + moonbeam: { + id: ("Moonbeam" as const), + erc20ContractAddress: "0xFfFFfFff1FcaCBd218EDc0EbA20Fc2308C778080", + logoUrl: "/networks/moonbeam.svg", + transferFeeMinAmount: "1000000000", + }, + }, + usdt: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0xdAC17F958D2ee523a2206206994597C13D831ec7", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "10000000", + }, + }, + frax: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x853d955aCEf822Db058eb8505911ED77F175b99e", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "10000000000000000000", + }, + }, + link: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x514910771AF9Ca656af840dff83E8264EcF986CA", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "2000000000000000000", + }, + }, + aave: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "200000000000000000", + }, + }, + ape: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x4d224452801ACEd8B2F0aebE155379bb5D594381", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "2000000000000000000", + }, + }, + axs: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "700000000000000000", + }, + }, + mkr: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "10000000000000000", + }, + }, + rai: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "3000000000000000000", + }, + }, + shib: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "1000000000000000000000000", + }, + }, + uni: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "2000000000000000000", + }, + }, + xcn: { + ethereum: { + id: ("Ethereum" as const), + erc20ContractAddress: "0xA2cd3D43c775978A96BdBf12d733D5A1ED94fb18", + logoUrl: "/networks/ethereum.svg", + transferFeeMinAmount: "100000000000000000000", + }, + }, + wbnb: { + binance: { + id: ("binance" as const), + erc20ContractAddress: IS_TESTNET + ? "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd" + : "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + logoUrl: "/networks/binance.svg", + transferFeeMinAmount: IS_TESTNET ? "500000000000000" : "5000000000000000", }, }, }; diff --git a/packages/web/integrations/axelar/types.ts b/packages/web/integrations/axelar/types.ts index 854fef816e..d9c5b3a795 100644 --- a/packages/web/integrations/axelar/types.ts +++ b/packages/web/integrations/axelar/types.ts @@ -1,3 +1,5 @@ +const IS_TESTNET = process.env.NEXT_PUBLIC_IS_TESTNET === "true"; + export interface AxelarBridgeConfig { /** Currently just via deposit address, future could be gateway contract call. */ method: "deposit-address"; @@ -15,29 +17,46 @@ export interface AxelarBridgeConfig { } /** See: https://docs.axelar.dev/dev/build/chain-names/mainnet + * See: https://docs.axelar.dev/dev/build/chain-names/testnet * Testnet: https://axelartest-lcd.quickapi.com/axelar/nexus/v1beta1/chains?status=1 */ export type SourceChain = - | "Ethereum" - | "Ropsten Test Network" + | "aurora" | "Avalanche" + | "binance" + | "Ethereum" + | "ethereum-2" | "Fantom" - | "Polygon" | "Moonbeam" - | "Binance"; + | "Polygon"; /** Maps eth client chainIDs => axelar chain ids. + * + * ethClientChainIDs must be specified in ../ethereuem/types.ts::ChainNames{} to map the name to a chainID, which is in turn used to add the network to EVM-compatible wallets, like Metamask. + * + * AxelarChainIds must be specified in SourceChain{} and are used in ./source-chain-configs.ts::SourceChainConfigs{} as ::::id values. * * Values not included as keys are assumed to be the same across chainlist and Axelar. */ export const EthClientChainIds_AxelarChainIdsMap: { [ethClientChainIds: string]: SourceChain; -} = { - "Ropsten Test Network": "Ethereum", - "Avalanche C-Chain": "Avalanche", - "Binance Smart Chain": "Binance", - "Fantom Opera": "Fantom", -}; +} = IS_TESTNET ? + { + "Aurora Testnet": "aurora", + "Avalanche Fuji Testnet": "Avalanche", + "Binance Smart Chain Testnet": "binance", + "Goerli Test Network": "ethereum-2", + "Fantom Testnet": "Fantom", + "Moonbase Alpha": "Moonbeam", + "Mumbai": "Polygon", + } : { + "Avalanche C-Chain": "Avalanche", + "Binance Smart Chain Mainnet": "binance", + "Ethereum Main Network": "Ethereum", + "Fantom Opera": "Fantom", + "Moonbeam Mainnet": "Moonbeam", + "Polygon Mainnet": "Polygon", + }; export type SourceChainConfig = { /** Axelar-defined identifier. */ diff --git a/packages/web/integrations/ethereum/metamask.ts b/packages/web/integrations/ethereum/metamask.ts index 34f0b582dd..7ff98b5bed 100644 --- a/packages/web/integrations/ethereum/metamask.ts +++ b/packages/web/integrations/ethereum/metamask.ts @@ -246,7 +246,7 @@ export class ObservableMetamask implements EthWallet { makeExplorerUrl = (txHash: string) => IS_TESTNET - ? `https://ropsten.etherscan.io/tx/${txHash}` + ? `https://goerli.etherscan.io/tx/${txHash}` : `https://etherscan.io/tx/${txHash}`; // ONBOARDING diff --git a/packages/web/integrations/ethereum/types.ts b/packages/web/integrations/ethereum/types.ts index d67ffc2164..516f5eb551 100644 --- a/packages/web/integrations/ethereum/types.ts +++ b/packages/web/integrations/ethereum/types.ts @@ -24,23 +24,29 @@ export interface EthWallet export type SendFn = Pick["send"]; -/** Ethereum chains: https://docs.metamask.io/guide/ethereum-provider.html#chain-ids */ export const ChainNames: { [chainId: string]: string } = { - "0x1": "Ethereum", + /** Ethereum chains: https://docs.metamask.io/guide/ethereum-provider.html#chain-ids */ + "0x1": "Ethereum Main Network", "0x3": "Ropsten Test Network", "0x4": "Rinkeby Test Network", "0x5": "Goerli Test Network", "0x2a": "Kovan Test Network", // manually searched and added. Source: https://chainlist.org/ - "0x38": "Binance Smart Chain", + "0x38": "Binance Smart Chain Mainnet", + "0x61": "Binance Smart Chain Testnet", "0x64": "Gnosis", - "0x89": "Polygon", + "0x89": "Polygon Mainnet", + "0x13881": "Mumbai", "0xfa": "Fantom Opera", - "0x504": "Moonbeam", + "0xfa2": "Fantom Testnet", + "0x504": "Moonbeam Mainnet", + "0x507": "Moonbase Alpha", "0x2329": "Evmos", "0xa86a": "Avalanche C-Chain", - "0x4e454152": "Aurora", + "0xa869": "Avalanche Fuji Testnet", + "0x4e454152": "Aurora Mainnet", + "0x4e454153": "Aurora Testnet", }; export const ChainNetworkConfigs: { [chainId: string]: object } = {}; diff --git a/packages/web/public/tokens/wbnb.svg b/packages/web/public/tokens/wbnb.svg new file mode 100644 index 0000000000..f39dba1be1 --- /dev/null +++ b/packages/web/public/tokens/wbnb.svg @@ -0,0 +1,20 @@ + + + + + + + + + + +