Skip to content

Commit

Permalink
Merge pull request #276 from ethereum/goerli
Browse files Browse the repository at this point in the history
Support `--chain goerli`
  • Loading branch information
CarlBeek authored Jul 31, 2022
2 parents 7326f85 + 6d69439 commit 79eed93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion staking_deposit/cli/generate_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from staking_deposit.settings import (
ALL_CHAINS,
MAINNET,
PRATER,
get_chain_setting,
)

Expand Down Expand Up @@ -87,7 +88,8 @@ def generate_keys_arguments_decorator(function: Callable[..., Any]) -> Callable[
param_decls='--chain',
prompt=choice_prompt_func(
lambda: load_text(['chain', 'prompt'], func='generate_keys_arguments_decorator'),
list(ALL_CHAINS.keys())
# Since `prater` is alias of `goerli`, do not show `prater` in the prompt message.
list(key for key in ALL_CHAINS.keys() if key != PRATER)
),
),
jit_option(
Expand Down
16 changes: 7 additions & 9 deletions staking_deposit/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,28 @@ class BaseChainSetting(NamedTuple):


MAINNET = 'mainnet'
ROPSTEN = 'ropsten'
GOERLI = 'goerli'
PRATER = 'prater'
KINTSUGI = 'kintsugi'
KILN = 'kiln'
ROPSTEN = 'ropsten'


# 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'))
# Testnet (spec v1.0.1)
PraterSetting = BaseChainSetting(NETWORK_NAME=PRATER, GENESIS_FORK_VERSION=bytes.fromhex('00001020'))
# Merge Testnet (spec v1.1.4)
KintsugiSetting = BaseChainSetting(NETWORK_NAME=KINTSUGI, GENESIS_FORK_VERSION=bytes.fromhex('60000069'))
# Goreli setting
GoerliSetting = BaseChainSetting(NETWORK_NAME=GOERLI, 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,
KINTSUGI: KintsugiSetting,
KILN: KilnSetting,
ROPSTEN: RopstenSetting,
GOERLI: GoerliSetting,
PRATER: GoerliSetting, # Prater is the old name of the Prater/Goerli testnet
KILN: KilnSetting,
}


Expand Down

0 comments on commit 79eed93

Please sign in to comment.