diff --git a/README.md b/README.md index ebfb193..4cf72f8 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ You can use `new-mnemonic --help` to see all arguments. Note that if there are m | `--mnemonic_language` | String. Options: `简体中文`, `繁體中文`, `český jazyk`, `English`, `Italiano`, `한국어`, `Português`, `Español`. Default to `English` | The language of the mnemonic word list | | `--folder` | String. Pointing to `./validator_keys` by default | The folder path for the keystore(s) and deposit(s) | | `--chain` | String. `mainnet` by default | The chain setting for the signing domain. | -| `--execution_address` (or `--eth1_withdrawal_address`) | String. Eth1 address in hexadecimal encoded form | If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | +| `--execution_address` (or `--withdrawal_address`) | String. Eth1 address in hexadecimal encoded form | If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | ###### `existing-mnemonic` Arguments @@ -161,7 +161,7 @@ You can use `existing-mnemonic --help` to see all arguments. Note that if there | `--num_validators` | Non-negative integer | The number of new signing keys you want to generate. Note that the child key(s) are generated via the same master key. | | `--folder` | String. Pointing to `./validator_keys` by default | The folder path for the keystore(s) and deposit(s) | | `--chain` | String. `mainnet` by default | The chain setting for the signing domain. | -| `--execution_address` (or `--eth1_withdrawal_address`) | String. Eth1 address in hexadecimal encoded form | If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | +| `--execution_address` (or `--withdrawal_address`) | String. Eth1 address in hexadecimal encoded form | If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | ###### Successful message @@ -191,7 +191,7 @@ You can use `bls-to-execution-change --help` to see all arguments. Note that if | `--validator_start_index` | Non-negative integer | The index position for the keys to start generating withdrawal credentials in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | | `--validator_indices` | String of integer(s) | A list of the chosen validator index number(s) as identified on the beacon chain. Split multiple items with whitespaces or commas. | | `--bls_withdrawal_credentials_list` | String of hexstring(s). | A list of the old BLS withdrawal credentials of the given validator(s). It is for confirming you are using the correct keys. Split multiple items with whitespaces or commas. | -| `--execution_address` (or `--eth1_withdrawal_address`) | String. Eth1 address in hexadecimal encoded form | If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | +| `--execution_address` (or `--withdrawal_address`) | String. Eth1 address in hexadecimal encoded form | If this field is set and valid, the given Eth1 address will be used to create the withdrawal credentials. Otherwise, it will generate withdrawal credentials with the mnemonic-derived withdrawal public key in [ERC-2334 format](https://eips.ethereum.org/EIPS/eip-2334#eth2-specific-parameters). | | `--devnet_chain_setting` | String. JSON string `'{"network_name": "", "genesis_fork_version": "", "genesis_validator_root": ""}'` | The custom chain setting of a devnet or testnet. Note that it will override your `--chain` choice. | #### Option 2. Build `deposit-cli` with native Python diff --git a/staking_deposit/cli/generate_bls_to_execution_change.py b/staking_deposit/cli/generate_bls_to_execution_change.py index b37d35a..47a7c40 100644 --- a/staking_deposit/cli/generate_bls_to_execution_change.py +++ b/staking_deposit/cli/generate_bls_to_execution_change.py @@ -114,7 +114,7 @@ def get_password(text: str) -> str: lambda: load_text(['arg_execution_address', 'mismatch'], func=FUNC_NAME), ), help=lambda: load_text(['arg_execution_address', 'help'], func=FUNC_NAME), - param_decls=['--execution_address', '--eth1_withdrawal_address'], + param_decls=['--execution_address', '--withdrawal_address'], prompt=lambda: load_text(['arg_execution_address', 'prompt'], func=FUNC_NAME), ) @jit_option( diff --git a/staking_deposit/cli/generate_keys.py b/staking_deposit/cli/generate_keys.py index 63c4166..8e2456e 100644 --- a/staking_deposit/cli/generate_keys.py +++ b/staking_deposit/cli/generate_keys.py @@ -103,7 +103,7 @@ def generate_keys_arguments_decorator(function: Callable[..., Any]) -> Callable[ ), default=None, help=lambda: load_text(['arg_execution_address', 'help'], func='generate_keys_arguments_decorator'), - param_decls=['--execution_address', '--eth1_withdrawal_address'], + param_decls=['--execution_address', '--withdrawal_address'], ), ] for decorator in reversed(decorators): diff --git a/tests/test_cli/test_existing_menmonic.py b/tests/test_cli/test_existing_menmonic.py index d41ce46..fd6cc19 100644 --- a/tests/test_cli/test_existing_menmonic.py +++ b/tests/test_cli/test_existing_menmonic.py @@ -74,7 +74,7 @@ def test_existing_mnemonic_eth1_address_withdrawal() -> None: 'existing-mnemonic', '--folder', my_folder_path, '--mnemonic-password', 'TREZOR', - '--eth1_withdrawal_address', eth1_withdrawal_address, + '--withdrawal_address', eth1_withdrawal_address, ] result = runner.invoke(cli, arguments, input=data) @@ -133,7 +133,7 @@ def test_existing_mnemonic_eth1_address_withdrawal_bad_checksum() -> None: 'existing-mnemonic', '--folder', my_folder_path, '--mnemonic-password', 'TREZOR', - '--eth1_withdrawal_address', wrong_eth1_withdrawal_address, + '--withdrawal_address', wrong_eth1_withdrawal_address, ] result = runner.invoke(cli, arguments, input=data) diff --git a/tests/test_cli/test_new_mnemonic.py b/tests/test_cli/test_new_mnemonic.py index 0e091dd..965126a 100644 --- a/tests/test_cli/test_new_mnemonic.py +++ b/tests/test_cli/test_new_mnemonic.py @@ -81,7 +81,7 @@ def mock_get_mnemonic(language, words_path, entropy=None) -> str: '--language', 'english', 'new-mnemonic', '--folder', my_folder_path, - '--eth1_withdrawal_address', eth1_withdrawal_address, + '--withdrawal_address', eth1_withdrawal_address, ] result = runner.invoke(cli, arguments, input=data) assert result.exit_code == 0 @@ -142,7 +142,7 @@ def mock_get_mnemonic(language, words_path, entropy=None) -> str: '--language', 'english', 'new-mnemonic', '--folder', my_folder_path, - '--eth1_withdrawal_address', wrong_eth1_withdrawal_address, + '--withdrawal_address', wrong_eth1_withdrawal_address, ] result = runner.invoke(cli, arguments, input=data) assert result.exit_code == 0 @@ -255,7 +255,7 @@ def mock_get_mnemonic(language, words_path, entropy=None) -> str: 'new-mnemonic', '--folder', my_folder_path, '--execution_address', execution_address, - '--eth1_withdrawal_address', execution_address, # double param + '--withdrawal_address', execution_address, # double param ] result = runner.invoke(cli, arguments, input=data)