from typing import Dict, NamedTuple DEPOSIT_CLI_VERSION = '2.2.0' class BaseChainSetting(NamedTuple): NETWORK_NAME: str GENESIS_FORK_VERSION: bytes MAINNET = 'mainnet' PRATER = 'prater' KILN = 'kiln' ROPSTEN = 'ropsten' SEPOLIA = 'sepolia' # Mainnet setting MainnetSetting = BaseChainSetting(NETWORK_NAME=MAINNET, GENESIS_FORK_VERSION=bytes.fromhex('00000000')) # Ropsten setting RopstenSetting = BaseChainSetting(NETWORK_NAME=ROPSTEN, GENESIS_FORK_VERSION=bytes.fromhex('80000069')) # Sepolia setting SepoliaSetting = BaseChainSetting(NETWORK_NAME=SEPOLIA, GENESIS_FORK_VERSION=bytes.fromhex('90000069')) # Testnet (spec v1.0.1) PraterSetting = BaseChainSetting(NETWORK_NAME=PRATER, GENESIS_FORK_VERSION=bytes.fromhex('00001020')) # Merge Testnet (spec v1.1.9) KilnSetting = BaseChainSetting(NETWORK_NAME=KILN, GENESIS_FORK_VERSION=bytes.fromhex('70000069')) ALL_CHAINS: Dict[str, BaseChainSetting] = { MAINNET: MainnetSetting, PRATER: PraterSetting, KILN: KilnSetting, ROPSTEN: RopstenSetting, SEPOLIA: SepoliaSetting, } def get_chain_setting(chain_name: str = MAINNET) -> BaseChainSetting: return ALL_CHAINS[chain_name]