You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,52 @@ forge lint
45
45
- Update surya doc by running the 3 scripts in [./doc/script](./doc/script)
46
46
- Update changelog
47
47
48
+
49
+
50
+
### v3.0.0-rc4 - 2026-05-22
51
+
52
+
### Added
53
+
54
+
- Add `RuleMintAllowance` mock rule: admin-controlled per-minter mint allowance with `setMintAllowance(address, uint256)`, enforcement in `transferred(spender, from, to, value)` when `from == address(0)`, and `CODE_MINTER_INSUFFICIENT_ALLOWANCE` (code 81).
55
+
- Add `ERC3643ComplianceModuleInvariantStorage` in `src/modules/library/` to hold all `RuleEngine_ERC3643Compliance_*` custom errors, following the invariant storage pattern already used by `RulesManagementModule`.
56
+
- Add `ERC3643ComplianceRolesStorage` in `src/modules/library/` as a dedicated contract for `COMPLIANCE_MANAGER_ROLE`, separating role constants from error/event declarations.
57
+
58
+
### Changed
59
+
60
+
-`ERC3643ComplianceModule` now inherits `ERC3643ComplianceModuleInvariantStorage` and `ERC3643ComplianceRolesStorage`; errors and role constant are no longer declared inline.
61
+
-`RuleWhitelist.detectTransferRestrictionFrom`: spender check is now skipped for mint (`from == address(0)`) and burn (`to == address(0)`) operations, as the operator in those cases is the authorized minter/burner rather than a delegated spender.
62
+
-`RuleWhitelist.transferred` (both overloads): removed `view` modifier to match the intended mutable-callback semantics of the `IRule` interface.
63
+
-`RuleMintAllowance.transferred(address, address, uint256)`: removed `view` modifier for the same reason.
64
+
-`COMPLIANCE_MANAGER_ROLE` moved from inline declaration in `ERC3643ComplianceModule` to `ERC3643ComplianceRolesStorage`.
65
+
-`VersionModule.VERSION` constant visibility changed from `private` to `internal` to allow direct access by inheriting contracts and tests.
66
+
-`IRulesManagementModule.containsRule` now correctly declares `view`.
67
+
-`IRulesManagementModule.setMaxRules` NatSpec documents that high cap values re-expose O(n) gas cost for administrative operations such as `clearRules`.
68
+
-`IRulesManagementModule.clearRules` NatSpec updated to reflect O(n) cost relative to rule count and the interaction with `maxRules`.
69
+
-`RulesManagementModule.setRules` NatSpec now documents that `ClearRules` is emitted when replacing a non-empty rule set, in addition to `AddRule` per new rule.
70
+
-`RuleWhitelist` imports converted from plain imports with forge-lint suppression comments to named imports.
71
+
-`RuleEngineOwnable2Step` constructor now has full `@notice`/`@param` NatSpec.
72
+
-`RuleEngine.grantRole` NatSpec documents the intentional asymmetry: the check prevents granting roles to current rules but does not prevent adding a privileged address as a rule afterwards.
73
+
-`ERC3643ComplianceModule.bindToken` and `ERC3643ComplianceExtendedModule.bindTokens` now carry a `@custom:security-note` warning about cross-token state contamination in multi-tenant setups with stateful/operation rules.
74
+
75
+
### Documentation
76
+
77
+
- CLAUDE.md / AGENTS.md:
78
+
- Inheritance hierarchy corrected to show `ERC3643ComplianceExtendedModule` → `ERC3643ComplianceModule` → `ERC3643ComplianceModuleInvariantStorage`.
79
+
- Access control pattern section now documents the `_onlyRulesLimitManager` hook alongside `_onlyRulesManager` and `_onlyComplianceManager`.
80
+
- Rule Execution Flow diagram extended with `created` and `destroyed` ERC-3643 entry points.
81
+
- README:
82
+
- CMTAT target version updated to v3.3.0 in both the compatibility table and the dependencies section.
83
+
- "Like CMTAT" section rewritten to document the v3.3.0 spender path for mint and burn, with an operation/address table and a rule-authoring note.
84
+
-`bindToken`/`unbindToken` function table updated to reflect `COMPLIANCE_MANAGER_ROLE or approved token self-call` access path.
- Enforce an on-chain maximum rule count in `RulesManagementModule` to mitigate transfer liveness risk from unbounded per-transfer rule iteration (Nethermind AuditAgent finding 3 follow-up).
0 commit comments