This document defines Enforcement Module for the CMTA Token specification.
[TOC]
The issuer (or a third party appointed by it) must be in a position to freeze tokens on specific distributed ledger addresses (as opposed to pausing the whole smart contract) to prevent the transfer of tokens that have been earmarked for transfer to a third party (e.g. between the execution of a transaction on a trading platform and the settlement of the trade in the distributed ledger).
Symbol | Meaning |
---|---|
🛑 | Function can modify state |
💵 | Function is payable |
File Name | SHA-1 Hash |
---|---|
./modules/wrapper/core/EnforcementModule.sol | 8d23b8c60e119a6421150f1bab0cb2061a1e640a |
Contract | Type | Bases | ||
---|---|---|---|---|
└ | Function Name | Visibility | Mutability | Modifiers |
EnforcementModule | Implementation | EnforcementModuleInternal, AuthorizationModule | ||
└ | __EnforcementModule_init_unchained | Internal 🔒 | 🛑 | onlyInitializing |
└ | freeze | Public ❗️ | 🛑 | onlyRole |
└ | unfreeze | Public ❗️ | 🛑 | onlyRole |
File Name | SHA-1 Hash |
---|---|
./modules/internal/EnforcementModuleInternal.sol | 4b56bc3e6903e1a3fd67afcfdd4a6dd936827c0c |
Contract | Type | Bases | ||
---|---|---|---|---|
└ | Function Name | Visibility | Mutability | Modifiers |
EnforcementModuleInternal | Implementation | Initializable, ContextUpgradeable | ||
└ | __Enforcement_init | Internal 🔒 | 🛑 | onlyInitializing |
└ | __Enforcement_init_unchained | Internal 🔒 | 🛑 | onlyInitializing |
└ | frozen | Public ❗️ | NO❗️ | |
└ | _freeze | Internal 🔒 | 🛑 | |
└ | _unfreeze | Internal 🔒 | 🛑 |
This section describes the Ethereum API of the Enforcement Module.
function freeze(address account,string memory reason)
public onlyRole(ENFORCER_ROLE)
returns (bool)
Prevents account
to perform any transfer.
Only authorized users are allowed to call this function.
Returns true
if the address is not yet frozen, false
otherwise.
function unfreeze(address account,string memory reason)
public onlyRole(ENFORCER_ROLE)
returns (bool)
Re-authorizes account
to perform transfers if it was frozen.
Only authorized users are allowed to call this function.
Returns true
if the address was frozen, false
otherwise.
Origin: EnforcementModuleInternal
function frozen(address account)
public view virtual
returns (bool)
Tell, whether the given account
is frozen.
event Freeze (address indexed enforcer, address indexed owner)
Emitted when address owner
is frozen by enforcer
.
event Unfreeze (address indexed enforcer, address indexed owner)
Emitted when address owner
is unfrozen by enforcer
.