This document defines the Validation Module for the CMTA Token specification. The goal of the Validation Module is to restrict token transferability based on a set of rules applied to the token.
[TOC]
Issuers may decide to implement legal restrictions to the transfer of the tokenized instruments, to limit the scope of persons or entities who may hold the relevant instruments.
Symbol | Meaning |
---|---|
🛑 | Function can modify state |
💵 | Function is payable |
File Name | SHA-1 Hash |
---|---|
./modules/wrapper/controllers/ValidationModule.sol | 109054150a46ef0f010693889f9c1c44e151719b |
Contract | Type | Bases | ||
---|---|---|---|---|
└ | Function Name | Visibility | Mutability | Modifiers |
ValidationModule | Implementation | ValidationModuleInternal, PauseModule, EnforcementModule, IERC1404Wrapper | ||
└ | __ValidationModule_init | Internal 🔒 | 🛑 | onlyInitializing |
└ | __ValidationModule_init_unchained | Internal 🔒 | 🛑 | onlyInitializing |
└ | setRuleEngine | External ❗️ | 🛑 | onlyRole |
└ | detectTransferRestriction | Public ❗️ | NO❗️ | |
└ | messageForTransferRestriction | External ❗️ | NO❗️ | |
└ | validateTransfer | Public ❗️ | NO❗️ |
File Name | SHA-1 Hash |
---|---|
./modules/internal/ValidationModuleInternal.sol | 7520ea131a1c5befcc07ff41eada7406ab745850 |
Contract | Type | Bases | ||
---|---|---|---|---|
└ | Function Name | Visibility | Mutability | Modifiers |
ValidationModuleInternal | Implementation | Initializable, ContextUpgradeable | ||
└ | __Validation_init | Internal 🔒 | 🛑 | onlyInitializing |
└ | __Validation_init_unchained | Internal 🔒 | 🛑 | onlyInitializing |
└ | _validateTransfer | Internal 🔒 | ||
└ | _messageForTransferRestriction | Internal 🔒 | ||
└ | _detectTransferRestriction | Internal 🔒 |
This section describes the Ethereum API of the Validation Module.
The rules are defined using an (optional) rule engine, set using the setRuleEngine
method. The RuleEngine
implementation is not provided along with this implementation but it has to comply with the interface IRuleEngine. The RuleEgine call rules that must respect the interface IRule
function setRuleEngine(IEIP1404Wrapper ruleEngine_)
external onlyRole(DEFAULT_ADMIN_ROLE)
Set the optional rule engine to the given address
.
Only authorized users are allowed to call this function.
event RuleEngine(IEIP1404Wrapper indexed newRuleEngine)
Emitted when the rule engine is set to newRuleEngine
.