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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

adtreasury state

Back to all declarations

pkgPath

untyped string

// must match gnomod.toml

Value

"gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/adtreasury"

GNOT

untyped string

Value

"ugnot"

maxMemo

untyped bigint

Value

(120 <untyped> bigint)

listMax

untyped bigint

// spends the page lists

Value

(50 <untyped> bigint)

Payment

type

Payment is one spend out of the treasury, on the record for good.

Value

adtreasury.Payment

controller

.uverse.address

// Jae's cold key (the realm ownership rule)

Value

<gnolang.StringValue>

nextController

.uverse.address

Value

<zero>

spends

[]adtreasury.Payment

Value

<zero>

spent

int64

Value

0

Balance

func() int64

Balance is the GNOT the treasury holds, in ugnot.

Open
OID
02afe8…3d1b:10
Balance details

Inspect func

Controller

func() .uverse.address
Open
OID
02afe8…3d1b:11
Controller details

Inspect func

NextController

func() .uverse.address
Open
OID
02afe8…3d1b:12
NextController details

Inspect func

Get

func(id int64) adtreasury.Payment

Get is a copy of spend id (1-based).

Open
OID
02afe8…3d1b:15
Get details

Inspect func

mustControl

func() .uverse.address
Open
OID
02afe8…3d1b:17
mustControl details

Inspect func

Spend

func(to .uverse.address, ugnot int64, memo string) int64

Spend pays ugnot to an address, by the controller, with a memo kept on the record (plain text, at most 120 characters). Returns the spend's id.

Open
OID
02afe8…3d1b:18
Spend details

Inspect func

SetController

func(to .uverse.address)

SetController names the next controller; nothing changes until they AcceptController. "" withdraws the offer.

Open
OID
02afe8…3d1b:19
SetController details

Inspect func

AcceptController

func()

AcceptController takes the controller role, by the one named (a user or a realm).

Open
OID
02afe8…3d1b:20
AcceptController details

Inspect func

plain

func(s string)

plain refuses text the page would render as markup.

Open
OID
02afe8…3d1b:21
plain details

Inspect func

Render

func(path string) string

Render: "" the treasury and its last spends; "json" its figures.

Open
OID
02afe8…3d1b:22
Render details

Inspect func

gnot

func(ugnot int64) string

gnot formats ugnot as GNOT, the trailing zeros trimmed.

Open
OID
02afe8…3d1b:24
gnot details

Inspect func
pkgPath : untyped string ="gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/adtreasury"
GNOT : untyped string ="ugnot"
maxMemo : untyped bigint =(120 <untyped> bigint)
listMax : untyped bigint =(50 <untyped> bigint)
Payment : type =adtreasury.Payment
controller : .uverse.address =<gnolang.StringValue>
nextController : .uverse.address =<zero>
spends : []adtreasury.Payment =<zero>
spent : int64 =0
init.9 : func() Inspect
Address : func() .uverse.address Inspect
Balance : func() int64 Inspect
Controller : func() .uverse.address Inspect
NextController : func() .uverse.address Inspect
Spent : func() int64 Inspect
Count : func() int Inspect
Get : func(id int64) adtreasury.Payment Inspect
caller : func() .uverse.address Inspect
mustControl : func() .uverse.address Inspect
Spend : func(to .uverse.address, ugnot int64, memo string) int64 Inspect
SetController : func(to .uverse.address) Inspect
AcceptController : func() Inspect
plain : func(s string) Inspect
Render : func(path string) string Inspect
home : func() string Inspect
gnot : func(ugnot int64) string Inspect