Object which represents a network on the Ethereum Virtual Machine (EVM). It can be used in the DynamicContextProvider or in the DynamicWagmiConnector.

Definition

AttributeValueRequired/Optional
blockExplorerUrlsstring[]Required
chainIdnumberRequired
namestringRequired
iconUrlsstring[]Required
nativeCurrencyNativeCurrencyRequired
networkIdnumberRequired
privateCustomerRpcUrlsstring[]Optional
rpcUrlsstring[]Required
vanityNamestringOptional

NativeCurrency

AttributeValueRequired/Optional
decimalsnumberRequired
namestringRequired
symbolstringRequired
denomstringOptional

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>
)