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
CMTAT provides two deployment versions for representing debt and credit events information on-chain.
Version
Module
Storage
Debt
DebtModule
Directly in the token contract
DebtEngine
DebtEngineModule
External DebtEngine contract
The DebtEngine approach reduces the CMTAT contract size (which is near the maximum limit) and allows sharing debt information across multiple token contracts.
interfaceIDebtEngineisICMTATDebt, ICMTATCreditEvents {
// nothing more
}
The DebtEngine must implement debt() and creditEvents(). The CMTAT token contract delegates read calls to the external engine; the engine is free to store and manage the data however it wants.
Deployment Versions
Contract
Type
CMTATStandaloneDebt
Standalone (immutable)
CMTATUpgradeableDebt
Upgradeable (proxy)
CMTATStandaloneDebtEngine
Standalone with external DebtEngine
CMTATUpgradeableDebtEngine
Upgradeable with external DebtEngine
Feature Matrix
Feature
Debt
DebtEngine
DebtModule (on-chain debt data)
✓
—
DebtEngineModule (external engine)
—
✓
ERC20CrossChainModule + CCIPModule
—
✓
ERC-1404 (detectTransferRestriction)
—
✓ (via CMTATBaseERC20CrossChain)
ERC2771Module (meta-transactions)
—
—
CMTATBaseSnapshot (SnapshotEngine support)
✓
✓
Both Debt and DebtEngine variants include CMTATBaseSnapshot, which wires the ERC-20 _update hook into an optional external SnapshotEngine. This means snapshot functionality is available on these variants without deploying the dedicated Snapshot deployment variant. Set the engine with setSnapshotEngine(address) (requires SNAPSHOOTER_ROLE).