Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 state

Back to all declarations

Name

untyped string

Value

"moultest"

Path

untyped string

Value

"gno.land/r/moul/x/moultest/v0"

Denom

string

Denom is the full chain denom, "/" + [Path](#Path) + ":" + [Name](#Name). This is the string a wallet, an explorer or a \`-send\` flag needs; the bank knows nothing about the realm behind it.

Value

"/gno.land/r/moul/x/moultest/v0:moultest"

ClaimAmount

int64

Value

10000

ClaimEvery

int64

Value

100

MaxPerAccount

int64

Value

100000

MaxSupply

int64

Value

1000000

MaxNote

untyped bigint

Value

(120 <untyped> bigint)

MaxTips

untyped bigint

Value

(20 <untyped> bigint)

account

type

Value

v0.account

tip

type

Tip is one entry of the public board written by [Tip](#Tip).

Value

v0.tip

accounts

*v0.Tree

// address string -> \*account

Open
OID
0bd071…fa4d:5
accounts details

Inspect pointer

issued

int64

Value

0

burned

int64

Value

0

tips

[]*v0.tip

// most recent last, at most MaxTips

Value

<zero>

Claim

func() int64

Claim issues [ClaimAmount](#ClaimAmount) of moultest to the caller and returns it. It never issues to an address the caller names. That is deliberate: a faucet that mints to a third party is a way to spray a denom nobody asked for into strangers' wallets, and their account page then carries it forever.

Open
OID
0bd071…fa4d:10
Claim details

Inspect func

Burn

func(amount int64)

Burn destroys \`amount\` of the CALLER's moultest, and only the caller's. The banker this realm holds could remove coins from any address on the chain without asking, so the \`who\` here is read from the call frame and is never a parameter. A clawback is what an issuing realm is always able to write; the choice not to is made here, once, and cannot be revisited without a redeploy. Burning lowers what circulates and does not return any cap headroom: see [MaxPerAccount](#MaxPerAccount).

Open
OID
0bd071…fa4d:12
Burn details

Inspect func

Tip

func(to .uverse.address, note string) int64

Tip forwards the moultest attached to THIS transaction to \`to\`, and writes the note on a public board. The coin arrives in the \`-send\` envelope of the call, credited to this realm's address before a line of this function runs, and leaves through a BankerTypeOriginSend banker, whose whole authority is that envelope: it can spend what this message paid in and not one coin more, not even out of the realm's own balance. So the realm can route a payment it was handed while being structurally unable to touch anything else. A GRC20 has no equivalent. Its tokens cannot ride a message, so the same flow costs an Approve, then a call, then an allowance that outlives both. Anything else in the envelope (the GNOT covering a storage deposit, say) is left alone and stays with the realm.

Open
OID
0bd071…fa4d:13
Tip details

Inspect func

BalanceOf

func(who .uverse.address) int64

BalanceOf returns what the bank holds of moultest for \`who\`. It reads the chain, not this realm: a balance this realm never saw counts the same.

Open
OID
0bd071…fa4d:14
BalanceOf details

Inspect func

Circulating

func() int64

Circulating returns how much moultest exists right now, from the bank.

Open
OID
0bd071…fa4d:15
Circulating details

Inspect func

Issued

func() int64

Issued returns how much this realm has ever issued. It only grows, and it is what [MaxSupply](#MaxSupply) caps.

Open
OID
0bd071…fa4d:16
Issued details

Inspect func

Burned

func() int64

Burned returns how much has been destroyed through [Burn](#Burn).

Open
OID
0bd071…fa4d:17
Burned details

Inspect func

NextClaim

func(who .uverse.address) (int64, bool)

NextClaim returns the block height at which \`who\` may claim again, and whether they have ever claimed at all.

Open
OID
0bd071…fa4d:18
NextClaim details

Inspect func

ClaimedBy

func(who .uverse.address) int64

ClaimedBy returns the lifetime total issued to \`who\` by this realm, which is what [MaxPerAccount](#MaxPerAccount) caps.

Open
OID
0bd071…fa4d:19
ClaimedBy details

Inspect func

Accounts

func() int

Accounts returns how many addresses have ever claimed.

Open
OID
0bd071…fa4d:20
Accounts details

Inspect func

accountOf

func(who .uverse.address) *v0.account
Open
OID
0bd071…fa4d:21
accountOf details

Inspect func

Render

func(path string) string

Render shows the coin, what is left under each cap, and the tip board. \`?\<address>\` adds that address's balance and claim state.

Open
OID
0bd071…fa4d:23
Render details

Inspect func

renderAccount

func(path string) string
Open
OID
0bd071…fa4d:26
renderAccount details

Inspect func
Name : untyped string ="moultest"
Path : untyped string ="gno.land/r/moul/x/moultest/v0"
Denom : string ="/gno.land/r/moul/x/moultest/v0:moultest"
ClaimAmount : int64 =10000
ClaimEvery : int64 =100
MaxPerAccount : int64 =100000
MaxSupply : int64 =1000000
MaxNote : untyped bigint =(120 <untyped> bigint)
MaxTips : untyped bigint =(20 <untyped> bigint)
account : type =v0.account
tip : type =v0.tip
accounts : *v0.Tree Inspect
issued : int64 =0
burned : int64 =0
tips : []*v0.tip =<zero>
Claim : func() int64 Inspect
Burn : func(amount int64) Inspect
Tip : func(to .uverse.address, note string) int64 Inspect
BalanceOf : func(who .uverse.address) int64 Inspect
Circulating : func() int64 Inspect
Issued : func() int64 Inspect
Burned : func() int64 Inspect
NextClaim : func(who .uverse.address) (int64, bool) Inspect
ClaimedBy : func(who .uverse.address) int64 Inspect
Accounts : func() int Inspect
accountOf : func(who .uverse.address) *v0.account Inspect
caller : func() .uverse.address Inspect
Render : func(path string) string Inspect
renderSupply : func() string Inspect
renderAccount : func(path string) string Inspect
renderTips : func() string Inspect
renderUsage : func() string Inspect