Objects
EvmNetwork
Object which represents a network on the Ethereum Virtual Machine (EVM). It can be used in the DynamicContextProvider or in the DynamicWagmiConnector.
Definition
Attribute | Value | Required/Optional |
---|---|---|
blockExplorerUrls | string[] | Required |
chainId | number | Required |
name | string | Required |
iconUrls | string[] | Required |
nativeCurrency | NativeCurrency | Required |
networkId | number | Required |
privateCustomerRpcUrls | string[] | Optional |
rpcUrls | string[] | Required |
vanityName | string | Optional |
NativeCurrency
Attribute | Value | Required/Optional |
---|---|---|
decimals | number | Required |
name | string | Required |
symbol | string | Required |
denom | string | Optional |
Example Usage
const evmNetworks = [
{
blockExplorerUrls: ['https://etherscan.io/'],
chainId: 1,
name: 'Ethereum Mainnet',
iconUrls: ['https://app.dynamic.xyz/assets/networks/eth.svg'],
nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' },
networkId: 1,
privateCustomerRpcUrls: ['https://mainnet.infura.io/v3/your-api-key'],
rpcUrls: ['https://cloudflare-eth.com'],
vanityName: 'Ethereum',
},
]
return (
<DynamicContextProvider
settings={{
environmentId: 'XXXX',
overrides: { evmNetworks },
}}
>
...
</DynamicContextProvider>
)
Was this page helpful?