Shared treasury requiring multiple approvals for outgoing transfers. Owners propose, approve, and reject spending proposals. Transfers execute automatically when the approval threshold is met.
DAO treasuries with multi-owner control
Team fund management with shared signing
Project treasuries with governance-controlled spending
Parameter Type Description ownersVec<Address>List of owner addresses required_approvalsu64Number of approvals needed to execute a proposal nameStringTreasury name
Method Parameters Description initializeowners, required_approvals, nameSet up the treasury. Only callable once. proposeto, token_id, amount, description, deadlineOwner proposes a transfer. Returns proposal ID. approveproposal_id: u64Owner approves a proposal. Auto-executes if threshold met. rejectproposal_id: u64Owner rejects a proposal. revoke_approvalproposal_id: u64Owner revokes their previous approval. deposittoken_id: TokenId, amount: u128Anyone can deposit tokens into the treasury. expire_proposalproposal_id: u64Mark a proposal as expired after its deadline.
Method Parameters Returns Description get_config-- TreasuryConfigTreasury configuration (owners, threshold) get_proposalproposal_id: u64ProposalFull proposal details get_proposal_count-- u64Total number of proposals
pub enum ProposalStatus {
Proposed , // Awaiting approvals
Executed , // Threshold met, transfer completed
Rejected , // Rejected by an owner
Expired , // Deadline passed without execution
}
pub struct TreasuryConfig {
pub name : String ,
pub owners : Vec < Address >,
pub required_approvals : u64 ,
pub created_at : u64 ,
}
pub struct Proposal {
pub id : u64 ,
pub proposer : Address ,
pub to : Address ,
pub token_id : TokenId ,
pub amount : u128 ,
pub description : String ,
pub status : ProposalStatus ,
pub approval_count : u64 ,
pub created_at : u64 ,
pub deadline : u64 ,
}
# Deploy
norn wallet deploy-loom --name my-treasury
# Upload bytecode
norn wallet upload-bytecode --loom-id < LOOM_I D > \
--bytecode multisig-treasury.wasm
# Execute (borsh-encoded input)
norn wallet execute-loom --loom-id < LOOM_I D > --input < HE X >
# Query config
norn wallet query-loom --loom-id < LOOM_I D >