-
Notifications
You must be signed in to change notification settings - Fork 373
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
2588613
to
6b06c76
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #906 +/- ##
==========================================
- Coverage 60.96% 60.95% -0.02%
==========================================
Files 564 564
Lines 75273 75273
==========================================
- Hits 45893 45885 -8
- Misses 26009 26019 +10
+ Partials 3371 3369 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Excuse me, can you let me know the current status of this idea @albttx ? |
It was blocked by #1257 for a long time, i just realized it has been merged! I'll fixup this PR :) |
9cf2f47
to
7497268
Compare
865989b
to
245b432
Compare
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.