test(contracts): verify record_withdrawal fails while paused and set_operator rejects same-address rotation

Open Beginner friendly
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start with contracts/anchor_vault/src/test.rs and inspect the existing tests for record_withdrawal and set_operator; check contracts/anchor_vault/src/lib.rs if the same-address case exposes a missing guard. Add assertions for failure while paused, success after unpause(), and rejection of rotation to the active operator. Run cd contracts && cargo test --verbose and confirm it passes.

Written by the indexing model from the issue text.

Description

complexity: trivial contracts good first issue

Summary

Expand anchor_vault Soroban unit test coverage to verify that record_withdrawal fails when the contract is paused and that set_operator rejects rotation to the current operator address.

Files

  • contracts/anchor_vault/src/test.rs
  • contracts/anchor_vault/src/lib.rs (if same-address guard is needed)

Acceptance Criteria

  • Test asserts record_withdrawal fails while paused and succeeds after unpause().
  • Test asserts set_operator rejects rotating to the already-active operator address.
  • cd contracts && cargo test --verbose passes cleanly.
Dominant language
Python
Stars
0
Forks
1
Avg merge
19h 43m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sepbox-dev/sepbox

All issues in sepbox-dev/sepbox

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.