-
Notifications
You must be signed in to change notification settings - Fork 40
Adding possibility to add more prefunded accounts #221
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
base: main
Are you sure you want to change the base?
Adding possibility to add more prefunded accounts #221
Conversation
Add possibility to add more prefunded accounts to the L1 generated genesis by accepting a repeated `[]string` flag `--prefunded-account` which accepts the same format (private key in hex) as the static prefunded accounts. I debated about putting the `prefunded-account` flag on the L1 recipe directly, to scope it just to this. Maybe it would be preferable, let me know what do you think.
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.
Pull request overview
This pull request adds the ability to specify additional prefunded accounts for L1 and L2 genesis configurations through a new --prefunded-account CLI flag. The flag accepts private keys in hexadecimal format and can be specified multiple times to add multiple accounts.
Key changes:
- New
--prefunded-accountflag that accepts private keys and can be repeated - Refactored static prefunded accounts into a separate variable positioned closer to usage
- Additional prefunded accounts are combined with the existing 10 static accounts in the genesis
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| playground/artifacts.go | Added prefundedAccounts field to ArtifactsBuilder, new setter method PrefundedAccounts(), helper method getPrefundedAccounts() to combine static and user-provided accounts, and moved static accounts definition for better code organization |
| main.go | Added prefundedAccounts global variable and --prefunded-account CLI flag, integrated the flag value with the artifacts builder |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Took the opportunity to document the prefunded
|
LGTM! |
|
@ferranbt Let me know how you want to proceed, will be happy to work any you like for this. |
Add possibility to add more prefunded accounts to the L1 generated genesis by accepting a repeated
[]stringflag--prefunded-accountwhich accepts the same format (private key in hex) as the static prefunded accounts.I debated about putting the
prefunded-accountflag on the L1 recipe directly, to scope it just to this. Maybe it would be preferable, let me know what do you think.