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.

bolo state

Back to all declarations

adminAddr

.uverse.address

Value

<gnolang.StringValue>

Error

type

Error is the type of every failure the registry reports (API C10, §7). Each one is a constant led by its copy key, the same keys v0 uses (UI spec §8).

Value

bolo.Error

ErrNotUserCall

bolo.Error

Value

<gnolang.StringValue>

ErrSessionKey

bolo.Error

Value

<gnolang.StringValue>

ErrNotAdmin

bolo.Error

Value

<gnolang.StringValue>

ErrSetting

bolo.Error

Value

<gnolang.StringValue>

assertCurrent

func()

assertCurrent is the first statement of every crossing function (API C2).

Open
OID
053643…837f:3
assertCurrent details

Inspect func

assertCodeCaller

func()

assertCodeCaller refuses any caller but a deployed realm (API C11). A maketx run script is ephemeral and code at once: it is refused here, as is a user.

Open
OID
053643…837f:5
assertCodeCaller details

Inspect func

assertSigner

func(who .uverse.address)

assertSigner runs right after C11's branch in every write: no session key, in either branch (C11), then the caller must be who (API §3.7).

Open
OID
053643…837f:6
assertSigner details

Inspect func

checkCandidate

func(a .uverse.address)

checkCandidate refuses, with ErrSetting, a malformed address (C12: exactly 40 characters, a lowercase "g" first, then IsValid) and the registry's own address and storage-deposit address, which can never accept the admin role (API §3.7).

Open
OID
053643…837f:7
checkCandidate details

Inspect func

registryPath

untyped string

Value

"gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo"

versionPrefix

untyped string

Value

"gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v"

maxVersions

untyped bigint

Value

(50 <untyped> bigint)

maxPathLen

untyped bigint

Value

(256 <untyped> bigint)

admin

.uverse.address

// a realm once a DAO accepts the role (ADR D11)

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

// the proposed admin until it accepts; "" for none

Value

<zero>

versions

[]string (len=1)

// every version added, oldest first

Open
OID
053643…837f:32
versions details (len=1)

+1 more Inspect slice

added

v0.Tree

// path → true, for lookups

Open
OID
053643…837f:14
added details

Inspect ref

current

string

// "" until the first SetCurrent

Value

"gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0"

evVersionAdded

untyped string

The registry's events (API §6).

Value

"VersionAdded"

evCurrentSet

untyped string

The registry's events (API §6).

Value

"CurrentSet"

evAdminProposed

untyped string

The registry's events (API §6).

Value

"AdminProposed"

evAdminChanged

untyped string

The registry's events (API §6).

Value

"AdminChanged"

Current

func() string

Current returns the version new campaigns should use: a pkgpath, or "" before the first SetCurrent.

Open
OID
053643…837f:16
Current details

Inspect func

Versions

func() []string

Versions returns every version ever added, oldest first, as a copy.

Open
OID
053643…837f:18
Versions details

Inspect func

GetAdmin

func() (.uverse.address, .uverse.address)

GetAdmin returns the admin and the proposed admin, "" when there is none.

Open
OID
053643…837f:19
GetAdmin details

Inspect func

AddVersion

func(path string)

AddVersion registers a version. None is ever removed.

Open
OID
053643…837f:20
AddVersion details

Inspect func

SetCurrent

func(path string)

SetCurrent points new campaigns, and their donors' money, at a version already added.

Open
OID
053643…837f:21
SetCurrent details

Inspect func

ProposeAdmin

func(next .uverse.address)

ProposeAdmin proposes next as the registry's admin, who takes over by accepting. A second proposal replaces the first.

Open
OID
053643…837f:22
ProposeAdmin details

Inspect func

AcceptAdmin

func()

AcceptAdmin makes the proposed admin the admin, and ends the proposal.

Open
OID
053643…837f:23
AcceptAdmin details

Inspect func

Render

func(path string) string

Render is Bolo's front page on gnoweb, the twin of the web app's Home (UI spec §3, §4.13): the name, the tagline, a link to the current version, then the versions, oldest first, the current one marked. It ignores path: nothing a visitor types reaches the page (API §3.7).

Open
OID
053643…837f:24
Render details

Inspect func

checkNewVersion

func(path string)

checkNewVersion refuses, with ErrSetting, a path that isn't a version path, one already added, and one past the cap (API §3.7).

Open
OID
053643…837f:25
checkNewVersion details

Inspect func

isVersionPath

func(path string) bool

isVersionPath reports whether path names a Bolo version (API §3.7), parsed by hand: exactly versionPrefix, then 0 or a number without a leading zero, and nothing else, in at most maxPathLen bytes. v012 would be another package than v12, so it is refused.

Open
OID
053643…837f:26
isVersionPath details

Inspect func
adminAddr : .uverse.address =<gnolang.StringValue>
Error : type =bolo.Error
ErrNotUserCall : bolo.Error =<gnolang.StringValue>
ErrSessionKey : bolo.Error =<gnolang.StringValue>
ErrNotAdmin : bolo.Error =<gnolang.StringValue>
ErrSetting : bolo.Error =<gnolang.StringValue>
assertCurrent : func() Inspect
assertCodeCaller : func() Inspect
assertSigner : func(who .uverse.address) Inspect
checkCandidate : func(a .uverse.address) Inspect
init.10 : func() Inspect
registryPath : untyped string ="gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo"
versionPrefix : untyped string ="gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v"
maxVersions : untyped bigint =(50 <untyped> bigint)
maxPathLen : untyped bigint =(256 <untyped> bigint)
admin : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
versions : []string (len=1) Inspect
added : v0.Tree Inspect
current : string ="gno.land/r/g12yg9nh4ncma44emgm8msxe8aavzywt0p95tanv/bolo/v0"
evVersionAdded : untyped string ="VersionAdded"
evCurrentSet : untyped string ="CurrentSet"
evAdminProposed : untyped string ="AdminProposed"
evAdminChanged : untyped string ="AdminChanged"
Current : func() string Inspect
Versions : func() []string Inspect
GetAdmin : func() (.uverse.address, .uverse.address) Inspect
AddVersion : func(path string) Inspect
SetCurrent : func(path string) Inspect
ProposeAdmin : func(next .uverse.address) Inspect
AcceptAdmin : func() Inspect
Render : func(path string) string Inspect
checkNewVersion : func(path string) Inspect
isVersionPath : func(path string) bool Inspect