eth_networks
Ethereum Network Configuration Module
Provides built-in configurations for popular EVM-compatible networks with default public RPC endpoints. Supports custom network configuration.
- class eth_networks.NetworkConfig(name, chain_id, rpc_url, native_symbol, native_decimals=18, explorer_url=None, is_testnet=False)[source]
Bases:
objectConfiguration for an EVM-compatible network.
- Parameters:
- eth_networks.get_network(network_name_or_id)[source]
Retrieve the network.
- Parameters:
network_name_or_id (
str) – The network name or id value.- Returns:
The result.
- Return type:
- eth_networks.get_network_by_chain_id(chain_id)[source]
Retrieve the network by chain id.
- Parameters:
chain_id (
int) – The chain id value.- Returns:
The result.
- Return type:
- eth_networks.create_custom_network(name, chain_id, rpc_url, native_symbol='ETH', native_decimals=18, explorer_url=None, is_testnet=False)[source]
Create a new custom network.