Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contract admin cleanup #789

Merged
merged 2 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/fuse/FuseGuardian.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract FuseGuardian is CoreRef {
comptroller = _comptroller;
/// @notice The reason we are reusing the tribal chief admin role is it consolidates control in the OA,
/// and means we don't have to do another governance action to create this role in core
_setContractAdminRole(keccak256("TRIBAL_CHIEF_ADMIN_ROLE"));
_setContractAdminRole(keccak256("FUSE_ADMIN"));
}

// ************ BORROW GUARDIAN FUNCTIONS ************
Expand Down
6 changes: 3 additions & 3 deletions contracts/pcv/convex/VotiumBriber.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import "./IVotiumBribe.sol";
import "../../refs/CoreRef.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import {TribeRoles} from "../../core/TribeRoles.sol";

/// @title VotiumBriber: implementation for a contract that can use
/// tokens to bribe on Votium.
/// @author Fei Protocol
Expand Down Expand Up @@ -32,8 +34,6 @@ contract VotiumBriber is CoreRef {
) CoreRef(_core) {
token = _token;
votiumBribe = _votiumBribe;

_setContractAdminRole(keccak256("TRIBAL_CHIEF_ADMIN_ROLE"));
}

/// @notice Spend tokens on Votium to bribe for a given pool.
Expand All @@ -43,7 +43,7 @@ contract VotiumBriber is CoreRef {
/// the _proposal ID, if _choiceIndex is out of range, or of block.timestamp
/// is after the deadline for bribing (usually 6 hours before Convex snapshot
/// vote ends).
function bribe(bytes32 _proposal, uint256 _choiceIndex) public onlyGovernorOrAdmin whenNotPaused {
function bribe(bytes32 _proposal, uint256 _choiceIndex) public onlyTribeRole(TribeRoles.VOTIUM_ROLE) whenNotPaused {
kryptoklob marked this conversation as resolved.
Show resolved Hide resolved
// fetch the current number of TRIBE
uint256 tokenAmount = token.balanceOf(address(this));
require(tokenAmount > 0, "VotiumBriber: no tokens to bribe");
Expand Down