Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To load using private key, we can now use the
--private-key
option. And if we want to load with private key using flashbots send bundle mode, we can pass another option--flashbots-private-key
. An addition option is required for using flashbots mode while loading with private key, since the private key only maps to a single address without hierarchical derivation.Sample command to load using private key:
cargo run --release -- node --eth-client-address http://127.0.0.1:8545 --private-key 4c5e5d30… --beneficiary 0xf39Fd6e5… --entry-points 0x5FF137D4… --http --ws
Sample command to load using private key with flashbots mode:
cargo run --release -- node --eth-client-address http://127.0.0.1:8545 --private-key 4c5e5d30… --flashbots-private-key df218be... --send-bundle-mode flashbots --beneficiary 0xf39Fd6e5… --entry-points 0x5FF137D4… --http --ws
--mnemonic-file
and--private-key
options are mutually exclusive, one and only one can be used.--flashbots-private-key
cannot be used in the same command as--mnemonic-file
, and it cannot be used alone without the--private-key
option; but it can be optional when--private-key
is used.--send-bundle-mode
is notflashbots
and--flashbots-private-key
is provided,--flashbots-private-key
will be ignored.Additional considerations:
I added a
value-parser
for the--private-key
and--flashbot-private-key
arguments, and the current implementation only checks if there are 64 characters and if each char is an ASCII hexadecimal digit. Am wondering if this is sufficient or if theres another better way to do this: