Skip to content

Commit

Permalink
Change withdrawal option name
Browse files Browse the repository at this point in the history
  • Loading branch information
Kang-Simon committed May 18, 2023
1 parent 6d44c6a commit 1839d2f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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": "<NETWORK_NAME>", "genesis_fork_version": "<GENESIS_FORK_VERSION>", "genesis_validator_root": "<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
Expand Down
2 changes: 1 addition & 1 deletion staking_deposit/cli/generate_bls_to_execution_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion staking_deposit/cli/generate_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli/test_existing_menmonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_cli/test_new_mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 1839d2f

Please sign in to comment.