Ownable
*v0.OwnableOwnable holds the administrative authority over the campaign.
- OID
- 080ccf…0f65:85
Ownable details
tokenKey
stringtokenKey is the key of the distributed token. It is a variable rather than a constant only so that tests can register one of their own; in production it keeps the config.gno value for the realm's whole life.
Value
"gno.land/r/nym-thegnomic001/gnomic.GNOMIC"
claimWindowSeconds
int64claimWindowSeconds is a variable for the same reason: tests shrink or widen it. In production it keeps the config.gno value for the realm's whole life.
Value
31536000
withdrawCooldownSeconds
int64withdrawCooldownSeconds likewise: tests switch it off, production keeps it.
Value
86400
root
[]uint8// Merkle root of the current campaign
- OID
- 080ccf…0f65:87
root details
leafCount
int// total number of leaves (needed to verify)
Value
12107
endHeight
int64// block past which no one can claim (0 = no limit)
Value
0
epoch
int// bumped on every new campaign
Value
1
claimed
v0.Tree- OID
- 080ccf…0f65:12
claimed details
campaignStart
int64Value
1789851184
outstanding
int64Value
130530166807
sealed
boolValue
true
totalClaimed
int64// total actually paid out
Value
20180660450
totalGranted
int64// total granted (including what has not vested yet)
Value
163422948346
totalBurned
int64// total destroyed: instant exits, renunciations, settlement
Value
6356060541
settledBurned
int64// burned by SettleUnclaimed
Value
0
settledToFund
int64// sent to the ecosystem fund by SettleUnclaimed
Value
0
totalToFund
int64// sent to the ecosystem fund by voluntary forfeits
Value
6356060548
claimCount
intValue
94
realmAddr
.uverse.addressValue
<gnolang.StringValue>
grant
typegrant is the entitlement a beneficiary obtained in a campaign. It always holds that total == withdrawn + burned + toFund + (not yet released). Grants are keyed by address ALONE, not by "epoch:address": tying the key to the epoch made the previous campaign's grants unreachable as soon as a new one opened — the beneficiary could no longer withdraw and the tokens stayed counted in outstanding, so not even Sweep could recover them.
Value
gnomic_airdrop.grant
SealEvent
untyped stringValue
"AirdropSeal"
SettleEvent
untyped stringValue
"AirdropSettleUnclaimed"
ClaimEvent
untyped stringValue
"AirdropClaim"
WithdrawEvent
untyped stringValue
"AirdropWithdraw"
ForfeitEvent
untyped stringValue
"AirdropForfeit"
CampaignEvent
untyped stringValue
"AirdropCampaign"
bpsDenominator
untyped bigintValue
(10000 <untyped> bigint)
init.28
func()- OID
- 080ccf…0f65:24
init.28 details
SetCampaign
func(rootHex string, total int, end int64)SetCampaign publishes a new campaign: rootHex is the Merkle root in hex (32 bytes), total the number of leaves in the tree, end the deadline block (0 = no deadline). Publishing a new campaign resets the claim history: whoever appears on both lists can claim again. That is deliberate — it allows recurring airdrops on the same realm without a redeploy.
- OID
- 080ccf…0f65:26
SetCampaign details
CloseCampaign
func()CloseCampaign stops claims immediately.
- OID
- 080ccf…0f65:27
CloseCampaign details
SealCampaign
func()SealCampaign closes off the possibility of opening new campaigns forever. Irreversible: no code path sets sealed back to false. Call it once the published root is the final one. Until then the owner can fix a mistake by republishing the root; afterwards the airdrop is provably one-off and anyone can check with IsSealed().
- OID
- 080ccf…0f65:28
SealCampaign details
SettleUnclaimed
func()SettleUnclaimed disposes of whatever was never claimed, once the claim window has elapsed: half is burned, the other half goes to the team fund. The rule is enforced here rather than promised: there is no Sweep and no BurnRemaining, so the owner cannot pocket the residue nor destroy all of it. Settlement waits for the window even if CloseCampaign stopped claims earlier, and grants already made stay untouchable — only the free part (balance minus outstanding) is settled. Anyone may call it: it is a public service, not a privilege.
- OID
- 080ccf…0f65:29
SettleUnclaimed details
TransferOwnership
func(newOwner .uverse.address)TransferOwnership hands administration of the campaign over.
- OID
- 080ccf…0f65:30
TransferOwnership details
Claim
func(amount int64, index int, auntsHex string)Claim pays amount tokens to the caller, if the Merkle proof (index, auntsHex) shows that "\<caller>|\<amount>" is a leaf of the published tree. auntsHex is the hex concatenation of the sibling hashes, 32 bytes each, just as produced by tools/merkle.
- OID
- 080ccf…0f65:31
Claim details
claimFor
func(beneficiary .uverse.address, amount int64, index int, auntsHex string)claimFor is the body of Claim. It is unexported on purpose: a transaction can only reach exported functions, so from outside the realm the only way in is Claim, which always uses the caller's own address. The tests, being in the same package, still exercise the registration logic directly.
- OID
- 080ccf…0f65:32
claimFor details
ClaimInstant
func(amount int64, index int, auntsHex string)ClaimInstant is the first of the two alternatives to Claim: the instant share (instantBps, 30%) is paid at once and the rest (70%) is given up the same way a forfeit is — half burned, half to the ecosystem fund — whenever it is chosen, even after the whole grant would have vested. The share is larger than Claim's immediate 10% on purpose: it makes the shortcut a real choice rather than a punishment. It cannot be undone and suits someone who prefers a certain fraction today to the whole a year from now. The residue is destroyed, to every holder's benefit. Only the person concerned can choose it: there is no "on behalf of" form.
- OID
- 080ccf…0f65:33
ClaimInstant details
Forfeit
func(amount int64, index int, auntsHex string)Forfeit is the second alternative to Claim: the beneficiary gives the grant up without taking anything. Half is burned, half goes to the ecosystem fund — the same split SettleUnclaimed applies to whoever never acted at all. The proof is still required and the grant is still recorded: without that, the same address could forfeit and then claim. The record makes it final. Only the person concerned can choose it: there is no "on behalf of" form.
- OID
- 080ccf…0f65:34
Forfeit details
immediateOf
func(total int64) int64immediateOf is the share Claim unlocks at once: immediateBps/10000 of total.
- OID
- 080ccf…0f65:35
immediateOf details
shareOf
func(total int64, bps int) int64shareOf is bps/10000 of total, in two steps to stay inside int64.
- OID
- 080ccf…0f65:36
shareOf details
registerGrant
func(beneficiary .uverse.address, amount int64, index int, auntsHex string)registerGrant checks the proof and records the grant. It transfers nothing.
- OID
- 080ccf…0f65:37
registerGrant details
Withdraw
func()Withdraw transfers to the caller the vested, not-yet-withdrawn part.
- OID
- 080ccf…0f65:38
Withdraw details
WithdrawFor
func(beneficiary .uverse.address)WithdrawFor is like Withdraw but on another beneficiary's behalf: the tokens still go to beneficiary, whoever sends the transaction only pays the gas.
- OID
- 080ccf…0f65:39
WithdrawFor details
release
func(beneficiary .uverse.address)release transfers the vested share. It is the public form: when there is nothing to withdraw it says so, instead of silently letting through a transaction that did nothing.
- OID
- 080ccf…0f65:40
release details
releaseIfAny
func(beneficiary .uverse.address) int64releaseIfAny is the internal form: it transfers whatever has vested and returns the amount, or 0 if nothing has vested yet. It serves the paths where "nothing to withdraw" is normal rather than an error: a claim whose immediate share is zero, and a forfeit, whose point is to burn the residue rather than to collect. Payouts are rate-limited: one every withdrawCooldownSeconds per grant, the claim itself counting as the first. The very first payout is never delayed.
- OID
- 080ccf…0f65:41
releaseIfAny details
vestedOf
func(g *gnomic_airdrop.grant) int64vestedOf computes how much of a grant has vested: vested = immediate + rest * elapsed / duration where immediate is immediateBps/10000 of the total. The division is done in two steps (quotient and remainder) because rest\*elapsed would overflow int64 for large amounts: 1e13 \* 3.15e7 exceeds 9.2e18.
- OID
- 080ccf…0f65:42
vestedOf details
addSat
func(a int64, b int64) int64addSat adds without ever wrapping. These counters only grow, across every campaign, and nothing bounds them to the supply: a statistic that turns negative would be bad, one that blocks a withdrawal would be worse.
- OID
- 080ccf…0f65:43
addSat details
grantOf
func(addr .uverse.address) *gnomic_airdrop.grant- OID
- 080ccf…0f65:44
grantOf details
Leaf
func(addr .uverse.address, amount int64) stringLeaf returns the canonical Merkle-leaf encoding for the (address, amount) pair. It must match byte for byte the one used by the off-chain generator.
- OID
- 080ccf…0f65:45
Leaf details
RealmAddress
func() .uverse.address- OID
- 080ccf…0f65:46
RealmAddress details
Balance
func() int64Balance is the token balance the realm currently holds.
- OID
- 080ccf…0f65:47
Balance details
Root
func() stringRoot returns the current Merkle root in hex.
- OID
- 080ccf…0f65:48
Root details
Epoch
func() intEpoch is the number of the current campaign.
- OID
- 080ccf…0f65:49
Epoch details
IsSealed
func() boolIsSealed reports whether the campaign has been sealed: if true, no new campaign can ever be opened.
- OID
- 080ccf…0f65:50
IsSealed details
LeafCount
func() intLeafCount is the number of leaves in the published tree.
- OID
- 080ccf…0f65:51
LeafCount details
EndHeight
func() int64EndHeight is the deadline block (0 = no deadline).
- OID
- 080ccf…0f65:52
EndHeight details
IsOpen
func() boolIsOpen reports whether claims are currently accepted.
- OID
- 080ccf…0f65:53
IsOpen details
HasClaimed
func(addr .uverse.address) boolHasClaimed reports whether addr has already claimed in the current campaign.
- OID
- 080ccf…0f65:54
HasClaimed details
HasGrant
func(addr .uverse.address) boolHasGrant reports whether addr holds a grant, from this campaign or an earlier one.
- OID
- 080ccf…0f65:55
HasGrant details
GrantEpoch
func(addr .uverse.address) intGrantEpoch returns the campaign in which addr obtained its grant.
- OID
- 080ccf…0f65:56
GrantEpoch details
VestingStartOf
func(addr .uverse.address) int64VestingStartOf returns when vesting starts for addr's grant.
- OID
- 080ccf…0f65:57
VestingStartOf details
ClaimedAmount
func(addr .uverse.address) int64ClaimedAmount returns addr's total grant, vested or not.
- OID
- 080ccf…0f65:58
ClaimedAmount details
Vested
func(addr .uverse.address) int64Vested returns how much of addr's grant has vested so far. A closed grant (instant exit or forfeit) will never vest anything more: it reports what was paid, not where the curve would be.
- OID
- 080ccf…0f65:59
Vested details
InstantBps
func() intInstantBps is the share ClaimInstant pays at once, in hundredths of a percent.
- OID
- 080ccf…0f65:60
InstantBps details
Withdrawn
func(addr .uverse.address) int64Withdrawn returns how much addr has already withdrawn.
- OID
- 080ccf…0f65:61
Withdrawn details
Withdrawable
func(addr .uverse.address) int64Withdrawable returns how much addr can withdraw right now.
- OID
- 080ccf…0f65:62
Withdrawable details
NextWithdrawAt
func(addr .uverse.address) int64NextWithdrawAt returns the unix time from which addr may withdraw again (0 when there is no grant, the grant is closed, or no cooldown is running).
- OID
- 080ccf…0f65:63
NextWithdrawAt details
WithdrawCooldown
func() int64WithdrawCooldown is the minimum interval between two payouts, in seconds.
- OID
- 080ccf…0f65:64
WithdrawCooldown details
BurnedOf
func(addr .uverse.address) int64BurnedOf returns how much of addr's grant was destroyed.
- OID
- 080ccf…0f65:65
BurnedOf details
FundOf
func(addr .uverse.address) int64FundOf returns how much of addr's grant went to the ecosystem fund.
- OID
- 080ccf…0f65:66
FundOf details
TotalToFund
func() int64TotalToFund is what voluntary forfeits sent to the ecosystem fund.
- OID
- 080ccf…0f65:67
TotalToFund details
TotalBurned
func() int64TotalBurned is the total destroyed: instant exits, renunciations and the settlement of the unclaimed residue.
- OID
- 080ccf…0f65:68
TotalBurned details
ClaimWindowEnd
func() int64ClaimWindowEnd is the moment (unix) claims stop being accepted for the current campaign; SettleUnclaimed becomes callable from then on.
- OID
- 080ccf…0f65:69
ClaimWindowEnd details
EcosystemFund
func() .uverse.address- OID
- 080ccf…0f65:70
EcosystemFund details
SettledBurned
func() int64SettledBurned and SettledToFund report what SettleUnclaimed did.
- OID
- 080ccf…0f65:71
SettledBurned details
SettledToFund
func() int64- OID
- 080ccf…0f65:72
SettledToFund details
Outstanding
func() int64Outstanding is the total granted and not yet withdrawn: the part of the realm's balance that Sweep cannot touch.
- OID
- 080ccf…0f65:73
Outstanding details
TotalGranted
func() int64TotalGranted is the total of all grants made, vested or not.
- OID
- 080ccf…0f65:74
TotalGranted details
VestingStart
func() int64VestingStart is the moment (unix) the CURRENT campaign's linear release runs from. Grants from earlier campaigns keep their own, readable with VestingStartOf.
- OID
- 080ccf…0f65:75
VestingStart details
VestingEnd
func() int64VestingEnd is the moment (unix) at which everything granted in the current campaign counts as fully vested.
- OID
- 080ccf…0f65:76
VestingEnd details
ImmediateBps
func() intImmediateBps is the share unlocked at once, in hundredths of a percent.
- OID
- 080ccf…0f65:77
ImmediateBps details
TotalClaimed
func() int64TotalClaimed is the total actually transferred to beneficiaries.
- OID
- 080ccf…0f65:78
TotalClaimed details
ClaimCount
func() intClaimCount is the number of successful claims.
- OID
- 080ccf…0f65:79
ClaimCount details
isOpen
func() bool- OID
- 080ccf…0f65:80
isOpen details
Render
func(path string) string- OID
- 080ccf…0f65:81
Render details
sealLabel
func() stringsealLabel describes in Render whether the airdrop is provably one-off.
- OID
- 080ccf…0f65:82
sealLabel details
statusLabel
func() string- OID
- 080ccf…0f65:83
statusLabel details
defaultTokenKey
untyped stringValue
"gno.land/r/nym-thegnomic001/gnomic.GNOMIC"
campaignName
untyped stringValue
"Gnomic Airdrop"
immediateBps
untyped bigintValue
(1000 <untyped> bigint)
instantBps
untyped bigintValue
(3000 <untyped> bigint)
vestingSeconds
int64Value
31536000
defaultClaimWindowSeconds
int64Value
31536000
defaultWithdrawCooldownSeconds
int64Value
86400
ecosystemFundAddress
untyped stringValue
"g14slrjauvzpx578ker2wtt2jzs0c4mzslcpjcqf"
adminAddress
untyped stringValue
"g1z0c0wrmwpzpd0gq4q67hl9508dtgv4epr0z5ml"