Skip to content

Commit

Permalink
add a setter for treasury
Browse files Browse the repository at this point in the history
  • Loading branch information
Splidge committed Aug 26, 2021
1 parent 198f379 commit da99081
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions contracts/RCLeaderboard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ contract RCLeaderboard is NativeMetaTransaction, IRCLeaderboard {
// Contracts and Permissions
IRCTreasury public override treasury;
IRCMarket public override market;
bytes32 public constant UBER_OWNER = keccak256("UBER_OWNER");
bytes32 public constant MARKET = keccak256("MARKET");
bytes32 public constant FACTORY = keccak256("FACTORY");

Expand Down Expand Up @@ -59,6 +60,19 @@ contract RCLeaderboard is NativeMetaTransaction, IRCLeaderboard {
_;
}

/*╔═════════════════════════════════╗
║ GOVERNANCE ║
╚═════════════════════════════════╝*/

function setTreasuryAddress(address _newTreasury) external override {
require(
treasury.checkPermission(UBER_OWNER, msgSender()),
"Extremely Verboten"
);
require(_newTreasury != address(0));
treasury = IRCTreasury(_newTreasury);
}

/*╔═════════════════════════════════╗
║ Leaderboard Tracking ║
╚═════════════════════════════════╝*/
Expand Down
2 changes: 2 additions & 0 deletions contracts/interfaces/IRCLeaderboard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ interface IRCLeaderboard {

function NFTsToAward(address _market) external view returns (uint256);

function setTreasuryAddress(address _newTreasury) external;

function updateLeaderboard(
address _user,
uint256 _card,
Expand Down

0 comments on commit da99081

Please sign in to comment.