-
Notifications
You must be signed in to change notification settings - Fork 5
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: raw and process snapshot commands #6
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # .gitignore # Makefile
Welcome to Codecov 🎉Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment. Thanks for integrating Codecov - We've got you covered ☂️ |
cmd/cmd.go
Outdated
func NewAirdropRaw() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "raw [input-genesis]", | ||
Short: "Generate raw airdrop data based on the input genesis", |
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.
What is the input genesis for the raw command? Is it the genesis that has been exported from the chain to parse snapshot from? It's a bit unclear since we should also have the "input genesis" where we populate the claim genesis state from the snapshot data
This may be implemented but I think we should let the use the ability to provide a RPC address for the chain, where the genesis would be automatically exported
- add comments - unexport config validate method
# Conflicts: # .github/workflows/test.yml # go.mod # go.sum
Still in draft @Pantani ? |
yes, I'm working on it today |
Description
cmd
commands;debug
main package to test locally;snapshot
package to generate a raw snapshot and filter based on the stake and bank modules;config
package to parse the snapshot config file;formula
package to calculate the airdrop balance (WIP/Blocked);genesis
package to handle genesis files;encode
package to decode/encode the genesis state;How to test
Run the raw airdrop command to generate the raw data
go run cmd/debug/debug.go airdrop raw testdata/genesis.json 2> raw-snapshot.json
Run the process command to generate the claim records
go run cmd/debug/debug.go airdrop process testdata/config.yml raw-snapshot.json 2> snapshot.json
Generate the new genesis json with the claimable state based on the output genesis
Or you can only use the generate command to run all four above with one command