Added
- Add
RuleEngineOwnablecontract variant using ERC-173 ownership (Ownable) as an alternative to the RBAC-basedRuleEngine. ERC-3643 compliance specification recommends ERC-173 for ownership. - Add ERC-165
supportsInterfacecheck when adding rules viaaddRule/setRules, ensuring that only valid rule contracts (implementingIRule) can be registered. - Use CMTAT library for ERC-165 interface ID constants (
RuleEngineInterfaceId,ERC1404ExtendInterfaceId). - Add compatibility with CMTAT v3.0.0 and v3.2.0-rc0 (dual-version test support via
CMTATDeploymentV3).
Fixed
- Fix deployment script
CMTATWithRuleEngineScript: deploy CMTAT with the deployer as admin instead of a hardcoded address, which causedsetRuleEngineto revert withAccessControlUnauthorizedAccount. - Remove dead code in
RuleEngineOwnableconstructor: the custom zero-address owner check was unreachable becauseOwnable(owner_)already reverts withOwnableInvalidOwner(address(0)). - Remove duplicate code across rule contracts.
Dependencies
- Update CMTAT library to v3.2.0-rc0
- Update OpenZeppelin Contracts to v5.4.0
- Update Foundry (forge-std) to v1.10.0
- Set Solidity version to 0.8.33 and EVM version to Prague (Pectra upgrade)
Code quality
- Resolve all
forge lintwarnings: convert plain imports to named imports, remove unused imports, rename variables/functions to mixedCase, refactor modifier logic, and add targeted lint suppressions where appropriate. - Replace Prettier and Ethlint/Solium with Foundry-native
forge fmtandforge lintfor formatting and linting. - Run
forge fmton the entire codebase.
Testing
- Add deployment script tests (
test/script/) forCMTATWithRuleEngineScriptandRuleEngineScript. - Add
RuleEngineOwnabletest suite: deployment, access control, ERC-3643 compliance, rules management, and coverage tests. - Add
IRuleInterfaceIdtest for ERC-165 interface ID computation. - Add integration tests with CMTAT v3.0.0 and v3.2.0-rc0.
- Improve code coverage with additional edge-case tests.
Documentation
- Expand README with contract variants comparison, constructor API, access control details, and ERC-173 ownership documentation.
- Add formatting & linting section to README and TOOLCHAIN documentation.
- Update surya diagrams, coverage reports, and specification documents.
Acknowledge
We would like to thank @amilazz, as well as CMTA Tech Comite for their valuable feedback and contributions to this release. Their input played an important role in improving the project, and we sincerely appreciate their support.