|
1 | | -import { extractChain } from 'viem'; |
| 1 | +import { defineChain, extractChain } from 'viem'; |
2 | 2 | import type { Chain } from 'viem'; |
3 | 3 | import * as chains from 'viem/chains'; |
4 | 4 |
|
5 | | -const ALL_CHAINS = [...Object.values(chains)]; |
| 5 | +/** |
| 6 | + * Robinhood Chain is not yet included in viem/chains. |
| 7 | + * Network details: https://docs.robinhood.com/chain/add-network-to-wallet/ |
| 8 | + */ |
| 9 | +export const robinhoodChain = defineChain({ |
| 10 | + id: 4663, |
| 11 | + name: 'Robinhood Chain', |
| 12 | + nativeCurrency: { |
| 13 | + name: 'Ether', |
| 14 | + symbol: 'ETH', |
| 15 | + decimals: 18, |
| 16 | + }, |
| 17 | + rpcUrls: { |
| 18 | + default: { |
| 19 | + http: ['https://rpc.mainnet.chain.robinhood.com'], |
| 20 | + }, |
| 21 | + }, |
| 22 | + blockExplorers: { |
| 23 | + default: { |
| 24 | + name: 'Robinhood Chain Explorer', |
| 25 | + url: 'https://robinhoodchain.blockscout.com', |
| 26 | + }, |
| 27 | + }, |
| 28 | +}); |
| 29 | + |
| 30 | +/** |
| 31 | + * Robinhood Chain Testnet is not yet included in viem/chains. |
| 32 | + * Network details: https://docs.robinhood.com/chain/add-network-to-wallet/ |
| 33 | + */ |
| 34 | +export const robinhoodChainTestnet = defineChain({ |
| 35 | + id: 46630, |
| 36 | + name: 'Robinhood Chain Testnet', |
| 37 | + nativeCurrency: { |
| 38 | + name: 'Ether', |
| 39 | + symbol: 'ETH', |
| 40 | + decimals: 18, |
| 41 | + }, |
| 42 | + rpcUrls: { |
| 43 | + default: { |
| 44 | + http: ['https://rpc.testnet.chain.robinhood.com'], |
| 45 | + }, |
| 46 | + }, |
| 47 | + blockExplorers: { |
| 48 | + default: { |
| 49 | + name: 'Robinhood Chain Testnet Explorer', |
| 50 | + url: 'https://explorer.testnet.chain.robinhood.com', |
| 51 | + }, |
| 52 | + }, |
| 53 | +}); |
| 54 | + |
| 55 | +const ALL_CHAINS = [ |
| 56 | + ...Object.values(chains), |
| 57 | + robinhoodChain, |
| 58 | + robinhoodChainTestnet, |
| 59 | +]; |
6 | 60 |
|
7 | 61 | const DEFAULT_CHAINS = [chains.sepolia]; |
8 | 62 |
|
|
0 commit comments