Skip to content

[CT-19] Write comprehensive tests for multisig-wallet contract in opsce crate #816

@yusuftomilola

Description

@yusuftomilola

Problem

contracts/multisig-wallet/src/tests.rs exists but coverage is minimal. The approval threshold logic, owner management, and transaction lifecycle (submit, approve, execute) are not fully tested.

Proposed Solution

Create contracts/opsce/src/multisig_tests.rs with a complete test suite for the multisig wallet using soroban_sdk::testutils.

Acceptance Criteria

  • initialize() — correct threshold set, duplicate init fails
  • submit_transaction() — success, non-owner submission fails
  • approve_transaction() — approvals accumulate, duplicate approval by same owner is rejected
  • execute_transaction() — executes at threshold, fails below threshold, fails on re-execution
  • revoke_approval() — revocation reduces count, execution fails after sufficient revocations
  • add_owner() and remove_owner() — non-owner calls fail; removing last owner fails
  • 2-of-3 and 3-of-5 threshold scenarios both tested
  • Tests run cleanly with cargo test -p multisig-wallet

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions