Skip to content

feat(contracts): add contract upgrade timelock tests#415

Open
pauljacobb wants to merge 1 commit into
AnnabelJoe:mainfrom
pauljacobb:feat/284-contract-upgrade-timelock
Open

feat(contracts): add contract upgrade timelock tests#415
pauljacobb wants to merge 1 commit into
AnnabelJoe:mainfrom
pauljacobb:feat/284-contract-upgrade-timelock

Conversation

@pauljacobb
Copy link
Copy Markdown

Adds comprehensive tests for the contract upgrade mechanism with 48-hour timelock in community_governance.

Tests cover all acceptance criteria

  • propose_upgrade() restricted to admin (non-admin panics)
  • 48-hour timelock enforced (execute before unlock panics with timelock not elapsed)
  • Upgrade announcement event emitted on proposal
  • Timelock cancellable by admin (cancel_upgrade clears pending)
  • Cancel restricted to admin, cancel when nothing pending panics
  • Double-propose while pending panics; re-propose after cancel succeeds

Closes #284

…nnabelJoe#284)

- Tests for propose_upgrade restricted to admin
- Tests for 48-hour timelock enforcement
- Tests for upgrade announcement (event emitted)
- Tests for cancellation by admin within window
- Tests for full upgrade flow and edge cases

Closes AnnabelJoe#284
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

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

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.

Add contract upgrade mechanism with timelock

1 participant