Skip to content

Commit

Permalink
treasury: Move some things around
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges committed Jul 7, 2023
1 parent 237b790 commit 2866eb8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion contracts/treasury/BondingCheckpointsVotes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.8.9;

import "../Manager.sol";
import "../bonding/IBondingCheckpoints.sol";
import "./IVotes.sol";
import "./GovernorCountingOverridable.sol";

/**
* @title Interface for BondingCheckpoints
Expand Down
8 changes: 6 additions & 2 deletions contracts/treasury/GovernorCountingOverridable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity 0.8.9;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC5805Upgradeable.sol";

import "../bonding/libraries/EarningsPool.sol";
import "../bonding/libraries/EarningsPoolLIP36.sol";
Expand All @@ -11,7 +12,10 @@ import "../Manager.sol";
import "../IController.sol";
import "../rounds/IRoundsManager.sol";
import "../bonding/IBondingCheckpoints.sol";
import "./IVotes.sol";

interface IVotes is IERC5805Upgradeable {
function delegatedAt(address delegatee, uint256 timepoint) external returns (address);
}

/**
* @title GovernorCountingOverridable
Expand Down Expand Up @@ -57,7 +61,7 @@ abstract contract GovernorCountingOverridable is Initializable, GovernorUpgradea
// solhint-disable-next-line func-name-mixedcase
function COUNTING_MODE() public pure virtual override returns (string memory) {
// TODO: Figure out the right value for this
return "support=bravo&quorum=for,abstain";
return "support=bravo&quorum=for,abstain,against";
}

/**
Expand Down
8 changes: 0 additions & 8 deletions contracts/treasury/IVotes.sol

This file was deleted.

5 changes: 2 additions & 3 deletions contracts/treasury/LivepeerGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import "../IController.sol";
import "../rounds/IRoundsManager.sol";
import "./GovernorCountingOverridable.sol";
import "./BondingCheckpointsVotes.sol";
import "./IVotes.sol";

contract LivepeerGovernor is
Initializable,
Expand Down Expand Up @@ -98,11 +97,11 @@ contract LivepeerGovernor is
token = votes();
}

function bondingCheckpointVotes() public view returns (BondingCheckpointsVotes) {
function bondingCheckpointVotes() internal view returns (BondingCheckpointsVotes) {
return BondingCheckpointsVotes(controller.getContract(keccak256("BondingCheckpointsVotes")));
}

function pollCreator() public view returns (PollCreator) {
function pollCreator() internal view returns (PollCreator) {
return PollCreator(controller.getContract(keccak256("PollCreator")));
}
}

0 comments on commit 2866eb8

Please sign in to comment.