mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2024-12-23 03:51:39 +00:00
Merge pull request #61 from ethereum/hwwhww/network-selection
Add network (chain) name selection to prompt
This commit is contained in:
commit
55b89503f9
@ -70,6 +70,7 @@ def check_python_version() -> None:
|
||||
)
|
||||
@click.option(
|
||||
'--chain',
|
||||
prompt='Please choose the (mainnet or testnet) network/chain name',
|
||||
type=click.Choice(ALL_CHAINS.keys(), case_sensitive=False),
|
||||
default=MAINNET,
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ class BaseChainSetting(NamedTuple):
|
||||
GENESIS_FORK_VERSION: bytes
|
||||
|
||||
|
||||
# Eth2 Mainet setting
|
||||
# Eth2 Mainnet setting
|
||||
MainnetSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000000'))
|
||||
# Eth2 spec v0.11.3 testnet
|
||||
WittiSetting = BaseChainSetting(GENESIS_FORK_VERSION=bytes.fromhex('00000113'))
|
||||
|
@ -27,6 +27,7 @@ async def main():
|
||||
run_script_cmd,
|
||||
'--num_validators', '1',
|
||||
'--mnemonic_language', 'english',
|
||||
'--chain', 'mainnet',
|
||||
'--password', 'MyPassword',
|
||||
'--folder', my_folder_path,
|
||||
]
|
||||
|
@ -41,7 +41,7 @@ def test_deposit(monkeypatch) -> None:
|
||||
os.mkdir(my_folder_path)
|
||||
|
||||
runner = CliRunner()
|
||||
inputs = ['5', 'english', 'MyPassword', 'MyPassword', 'fakephrase']
|
||||
inputs = ['5', 'english', 'mainnet', 'MyPassword', 'MyPassword', 'fakephrase']
|
||||
data = '\n'.join(inputs)
|
||||
result = runner.invoke(main, ['--folder', my_folder_path], input=data)
|
||||
|
||||
@ -87,6 +87,7 @@ async def test_script() -> None:
|
||||
run_script_cmd,
|
||||
'--num_validators', '1',
|
||||
'--mnemonic_language', 'english',
|
||||
'--chain', 'mainnet',
|
||||
'--password', 'MyPassword',
|
||||
'--folder', my_folder_path,
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user