-
Notifications
You must be signed in to change notification settings - Fork 34
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
feature: bulk fund crypto wallets #159
Conversation
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.
lgtm! a few nits but I tested against a local anvil
chain and it works great, it may be a little bit slow though.
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.
Tested this out and it seems to work. A few high level thoughts:
- The addresses it's funding are random and we're not keeping the private key. So essentially all of the funds are being lost
- I'd prefer to stick with same log package along with using the same web3 libraries just for the sake of consistency and maintainability.
- I would plan ahead here to think about how you would handle funding of an erc20 (you don't need to implement it, but just making sure your design is flexible enough)
- Funding random addresses is okay, but that seems like it should be a mode (and we 100% need to save the private keys in this mode). Two other modes I would consider in priority order. 1 is funding based on a a mnemonic. We already have the libraries intetegrated for deriving the keys. 2 is funding based on an input list of keys.
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.
thanks for the re-review @leovct confident the insufficient funds error you ran into is because you leveraged default gasLimit by not setting that flag in your cmd, i've gone ahead and bumped the default gas value and confirmed all is till working as expected: |
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.
lgtm
Description
give users dead-simple ability to bulk fund X many crypto wallets for testing purposes
Jira / Linear Tickets
https://polygon.atlassian.net/browse/DVT-1022
Follow-up Tickets (additional features)
https://polygon.atlassian.net/browse/DVT-1115
4:20
https://polygon.atlassian.net/browse/DVT-1114
4:20
https://polygon.atlassian.net/browse/DVT-1116
Testing
fully tested locally:
try it yourself:
polycli fund \ --wallet-count=5 \ --funding-wallet-pk="0xe79a26e98ad10db36e8d31cd0bcf93114d53f8acf99b0440d6a3ffb176a9cd98" \ --chain-id=100 \ --concurrency=5 \ --rpc-url="https://rootchain-devnetsub.zkevmdev.net" \ --wallet-funding-amt=0.00015 \ --wallet-funding-gas=50000 \ --output-file="/tmp/generated_keys.json" \ --verbosity=true