-
Notifications
You must be signed in to change notification settings - Fork 4
Description
The Solidity version of CMTAT has make some design choice due to Ethereum ecosystem and EVM limitation (mainly contract code size).
It could make sense to make different choice for the Cairo implementation.
Here some open point:
Freeze
To be compatible with ERC-3643, the freeze functionality is implemented with only one function: setAddressFrozen which takes the target address and the frozen status (true/false).
However, for non-EVM blockchains, it could make clearer and makes more sense to separate the freeze and unfreeze (or thaw) functionality with two separates and distinct functions, such as:
freeze(address targetAddress)
unfreeze(address targetAddress)
ForcedBurn/forcedTransfer:
In the standard burn function, it is not possible to burn token from a frozen wallet. CMTAT offers a dedicated function forcedTransferwhich allows to force a transfer or a burn. If the forcedTransfer function is not available, the alternative is to implement only the function forcedBurn.
This is what is done for the CMTAT light version which does not include forcedTransfer. You can also decide to implement both. In this case, we suggest that only forcedBurncan burn tokens and not forcedTransfer. With the CMTAT Solidity version, when forcedTransfer is available, we do not implement forcedBurn to reduce smart contract code size, but this limitation is not necessary present with other blockchains.
See cmtat-framework