diff --git a/contracts/bonding/BondingManager.sol b/contracts/bonding/BondingManager.sol index 0dee4e07..dcd891af 100644 --- a/contracts/bonding/BondingManager.sol +++ b/contracts/bonding/BondingManager.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.9; import "../ManagerProxyTarget.sol"; -import "./IBondingManager.sol"; +import "../interfaces/IBondingManager.sol"; import "../libraries/SortedDoublyLL.sol"; import "../libraries/MathUtils.sol"; import "../libraries/PreciseMathUtils.sol"; diff --git a/contracts/bonding/IBondingManager.sol b/contracts/interfaces/IBondingManager.sol similarity index 97% rename from contracts/bonding/IBondingManager.sol rename to contracts/interfaces/IBondingManager.sol index 3981e236..c9fb51a7 100644 --- a/contracts/bonding/IBondingManager.sol +++ b/contracts/interfaces/IBondingManager.sol @@ -78,4 +78,6 @@ interface IBondingManager { function isActiveTranscoder(address _transcoder) external view returns (bool); function getTotalBonded() external view returns (uint256); + + function pendingStake(address _addr, uint256 _endRound) external view returns (uint256); } diff --git a/contracts/pm/mixins/interfaces/MContractRegistry.sol b/contracts/pm/mixins/interfaces/MContractRegistry.sol index 7dff65dc..9e9b1bc9 100644 --- a/contracts/pm/mixins/interfaces/MContractRegistry.sol +++ b/contracts/pm/mixins/interfaces/MContractRegistry.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.9; -import "../../../bonding/IBondingManager.sol"; +import "../../../interfaces/IBondingManager.sol"; import "../../../token/IMinter.sol"; import "../../../rounds/IRoundsManager.sol"; diff --git a/contracts/polling/PollCreator.sol b/contracts/polling/PollCreator.sol index 3b478b9e..9fcc0df6 100644 --- a/contracts/polling/PollCreator.sol +++ b/contracts/polling/PollCreator.sol @@ -2,12 +2,7 @@ pragma solidity 0.8.9; import "./Poll.sol"; - -interface IBondingManager { - function transcoderTotalStake(address _addr) external view returns (uint256); - - function pendingStake(address _addr, uint256 _endRound) external view returns (uint256); -} +import "../interfaces/IBondingManager.sol"; contract PollCreator { // 33.33% diff --git a/contracts/rounds/RoundsManager.sol b/contracts/rounds/RoundsManager.sol index 1bc8b8be..284a2d53 100644 --- a/contracts/rounds/RoundsManager.sol +++ b/contracts/rounds/RoundsManager.sol @@ -3,7 +3,7 @@ pragma solidity 0.8.9; import "../ManagerProxyTarget.sol"; import "./IRoundsManager.sol"; -import "../bonding/IBondingManager.sol"; +import "../interfaces/IBondingManager.sol"; import "../token/IMinter.sol"; import "../libraries/MathUtils.sol"; diff --git a/contracts/token/Minter.sol b/contracts/token/Minter.sol index ce86354a..be3a4505 100644 --- a/contracts/token/Minter.sol +++ b/contracts/token/Minter.sol @@ -5,7 +5,7 @@ import "../Manager.sol"; import "./IMinter.sol"; import "./ILivepeerToken.sol"; import "../rounds/IRoundsManager.sol"; -import "../bonding/IBondingManager.sol"; +import "../interfaces/IBondingManager.sol"; import "../libraries/MathUtilsV2.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; diff --git a/test/unit/PollCreator.js b/test/unit/PollCreator.js index 4b3c0a16..be9a9356 100644 --- a/test/unit/PollCreator.js +++ b/test/unit/PollCreator.js @@ -25,7 +25,7 @@ describe("PollCreator", () => { fixture = new Fixture(web3) bondingManagerMock = await smock.fake( - "contracts/polling/PollCreator.sol:IBondingManager", + "contracts/interfaces/IBondingManager.sol:IBondingManager", { address: mockBondingManagerEOA.address }