Releases: CMTA/SnapshotEngine
Releases · CMTA/SnapshotEngine
v0.5.0
- Changed
- Bump
VersionModule.VERSIONand deployment test expectations to0.5.0.
- Documentation
- Add short contract-level NatSpec title/description blocks to the module and base contracts.
- Add a short inheritance explanation for
SnapshotEnginein the README schema section. - Add a matching README schema subsection for
SnapshotEngineOwnable2Step, including inheritance and graph references. - Add a README
Eventssection summarizing the snapshot events emitted by the external-engine and internal CMTAT deployment variants. - Fix the README table of contents and rename the duplicate
Schemaheading for the function-diagram section toFunction Schemas. - Add the current deployed sizes of the main external-engine and local CMTAT internal snapshot deployment contracts to the README.
- Testing
- Add a compatibility test covering simultaneous use of the external
SnapshotEngineand the upstream CMTAT mock rule engine on the same token deployment.
Acknowledge
We would like to thank @Domson97 and @seturionbisig, as well as CMTA Tech Comite for their valuable feedback and contributions to this release and the previous one (v0.4.0). Their input played an important role in improving the project, and we sincerely appreciate their support.
v0.4.0
-
Dependencies
- Align integration for
CMTAT v3.3.0-rc1. - Update
CMTATBaseRuleEngineimport path (2_CMTATBaseRuleEngine.sol->3_CMTATBaseRuleEngine.sol). - Update version interface usage from
IERC3643BasetoIERC3643Version. - Update OpenZeppelin dependencies to
@openzeppelin/contractsand@openzeppelin/contracts-upgradeable5.6.1. - Replace full
IERC20dependency in SnapshotEngine modules with a minimalIERC20SnapshotCompatibleinterface (balanceOf,totalSupply).
- Align integration for
-
Changed
- Bump
VersionModule.VERSIONand deployment test expectations to0.4.0. - Switch
SnapshotEnginefrom OpenZeppelinAccessControltoAccessControlEnumerable. - Remove
CMTATBaseSnapshotsupport from localCMTATUpgradeableInternalSnapshotandCMTATStandaloneInternalSnapshotso these deployment variants only support internal snapshots. - Keep external
SnapshotEnginesupport separate from the local CMTAT deployment variants because combining both paths exceeds the EVM contract size limit. - Rename the local shared CMTAT snapshot base from
CMTATSnapshotBasetoCMTATInternalSnapshotBaseto avoid confusion with upstream CMTAT snapshot contracts. - Rename the local deployment contracts from
CMTATUpgradeableSnapshot/CMTATStandaloneSnapshottoCMTATUpgradeableInternalSnapshot/CMTATStandaloneInternalSnapshotto avoid colliding with upstream CMTAT contract names. - Convert snapshot scheduler authorization to a modifier-based gate that delegates to the internal
_authorizeSnapshot()hook.
- Bump
-
Documentation
- Clarify and document the
0.3.0known issue and0.4.0resolution forgetNextSnapshots()arithmetic underflow when no future snapshots remain. - Document strict snapshot query semantics with exact-time APIs:
snapshotExists(time)snapshotBalanceOfExact(time, tokenHolder)(reverts iftimeis not scheduled)snapshotTotalSupplyExact(time)(reverts iftimeis not scheduled)
- Document snapshot materialization observability:
SnapshotMaterialized(time, blockNumber)emitted when_setCurrentSnapshot()advances.poke()can be used by authorized accounts to materialize due snapshots without requiring token transfers.
- Add a second deployment variant using OpenZeppelin
Ownable2Step(SnapshotEngineOwnable2Step) and refactor shared deployment logic intoSnapshotEngineBaseto minimize duplication. - Add
CMTATStandaloneInternalSnapshot(standalone/non-proxy deployment) and refactor shared CMTAT+snapshot behavior intoCMTATInternalSnapshotBaseto minimize duplication withCMTATUpgradeableInternalSnapshot. - Update README integration guidance to document the minimal token interface required by SnapshotEngine (
IERC20SnapshotCompatible). - Clarify in
README.mdthat localCMTAT*InternalSnapshotdeployment contracts are internal-snapshot-only and that external snapshot-engine-enabled CMTAT deployments should come from theCMTATrepository snapshot variants. - Add a
SnapshotEnginecompatibility table and setup guidance for supported CMTAT target versions.
- Clarify and document the
-
Testing
- Add tests for exact snapshot queries (scheduled vs non-scheduled timestamps and parity with legacy queries on scheduled timestamps).
- Add tests for snapshot materialization event emission.
- Add tests for
poke()access control and idempotent behavior. - Add test coverage for
SnapshotUnschedule(time)emission inunscheduleSnapshotNotOptimized. - Add a dedicated
SnapshotEngineOwnable2Steptest suite and share common snapshot behavior tests across AccessControl and Ownable variants. - Add a dedicated
CMTATStandaloneInternalSnapshottest suite reusing the same shared snapshot behavior suites. - Refactor admin-authorization assertions into a shared helper to avoid duplicated expectations across test modules.
- Refactor snapshot suite registration and CMTAT init params into shared test helpers to reduce duplication across test entrypoints.
v0.3.0
known issue with this release: _findScheduleMostRecentPastSnapshot - Uninitialized variable used in condition
- Add deployment version with snapshot for CMTAT
- Better code separation
- Create new module SnapshotUpdateModule