diff --git a/src/consts/chains.ts b/src/consts/chains.ts index 9083e108..f93a544d 100644 --- a/src/consts/chains.ts +++ b/src/consts/chains.ts @@ -1,31 +1,36 @@ -import { ChainMap, ChainMetadata } from '@hyperlane-xyz/sdk'; +import { ChainMap, ChainMetadata, ChainTechnicalStack, ExplorerFamily } from '@hyperlane-xyz/sdk'; +import { etherToken } from '@hyperlane-xyz/sdk/dist/consts/chainMetadata'; +import { ProtocolType } from '@hyperlane-xyz/utils'; // A map of chain names to ChainMetadata // Chains can be defined here, in chains.json, or in chains.yaml // Chains already in the SDK need not be included here unless you want to override some fields // Schema here: https://github.com/hyperlane-xyz/hyperlane-monorepo/blob/main/typescript/sdk/src/metadata/chainMetadataTypes.ts export const chains: ChainMap = { - // mycustomchain: { - // protocol: ProtocolType.Ethereum, - // chainId: 123123, - // domainId: 123123, - // name: 'mycustomchain', - // displayName: 'My Chain', - // nativeToken: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - // rpcUrls: [{ http: 'https://mycustomchain-rpc.com' }], - // blockExplorers: [ - // { - // name: 'MyCustomScan', - // url: 'https://mycustomchain-scan.com', - // apiUrl: 'https://api.mycustomchain-scan.com/api', - // family: ExplorerFamily.Etherscan, - // }, - // ], - // blocks: { - // confirmations: 1, - // reorgPeriod: 1, - // estimateBlockTime: 10, - // }, - // logoURI: '/logo.svg', - // }, + ancient8: { + blockExplorers: [ + { + apiUrl: 'https://scan.ancient8.gg/api', + family: ExplorerFamily.Blockscout, + name: 'Ancient8 Explorer', + url: 'https://scan.ancient8.gg', + }, + ], + blocks: { + confirmations: 1, + estimateBlockTime: 2, + reorgPeriod: 0, + }, + chainId: 888888888, + displayName: 'Ancient8', + domainId: 888888888, + isTestnet: false, + name: 'ancient8', + nativeToken: etherToken, + gasCurrencyCoinGeckoId: 'ethereum', + protocol: ProtocolType.Ethereum, + rpcUrls: [{ http: 'https://rpc.ancient8.gg' }], + technicalStack: ChainTechnicalStack.Other, + mailbox: '0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7', + }, }; diff --git a/src/consts/tokens.ts b/src/consts/tokens.ts index 6c65f93d..22d56cc4 100644 --- a/src/consts/tokens.ts +++ b/src/consts/tokens.ts @@ -1,9 +1,37 @@ -import { WarpCoreConfig } from '@hyperlane-xyz/sdk'; +import { TokenStandard, WarpCoreConfig } from '@hyperlane-xyz/sdk'; // A list of Warp UI token configs // Tokens can be defined here, in tokens.json, or in tokens.yaml // The input here is typically the output of the Hyperlane CLI warp deploy command export const tokenConfigs: WarpCoreConfig = { - tokens: [], + tokens: [ + { + name: 'USD Coin', + symbol: 'USDC', + decimals: 6, + chainName: 'ethereum', + standard: TokenStandard.EvmHypCollateral, + addressOrDenom: '0x8b4192B9Ad1fCa440A5808641261e5289e6de95D', + collateralAddressOrDenom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + connections: [ + { + token: 'ethereum|ancient8|0x97423A68BAe94b5De52d767a17aBCc54c157c0E5', + }, + ], + }, + { + name: 'USD Coin', + symbol: 'USDC', + decimals: 6, + chainName: 'ancient8', + standard: TokenStandard.EvmHypSynthetic, + addressOrDenom: '0x97423A68BAe94b5De52d767a17aBCc54c157c0E5', + connections: [ + { + token: 'ethereum|ethereum|0x8b4192B9Ad1fCa440A5808641261e5289e6de95D', + }, + ], + }, + ], options: {}, }; diff --git a/src/consts/tokens.yaml b/src/consts/tokens.yaml index 3f05cb30..0f3259c8 100644 --- a/src/consts/tokens.yaml +++ b/src/consts/tokens.yaml @@ -2,23 +2,4 @@ # Configs can be defined here, in tokens.json, or in tokens.ts # The input here is typically the output of the Hyperlane CLI warp deploy command --- -tokens: - # Eth Mainnet HypNative token - - chainName: sepolia - standard: EvmHypNative - decimals: 18 - symbol: ETH - name: Ether - addressOrDenom: '0x767C51a91CC9dEF2F24C35c340649411D6390320' - logoURI: '/logos/weth.png' - connections: - - { token: ethereum|alfajores|0x8bF6Ca2Dca1DF703Cb9144cef6A4d86abA7776C4 } - - chainName: alfajores - standard: EvmHypSynthetic - decimals: 18 - symbol: ETH - name: Ether - addressOrDenom: '0x8bF6Ca2Dca1DF703Cb9144cef6A4d86abA7776C4' - logoURI: '/logos/weth.png' - connections: - - { token: ethereum|sepolia|0x767C51a91CC9dEF2F24C35c340649411D6390320 } +tokens: [] \ No newline at end of file