> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# EvmNetwork

> [card] Recommended: JavaScript SDK with React Hooks
>
> For new React apps, we recommend the JavaScript SDK with React Hooks (`@dynamic-labs-sdk/react-hooks`) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the [React quickstart (JavaScript SDK)](https://docs.dynamic.xyz/docs/javascript/reference/react-quickstart.md) to get started.

Object which represents a network on the Ethereum Virtual Machine (EVM).

It can be used in the [DynamicContextProvider](https://docs.dynamic.xyz/docs/react/reference/providers/dynamiccontextprovider.md), in the [DynamicWagmiConnector](https://docs.dynamic.xyz/docs/react/reference/providers/dynamicwagmiconnector.md) or in the React Native `Client`.

## 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 |
| iconUrl | `string` | Optional |
| name | `string` | Required |
| symbol | `string` | Required |

## React Example Usage

```jsx theme={"system"}
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>
)
```

## React Native Example Usage

```typescript theme={"system"}
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',
  },
]

const dynamicClient = createClient({
  environmentId: 'XXXX',
  networks: evmNetworks,
})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.