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

nativereg: what a native denom means

A realm-issued coin is a string and a balance. The chain stores no name, no symbol and no decimals for it, so this realm does. An issuer registers its own denoms and nobody else's: the package path is embedded in the denom, and that is the whole authorization.

Registered

Nothing registered yet.

Register your own

From inside the realm that issues the coin, never from a wallet:

1import "gno.land/r/moul/x/nativereg/v0"
2
3func init(cur realm) {
4	nativereg.Register(cross(cur), Denom, "My Coin", "MINE", 6,
5		"one line about what it is for")
6}

Decimals is a display hint. The bank counts whole units and knows nothing about divisibility.