Skip to content

Releases: CMTA/CMTAT

v2.5.1

03 Oct 11:37
cab48f1
Compare
Choose a tag to compare

2.5.1 - 20241003

  • Beacon Factory: deploy an implementation inside the constructor if no implementation is provided
  • Run myhtril

v2.5.0

10 Sep 13:52
d176892
Compare
Choose a tag to compare

2.5.0 - 20240910

Features

Technical

v2.5.0-rc0

09 Aug 13:49
e8048d4
Compare
Choose a tag to compare
v2.5.0-rc0 Pre-release
Pre-release

2.5.0-rc.0 - 20240809

Features

Technical

v2.4.0

03 May 10:11
23a1e59
Compare
Choose a tag to compare

Main goals of this release

  • Improve the flexibility of the CMTAT
  • Reduce the actual code size
  • Reduce gas deployment through factory

New architecture for the RuleEngine #250

  • A new function operateOnTransfer is added and used inside the ValidationModule.
  • Contrary to validateTransfer, operateOnTransfer has to be protected by an access control (if not implemented as view or pure)
  • This function can be used to perform operation which modifies the state of the blockchain (storage) by the RuleEngine.
  • The RuleEngine inherits now from IRuleEngine which contains in its interface the function operateOnTransfer + IERC-1404
  • The function validateTransfer is still available to verify a transfer without performing operation. The behavior is the same than with the previous CMTAT version.
  • Add new interfaces IERC1404EnumCode to only contain restriction code, in order to be used in the RuleEngine

SnapshotModule #256

  • Create an interface ICMTATSnapshot with the main public functions to simplify the calls to a contract with a snapshotModule, for example useful for debt payment.
  • Imported by default again since the whole code can no longer be considered as "audited" now
  • Split the snapshotModuleInternal in two parts: one with the inheritance with ERC-20 and the other part with the base function and does not inherit from ERC-20.
    Thus, if we want to build a snapshotModule with the RuleEngine, we can use the base contract to avoid the inheritance with ERC-20.
  • Add twos functions to reduce number of call when computing debt payment
    --SnapshotInfo to get a user's balance and the total supply
    --SnapshotInfoBatch to get several user's balances and the total supply
    --SnapshotInfoBatch to get several user's balances and the total supply for several different times

ERC20BaseModule (Done)
-- Add a function balanceInfo to get the balance for two addresses and the total supply
Useful to perform transfer restriction based on the user's balance.

AuthorizationEngine #254

  • Add the AuthorizationEngine. With that, it is possible to add supplementary check on the functions grantRole and revokeRolewithout modifying the CMTAT.
  • Remove inheritance with AccessControlDefaultAdminRulesUpgradeable, introduces in the version 2.3.1, from OpenZeppelin since this contract is difficult to manage and increases also the smart contract code size.

BurnModule

  • rename forceBurn and forceBurnBatch toburn and burnBatch
  • Add a function burnFrom with a specific role (useful for bridge) for compatibility with CCIP #260
  • Add a function burnAndMint to perform a burn/mint operation atomically.

ValidationModule
Create an internal function _validateTransferByModule which performs check with others module (PauseModule & EnforcementModule)

Gas optimization

  • Add factory contract for deployment with transparent and beacon proxy #259
  • Remove useless init function in internal modules (Done) #237

Other

  • Remove custom approval function #225
  • Upgrade some JS libraries
  • Upgrade OpenZeppelin to the version v5.0.2

v2.4.0-rc2

10 Apr 08:54
4774b7e
Compare
Choose a tag to compare
v2.4.0-rc2 Pre-release
Pre-release

The modifications between the version v2.3.0 and this version are not audited !!

  • Add a second function SnapshotInfoBatch to get several user's balances and the total supply for several different times.
  • Add new interfaces IERC1404EnumCode to only contain restriction code, in order to be used in the RuleEngine.

v2.4.0-rc1

19 Mar 16:29
2abaa06
Compare
Choose a tag to compare
v2.4.0-rc1 Pre-release
Pre-release

The modifications between the version v2.3.0 and this version are not audited !!!

This intermediate release adds mainly functions to retrieve information from the snapshotModule or the ERC20BaseModule in batch for gas optimization. It is useful for:
-Dividend payment based on the user's balance (snapshot)
-Transfer restriction bases on the user's balance (vesting rule or partial lock)

snapshotModule

  • Create an interface ICMTATSnapshot with the main public functions for the SnapshotModule to make easier the calls to a contract including a snapshotModule, useful e.g. for debt payment.
  • Replace getSnapshotInfoBatch by SnapshotInfo. This function gets a user's balance specified in parameter and the total supply.
  • Add a new function SnapshotInfoBatch to get several user's balances and the total supply.

ERC20BaseModule
Add a function balanceInfo to get the balance for a list of addresses and the total supply
Useful to perform transfer restriction based on the user's balance (e.g vesting rule or partial lock).

ValidationModule
Create an internal function _validateTransferByModule which performs check with others module (PauseModule & EnforcementModule)

Other

v2.4.0-rc0

29 Jan 12:37
5741a09
Compare
Choose a tag to compare
v2.4.0-rc0 Pre-release
Pre-release

New architecture for the RuleEngine [#250](#250)

  • A new function operateOnTransfer is added and use inside the ValidationModule.
  • Contrary to validateTransfer, this function has to be protected by an access control (if not implemented as view or pure)
  • This function can be used to perform operation which modifies the state of the blockchain (storage) by the RuleEngine.
  • The RuleEngine inherits now from IRuleEngine wich contains in its interface the function operateOnTransfer + IERC-1404
  • The function validateTransfer is still available to verify a transfer without performing operation. The behavior is the same than with the previous CMTAT version.

snapshotModule [#256](#256)

  • Split the snapshotModuleInternal in two parts : one with the inheritance with ERC-20 and the other part with the base function and does not inherit from ERC-20.
    Thus, if we want to build a snapshotModule with the RuleEngine, we can use the base contract to avoid the inheritance with ERC-20.
  • Add a function getSnapshotInfoBatch to avoid multiple calls when computing debt payment

AuthorizationEngine [#254](#254)

  • Add the AuthorizationEngine. With that, it is possible to add supplementary check on the functions grantRole and revokeRolewithout modifying the CMTAT.

BurnModule

  • rename forceBurn and forceBurnBatch in burn and burnBatch
  • Add a function burnFrom with a specific role (useful for bridge) for compatibility with CCIP [Ccip #260](#260)
  • Add a function burnAndMint to perform a burn/mint operation atomically.

Gas optimization

Other

v2.3.1

10 Nov 16:01
5a8e27b
Compare
Choose a tag to compare

The modifications between the version v2.3.0 and this version are not audited !!!

  • Remove useless functions init in wrapper modules #230
  • Add missing tests in EnforcementModule #239
  • Use calldata instead of memory #224
  • Upgrade OpenZeppelin to the version v5.0.0

v2.3.1-rc.0

25 Sep 14:13
0c23629
Compare
Choose a tag to compare
v2.3.1-rc.0 Pre-release
Pre-release

The modification between the version v2.3.0 and this version are not audited !!!

Summary

Architecture

  • The directory mandatory is renamed in core (#222)
  • The directory optional is renamed in extensions (#222)
  • Creation of a directory controllers which for the moment contains only the ValidationModule (#222)
  • Rename contract and init function for ERC20BurnModule, ERC20MintModule, ERC20SnapshotModule to clearly indicate the inheritance from ERC20 interface (#226)

Gas optimization

Other

  • Add ERC20 decimals as an argument of the initialize function (#213)
    Until now, the number of decimal was set inside the code to the value 0
    This release changes this behavior to use instead a parameter supplied by the deployer inside the function initialize.
  • Add a constant VERSION to indicate the current version of the token (#229)
  • Implement an alternative to the kill function (#221)

The alternative function is the function deactivateContract inside the PauseModule, to deactivate the contract. This function set a boolean state variable isDeactivated to true and puts the contract in the pause state. The function unpauseis updated to revert if the previous variable is set to true, thus the contract is in the pause state "forever".

The consequences are the following:

In standalone mode, this operation is irreversible, it is not possible to rollback.

With a proxy, it is still possible to rollback by deploying a new implementation.

Tools

  • Update the Solidity version to 0.8.20, which is a requirement for the new OpenZeppelin version (5.0.0)
  • Run tests with Hardhat instead of Truffle since Truffle does not support custom errors (#217)
  • Update OpenZeppelin to the version v5.0.0-rc.0

Security

  • Add new control on the DEFAULT_ADMIN_ROLE by inheriting AccessControlDefaultAdminRules (#220)
    This contract implements the following risk mitigations on top of AccessControl:

Only one account holds the DEFAULT_ADMIN_ROLE since deployment until it’s potentially renounced.

Enforces a 2-step process to transfer the DEFAULT_ADMIN_ROLE to another account.

Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted.

  • Add a function transferadminshipDirectly (#226)
  • Remove the module OnlyDelegateCallModule since it was used to protect the function kill, which has been removed in this version (#221).

v2.3.0

09 Jun 09:27
a74e0d3
Compare
Choose a tag to compare

An audit was performed by ABDK on the version 2.2 and this version contains the different improvement suggested by the report

See also v2.3.0-rc0 for more details