Skip to content

Commit

Permalink
chore: add r/grc20-merkle-airdrop
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx committed Apr 21, 2023
1 parent 490d403 commit 1289008
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions examples/gno.land/r/demo/grc20-merkle-airdrop/airdrop.gno
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 1289008

Please sign in to comment.