diff --git a/contracts/modules/wrapper/controllers/ValidationModule.sol b/contracts/modules/wrapper/controllers/ValidationModule.sol index cbb74f0b..056bf564 100644 --- a/contracts/modules/wrapper/controllers/ValidationModule.sol +++ b/contracts/modules/wrapper/controllers/ValidationModule.sol @@ -24,35 +24,6 @@ abstract contract ValidationModule is string constant TEXT_TRANSFER_OK = "No restriction"; string constant TEXT_UNKNOWN_CODE = "Unknown code"; - function __ValidationModule_init( - IEIP1404Wrapper ruleEngine_, - address admin, - uint48 initialDelayToAcceptAdminRole - ) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - - __Pausable_init_unchained(); - - /* CMTAT modules */ - // Internal - __Validation_init_unchained(ruleEngine_); - - // Security - __AuthorizationModule_init_unchained(); - - // Wrapper - __PauseModule_init_unchained(); - __EnforcementModule_init_unchained(); - - // own function - __ValidationModule_init_unchained(); - } - function __ValidationModule_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/core/BaseModule.sol b/contracts/modules/wrapper/core/BaseModule.sol index dc89d857..63414116 100644 --- a/contracts/modules/wrapper/core/BaseModule.sol +++ b/contracts/modules/wrapper/core/BaseModule.sol @@ -29,6 +29,7 @@ abstract contract BaseModule is AuthorizationModule { uint256 public flag; + /* Initializers */ /** * @dev Sets the values for {name} and {symbol}. @@ -36,28 +37,6 @@ abstract contract BaseModule is AuthorizationModule { * All two of these values are immutable: they can only be set once during * construction. */ - function __Base_init( - string memory tokenId_, - string memory terms_, - string memory information_, - uint256 flag_, - address admin, - uint48 initialDelayToAcceptAdminRole - ) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Security - __AuthorizationModule_init_unchained(); - // own function - __Base_init_unchained(tokenId_, terms_, information_, flag_); - } - function __Base_init_unchained( string memory tokenId_, string memory terms_, diff --git a/contracts/modules/wrapper/core/ERC20BaseModule.sol b/contracts/modules/wrapper/core/ERC20BaseModule.sol index ef777ae6..89395ca4 100644 --- a/contracts/modules/wrapper/core/ERC20BaseModule.sol +++ b/contracts/modules/wrapper/core/ERC20BaseModule.sol @@ -18,25 +18,13 @@ abstract contract ERC20BaseModule is ERC20Upgradeable { uint8 private _decimals; /* Initializers */ + /** - * @dev Sets the values for {name}, {symbol} and decimals. + * @dev Sets the values for decimals. * - * These values are immutable: they can only be set once during + * this value is immutable: it can only be set once during * construction/initialization. */ - function __ERC20Module_init( - string memory name_, - string memory symbol_, - uint8 decimals_ - ) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - __ERC20_init(name_, symbol_); - - /* own function */ - __ERC20Module_init_unchained(decimals_); - } - function __ERC20Module_init_unchained( uint8 decimals_ ) internal onlyInitializing { diff --git a/contracts/modules/wrapper/core/ERC20BurnModule.sol b/contracts/modules/wrapper/core/ERC20BurnModule.sol index eb66e0d6..1e7b1f23 100644 --- a/contracts/modules/wrapper/core/ERC20BurnModule.sol +++ b/contracts/modules/wrapper/core/ERC20BurnModule.sol @@ -12,28 +12,6 @@ abstract contract ERC20BurnModule is ERC20Upgradeable, AuthorizationModule { */ event Burn(address indexed owner, uint256 value, string reason); - function __ERC20BurnModule_init( - string memory name_, - string memory symbol_, - address admin, - uint48 initialDelayToAcceptAdminRole - ) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - __ERC20_init_unchained(name_, symbol_); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained( initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Security - __AuthorizationModule_init_unchained(); - - // own function - __ERC20BurnModule_init_unchained(); - } - function __ERC20BurnModule_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/core/ERC20MintModule.sol b/contracts/modules/wrapper/core/ERC20MintModule.sol index c8abe018..3744a4f3 100644 --- a/contracts/modules/wrapper/core/ERC20MintModule.sol +++ b/contracts/modules/wrapper/core/ERC20MintModule.sol @@ -13,28 +13,6 @@ abstract contract ERC20MintModule is ERC20Upgradeable, AuthorizationModule { */ event Mint(address indexed account, uint256 value); - function __ERC20MintModule_init( - string memory name_, - string memory symbol_, - address admin, - uint48 initialDelayToAcceptAdminRole - ) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - __ERC20_init_unchained(name_, symbol_); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Security - __AuthorizationModule_init_unchained(); - - // own function - __ERC20MintModule_init_unchained(); - } - function __ERC20MintModule_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/core/EnforcementModule.sol b/contracts/modules/wrapper/core/EnforcementModule.sol index 6b7eb682..739cadf4 100644 --- a/contracts/modules/wrapper/core/EnforcementModule.sol +++ b/contracts/modules/wrapper/core/EnforcementModule.sol @@ -20,25 +20,6 @@ abstract contract EnforcementModule is string internal constant TEXT_TRANSFER_REJECTED_TO_FROZEN = "The address TO is frozen"; - function __EnforcementModule_init(address admin, uint48 initialDelayToAcceptAdminRole) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Internal - __Enforcement_init_unchained(); - - // Security - __AuthorizationModule_init_unchained(); - - // own function - __EnforcementModule_init_unchained(); - } - function __EnforcementModule_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/core/PauseModule.sol b/contracts/modules/wrapper/core/PauseModule.sol index a6d2bb13..4d999163 100644 --- a/contracts/modules/wrapper/core/PauseModule.sol +++ b/contracts/modules/wrapper/core/PauseModule.sol @@ -22,23 +22,6 @@ abstract contract PauseModule is PausableUpgradeable, AuthorizationModule { bool private isDeactivated; event Deactivated(address account); - function __PauseModule_init(address admin, uint48 initialDelayToAcceptAdminRole) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - __Pausable_init_unchained(); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Security - __AuthorizationModule_init_unchained(); - - // own function - __PauseModule_init_unchained(); - } - function __PauseModule_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol b/contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol index f7a85dcb..6b332a8e 100644 --- a/contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol +++ b/contracts/modules/wrapper/extensions/DebtModule/CreditEventsModule.sol @@ -22,25 +22,6 @@ abstract contract CreditEventsModule is event FlagRedeemed(bool indexed newFlagRedeemed); event Rating(string indexed newRatingIndexed, string newRating); - function __CreditEvents_init( - address admin, - uint48 initialDelayToAcceptAdminRole) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Security - __AuthorizationModule_init_unchained(); - - // own function - __CreditEvents_init_unchained(); - } - function __CreditEvents_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol b/contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol index dde92ef2..e08ab688 100644 --- a/contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol +++ b/contracts/modules/wrapper/extensions/DebtModule/DebtBaseModule.sol @@ -55,25 +55,6 @@ abstract contract DebtBaseModule is string newCouponFrequency ); - function __DebtBaseModule_init( - address admin, - uint48 initialDelayToAcceptAdminRole) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Security - __AuthorizationModule_init_unchained(); - - // own function - __DebtBaseModule_init_unchained(); - } - function __DebtBaseModule_init_unchained() internal onlyInitializing { // no variable to initialize } diff --git a/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol b/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol index cd6ec331..9c167f35 100644 --- a/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol +++ b/contracts/modules/wrapper/extensions/ERC20SnapshotModule.sol @@ -16,32 +16,6 @@ abstract contract ERC20SnapshotModule is ERC20SnapshotModuleInternal, AuthorizationModule { - function __ERC20SnasphotModule_init( - string memory name_, - string memory symbol_, - address admin, - uint48 initialDelayToAcceptAdminRole - ) internal onlyInitializing { - /* OpenZeppelin */ - __Context_init_unchained(); - // SnapshotModuelInternal inherits from ERC20 - __ERC20_init_unchained(name_, symbol_); - // AccessControlUpgradeable inherits from ERC165Upgradeable - __ERC165_init_unchained(); - // AuthorizationModule inherits from AccessControlUpgradeable - __AccessControl_init_unchained(); - __AccessControlDefaultAdminRules_init_unchained(initialDelayToAcceptAdminRole, admin); - /* CMTAT modules */ - // Internal - __ERC20Snapshot_init_unchained(); - - // Security - __AuthorizationModule_init_unchained(); - - // own function - __ERC20SnasphotModule_init_unchained(); - } - function __ERC20SnasphotModule_init_unchained() internal onlyInitializing { // no variable to initialize }