mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2024-12-23 11:57:19 +00:00
29 lines
552 B
Python
29 lines
552 B
Python
from typing import Dict, NamedTuple
|
|
|
|
|
|
class BaseChainSetting(NamedTuple):
|
|
GENESIS_FORK_VERSION: bytes
|
|
|
|
|
|
MainnetSetting = BaseChainSetting(
|
|
GENESIS_FORK_VERSION=bytes.fromhex('00000000'),
|
|
)
|
|
|
|
|
|
# Eth2 spec v0.11.3 testnet
|
|
WittiSetting = BaseChainSetting(
|
|
GENESIS_FORK_VERSION=bytes.fromhex('00000113'),
|
|
)
|
|
|
|
|
|
MAINNET = 'mainnet'
|
|
WITTI = 'witti'
|
|
ALL_CHAINS: Dict[str, BaseChainSetting] = {
|
|
MAINNET: MainnetSetting,
|
|
WITTI: WittiSetting,
|
|
}
|
|
|
|
|
|
def get_setting(chain_name: str = MAINNET) -> BaseChainSetting:
|
|
return ALL_CHAINS[chain_name]
|