Skip to content

feat(deprader_router): add pause, upgrade, and bounty listing - #232

Merged
ALLEN-AYODEJI merged 2 commits into
DepRadarOrg:mainfrom
Shredder401k:wave10
Oct 20, 2026
Merged

ALLEN-AYODEJI merged 2 commits into
DepRadarOrg:mainfrom
Shredder401k:wave10

Conversation

@Shredder401k

Copy link
Copy Markdown

Contract Enhancements: Withdraw, Pause, Upgrade, and Pagination

This PR implements four contract improvements for deprader_router:

#111 - Claimant Claim Withdrawal

Researchers can now retract their own pending claims via withdraw_claim(). Adds ClaimStatus::Withdrawn variant, decrements pending_claims, and emits a withdrawn event.

#112 - Emergency Pause Switch

Admin can pause/unpause the contract to halt fund movements during emergencies. While paused:

  • create_bounty, submit_claim, and release fail with Error::Paused
  • Admin can still cancel_bounty to return locked funds

#113 - Admin-Gated Contract Upgrade

Admin can upgrade the contract WASM via upgrade(new_wasm_hash) without losing state or changing the contract ID. Includes upgrade procedure documentation in DEPLOYMENT.md.

#114 - Paginated Bounty Listing

New get_bounties(start_id, limit) getter returns multiple bounties in one RPC call (limit capped at 50), reducing N round trips to 1.


Changes:

  • Added ClaimStatus::Withdrawn enum variant
  • Added Error::Paused and Error::InvalidLimit error variants
  • Added DataKey::Paused and DataKey::WasmHash storage keys
  • Implemented withdraw_claim(), pause(), unpause(), is_paused(), upgrade(), and get_bounties()
  • All state-changing functions now check pause state
  • Added 17 new contract tests
  • Created DEPLOYMENT.md with upgrade instructions
  • Updated PROGRESS.md with all four entries

Testing:

  • All 17 new tests pass (withdraw, pause/unpause, upgrade, pagination)
  • Existing tests remain green
  • Contract compiles to WASM successfully

Closes #111
Closes #112
Closes #113
Closes #114

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@Shredder401k Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ALLEN-AYODEJI
ALLEN-AYODEJI merged commit 0761c77 into DepRadarOrg:main Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants