-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat(l1, l2): show rich wallets on startup #2045
base: main
Are you sure you want to change the base?
Conversation
|
cmd/ethrex/ethrex.rs
Outdated
@@ -174,6 +177,23 @@ async fn main() { | |||
}; | |||
|
|||
let genesis = read_genesis_file(&network); | |||
|
|||
// Show top rich accounts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want this when running an L1 node. This seems for testing purposed, dunno why this is here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I move it to only print the accounts if we are in dev_mode
for the L1.
let l2_pks = include_str!("../../test_data/private_keys.txt"); | ||
show_rich_accounts(&genesis, l2_pks); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this so we can run the print independent where we execute it
let Ok(pk_h256) = pk_str.parse::<H256>() else { | ||
return; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is any error, don't print the addresses so we don't stop the ethrex client
Motivation
In this PR we show the top 10 rich accounts on startup. Also, we add to the cli and option to parse a private key to an address.
Description
ethrex_l2
cli we add theutils
subcommand to calculate the address from the private key.The print of the addresses set in the genesis block is show this way:
Closes #1981
Links to #2034