diff --git a/examples/gno.land/r/demo/grc20-merkle-airdrop/airdrop.gno b/examples/gno.land/r/demo/grc20-merkle-airdrop/airdrop.gno new file mode 100644 index 00000000000..83a5f23f5f7 --- /dev/null +++ b/examples/gno.land/r/demo/grc20-merkle-airdrop/airdrop.gno @@ -0,0 +1,38 @@ +package grc20mtairdrop + +import ( + "std" + "strings" + + "gno.land/p/demo/airdrop" + "gno.land/p/demo/grc/grc20" + + "gno.land/r/demo/foo20" +) + +var ( + merkleRoot string + + admin std.Address = "g1sw5xklxjjuv0yvuxy5f5s3l3mnj0nqq626a9wr" // albttx.gno + + airdrop *airdrop.MerkleAirdrop +) + +func init() { + airdrop = airdrop.NewMerkleAirdrop("", token) +} + +func RegisterMerkleRoot(root string) { + foo := foo20.Get() + + // banker := std.GetBanker(std.BankerTypeOrigSend) + // balance := banker.GetCoins(std.GetOrigPkgAddr()) + + caller := std.GetOrigCaller() + if caller != admin { + panic("unauthorized") + } + airdrop.RegisterMerkleRoot(root) +} + +// func Claim()