diff --git a/CHANGELOG.md b/CHANGELOG.md index fd408cb..8a4f705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,31 @@ # CHANGELOG -Please follow [https://changelog.md/](https://changelog.md/) conventions. +Please follow [https://changelog.md](https://changelog.md) conventions and the other conventions below + +## Semantic Version 2.0.0 + +Given a version number MAJOR.MINOR.PATCH, increment the: + +1. MAJOR version when the new version makes: + - Incompatible proxy **storage** change internally or through the upgrade of an external library (OpenZeppelin) + - A significant change in external APIs (public/external functions) or in the internal architecture +2. MINOR version when the new version adds functionality in a backward compatible manner +3. PATCH version when the new version makes backward compatible bug fixes + +See [https://semver.org](https://semver.org) + +## Type of changes + +- `Added` for new features. +- `Changed` for changes in existing functionality. +- `Deprecated` for soon-to-be removed features. +- `Removed` for now removed features. +- `Fixed` for any bug fixes. +- `Security` in case of vulnerabilities. + +Reference: [keepachangelog.com/en/1.1.0/](https://keepachangelog.com/en/1.1.0/) + +Custom changelog tag: `Dependencies`, `Documentation`, `Testing` ## Checklist @@ -20,7 +45,51 @@ forge lint - Update surya doc by running the 3 scripts in [./doc/script](./doc/script) - Update changelog -## v3.0.0-rc0 +## v3.0.0-rc1 - 2026-02-16 + +### Added + +- Add `RuleEngineOwnable` contract variant using ERC-173 ownership (`Ownable`) as an alternative to the RBAC-based `RuleEngine`. ERC-3643 compliance specification recommends ERC-173 for ownership. +- Add ERC-165 `supportsInterface` check when adding rules via `addRule` / `setRules`, ensuring that only valid rule contracts (implementing `IRule`) 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 caused `setRuleEngine` to revert with `AccessControlUnauthorizedAccount`. +- Remove dead code in `RuleEngineOwnable` constructor: the custom zero-address owner check was unreachable because `Ownable(owner_)` already reverts with `OwnableInvalidOwner(address(0))`. +- Remove duplicate code across rule contracts. + +### Dependencies + +- Update CMTAT library to [v3.2.0-rc0](https://github.com/CMTA/CMTAT) +- Update OpenZeppelin Contracts to [v5.4.0](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.4.0) +- Update Foundry (forge-std) to [v1.10.0](https://github.com/foundry-rs/forge-std/releases/tag/v1.10.0) +- Set Solidity version to [0.8.33](https://docs.soliditylang.org/en/v0.8.33/) and EVM version to Prague (Pectra upgrade) + +### Code quality + +- Resolve all `forge lint` warnings: 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 fmt` and `forge lint` for formatting and linting. +- Run `forge fmt` on the entire codebase. + +### Testing + +- Add deployment script tests (`test/script/`) for `CMTATWithRuleEngineScript` and `RuleEngineScript`. +- Add `RuleEngineOwnable` test suite: deployment, access control, ERC-3643 compliance, rules management, and coverage tests. +- Add `IRuleInterfaceId` test 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. + +## v3.0.0-rc0 - 2025-08-15 + +Commit: f3283c3b8a99089c3c6f674150831003a6bd2927 - Rule contracts, requires to perform compliance check, have now their own dedicated [GitHub repository](https://github.com/CMTA/Rules). It means that these contract will be developed and audited separately from the `RuleEngine`. This provides more flexibility and makes it easier to manage audits. - There is now only one type of rule (read-write rules). Before that: @@ -33,7 +102,7 @@ forge lint - `RuleEngineOperation`-> `RulesManagementModule` - `MetaTxModuleStandalone` -> `ERC2771ModuleStandalone` -## v2.1.0 +## v2.1.0 - 2025-07-04 - Update RuleEngine to CMTAT v3.0.0-rc5 @@ -44,11 +113,11 @@ forge lint - Add functions `detectTransferRestrictionFrom` and `canTransferFrom` -## v2.0.5 +## v2.0.5 - 2024-12-21 - Fix a bug present in the Conditional Transfer rule and improve the corresponding tests. -## v2.0.4 +## v2.0.4 - 2024-12-16 - Fix a bug present in the Conditional Transfer rule and the corresponding test. - Config file: @@ -59,23 +128,23 @@ forge lint - Integration test with CMTAT: set the CMTAT version to [v2.5.1](https://github.com/CMTA/CMTAT/releases/tag/v2.5.1) - Access control: The default admin has by default all the roles for the RuleEngine and the different rules -## v2.0.3 - 20240910 +## v2.0.3 - 2024-09-10 - Small optimization in WhitelistWrapper; add a break in a loop - Set Solidity version to 0.8.26 in config file -## v2.0.2 - 20240617 +## v2.0.2 - 2024-06-17 - Create abstract contract ruleWhitelistCommon to contain code shared between ruleWhitelist & ruleWhitelistWrapper - Split ADDRESS_LIST_ROLE in two distinct roles : ADDRESS_LIST_ADD_ROLE && ADDRESS_LIST_REMOVE_ROLE -## v2.0.1 - 20240611 +## v2.0.1 - 2024-06-11 - Add a new rule WhitelistWrapper This rule can be used to restrict transfers from/to only addresses inside a group of whitelist rules managed by different operators. -## v2.0.0 - 20240515 +## v2.0.0 - 2024-05-15 - Implement the new architecture for the RuleEngine, with ValidationRule and OperationRule - Add the rule ConditionalTransfer as an Operation rule @@ -84,19 +153,19 @@ This rule can be used to restrict transfers from/to only addresses inside a grou - Upgrade the library CMTAT to the version [v2.4.0](https://github.com/CMTA/CMTAT/releases/tag/v2.4.0) - Fix a minor bug when rules are deleted with clearRules -## v1.0.3 - 20231122 +## v1.0.3 - 2023-11-22 - Upgrade the library CMTAT to the version [v2.3.1](https://github.com/CMTA/CMTAT/releases/tag/v2.3.1) - Use custom errors instead of revert message (gas optimization) - Add the rule `SanctionList` - Upgrade OpenZeppelin to the version [v5.0.0](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.0) -## v1.0.2 - 20230609 +## v1.0.2 - 2023-06-09 - Upgrade the library CMTAT to the vesion [v2.3.0](https://github.com/CMTA/CMTAT/releases/tag/v2.3.0) - Set the number of runs for the optimizer to 200 for Hardhat and Foundry, see [https://docs.soliditylang.org/en/v0.8.17/using-the-compiler.html#optimizer-options](https://docs.soliditylang.org/en/v0.8.17/using-the-compiler.html#optimizer-options) -## 1.0.2-rc.0 - 20230523 +## 1.0.2-rc.0 - 2023-05-23 The release 1.0.2 contains mainly the different fixes and improvements related to the audit performed on the version 1.0.1. @@ -133,11 +202,11 @@ Whitelist - CVF-4, CVF-5: remove useless conditional statement ([pull/19/](https://github.com/CMTA/RuleEngine/pull/19/)) - CVF-15, CVF-16, CVF-17: improve readibility ([pull/24](https://github.com/CMTA/RuleEngine/pull/24)) -## 1.0.1 - 20230122 +## 1.0.1 - 2023-01-22 - Update the library CMTAT to the version [2.2](https://github.com/CMTA/CMTAT/releases/tag/2.2) - Update the library OpenZeppelin to the version [4.8.1](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.8.1) - Improve integration test with CMTAT -## 1.0.0 - 20221114 +## 1.0.0 - 2022-11-14 - 🎉 first release!<