> ## Documentation Index
> Fetch the complete documentation index at: https://www.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 dashboard for this session. Pass the full list of networks you want the SDK to use.
</Warning>

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

## 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](/docs/swift/wallets/general/network-management) - Switch networks and read the current network
* [Send ETH](/docs/swift/wallets/evm/send-eth) - Send transactions on EVM networks
