Skip to content

[SC-40] Expand multisig-wallet test coverage (942 lines, only 4 tests) #1204

Description

@yusuftomilola

Overview

contracts/multisig-wallet/ is 942 lines across lib.rs, types.rs, errors.rs, and tests.rs with only 4 #[test] functions. A multisig wallet is a security-critical primitive — four tests is far short of what it needs.

Tasks

  • Enumerate every public entrypoint in lib.rs and identify which lack coverage.
  • Test signer management: add, remove, replace, and the boundary where removal would drop signers below the threshold.
  • Test threshold changes, including rejecting a threshold greater than the signer count or equal to zero.
  • Test proposal lifecycle: create, approve, reach threshold, execute, and reject re-execution of an already-executed proposal.
  • Test edge cases: duplicate approvals, approval by a removed signer, and expired proposals if supported.
  • Add negative auth tests without mock_all_auths.
  • Assert every errors.rs variant is reachable.

Acceptance Criteria

  • At least 30 tests covering every entrypoint.
  • Threshold and signer-count invariants are enforced and tested at their boundaries.
  • A removed signer's prior approval cannot be counted toward a threshold.

Notes for Contributors

Requires Rust + Soroban. Workspace: contracts/ (soroban-sdk 22, members: assetsup, contrib, multisig-wallet, multisig_transfer, asset-maintenance). Run cargo test --all, cargo fmt --all -- --check, and cargo clippy --all-targets --all-features -- -D warnings before opening a PR — CI enforces all three. Comment below to be assigned.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcontracttestingTests, QA, and quality assurance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions