Improve Governor (#2794)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f782943099
commit
4b152bd8ce
@ -47,7 +47,7 @@ contract GovernorCompMock is Governor, GovernorVotesComp, GovernorCountingSimple
|
||||
public
|
||||
view
|
||||
virtual
|
||||
override(Governor, GovernorVotesComp)
|
||||
override(IGovernor, GovernorVotesComp)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.getVotes(account, blockNumber);
|
||||
|
||||
@ -34,11 +34,11 @@ contract GovernorCompatibilityBravoMock is GovernorCompatibilityBravo, GovernorT
|
||||
return super.supportsInterface(interfaceId);
|
||||
}
|
||||
|
||||
function votingDelay() public view override(IGovernor, Governor) returns (uint256) {
|
||||
function votingDelay() public view override returns (uint256) {
|
||||
return _votingDelay;
|
||||
}
|
||||
|
||||
function votingPeriod() public view override(IGovernor, Governor) returns (uint256) {
|
||||
function votingPeriod() public view override returns (uint256) {
|
||||
return _votingPeriod;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ contract GovernorCompatibilityBravoMock is GovernorCompatibilityBravo, GovernorT
|
||||
return _proposalThreshold;
|
||||
}
|
||||
|
||||
function quorum(uint256) public pure override(IGovernor, Governor) returns (uint256) {
|
||||
function quorum(uint256) public pure override returns (uint256) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ contract GovernorCompatibilityBravoMock is GovernorCompatibilityBravo, GovernorT
|
||||
public
|
||||
view
|
||||
virtual
|
||||
override(GovernorCompatibilityBravo, GovernorTimelockCompound)
|
||||
override(IGovernorTimelock, GovernorTimelockCompound)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.proposalEta(proposalId);
|
||||
@ -84,7 +84,7 @@ contract GovernorCompatibilityBravoMock is GovernorCompatibilityBravo, GovernorT
|
||||
uint256[] memory values,
|
||||
bytes[] memory calldatas,
|
||||
bytes32 salt
|
||||
) public virtual override(GovernorCompatibilityBravo, GovernorTimelockCompound) returns (uint256) {
|
||||
) public virtual override(IGovernorTimelock, GovernorTimelockCompound) returns (uint256) {
|
||||
return super.queue(targets, values, calldatas, salt);
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ contract GovernorMock is Governor, GovernorVotesQuorumFraction, GovernorCounting
|
||||
public
|
||||
view
|
||||
virtual
|
||||
override(Governor, GovernorVotes)
|
||||
override(IGovernor, GovernorVotes)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.getVotes(account, blockNumber);
|
||||
|
||||
@ -37,18 +37,18 @@ contract GovernorTimelockCompoundMock is GovernorTimelockCompound, GovernorVotes
|
||||
return super.supportsInterface(interfaceId);
|
||||
}
|
||||
|
||||
function votingDelay() public view override(IGovernor, Governor) returns (uint256) {
|
||||
function votingDelay() public view override returns (uint256) {
|
||||
return _votingDelay;
|
||||
}
|
||||
|
||||
function votingPeriod() public view override(IGovernor, Governor) returns (uint256) {
|
||||
function votingPeriod() public view override returns (uint256) {
|
||||
return _votingPeriod;
|
||||
}
|
||||
|
||||
function quorum(uint256 blockNumber)
|
||||
public
|
||||
view
|
||||
override(IGovernor, Governor, GovernorVotesQuorumFraction)
|
||||
override(IGovernor, GovernorVotesQuorumFraction)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.quorum(blockNumber);
|
||||
@ -99,7 +99,7 @@ contract GovernorTimelockCompoundMock is GovernorTimelockCompound, GovernorVotes
|
||||
public
|
||||
view
|
||||
virtual
|
||||
override(IGovernor, Governor, GovernorVotes)
|
||||
override(IGovernor, GovernorVotes)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.getVotes(account, blockNumber);
|
||||
|
||||
@ -37,18 +37,18 @@ contract GovernorTimelockControlMock is GovernorTimelockControl, GovernorVotesQu
|
||||
return super.supportsInterface(interfaceId);
|
||||
}
|
||||
|
||||
function votingDelay() public view override(IGovernor, Governor) returns (uint256) {
|
||||
function votingDelay() public view override returns (uint256) {
|
||||
return _votingDelay;
|
||||
}
|
||||
|
||||
function votingPeriod() public view override(IGovernor, Governor) returns (uint256) {
|
||||
function votingPeriod() public view override returns (uint256) {
|
||||
return _votingPeriod;
|
||||
}
|
||||
|
||||
function quorum(uint256 blockNumber)
|
||||
public
|
||||
view
|
||||
override(IGovernor, Governor, GovernorVotesQuorumFraction)
|
||||
override(IGovernor, GovernorVotesQuorumFraction)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.quorum(blockNumber);
|
||||
@ -99,7 +99,7 @@ contract GovernorTimelockControlMock is GovernorTimelockControl, GovernorVotesQu
|
||||
public
|
||||
view
|
||||
virtual
|
||||
override(IGovernor, Governor, GovernorVotes)
|
||||
override(IGovernor, GovernorVotes)
|
||||
returns (uint256)
|
||||
{
|
||||
return super.getVotes(account, blockNumber);
|
||||
|
||||
Reference in New Issue
Block a user