func AmountClaimed
ActionAmountClaimed returns how much the address has already claimed (0 if none).
Package merkledrop is an idiomatic gno.land port of the classic Solidity MerkleDistributor airdrop (Uniswap's contrac...
⚠️ Experimental — generated with no human supervision by the daily MCP pipeline (Solidity→Gno port). Not audited. See r/moul/x/daily.
A gno.land port of the classic Solidity MerkleDistributor airdrop (Uniswap /
OpenZeppelin MerkleProof). A fixed merkleRoot commits to a set of
(address, amount) allocations; a recipient claims by supplying the sibling
hashes on the path from their leaf to the root. Each address may claim exactly
once (tracked in an avl.Tree, so Render can list claimers deterministically).
Hashing uses crypto/sha256 from the gno stdlib (confirmed importable on
gno 0.9 / sapphire), so the tree is trivially reproducible off-chain. Internal
nodes hash their two children in sorted order (OpenZeppelin's commutative
scheme), meaning proofs need no left/right flags:
leaf = sha256(addr.String() + "|" + amount)
node = sha256(min(a,b) || max(a,b))
Amounts are pure uint64 accounting — gno has no msg.value, so this models
the allocation ledger only, not a real coin transfer.
| Address | Amount |
|---|---|
| g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 | 100 |
| g1sss9uxef4l6lwc0mxq8n5v0e4vqpml7c39cxq2 | 250 |
| g1manfred47kzduec920z88wfr64ylksmdcedar8 | 500 |
| g1us8428u2a5satrlxzagqqa5m6vmuze025anjlj | 750 |
Root: 0d00b73577019dc92924f0ae001d3e1839d51fb358adda2ad1510c39eb82b13f
Claim from g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 (its proof is the sibling
leaf then the right subtree root):
Claim(100, "dd57b89301cc6f1aa5593eb0881cefefcf2ef85ce7629dab61ad0528c301bce9,7c1352bec23bc53d2b573373623cff31174a738de9a257906866c9b598d01253")
Read-only checks:
Verify("g1manfred47kzduec920z88wfr64ylksmdcedar8", 500, "<proof>") // -> true
HasClaimed("g1manfred47kzduec920z88wfr64ylksmdcedar8") // -> false until claimed
A wrong amount, wrong caller, or bad proof panics invalid proof; a second
claim from the same address panics already claimed.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
Package merkledrop is an idiomatic gno.land port of the classic Solidity MerkleDistributor airdrop (Uniswap's contract, OpenZeppelin's MerkleProof).
A fixed merkleRoot commits to a set of (address, amount) allocations. A recipient proves membership by supplying the sibling hashes on the path from their leaf up to the root. Each address may claim exactly once.
Leaf and node hashing use crypto/sha256 (available in the gno stdlib), the same primitive Solidity distributors use via keccak — here sha256 keeps the off-chain tree builder trivially reproducible. Internal nodes hash the two children in sorted order (the OpenZeppelin "commutative" scheme), so proofs carry no left/right flags.
Balances are pure accounting (uint64); no real coin moves — there is no msg.value on gno, so this models the allocation ledger only.
AmountClaimed returns how much the address has already claimed (0 if none).
Claim proves the caller is entitled to `amount` via `proof` (comma-separated hex sibling hashes) and marks the allocation claimed. Panics on a bad proof or a double claim. Mirrors MerkleDistributor.claim (msg.sender is the caller).
HasClaimed reports whether the address already claimed.
Render shows the committed root, aggregate stats, and the list of claimers.
Verify reports whether (claimer, amount, proof) resolves to merkleRoot. Pure and read-only — safe to call from tests and Render.