|
| 1 | +import { |
| 2 | + Arbitrum as ArbitrumAsset, |
| 3 | + Avalanche as AvalancheAsset, |
| 4 | + BSC as BSCAsset, |
| 5 | + Goerli as GoerliAsset, |
| 6 | + Hardhat as HardhatAsset, |
| 7 | + Holesky as HoleskyAsset, |
| 8 | + Localhost as LocalhostAsset, |
| 9 | + Mainnet as MainnetAsset, |
| 10 | + Optimism as OptimismAsset, |
| 11 | + Polygon as PolygonAsset, |
| 12 | + Scroll as ScrollAsset, |
| 13 | + ScrollSepolia as ScrollSepoliaAsset, |
| 14 | + Sepolia as SepoliaAsset, |
| 15 | + X1Testnet as X1TestnetAsset, |
| 16 | +} from '@ant-design/web3-assets'; |
| 17 | +import { |
| 18 | + arbitrum, |
| 19 | + avalanche, |
| 20 | + bsc, |
| 21 | + goerli, |
| 22 | + hardhat, |
| 23 | + holesky, |
| 24 | + localhost, |
| 25 | + mainnet, |
| 26 | + optimism, |
| 27 | + polygon, |
| 28 | + scroll, |
| 29 | + scrollSepolia, |
| 30 | + sepolia, |
| 31 | +} from 'wagmi/chains'; |
| 32 | + |
| 33 | +import type { ChainAssetWithWagmiChain } from './interface'; |
| 34 | + |
| 35 | +export const Mainnet: ChainAssetWithWagmiChain = { |
| 36 | + ...MainnetAsset, |
| 37 | + wagmiChain: mainnet, |
| 38 | +}; |
| 39 | + |
| 40 | +export const Goerli: ChainAssetWithWagmiChain = { |
| 41 | + ...GoerliAsset, |
| 42 | + wagmiChain: goerli, |
| 43 | +}; |
| 44 | + |
| 45 | +export const Sepolia: ChainAssetWithWagmiChain = { |
| 46 | + ...SepoliaAsset, |
| 47 | + wagmiChain: sepolia, |
| 48 | +}; |
| 49 | + |
| 50 | +export const Holesky: ChainAssetWithWagmiChain = { |
| 51 | + ...HoleskyAsset, |
| 52 | + wagmiChain: holesky, |
| 53 | +}; |
| 54 | + |
| 55 | +export const Polygon: ChainAssetWithWagmiChain = { |
| 56 | + ...PolygonAsset, |
| 57 | + wagmiChain: polygon, |
| 58 | +}; |
| 59 | + |
| 60 | +export const BSC: ChainAssetWithWagmiChain = { |
| 61 | + ...BSCAsset, |
| 62 | + wagmiChain: bsc, |
| 63 | +}; |
| 64 | + |
| 65 | +export const Arbitrum: ChainAssetWithWagmiChain = { |
| 66 | + ...ArbitrumAsset, |
| 67 | + wagmiChain: arbitrum, |
| 68 | +}; |
| 69 | + |
| 70 | +export const Optimism: ChainAssetWithWagmiChain = { |
| 71 | + ...OptimismAsset, |
| 72 | + wagmiChain: optimism, |
| 73 | +}; |
| 74 | + |
| 75 | +export const Avalanche: ChainAssetWithWagmiChain = { |
| 76 | + ...AvalancheAsset, |
| 77 | + wagmiChain: avalanche, |
| 78 | +}; |
| 79 | + |
| 80 | +// OKX X1: https://www.okx.com/cn/x1/docs/developer/build-on-x1/quickstart |
| 81 | +export const X1Testnet: ChainAssetWithWagmiChain = { |
| 82 | + ...X1TestnetAsset, |
| 83 | + wagmiChain: { |
| 84 | + id: X1TestnetAsset.id, |
| 85 | + name: X1TestnetAsset.name, |
| 86 | + nativeCurrency: { name: 'OKB', symbol: 'OKB', decimals: 18 }, |
| 87 | + rpcUrls: { |
| 88 | + default: { |
| 89 | + http: ['https://testrpc.x1.tech'], |
| 90 | + }, |
| 91 | + }, |
| 92 | + blockExplorers: { |
| 93 | + default: { |
| 94 | + name: 'X1TestnetScan', |
| 95 | + url: 'https://www.okx.com/explorer/x1-test', |
| 96 | + }, |
| 97 | + }, |
| 98 | + }, |
| 99 | +}; |
| 100 | + |
| 101 | +export const Scroll: ChainAssetWithWagmiChain = { |
| 102 | + ...ScrollAsset, |
| 103 | + wagmiChain: scroll, |
| 104 | +}; |
| 105 | + |
| 106 | +export const ScrollSepolia: ChainAssetWithWagmiChain = { |
| 107 | + ...ScrollSepoliaAsset, |
| 108 | + wagmiChain: scrollSepolia, |
| 109 | +}; |
| 110 | + |
| 111 | +export const Hardhat: ChainAssetWithWagmiChain = { |
| 112 | + ...HardhatAsset, |
| 113 | + wagmiChain: hardhat, |
| 114 | +}; |
| 115 | + |
| 116 | +export const Localhost: ChainAssetWithWagmiChain = { |
| 117 | + ...LocalhostAsset, |
| 118 | + wagmiChain: localhost, |
| 119 | +}; |
0 commit comments