From 777b24d9c9e69d08451bf601f869e3d9b8b857e8 Mon Sep 17 00:00:00 2001 From: Trevor Porter Date: Fri, 22 Mar 2024 17:52:34 +0000 Subject: [PATCH] ancient8 --- src/consts/chains.ts | 53 ++++++++++++++++++++++++-------------------- src/consts/tokens.ts | 32 ++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 26 deletions(-) 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..cd42a687 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: '0x9f5cF636b4F2DC6D83c9d21c8911876C235DbC9f', + collateralAddressOrDenom: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', + connections: [ + { + token: 'ethereum|ancient8|0xB3fCcD379ad66CED0c91028520C64226611A48c9', + }, + ], + }, + { + name: 'USD Coin', + symbol: 'USDC', + decimals: 6, + chainName: 'ancient8', + standard: TokenStandard.EvmHypSynthetic, + addressOrDenom: '0xB3fCcD379ad66CED0c91028520C64226611A48c9', + connections: [ + { + token: 'ethereum|ethereum|0x9f5cF636b4F2DC6D83c9d21c8911876C235DbC9f', + }, + ], + }, + ], options: {}, };