-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint: add interfaces for governance contracts
Adds interfaces for the two governance contracts.
- Loading branch information
1 parent
849680b
commit 68cf21c
Showing
7 changed files
with
90 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/contracts-bedrock/src/governance/interfaces/IGovernanceToken.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import { ERC20Votes } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; | ||
|
||
interface IGovernanceToken { | ||
event Approval(address indexed owner, address indexed spender, uint256 value); | ||
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); | ||
event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); | ||
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | ||
event Transfer(address indexed from, address indexed to, uint256 value); | ||
|
||
function DOMAIN_SEPARATOR() external view returns (bytes32); | ||
function allowance(address owner, address spender) external view returns (uint256); | ||
function approve(address spender, uint256 amount) external returns (bool); | ||
function balanceOf(address account) external view returns (uint256); | ||
function burn(uint256 amount) external; | ||
function burnFrom(address account, uint256 amount) external; | ||
function checkpoints(address account, uint32 pos) external view returns (ERC20Votes.Checkpoint memory); | ||
function decimals() external view returns (uint8); | ||
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); | ||
function delegate(address delegatee) external; | ||
function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external; | ||
function delegates(address account) external view returns (address); | ||
function getPastTotalSupply(uint256 blockNumber) external view returns (uint256); | ||
function getPastVotes(address account, uint256 blockNumber) external view returns (uint256); | ||
function getVotes(address account) external view returns (uint256); | ||
function increaseAllowance(address spender, uint256 addedValue) external returns (bool); | ||
function mint(address _account, uint256 _amount) external; | ||
function name() external view returns (string memory); | ||
function nonces(address owner) external view returns (uint256); | ||
function numCheckpoints(address account) external view returns (uint32); | ||
function owner() external view returns (address); | ||
function permit( | ||
address owner, | ||
address spender, | ||
uint256 value, | ||
uint256 deadline, | ||
uint8 v, | ||
bytes32 r, | ||
bytes32 s | ||
) | ||
external; | ||
function renounceOwnership() external; | ||
function symbol() external view returns (string memory); | ||
function totalSupply() external view returns (uint256); | ||
function transfer(address to, uint256 amount) external returns (bool); | ||
function transferFrom(address from, address to, uint256 amount) external returns (bool); | ||
function transferOwnership(address newOwner) external; | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/contracts-bedrock/src/governance/interfaces/IMintManager.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import { IGovernanceToken } from "src/governance/interfaces/IGovernanceToken.sol"; | ||
|
||
interface IMintManager { | ||
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | ||
|
||
function DENOMINATOR() external view returns (uint256); | ||
function MINT_CAP() external view returns (uint256); | ||
function MINT_PERIOD() external view returns (uint256); | ||
function governanceToken() external view returns (IGovernanceToken); | ||
function mint(address _account, uint256 _amount) external; | ||
function mintPermittedAfter() external view returns (uint256); | ||
function owner() external view returns (address); | ||
function renounceOwnership() external; | ||
function transferOwnership(address newOwner) external; | ||
function upgrade(address _newMintManager) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 10 additions & 8 deletions
18
packages/contracts-bedrock/test/governance/MintManager.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters