> ## 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.

# Adding Custom EVM Networks

> Configure custom EVM networks for the Swift SDK at initialization.

You can add any EVM network that Dynamic does not support out of the box by passing a list of `GenericNetwork` objects to the `evmNetworks` property in `ClientProps` when initializing the SDK.

> [!WARNING]
>
> The `evmNetworks` list replaces the EVM networks enabled in your Dynamic Console for this session. Pass the full list of networks you want the SDK to use.

## Example

The following example sets Ethereum Mainnet and Polygon as supported networks.

```swift theme={"system"}
import DynamicSDKSwift

let evmNetworks = [
    GenericNetwork(
        blockExplorerUrls: ["https://etherscan.io"],
        chainId: 1,
        iconUrls: ["https://app.dynamic.xyz/assets/networks/eth.svg"],
        name: "Ethereum Mainnet",
        nativeCurrency: NativeCurrency(
            decimals: 18,
            name: "Ether",
            symbol: "ETH"
        ),
        networkId: 1,
        rpcUrls: ["https://mainnet.infura.io/v3/YOUR_INFURA_KEY"],
        vanityName: "ETH Mainnet"
    ),
    GenericNetwork(
        blockExplorerUrls: ["https://polygonscan.com"],
        chainId: 137,
        iconUrls: ["https://app.dynamic.xyz/assets/networks/polygon.svg"],
        name: "Matic Mainnet",
        nativeCurrency: NativeCurrency(
            decimals: 18,
            name: "MATIC",
            symbol: "MATIC"
        ),
        networkId: 137,
        rpcUrls: ["https://polygon-rpc.com"],
        vanityName: "Polygon"
    )
]

let _ = DynamicSDK.initialize(
    props: ClientProps(
        environmentId: "REPLACE_WITH_YOUR_ENV_ID",
        appOrigin: "https://your-app.com",
        evmNetworks: evmNetworks
    )
)
```

> [!NOTE]
>
> In the `GenericNetwork` initializer, `chainId` and `networkId` accept an `Int`, `Int64`, or `String`. `chainName`, `lcdUrl`, `nameService`, `privateCustomerRpcUrls`, and `vanityName` are optional.

## Type Reference

### GenericNetwork

| Attribute | Type | Required/Optional |
| - | - | - |
| blockExplorerUrls | `[String]` | Required |
| chainId | `Int` or `String` | Required |
| iconUrls | `[String]` | Required |
| name | `String` | Required |
| nativeCurrency | `NativeCurrency` | Required |
| networkId | `Int` or `String` | Required |
| privateCustomerRpcUrls | `[String]?` | Optional |
| rpcUrls | `[String]` | Required |
| vanityName | `String?` | Optional |

### NativeCurrency

| Attribute | Type | Required/Optional |
| - | - | - |
| decimals | `Int` | Required |
| name | `String` | Required |
| symbol | `String` | Required |

## Next Steps

* [Network Management](https://docs.dynamic.xyz/docs/swift/wallets/general/network-management.md) - Switch networks and read the current network
* [Send ETH](https://docs.dynamic.xyz/docs/swift/wallets/evm/send-eth.md) - Send transactions on EVM networks


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