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)
Problem
compact-contractshas 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:Initializablecannot be reset via upgrade (safety-critical)