Skip to content

Commit

Permalink
Merge pull request #585 from livepeer/revert-584-rl/remove-duplicate-…
Browse files Browse the repository at this point in the history
…ibondingmanager-interface

Revert "bonding: remove duplicate IBondingManager interface"
  • Loading branch information
RiccardoBiosas authored May 25, 2022
2 parents 58c1e20 + f5facdf commit d1e2222
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contracts/bonding/BondingManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.9;

import "../ManagerProxyTarget.sol";
import "../interfaces/IBondingManager.sol";
import "./IBondingManager.sol";
import "../libraries/SortedDoublyLL.sol";
import "../libraries/MathUtils.sol";
import "../libraries/PreciseMathUtils.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,4 @@ 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);
}
2 changes: 1 addition & 1 deletion contracts/pm/mixins/interfaces/MContractRegistry.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import "../../../interfaces/IBondingManager.sol";
import "../../../bonding/IBondingManager.sol";
import "../../../token/IMinter.sol";
import "../../../rounds/IRoundsManager.sol";

Expand Down
7 changes: 6 additions & 1 deletion contracts/polling/PollCreator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
pragma solidity 0.8.9;

import "./Poll.sol";
import "../interfaces/IBondingManager.sol";

interface IBondingManager {
function transcoderTotalStake(address _addr) external view returns (uint256);

function pendingStake(address _addr, uint256 _endRound) external view returns (uint256);
}

contract PollCreator {
// 33.33%
Expand Down
2 changes: 1 addition & 1 deletion contracts/rounds/RoundsManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.9;

import "../ManagerProxyTarget.sol";
import "./IRoundsManager.sol";
import "../interfaces/IBondingManager.sol";
import "../bonding/IBondingManager.sol";
import "../token/IMinter.sol";
import "../libraries/MathUtils.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/token/Minter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "../Manager.sol";
import "./IMinter.sol";
import "./ILivepeerToken.sol";
import "../rounds/IRoundsManager.sol";
import "../interfaces/IBondingManager.sol";
import "../bonding/IBondingManager.sol";
import "../libraries/MathUtilsV2.sol";

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/unit/PollCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe("PollCreator", () => {
fixture = new Fixture(web3)

bondingManagerMock = await smock.fake(
"contracts/interfaces/IBondingManager.sol:IBondingManager",
"contracts/polling/PollCreator.sol:IBondingManager",
{
address: mockBondingManagerEOA.address
}
Expand Down

0 comments on commit d1e2222

Please sign in to comment.