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.

init.gno

0.56 Kb · 14 lines
 1package bolo
 2
 3// init refuses to deploy Bolo from its admin's own key (API §3.6, ADR D11). The
 4// key that deploys under the namespace must not also be the admin: one stolen key
 5// could otherwise deploy a malicious version and point the registry at it. Then it
 6// lists the launch categories for lookups (API §2.1).
 7func init(cur realm) {
 8	if cur.Previous().Address() == adminAddr {
 9		panic("bolo: the admin key may not deploy Bolo; deploy from the namespace key, which must not be the admin")
10	}
11	for _, code := range categoryOrder {
12		categories.Set(code, true)
13	}
14}