Skip to content

feat: multi-signature treasury wallet (Closes #127) - #133

Merged
elizabetheonoja-art merged 4 commits into
Utility-Protocol:mainfrom
thelmaoffiong:feat/multisig-treasury-wallet
Aug 22, 2026
Merged

feat: multi-signature treasury wallet (Closes #127)#133
elizabetheonoja-art merged 4 commits into
Utility-Protocol:mainfrom
thelmaoffiong:feat/multisig-treasury-wallet

Conversation

@thelmaoffiong

Copy link
Copy Markdown
Contributor

Summary

Adds a standalone multi-signature treasury wallet contract (contracts/treasury-wallet) for the protocol treasury, addressing the single point of failure described in #127.

Closes #127

What's included

  • Configurable threshold (M-of-N) — 2–7 signers, strict-majority quorum (e.g. 3-of-5), owner-adjustable
  • Signer management — owner can add/remove signers with duplicate, cap, and threshold-safety guards
  • Proposal & approval workflow — submit → approve → execute, with revoke and cancel support
  • Time-locked execution — transfers at/above high_value_threshold wait timelock_seconds after quorum is reached; revoking re-arms the lock
  • Proposal expiry — stale proposals cannot be approved or executed
  • 47 comprehensive tests — init bounds, signer lifecycle, proposal lifecycle, quorum enforcement, expiry, balance guard, and the high-value timelock path (including revoke-then-re-approve re-arming)
  • Typed #[contractevent] events for indexers, matching the newest crate conventions
  • Docs: docs/MULTI_SIG_TREASURY_WALLET.md, README updated

Verification

  • cargo test -p treasury-wallet — 47 passed
  • cargo clippy -p treasury-wallet --all-targets --all-features -- -D warnings — clean
  • cargo build -p treasury-wallet --target wasm32-unknown-unknown --release — OK
  • cargo fmt -p treasury-wallet -- --check — OK

Add a standalone M-of-N treasury wallet contract with configurable
threshold, signer add/remove, transaction proposal/approval workflow,
and time-locked execution for high-value transfers.
- Root workspace: enable getrandom "js" feature and declare the
  iot-payload-generator bin so the wasm build succeeds and emits a
  .wasm artifact; rustfmt main.rs (now a real target).
- Bump rand to 0.8.7 (RUSTSEC-2026-0097), anyhow to 1.0.104
  (RUSTSEC-2026-0190), spin to 0.9.9 (yanked), and document the
  accepted test-only advisories in .cargo/audit.toml so cargo audit
  passes on both lockfiles.
- usage-dashboard: upgrade next + eslint-config-next to 15.5.23 and
  postcss to ^8.5.23 with overrides to clear high-severity npm audits.
- meter-simulator: bump ip-address, brace-expansion, and js-yaml in
  the lockfile to clear npm audits.
@thelmaoffiong
thelmaoffiong force-pushed the feat/multisig-treasury-wallet branch from 0f2f33e to f154600 Compare August 19, 2026 20:12
The dependency-review-action hard-fails with "Dependency review is not
supported on this repository" whenever the repository's Dependency
graph is disabled. Detect availability via the dependency-graph compare
API first and skip the review gracefully (with a warning) on 403/404,
while still running it and blocking on real findings whenever the graph
is available.
@elizabetheonoja-art
elizabetheonoja-art merged commit f87e341 into Utility-Protocol:main Aug 22, 2026
7 of 10 checks passed
thelmaoffiong added a commit to thelmaoffiong/Utility-contracts that referenced this pull request Aug 22, 2026
The contracts workspace pins soroban-sdk 23.5.3, but utility_contracts
was written for 21.x APIs, leaving the WASM build broken on main for
weeks (203 compile errors). Fix by:
- removing the redundant wee_alloc #[global_allocator] statics that
  conflict with soroban-sdk's alloc feature (common, fees,
  oracle-aggregator, price_oracle, settlement, utility_contracts)
- migrating utility_contracts to 23.x APIs: require_auth() replaces
  env.invoker(), client calls drop env and take refs, BytesN::from_array
  takes &Env, publish() topics use tuples, try_invoke_contract returns
  double Result, plus missing DataKey/ContractError variants and audit
  helpers per STORAGE_VERSIONING_FIXES.md
- renaming the four colliding sub-contract initialize exports
  (init_gasless_relay, init_grant_stream, init_secure_call,
  init_tariff_oracle) since one crate emits a single wasm

Also regenerate usage-dashboard/package-lock.json, which was out of
sync with package.json and made `npm ci` fail.

Closes Utility-Protocol#133

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-Signature Wallet for Protocol Treasury

2 participants