OpenZeppelin / OpenZeppelin/compact-contracts

Add test coverage for CMA upgradability across modules

Open
#457 0 comments 0 reactions 1 assignee View on GitHub

@0xisk is already working on this.

Since Apr 21, 2026.

  • #489 by @0xisk — open
1-medium effort: 3-M feat:upgradability
Dominant language
TypeScript
Stars
55
Forks
29
Avg merge
5d 7h
Merged PRs (30d)
25

Description

Problem

compact-contracts has no tests covering how modules behave under Midnight's Contract Maintenance Authority (CMA) upgrade mechanism (VerifierKeyInsert, VerifierKeyRemove, ReplaceAuthority).

Every module makes implicit assumptions about what ledger state survives a verifier-key rotation — none are currently asserted.

Goal

Cover the following across Ownable, AccessControl, ZOwnablePK, Pausable, Initializable, FungibleToken, NonFungibleToken:

  • State survival across VK rotation
  • CMA rotation (including rotation to empty = freeze)
  • Multi-version VK coexistence
  • Empty-CMA immutability
  • Initializable cannot be reset via upgrade (safety-critical)

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.