From b8cff7350ee8f70bda3fdcb6b0a1d998d739b001 Mon Sep 17 00:00:00 2001 From: Alberto Granzotto Date: Tue, 14 Nov 2023 15:38:48 +0100 Subject: [PATCH] Rename init function --- contracts/GovernanceToken/GovernanceToken.sol | 2 +- contracts/InternalMarket/InternalMarket.sol | 2 +- contracts/RedemptionController/RedemptionController.sol | 2 +- contracts/ResolutionManager/ResolutionManager.sol | 2 +- contracts/ShareholderRegistry/ShareholderRegistryBase.sol | 2 +- contracts/extensions/DAORegistryProxy.sol | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/GovernanceToken/GovernanceToken.sol b/contracts/GovernanceToken/GovernanceToken.sol index b6fe00e..59a61c0 100644 --- a/contracts/GovernanceToken/GovernanceToken.sol +++ b/contracts/GovernanceToken/GovernanceToken.sol @@ -43,7 +43,7 @@ contract GovernanceToken is Initializable, GovernanceTokenSnapshot { string memory name, string memory symbol ) public initializer { - _setDAORegistry(daoRegistry); + __DAORegistryProxy_init(daoRegistry); _initialize(name, symbol); } diff --git a/contracts/InternalMarket/InternalMarket.sol b/contracts/InternalMarket/InternalMarket.sol index 975c8f2..9696002 100644 --- a/contracts/InternalMarket/InternalMarket.sol +++ b/contracts/InternalMarket/InternalMarket.sol @@ -21,7 +21,7 @@ contract InternalMarket is Initializable, InternalMarketBase { * @param daoRegistry DAORegistry instance containing custom access control roles. */ function initialize(DAORegistry daoRegistry) public initializer { - _setDAORegistry(daoRegistry); + __DAORegistryProxy_init(daoRegistry); _initialize(7 days); } diff --git a/contracts/RedemptionController/RedemptionController.sol b/contracts/RedemptionController/RedemptionController.sol index 152d88a..a77b740 100644 --- a/contracts/RedemptionController/RedemptionController.sol +++ b/contracts/RedemptionController/RedemptionController.sol @@ -28,7 +28,7 @@ contract RedemptionController is Initializable, RedemptionControllerBase { * @param daoRegistry The addresses of DAORoles for this contract. */ function initialize(DAORegistry daoRegistry) public initializer { - _setDAORegistry(daoRegistry); + __DAORegistryProxy_init(daoRegistry); _initialize(); } diff --git a/contracts/ResolutionManager/ResolutionManager.sol b/contracts/ResolutionManager/ResolutionManager.sol index 0453f57..fa4f3bf 100644 --- a/contracts/ResolutionManager/ResolutionManager.sol +++ b/contracts/ResolutionManager/ResolutionManager.sol @@ -16,7 +16,7 @@ contract ResolutionManager is Initializable, ResolutionManagerBase { * @param daoRegistry The roles extension of the DAO. */ function initialize(DAORegistry daoRegistry) public initializer { - _setDAORegistry(daoRegistry); + __DAORegistryProxy_init(daoRegistry); } /// @custom:oz-upgrades-unsafe-allow constructor diff --git a/contracts/ShareholderRegistry/ShareholderRegistryBase.sol b/contracts/ShareholderRegistry/ShareholderRegistryBase.sol index 4254178..25e1e28 100644 --- a/contracts/ShareholderRegistry/ShareholderRegistryBase.sol +++ b/contracts/ShareholderRegistry/ShareholderRegistryBase.sol @@ -25,7 +25,7 @@ contract ShareholderRegistryBase is ERC20Upgradeable, DAORegistryProxy { string memory name, string memory symbol ) internal virtual { - _setDAORegistry(daoRegistry); + __DAORegistryProxy_init(daoRegistry); __ERC20_init(name, symbol); SHAREHOLDER_STATUS = keccak256("SHAREHOLDER_STATUS"); INVESTOR_STATUS = keccak256("INVESTOR_STATUS"); diff --git a/contracts/extensions/DAORegistryProxy.sol b/contracts/extensions/DAORegistryProxy.sol index da089f1..3feb9d5 100644 --- a/contracts/extensions/DAORegistryProxy.sol +++ b/contracts/extensions/DAORegistryProxy.sol @@ -9,7 +9,7 @@ import "@openzeppelin/contracts/utils/Strings.sol"; contract DAORegistryProxy is ContextUpgradeable { DAORegistry internal _daoRegistry; - function _setDAORegistry(DAORegistry daoRegistry) internal { + function __DAORegistryProxy_init(DAORegistry daoRegistry) internal { require( address(daoRegistry) != address(0), "DAORegistryProxy: 0x0 not allowed"