Skip to content

Multi-Sig Gated WASM Upgrades: cancel_proposal - #818

Open
deslawson wants to merge 3 commits into
BCPathway:mainfrom
deslawson:Testing]-Test-Cancellation-cleans-up-state
Open

Multi-Sig Gated WASM Upgrades: cancel_proposal#818
deslawson wants to merge 3 commits into
BCPathway:mainfrom
deslawson:Testing]-Test-Cancellation-cleans-up-state

Conversation

@deslawson

@deslawson deslawson commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Implemented cancel_proposal for the active Proposal governance flow, allowing proposal creators to withdraw their proposal before execution. The function verifies caller identity against the stored creator, removes both the proposal and its timelock entry from state, and emits a prp_cncld event. Six unit tests cover happy path, event emission, timelock cleanup, and all three error conditions (non-creator, already executed, nonexistent). All CI checks pass clean: cargo fmt, cargo clippy, and cargo test (124/124)

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • CI
  • Chore

Checklist

  • I ran pre-commit run --all-files locally and it passed
  • All CI jobs pass on this branch
  • I added or updated tests for new behaviour
  • I updated relevant docs / comments
  • No secrets or credentials are included
  • No breaking changes to public APIs (or I've documented them)

Breaking changes?

Yes. Two breaking ABI changes in bc-forge-admin:

  1. New error variant — AdminError::NotProposalCreator = 11 appended. ABI-stable since it's appended at the end and discriminants are not reordered.
  2. New public function — cancel_proposal(env, caller, proposal_id) -> Result<(), AdminError> added to the AdminContract trait impl. Any contract consuming bc-forge-admin that re-declares the #[contractimpl] block (e.g. upgrade_e2e.rs, deployable wrappers) must add the corresponding cancel_proposal method to compile. The E2E test contract was updated accordingly.
    Both are additive changes (new variant, new function) with no reordering or renaming of existing entries.

Related issues

Closes #671

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@deslawson 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

@p3ris0n

p3ris0n commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@deslawson where are the CI checks?

Implemented cancel_proposal for the active Proposal governance flow, allowing proposal creators to withdraw their proposal before execution. The function verifies caller identity against the stored creator, removes both the proposal and its timelock entry from state, and emits a prp_cncld event. Six unit tests cover happy path, event emission, timelock cleanup, and all three error conditions (non-creator, already executed, nonexistent). All CI checks pass clean: cargo fmt, cargo clippy, and cargo test (124/124)
Closes BCPathway#671
@p3ris0n

p3ris0n commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@deslawson please resolve conflicts

p3ris0n and others added 2 commits August 28, 2026 14:08
…ent state.

Co-authored-by: Cursor <cursoragent@cursor.com>
…osal merge.

Co-authored-by: Cursor <cursoragent@cursor.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.

[Testing] Test: Cancellation cleans up state

2 participants