Skip to content

CMTAT v3.3.0#377

Open
rya-sge wants to merge 71 commits into
masterfrom
dev
Open

CMTAT v3.3.0#377
rya-sge wants to merge 71 commits into
masterfrom
dev

Conversation

@rya-sge

@rya-sge rya-sge commented May 15, 2026

Copy link
Copy Markdown
Collaborator

CMTAT v3.3.0 — Release Summary

This version has not been audited.
It introduces breaking API changes. Review the sections below before upgrading.


What Changed and Why

v3.3.0 delivers two focused batches of work across two release candidates.


Implement

#375, #376, #372

rc0 — New Deployment Variants, ERC-7943 Alignment, Operator Propagation

Permit and Multicall support

A new base contract CMTATBaseERC2612 combines ERC-2612 Permit (gasless approvals via signature) with ERC-6357 Multicall (batched calls in one transaction). Two new deployment variants are introduced: CMTATStandalonePermit and CMTATUpgradeablePermit.

Permit is gated by CMTAT's existing pause and freeze checks through a new ValidationModuleAllowance contract, so compliance rules continue to apply to allowances set via signature.

Snapshot deployment variants

A new CMTATBaseSnapshot mixin and two deployment variants — CMTATStandaloneSnapshot and CMTATUpgradeableSnapshot — provide historical balance queries via an external SnapshotEngine. This is now a distinct deployment variant rather than being including in the Standard deployment.

ERC-7551 enforcement split

ERC-7551 specific enforcement functions (forcedTransfer, freezePartialTokens, unfreezePartialTokens with bytes data) and getActiveBalanceOf have been moved from ERC20EnforcementModule into a new ERC20EnforcementERC7551Module. This keeps the base enforcement module lean (IERC3643ERC20Enforcement only) while allowing ERC-7551 deployments to opt into the extended interface.

Standard, Allowlist, ERC-7551, and ERC-1363 deployment variants all expose these functions through a new CMTATBaseERC7551Enforcement mixin.

ERC-7943 breaking changes: canSend / canReceive

The canTransact(address) function has been removed. It is replaced by two directional checks:

  • canSend(address) — blocks senders, spenders, and burn sources.
  • canReceive(address) — blocks recipients and mint targets.

The corresponding error ERC7943CannotTransact is replaced by ERC7943CannotSend and ERC7943CannotReceive. The ERC-165 interface ID for ERC-7943 changes from 0x29388973 to 0x3edbb4c4. Internal helpers (_canTransact, _canMintBurnByModuleAndRevert) are split accordingly.

RuleEngine operator propagation

burn, burnFrom, and crosschainBurn now propagate _msgSender() through the transfer-compliance hook so that spender-aware RuleEngine checks apply to operator-initiated and allowance-based burn flows. mint and crosschainMint follow the same model.

Zero-address hardening

_addAddressToTheList (enforcement freeze list) and the partial-freeze paths (_freezePartialTokens, _unfreezePartialTokens) now reject address(0) with dedicated custom errors.

OpenZeppelin upgraded to v5.6.1


rc1 — Base Hierarchy Refactor, Document Module Isolation, ERC-1643 API Change

New CMTATBaseDocument contract

Document-management authorization has been extracted from CMTATBaseAccessControl into a dedicated CMTATBaseDocument contract at level 1 in the inheritance hierarchy. This cleanly separates document role checks (_authorizeDocumentManagement, DOCUMENT_ROLE) from access-control logic.

ERC-1643 document identifiers changed to bytes32 — Breaking change

Document names throughout the ERC-1643 interface now use bytes32 instead of string:

Function v3.2.0 v3.3.0
getDocument getDocument(string) getDocument(bytes32)
getAllDocuments returns (string[]) returns (bytes32[])
setDocument setDocument(string,string,bytes32) setDocument(bytes32,string,bytes32)
removeDocument removeDocument(string) removeDocument(bytes32)

CMTAT tokenization terms are not affected. IERC1643CMTAT.DocumentInfo still uses string name for the setTerms path.

Base module numbering aligned to strict dependency order

All base contracts are now numbered to reflect their level in the inheritance graph:

Level Contract
0 CMTATBaseCore, CMTATBaseSnapshot, CMTATBaseGeneric
1 CMTATBaseDocument
2 CMTATBaseAccessControl
3 CMTATBaseAllowlist, CMTATBaseRuleEngine
4 CMTATBaseDebt, CMTATBaseERC1404
5 CMTATBaseERC20CrossChain
6 CMTATBaseERC2612, CMTATBaseERC2771, CMTATBaseDebtEngine
7 CMTATBaseERC2771Snapshot, CMTATBaseERC7551Enforcement
8 CMTATBaseERC1363, CMTATBaseERC7551

ERC-20 CrossChain burn-path cleanup

The redundant crosschainBurn override in CMTATBaseERC20CrossChain has been removed; level-5 now delegates directly to ERC20CrossChainModule. The internal helper _burnWithSender is renamed _burnFromOperator for clarity. No external API change.


Test Count

Version Automated tests
v3.2.0 3,078
v3.3.0-rc1 5,630

…ive and ERC7943CannotTransact with directional errors
…t tests, remove stale snapshot hooks from non-snapshot deployments (ERC7551/ERC1363/debt), and fix snapshot npm script paths.
… and remove invalid snapshot coverage from UUPS tests
… update ERC7551 deployment imports/docs accordingly
…eployment variant, harden zero-address freeze paths, and align docs/changelog/review notes for v3.3.0
…nBurn, add cross-chain compliance regression tests, and align technical docs
…n coverage (including exact-balance batch burn edge case) and document it in v3.3.0
…eview/report references, and align changelog + feedback report summaries/statuses.
… zero-address mint safety, post-mint recovery) and add burnFrom RuleEngine authorized-spender regression.
…aded burn call, explicit role grants, active-balance typing) and align zero-address frozen-token mint expectation to ERC7943 revert behavior.
rya-sge added 29 commits May 19, 2026 14:11
…e, align ERC-1643 bytes32 API, and update docs/tests/spec refs
…ndexed event, ERC-165 id) and document post-deactivation privileged operations
…semantics, add regression tests, sync ERC docs/changelog, and exclude mocks from strict size gate
…ed CMTAT document-engine mock/tests, and clarify docs that no deployment variant currently includes DocumentEngineModule
…h updated snapshot/document engine initializer behavior and level/surya references
…dundant level-5 overrides and renaming sender-aware helper to _burnFromOperator
…abilize ERC1363 meta-tx msgData deployment path
…underflow and add regression tests for frozenTokens>=balance
…rarchy docs, and harden ERC1404 frozen-balance restriction handling with regression tests
…idating trusted-forwarder calldata path without oversized standalone deployment
…e and refactor meta-tx msgData mocks/tests to avoid oversized deployment failures
… modules (zero-engine and re-initialization revert paths)
…ight/core, standard, permit, ERC1363, snapshot, document, and ERC721 generic paths)
…llowlist canSend/canReceive matrix including zero-value transfers
refactor(rc1): renumber base-module hierarchy, introduce document bas…
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.

1 participant