-
Notifications
You must be signed in to change notification settings - Fork 375
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
9cf2f47
to
7497268
Compare
865989b
to
245b432
Compare
245b432
to
dff5cc3
Compare
f81a99a
to
2008cf6
Compare
(sorry force-pushed, missed the |
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.