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 source realm

Package adtreasury is the ad station's own treasury (jae, his terminal, 2026-10-14: "it goes to a treasury specifical...

Overview

Package adtreasury is the ad station's own treasury (jae, his terminal, 2026-10-14: "it goes to a treasury specifically for the ad station with its own controls/governance" → "just me for now but make it upgradeable").

It holds GNOT: what the ad station's weekly auctions earn (r/…/adstation sends each settled week's winning bids here), and whatever anyone sends to its address. One controller spends it, each spend on the record with its memo. The controller is Jae's cold key at first; the role moves by a two-step hand-off (SetController names, AcceptController takes), and the one named may be a realm — a council or a vote later calls AcceptController and Spend through a crossing call, so the governance can be upgraded without moving the money.

Immutable, not private (gnomod.toml).

Constants 1

const pkgPath, GNOT, maxMemo, listMax

1const (
2	pkgPath = "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/adtreasury" // must match gnomod.toml
3	GNOT    = "ugnot"
4	maxMemo = 120
5	listMax = 50 // spends the page lists
6)
source

Functions 8

func AcceptController

crossing Action
1func AcceptController(cur realm)
source

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

func Render

1func Render(path string) string
source

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

func SetController

crossing Action
1func SetController(cur realm, to address)
source

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

func Spend

crossing Action
1func Spend(cur realm, to address, ugnot int64, memo string) int64
source

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.

func Get

Action
1func Get(id int64) Payment
source

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

Types 1

type Payment

struct
1type Payment struct {
2	ID     int64
3	To     address
4	Amount int64 // ugnot
5	Memo   string
6	By     address // the controller that sent it
7	At     int64   // unix seconds
8}
source

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

Dependencies

Imports 5

/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/adtreasury

Source Files 2