> ## 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 title="Recommended: JavaScript SDK with React Hooks" icon="react" color="#4779FE">
  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)](/javascript/reference/react-quickstart) to get started.
</Card>

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

It can be used in the [DynamicContextProvider](/react/reference/providers/dynamiccontextprovider), in the [DynamicWagmiConnector](/react/reference/providers/dynamicwagmiconnector) 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,
})
```
