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

hubv2 source realm

Package hubv2 is the multi-admin module router for gnomemepad (Phase 3F).

Overview

Package hubv2 is the multi-admin module router for gnomemepad (Phase 3F).

Diff vs hub v1:

  • Multiple admins (AddAdmin / RemoveAdmin / ListAdmins)
  • Any admin may SetModule / TransferAdmin rights via AddAdmin
  • Ops helpers: AdminCount, IsAdmin

Migrate: deploy hubv2 → re-SetModule all paths → point UI HUB=hubv2

Functions 13

func AddAdmin

crossing Action
1func AddAdmin(cur realm, newAdmin address)
source

AddAdmin grants admin rights (existing admin only).

func Admin

Action
1func Admin() string
source

Admin returns first admin (compat) — first key in tree iteration order.

func GetModule

Action
1func GetModule(name string) string
source

GetModule returns the package path for name, or "".

func Init

crossing Action
1func Init(cur realm)
source

Init sets the first admin (deployer EOA). Call once.

func RemoveAdmin

crossing Action
1func RemoveAdmin(cur realm, who address)
source

RemoveAdmin revokes admin. Cannot remove last admin.

func SetModule

crossing Action
1func SetModule(cur realm, name, path string)
source

SetModule registers or updates a module path (any admin).

Imports 4

Source Files 2