-
Notifications
You must be signed in to change notification settings - Fork 385
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: r/demo/foo20airdrop - Merkle Airdrop contract example #906
base: master
Are you sure you want to change the base?
Conversation
2060eff
to
2675ea9
Compare
type AirdropData struct { | ||
Address std.Address | ||
// TODO: use std.Coin | ||
Amount uint64 |
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.
For better control and data integrity, keep the fields in the Airdrop
struct unexported.
To maintain easy marshaling with the Bytes
helper, consider this approach:
type Airdrop struct {
data struct {
Address std.Address
Amount uint64
}
}
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.
Looks good 💯
Please see @moul's comments, otherwise we should be good to go
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.
Just blocking since there are several changes. Let’s make an additional round of reviews.
There is tests issue once rebased with master. There is a situation to figure out, with When Possible fix could be to update in |
Related (and depending?) on #952 |
Hey @albttx, What's the status of this PR? |
7c384db
to
2588613
Compare
(sorry force-pushed, missed the |
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 after resolving convo; I don't think we need to add the js tooling in misc
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 after resolving convo; I don't think we need to add the js tooling in misc
cefa7ae
to
7907ff2
Compare
de99dd9
to
125f9a7
Compare
Want to take a final look? Cannot merge without your approval. |
Description
This PR bring an example for a merkle airdrop contract.
p/demo/airdrop
r/demo/foo20airdrop
How it's works ?
A merkle airdrop contract works by saving off-chain the elements of the merkle tree. ONLY the Merkle root is saved on the realm.
To confirm an element is present, we just need to send to the contract a merkle proof.