UNPKG

@hyperlane-xyz/sdk

Version:

The official SDK for the Hyperlane Network

239 lines 6.74 kB
import { ProtocolType } from '@hyperlane-xyz/utils'; import { ExplorerFamily } from '../metadata/chainMetadataTypes.js'; export var TestChainName; (function (TestChainName) { TestChainName["test1"] = "test1"; TestChainName["test2"] = "test2"; TestChainName["test3"] = "test3"; TestChainName["test4"] = "test4"; })(TestChainName || (TestChainName = {})); export const testChains = Object.values(TestChainName); export const test1 = { blockExplorers: [ { apiKey: 'fakekey', apiUrl: 'https://api.etherscan.io/api', family: ExplorerFamily.Etherscan, name: 'Etherscan', url: 'https://etherscan.io', }, ], blocks: { confirmations: 1, estimateBlockTime: 3, reorgPeriod: 0, }, chainId: 9913371, displayName: 'Test 1', domainId: 9913371, isTestnet: true, name: 'test1', nativeToken: { decimals: 18, name: 'Ether', symbol: 'ETH' }, protocol: ProtocolType.Ethereum, rpcUrls: [{ http: 'http://127.0.0.1:8545' }], }; export const test2 = { ...test1, blocks: { confirmations: 1, estimateBlockTime: 3, reorgPeriod: 1, }, chainId: 9913372, displayName: 'Test 2', domainId: 9913372, name: 'test2', }; export const test3 = { ...test1, blocks: { confirmations: 1, estimateBlockTime: 3, reorgPeriod: 2, }, chainId: 9913373, displayName: 'Test 3', domainId: 9913373, name: 'test3', }; export const test4 = { ...test1, chainId: 31337, displayName: 'Test 4', domainId: 31337, name: 'test4', }; export const testXERC20 = { ...test1, chainId: 9913374, domainId: 9913374, displayName: 'Test XERC20', name: 'testxerc20', }; export const testVSXERC20 = { ...test1, chainId: 9913375, domainId: 9913375, displayName: 'Test VSXERC20', name: 'testvsxerc20', }; export const testXERC20Lockbox = { ...test1, chainId: 9913376, domainId: 9913376, displayName: 'Test XERC20Lockbox', name: 'testxerc20lockbox', }; export const testOwnerCollateral = { ...test1, chainId: 9913380, domainId: 9913380, displayName: 'Test OwnerCollateral', name: 'testownercollateral', }; export const testRebaseCollateral = { ...test1, chainId: 9913381, domainId: 9913381, displayName: 'Test RebaseCollateral', name: 'testrebasecollateral', }; export const testScale1 = { ...test1, chainId: 9913377, domainId: 9913377, displayName: 'Test Scale 1', name: 'testscale1', }; export const testScale2 = { ...test1, chainId: 9913378, domainId: 9913378, displayName: 'Test Scale 2', name: 'testscale2', }; export const testCollateralFiat = { ...test1, chainId: 9913379, domainId: 9913379, displayName: 'Test Collateral Fiat', name: 'testcollateralfiat', }; export const testChainMetadata = { test1, test2, test3, test4, }; export const testCosmosChain = { bech32Prefix: 'testcosmos', blockExplorers: [ { apiUrl: 'https://www.mintscan.io/cosmos', family: ExplorerFamily.Other, name: 'Mintscan', url: 'https://www.mintscan.io/cosmos', }, ], chainId: 'testcosmos', domainId: 123456789, grpcUrls: [], name: 'testcosmos', nativeToken: { decimals: 6, denom: 'uatom', name: 'Atom', symbol: 'ATOM' }, protocol: ProtocolType.Cosmos, restUrls: [], rpcUrls: [{ http: 'http://127.0.0.1:1317' }], slip44: 118, }; export const testSealevelChain = { blockExplorers: [ { apiUrl: 'https://explorer.solana.com?cluster=devnet', family: ExplorerFamily.Other, name: 'Solana Explorer', url: 'https://explorer.solana.com?cluster=devnet', }, ], chainId: 987654321, domainId: 987654321, name: 'testsealevel', nativeToken: { decimals: 9, name: 'Sol', symbol: 'SOL' }, protocol: ProtocolType.Sealevel, rpcUrls: [{ http: 'http://127.0.0.1:8899' }], }; export const testStarknetChain = { chainId: '0x534e5f5345504f4c4941', domainId: 5854809, name: 'starknetdevnet', nativeToken: { decimals: 18, denom: '0x49D36570D4E46F48E99674BD3FCC84644DDD6B96F7C741B1562B82F9E004DC7', name: 'Ether', symbol: 'ETH', }, protocol: ProtocolType.Starknet, rpcUrls: [ { http: 'http://127.0.0.1:5050', }, ], blockExplorers: [ { apiUrl: 'https://sepolia.voyager.online/api', family: ExplorerFamily.Voyager, name: 'Starknet Sepolia Explorer', url: 'https://sepolia.voyager.online', }, ], }; // Address of the ENS DAO TimelockController contract on Ethereum mainnet, // used for integration tests that exercise the block explorer path. // Chosen because Base's Blockscout `getcontractcreation` endpoint has been // observed to hang in CI, while eth.blockscout.com is reliable. export const KNOWN_ETHEREUM_TIMELOCK_CONTRACT = '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7'; // Ethereum mainnet metadata for testing with a live block explorer export const ethereumTestChain = { blockExplorers: [ { apiUrl: 'https://eth.blockscout.com/api', family: ExplorerFamily.Blockscout, name: 'Ethereum Explorer', url: 'https://eth.blockscout.com', }, ], blocks: { confirmations: 3, estimateBlockTime: 12, reorgPeriod: 14 }, chainId: 1, displayName: 'Ethereum', domainId: 1, gasCurrencyCoinGeckoId: 'ethereum', name: 'ethereum', nativeToken: { decimals: 18, name: 'Ether', symbol: 'ETH', }, protocol: ProtocolType.Ethereum, rpcUrls: [ { http: 'https://ethereum-rpc.publicnode.com' }, { http: 'https://eth.llamarpc.com' }, { http: 'https://1rpc.io/eth' }, { http: 'https://ethereum.blockpi.network/v1/rpc/public' }, { http: 'https://eth.drpc.org' }, ], }; export const multiProtocolTestChainMetadata = { ...testChainMetadata, testcosmos: testCosmosChain, testsealevel: testSealevelChain, testxerc20: testXERC20, testvsxerc20: testVSXERC20, testxerc20lockbox: testXERC20Lockbox, starknetdevnet: testStarknetChain, testscale1: testScale1, testscale2: testScale2, testcollateralfiat: testCollateralFiat, testownercollateral: testOwnerCollateral, testrebasecollateral: testRebaseCollateral, }; export const multiProtocolTestChains = Object.keys(multiProtocolTestChainMetadata); //# sourceMappingURL=testChains.js.map