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

v0 source realm

Package multisig implements an M-of-N approval multisig realm.

Readme View source

M-of-N Multisig

⚠️ Experimental — generated with no human supervision. This realm was produced automatically by an MCP-driven agent to exercise the gno MCP server and tooling, and to generate test content for gno compilers, linters and formatters. Not audited. Not for production. Full context & folder README: r/moul/x/daily


An approval multisig realm, ported from the classic Solidity idea. A fixed set of owners is configured once with a required approval threshold. Any owner can create a proposal, owners approve it, and when the number of distinct approvals reaches the threshold the proposal is automatically marked Executed. This realm tracks approvals only — it does not custody or move funds.

Realm path: gno.land/r/REPLACE_ADDR/multisig

Example calls

 1# Initialize once: 3 owners, need 2 approvals to execute.
 2gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/multisig" \
 3  -func Setup -args "g1addr1,g1addr2,g1addr3" -args 2 ...
 4
 5# An owner creates a proposal (returns its id, e.g. 0).
 6gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/multisig" \
 7  -func Propose -args "send funds to treasury" ...
 8
 9# Owners approve; the 2nd distinct approval flips it to Executed.
10gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/multisig" \
11  -func Approve -args 0 ...

Render the realm (owners, threshold, proposals with approval counts + state) by browsing to its path on gno.land.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/r/moul/x/daily/multisig/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package multisig implements an M-of-N approval multisig realm.

It is a port of the classic Solidity multisig idea: a fixed set of owners is configured once, any owner may create a proposal, owners approve it, and once the number of distinct approvals reaches the threshold the proposal is marked "Executed". This realm tracks approvals only — it does not move funds.

Functions 4

func Approve

crossing Action
1func Approve(cur realm, id int)
source

Approve records an owner's approval for a proposal. When the count of distinct approvals reaches the threshold, the proposal becomes Executed.

func Propose

crossing Action
1func Propose(cur realm, description string) int
source

Propose creates a new proposal authored by an owner and returns its id.

func Render

1func Render(path string) string
source

Render returns a Markdown view of the multisig configuration and proposals.

func Setup

crossing Action
1func Setup(cur realm, ownersCSV string, thresholdN int)
source

Setup configures the multisig exactly once. owners is a comma-separated list of bech32 addresses; threshold is the number of approvals required to execute a proposal. It panics (cross-realm abort) on invalid input or if already set.

Imports 6

Source Files 3