From 7c8fe9f68198e78e53f23d200494011539f37f06 Mon Sep 17 00:00:00 2001 From: Satyam Agrawal Date: Fri, 31 May 2019 12:48:36 +0530 Subject: [PATCH] remove the IBoot from the contracts (#687) --- contracts/interfaces/IBoot.sol | 10 ---------- contracts/mocks/Dummy/DummySTOFactory.sol | 2 -- .../Dividend/ERC20/ERC20DividendCheckpointFactory.sol | 2 -- .../Dividend/Ether/EtherDividendCheckpointFactory.sol | 2 -- .../Voting/PLCR/PLCRVotingCheckpointFactory.sol | 2 -- .../Transparent/WeightedVoteCheckpointFactory.sol | 2 -- contracts/modules/ModuleFactory.sol | 4 ++-- contracts/modules/STO/Capped/CappedSTOFactory.sol | 2 -- contracts/modules/STO/PreSale/PreSaleSTOFactory.sol | 2 -- .../modules/STO/USDTiered/USDTieredSTOFactory.sol | 2 -- .../PTM/PercentageTransferManagerFactory.sol | 2 -- .../modules/Wallet/VestingEscrowWalletFactory.sol | 2 -- 12 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 contracts/interfaces/IBoot.sol diff --git a/contracts/interfaces/IBoot.sol b/contracts/interfaces/IBoot.sol deleted file mode 100644 index 34d3c3fc1..000000000 --- a/contracts/interfaces/IBoot.sol +++ /dev/null @@ -1,10 +0,0 @@ -pragma solidity ^0.5.0; - -interface IBoot { - /** - * @notice This function returns the signature of configure function - * @return bytes4 Configure function signature - */ - function getInitFunction() external pure returns(bytes4); - -} \ No newline at end of file diff --git a/contracts/mocks/Dummy/DummySTOFactory.sol b/contracts/mocks/Dummy/DummySTOFactory.sol index 640d0a7d7..235047fbe 100644 --- a/contracts/mocks/Dummy/DummySTOFactory.sol +++ b/contracts/mocks/Dummy/DummySTOFactory.sol @@ -1,9 +1,7 @@ pragma solidity ^0.5.0; import "../../modules/UpgradableModuleFactory.sol"; -import "../../libraries/Util.sol"; import "./DummySTOProxy.sol"; -import "../../interfaces/IBoot.sol"; /** * @title Factory for deploying DummySTO module diff --git a/contracts/modules/Checkpoint/Dividend/ERC20/ERC20DividendCheckpointFactory.sol b/contracts/modules/Checkpoint/Dividend/ERC20/ERC20DividendCheckpointFactory.sol index 1443d7a1f..9e6d26d34 100644 --- a/contracts/modules/Checkpoint/Dividend/ERC20/ERC20DividendCheckpointFactory.sol +++ b/contracts/modules/Checkpoint/Dividend/ERC20/ERC20DividendCheckpointFactory.sol @@ -1,8 +1,6 @@ pragma solidity ^0.5.0; import "./ERC20DividendCheckpointProxy.sol"; -import "../../../../libraries/Util.sol"; -import "../../../../interfaces/IBoot.sol"; import "../../../UpgradableModuleFactory.sol"; /** diff --git a/contracts/modules/Checkpoint/Dividend/Ether/EtherDividendCheckpointFactory.sol b/contracts/modules/Checkpoint/Dividend/Ether/EtherDividendCheckpointFactory.sol index 97eda239a..9576ed939 100644 --- a/contracts/modules/Checkpoint/Dividend/Ether/EtherDividendCheckpointFactory.sol +++ b/contracts/modules/Checkpoint/Dividend/Ether/EtherDividendCheckpointFactory.sol @@ -1,8 +1,6 @@ pragma solidity ^0.5.0; import "./EtherDividendCheckpointProxy.sol"; -import "../../../../libraries/Util.sol"; -import "../../../../interfaces/IBoot.sol"; import "../../../UpgradableModuleFactory.sol"; /** diff --git a/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpointFactory.sol b/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpointFactory.sol index cb0f07efe..49effca93 100644 --- a/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpointFactory.sol +++ b/contracts/modules/Checkpoint/Voting/PLCR/PLCRVotingCheckpointFactory.sol @@ -1,8 +1,6 @@ pragma solidity ^0.5.0; import "./PLCRVotingCheckpointProxy.sol"; -import "../../../../libraries/Util.sol"; -import "../../../../interfaces/IBoot.sol"; import "../../../UpgradableModuleFactory.sol"; /** diff --git a/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpointFactory.sol b/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpointFactory.sol index 65c530b6a..32a6f2d77 100644 --- a/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpointFactory.sol +++ b/contracts/modules/Checkpoint/Voting/Transparent/WeightedVoteCheckpointFactory.sol @@ -1,8 +1,6 @@ pragma solidity ^0.5.0; import "./WeightedVoteCheckpointProxy.sol"; -import "../../../../libraries/Util.sol"; -import "../../../../interfaces/IBoot.sol"; import "../../../UpgradableModuleFactory.sol"; /** diff --git a/contracts/modules/ModuleFactory.sol b/contracts/modules/ModuleFactory.sol index 676d9773f..208fd9918 100644 --- a/contracts/modules/ModuleFactory.sol +++ b/contracts/modules/ModuleFactory.sol @@ -2,7 +2,7 @@ pragma solidity ^0.5.0; import "../libraries/VersionUtils.sol"; import "../libraries/Util.sol"; -import "../interfaces/IBoot.sol"; +import "../interfaces/IModule.sol"; import "../interfaces/IOracle.sol"; import "../interfaces/IPolymathRegistry.sol"; import "../interfaces/IModuleFactory.sol"; @@ -219,7 +219,7 @@ contract ModuleFactory is IModuleFactory, Ownable { */ function _initializeModule(address _module, bytes memory _data) internal { uint256 polySetupCost = _takeFee(); - bytes4 initFunction = IBoot(_module).getInitFunction(); + bytes4 initFunction = IModule(_module).getInitFunction(); if (initFunction != bytes4(0)) { require(Util.getSig(_data) == initFunction, "Provided data is not valid"); /*solium-disable-next-line security/no-low-level-calls*/ diff --git a/contracts/modules/STO/Capped/CappedSTOFactory.sol b/contracts/modules/STO/Capped/CappedSTOFactory.sol index a724c60d3..450fba5df 100644 --- a/contracts/modules/STO/Capped/CappedSTOFactory.sol +++ b/contracts/modules/STO/Capped/CappedSTOFactory.sol @@ -1,9 +1,7 @@ pragma solidity ^0.5.0; import "../../UpgradableModuleFactory.sol"; -import "../../../libraries/Util.sol"; import "./CappedSTOProxy.sol"; -import "../../../interfaces/IBoot.sol"; /** * @title Factory for deploying CappedSTO module diff --git a/contracts/modules/STO/PreSale/PreSaleSTOFactory.sol b/contracts/modules/STO/PreSale/PreSaleSTOFactory.sol index cee2e5409..79bfcee0d 100644 --- a/contracts/modules/STO/PreSale/PreSaleSTOFactory.sol +++ b/contracts/modules/STO/PreSale/PreSaleSTOFactory.sol @@ -1,9 +1,7 @@ pragma solidity ^0.5.0; import "../../UpgradableModuleFactory.sol"; -import "../../../libraries/Util.sol"; import "./PreSaleSTOProxy.sol"; -import "../../../interfaces/IBoot.sol"; /** * @title Factory for deploying PreSaleSTO module diff --git a/contracts/modules/STO/USDTiered/USDTieredSTOFactory.sol b/contracts/modules/STO/USDTiered/USDTieredSTOFactory.sol index f0810a677..bb44e8145 100644 --- a/contracts/modules/STO/USDTiered/USDTieredSTOFactory.sol +++ b/contracts/modules/STO/USDTiered/USDTieredSTOFactory.sol @@ -1,9 +1,7 @@ pragma solidity ^0.5.0; -import "../../../interfaces/IBoot.sol"; import "./USDTieredSTOProxy.sol"; import "../../UpgradableModuleFactory.sol"; -import "../../../libraries/Util.sol"; /** * @title Factory for deploying CappedSTO module diff --git a/contracts/modules/TransferManager/PTM/PercentageTransferManagerFactory.sol b/contracts/modules/TransferManager/PTM/PercentageTransferManagerFactory.sol index b9c782b09..4f1ba00cf 100644 --- a/contracts/modules/TransferManager/PTM/PercentageTransferManagerFactory.sol +++ b/contracts/modules/TransferManager/PTM/PercentageTransferManagerFactory.sol @@ -1,9 +1,7 @@ pragma solidity ^0.5.0; import "../../UpgradableModuleFactory.sol"; -import "../../../libraries/Util.sol"; import "./PercentageTransferManagerProxy.sol"; -import "../../../interfaces/IBoot.sol"; /** * @title Factory for deploying PercentageTransferManager module diff --git a/contracts/modules/Wallet/VestingEscrowWalletFactory.sol b/contracts/modules/Wallet/VestingEscrowWalletFactory.sol index c2bfb2ece..551b11185 100644 --- a/contracts/modules/Wallet/VestingEscrowWalletFactory.sol +++ b/contracts/modules/Wallet/VestingEscrowWalletFactory.sol @@ -1,9 +1,7 @@ pragma solidity ^0.5.0; import "./VestingEscrowWalletProxy.sol"; -import "../../interfaces/IBoot.sol"; import "../UpgradableModuleFactory.sol"; -import "../../libraries/Util.sol"; /** * @title Factory for deploying VestingEscrowWallet module