v3.3.0-rc1
Pre-release
Pre-release
Note: This version has not been audited.
Smart contract
Added
- New base contract
CMTATBaseDocument:- Introduced as
contracts/modules/1_CMTATBaseDocument.sol. - Isolates document-management authorization (
_authorizeDocumentManagement) fromCMTATBaseAccessControl. - Composes
DocumentERC1643Moduleon top of the rule-engine base path.
- Introduced as
- Stateful RuleEngine transfer hook support (testing/mocks):
- Added
IRuleTransferHook(contracts/mocks/RuleEngine/interfaces/IRuleTransferHook.sol) to allow rules to update rule-local state on transfer callbacks. - Added
RuleTokenHolderTracker(contracts/mocks/RuleEngine/RuleTokenHolderTracker.sol) to track holder balances/list in rule storage. RuleEngineMocknow wires the holder-tracker rule and executes transfer hooks intransferred(...)paths.
- Added
Changed
- ERC-1643 document identifier format aligned to
bytes32(breaking API change for document functions):- Previous CMTAT variant (e.g.
v3.2.0) usedstringfor document names inIERC1643(getDocument(string),getAllDocuments() -> string[]). - Current implementation uses
bytes32document names (getDocument(bytes32),getAllDocuments() -> bytes32[]) and exposessetDocument(bytes32,string,bytes32)/removeDocument(bytes32)with associated events. - CMTAT terms remain on the modified CMTAT structure:
IERC1643CMTAT.DocumentInfostill usesstring namefor tokenization terms metadata (setTermspath).
- Previous CMTAT variant (e.g.
- Base hierarchy refactor (strict dependency-order levels):
CMTATBaseDocumentat level 1 (contracts/modules/1_CMTATBaseDocument.sol).CMTATBaseAccessControlat level 2 (contracts/modules/2_CMTATBaseAccessControl.sol) and now inheritsCMTATBaseDocument.CMTATBaseAllowlistandCMTATBaseRuleEngineat level 3.CMTATBaseDebtandCMTATBaseERC1404at level 4.CMTATBaseERC20CrossChainat level 5.CMTATBaseERC2612,CMTATBaseERC2771,CMTATBaseDebtEngineat level 6.CMTATBaseERC2771Snapshot,CMTATBaseERC7551Enforcementat level 7.CMTATBaseERC1363,CMTATBaseERC7551at level 8.
CMTATBaseCommonno longer inheritsDocumentERC1643Module.CMTATBaseAccessControlnow defines_authorizeDocumentManagementand enforcesDOCUMENT_ROLE.- Updated impacted imports and deployment references to match the new module numbering/layout.
- ERC20CrossChain burn-path cleanup (no external API change):
- Removed redundant
crosschainBurnoverride fromCMTATBaseERC20CrossChain; level-5 now usesERC20CrossChainModule.crosschainBurndirectly. - Removed redundant sender-aware burn override from
CMTATBaseERC20CrossChain; burn/burnFrom sender-aware flow now relies on the module implementation. - In
ERC20CrossChainModule, simplified internal self-burn routing and renamed helper_burnWithSenderto_burnFromOperatorfor clearer intent.
- Removed redundant
- Meta-tx
_msgDataERC1363 test path adjusted to avoid bytecode-size deployment failures:- Slimmed
CMTATUpgradeableERC1363MsgDataMock.getMsgData()by removing event emission and using aviewreturn path. - Reworked
test/standard/modules/MetaTxMsgDataERC1363.test.jsto validate trusted-forwarder calldata shape directly instead of relying on event parsing.
- Slimmed
Fixed
- Fixed compile-path inconsistencies caused by stale numbered imports after base-level refactor.
- Restored full compilation after engine/mock alignment:
CMTATEngineInitializerMockno longer calls unavailable document-engine initializer on snapshot path.DocumentEngineMocknow implements IERC1643-compatiblesetDocument(bytes32,string,bytes32).
Documentation
Changed
- Updated base-module hierarchy and file references in
doc/README.mdto reflect:1_CMTATBaseDocument.sol2_CMTATBaseAccessControl.sol3_CMTATBaseAllowlist.sol3_CMTATBaseRuleEngine.sol4_CMTATBaseDebt.sol4_CMTATBaseERC1404.sol5_CMTATBaseERC20CrossChain.sol6_CMTATBaseERC2612.sol6_CMTATBaseERC2771.sol6_CMTATBaseDebtEngine.sol7_CMTATBaseERC2771Snapshot.sol7_CMTATBaseERC7551Enforcement.sol8_CMTATBaseERC1363.sol8_CMTATBaseERC7551.sol
- Updated
doc/README.mdERC-1643 section to use currentbytes32API signatures (getDocument(bytes32),getAllDocuments() returns (bytes32[])) with compatibility note forIERC1643CMTAT.DocumentInfo.name(string). - Updated contracts tree file
.claude/tree/contracts_tree.txt. - Added technical clarification for freeze-event semantics across standards:
doc/technical/erc-7943-uRWA-integration.mdnow explicitly documents that baseFrozen(account, amount)is a normalized frozen-state update event (including unfreeze updates), while direction should be derived from ERC-3643/7551 directional events.doc/technical/erc-3643-implementation.mdnow documents the event-layering model (Frozenbase state update +TokensFrozen/TokensUnfrozendirectional wrappers).
Testing
Added
- Added dedicated stateful RuleEngine rule test coverage in
test/standard/modules/RuleEngineMockStatefulRule.test.js:- verifies holder-balance tracking and holder-list transitions through transfer hook callbacks.
- Added initializer edge-case tests for
DocumentEngineModuleandSnapshotEngineModule:test/common/DocumentModule/DocumentModuleSetDocumentEngineCommon.js: covers zero-engine assignment and re-initialization revert paths.test/common/SnapshotModuleCommon/SnapshotModuleSetSnapshotEngineCommon.js: covers zero-engine assignment and re-initialization revert paths.
- Added standard initializer branch tests in
test/deployment/deployment.test.js:- manual initialization path, initialization with rule engine, and double-initialize revert.
- Added interface and initializer coverage across deployment test suites:
test/common/CMTATIntegrationCommon.js: extended integration paths.test/deployment/erc721mock.test.js: ERC-721 generic initializer and interface paths.- Light/core, standard, permit, ERC-1363, snapshot, and document deployment suites.
- Added edge-case coverage for core transfer and approve paths:
test/common/ERC20BaseModuleCommon.js: zero-value transfers and explicit approve coverage.test/common/AllowlistModuleCommon.js: explicitcanSend/canReceivematrix including zero-value transfers.
- Extended
test/common/AllowlistModuleCommon.js,test/common/DocumentModule/DocumentModuleCommon.js, andtest/common/ERC20EnforcementModuleCommon.jswith additional edge-case tests.
Fixed
- Removed hardcoded
gasLimit: 30_000_000override fromdeployCMTATERC1363Standaloneintest/deploymentUtils.js. The explicit override exceeded the Prague/Fusaka per-transaction gas cap (FUSAKA_TRANSACTION_GAS_LIMIT = 16,777,216) enforced by Hardhat ≥ 2.28, causing aProviderErroron every ERC-1363 standalone test run. Auto-estimated gas is well within the cap for this contract.
Documentation
Changed
- Updated test count references in
README.mdanddoc/README.md: 3,078 → 5,630 automated tests. README.md: added hyperlinks to all ERC standard references in the features table; expanded the Supported Financial Instruments table (added Snapshot, DebtEngine, ERC-1363, and UUPS variants; clarified Allowlist entry); added Contract Sizes section with deployed/initcode sizes for all deployment variants; corrected UUPS standalone note.SECURITY.md: expanded responsible disclosure policy.doc/README.mdanddoc/SUMMARY.md: updated module-level documentation and surya reports to reflect current hierarchy and coverage results.- Updated code coverage reports in
doc/test/coverage/after full test run.