Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial deposit #93

Conversation

valefar-on-discord
Copy link
Collaborator

Fixing #89

Adds a partial deposit command where the user can sign a deposit signature using their keystore.

This also adds an amount field to resolve #53 concerns

I don't believe there is anything too special here though I have partially added some 0x02 logic but it is incomplete as I'm not 100% sure exactly how it will work.

I imagine we are going to do a round of changes once pectra is ready for testnet

@yorickdowne
Copy link

Grand. Caveat that the jit_option with confirm will need to be adjusted to click-8, see #98

ethstaker_deposit/intl/en/cli/partial_deposit.json Outdated Show resolved Hide resolved
ethstaker_deposit/utils/deposit.py Outdated Show resolved Hide resolved
ethstaker_deposit/cli/partial_deposit.py Outdated Show resolved Hide resolved
ethstaker_deposit/cli/partial_deposit.py Outdated Show resolved Hide resolved
ethstaker_deposit/cli/partial_deposit.py Outdated Show resolved Hide resolved
Copy link

Test Coverage: Download HTML Report

Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
ethstaker_deposit/__init__.py                                   0      0   100%
ethstaker_deposit/cli/__init__.py                               0      0   100%
ethstaker_deposit/cli/existing_mnemonic.py                     28      0   100%
ethstaker_deposit/cli/exit_transaction_keystore.py             39      2    95%
ethstaker_deposit/cli/exit_transaction_mnemonic.py             62      8    87%
ethstaker_deposit/cli/generate_bls_to_execution_change.py      63     15    76%
ethstaker_deposit/cli/generate_keys.py                         43      3    93%
ethstaker_deposit/cli/new_mnemonic.py                          26      0   100%
ethstaker_deposit/cli/partial_deposit.py                       61      5    92%
ethstaker_deposit/credentials.py                              197     68    65%
ethstaker_deposit/deposit.py                                   53      9    83%
ethstaker_deposit/exceptions.py                                 2      0   100%
ethstaker_deposit/key_handling/__init__.py                      0      0   100%
ethstaker_deposit/key_handling/key_derivation/__init__.py       0      0   100%
ethstaker_deposit/key_handling/key_derivation/mnemonic.py      90      7    92%
ethstaker_deposit/key_handling/key_derivation/path.py          18      1    94%
ethstaker_deposit/key_handling/key_derivation/tree.py          37      0   100%
ethstaker_deposit/key_handling/keystore.py                    100      0   100%
ethstaker_deposit/settings.py                                  22      1    95%
ethstaker_deposit/utils/__init__.py                             0      0   100%
ethstaker_deposit/utils/ascii_art.py                            1      0   100%
ethstaker_deposit/utils/click.py                               48      3    94%
ethstaker_deposit/utils/config.py                               3      0   100%
ethstaker_deposit/utils/constants.py                           27      0   100%
ethstaker_deposit/utils/crypto.py                              29      1    97%
ethstaker_deposit/utils/deposit.py                              9      0   100%
ethstaker_deposit/utils/exit_transaction.py                    24      0   100%
ethstaker_deposit/utils/file_handling.py                        8      0   100%
ethstaker_deposit/utils/intl.py                                54      3    94%
ethstaker_deposit/utils/ssz.py                                 50      6    88%
ethstaker_deposit/utils/validation.py                         198     51    74%
-------------------------------------------------------------------------------
TOTAL                                                        1292    183    86%

Copy link

Test Coverage: Download HTML Report

Name                                                        Stmts   Miss  Cover
-------------------------------------------------------------------------------
ethstaker_deposit/__init__.py                                   0      0   100%
ethstaker_deposit/cli/__init__.py                               0      0   100%
ethstaker_deposit/cli/existing_mnemonic.py                     28      0   100%
ethstaker_deposit/cli/exit_transaction_keystore.py             39      2    95%
ethstaker_deposit/cli/exit_transaction_mnemonic.py             62      8    87%
ethstaker_deposit/cli/generate_bls_to_execution_change.py      63     15    76%
ethstaker_deposit/cli/generate_keys.py                         43      3    93%
ethstaker_deposit/cli/new_mnemonic.py                          26      0   100%
ethstaker_deposit/cli/partial_deposit.py                       61      5    92%
ethstaker_deposit/credentials.py                              197     68    65%
ethstaker_deposit/deposit.py                                   53      9    83%
ethstaker_deposit/exceptions.py                                 2      0   100%
ethstaker_deposit/key_handling/__init__.py                      0      0   100%
ethstaker_deposit/key_handling/key_derivation/__init__.py       0      0   100%
ethstaker_deposit/key_handling/key_derivation/mnemonic.py      90      7    92%
ethstaker_deposit/key_handling/key_derivation/path.py          18      1    94%
ethstaker_deposit/key_handling/key_derivation/tree.py          37      0   100%
ethstaker_deposit/key_handling/keystore.py                    100      0   100%
ethstaker_deposit/settings.py                                  22      1    95%
ethstaker_deposit/utils/__init__.py                             0      0   100%
ethstaker_deposit/utils/ascii_art.py                            1      0   100%
ethstaker_deposit/utils/click.py                               48      3    94%
ethstaker_deposit/utils/config.py                               3      0   100%
ethstaker_deposit/utils/constants.py                           27      0   100%
ethstaker_deposit/utils/crypto.py                              29      1    97%
ethstaker_deposit/utils/deposit.py                              9      0   100%
ethstaker_deposit/utils/exit_transaction.py                    24      0   100%
ethstaker_deposit/utils/file_handling.py                        8      0   100%
ethstaker_deposit/utils/intl.py                                54      3    94%
ethstaker_deposit/utils/ssz.py                                 50      6    88%
ethstaker_deposit/utils/validation.py                         198     51    74%
-------------------------------------------------------------------------------
TOTAL                                                        1292    183    86%

default="32",
help=lambda: load_text(['arg_partial_deposit_amount', 'help'], func=FUNC_NAME),
param_decls='--amount',
prompt=False, # the callback handles the prompt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
prompt=False, # the callback handles the prompt
prompt=False, # the callback handles the prompt, to avoid second callback with gwei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add amount parameter for deposit
2 participants