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 pure

Package safe is inspired by Gnosis Safe

Readme View source

gno.land/p/moul/safe/v0

TODO: describe this package.


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

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.

Overview

Package safe is inspired by Gnosis Safe

Functions 1

Types 2

type Proposal

interface
1type Proposal interface {
2	ID() uint
3	Active() bool
4	Executed() bool
5	Voters() []address
6}
source

type Safe

interface
 1type Safe interface {
 2	Name() string
 3	Members() []address
 4	Threshold() uint
 5	Size() uint
 6	NextProposal() Proposal
 7	UpcomingProposals(page uint) (props []Proposal, total uint)
 8	PreviousProposals(page uint) (props []Proposal, total uint)
 9
10	ProposeAddingMember(addr address, newThreshold uint) (prop Proposal, err error)
11	ProposeRemovingMember(addr address, newThreshold uint) (prop Proposal, err error)
12	ProposeUpdatingThreshold(newThreshold uint) (prop Proposal, err error)
13
14	GetProposal(id uint) Proposal
15	ApproveProposal(p Proposal) error
16	ExecuteProposal(p Proposal) error
17	CancelProposal(p Proposal) error // XXX: should be ProposeToCancel?
18
19	Render(path string) string
20}
source

Imports 1

  • chain/runtime/unsafe stdlib

Source Files 3