evmNetworks
parameter inside the DynamicContextProvider
settings
EvmNetwork
to the DynamicContextProvider
settings. The reference for an EvmNetwork can be found here. The following example sets the Ethereum mainnet and Polygon as supported networks for the application. A comprehensive list of networks can be found at chainlist.org
Method | Description |
---|---|
supportsNetworkSwitching(): boolean | whether the connector supports network switching. |
switchNetwork({ networkChainId, networkName }: { networkChainId?: number; networkName?: string; }): Promise<void> | switch to another network by provider either the network name or chain id specified in the list of EvmNetwork |
switchNetwork
with a connector supporting network switching, the SDK will either request the user to confirm the network switch or add the network if it was not previously set.