-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
294 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "./GovernorMock.sol"; | ||
import "../governance/extensions/GovernorExtendedVoting.sol"; | ||
|
||
contract GovernorExtendedVotingMock is GovernorMock, GovernorExtendedVoting { | ||
uint256 private _quorum; | ||
|
||
constructor( | ||
string memory name_, | ||
ERC20Votes token_, | ||
uint256 votingDelay_, | ||
uint256 votingPeriod_, | ||
uint256 quorum_, | ||
uint64 votingDelayExtention_ | ||
) | ||
GovernorMock(name_, token_, votingDelay_, votingPeriod_, 0) | ||
GovernorExtendedVoting(votingDelayExtention_) | ||
{ | ||
_quorum = quorum_; | ||
} | ||
|
||
function quorum(uint256) public view virtual override returns (uint256) { | ||
return _quorum; | ||
} | ||
|
||
function proposalDeadline(uint256 proposalId) public view virtual override(Governor, GovernorExtendedVoting) returns (uint256) { | ||
return super.proposalDeadline(proposalId); | ||
} | ||
|
||
function proposalThreshold() public view virtual override(Governor, GovernorMock) returns (uint256) { | ||
return super.proposalThreshold(); | ||
} | ||
|
||
function propose( | ||
address[] memory targets, | ||
uint256[] memory values, | ||
bytes[] memory calldatas, | ||
string memory description | ||
) public virtual override(Governor, GovernorMock) returns (uint256) { | ||
return super.propose(targets, values, calldatas, description); | ||
} | ||
|
||
function _castVote( | ||
uint256 proposalId, | ||
address account, | ||
uint8 support, | ||
string memory reason | ||
) internal virtual override(Governor, GovernorExtendedVoting) returns (uint256) { | ||
return super._castVote(proposalId, account, support, reason); | ||
} | ||
} |
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
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
Oops, something went wrong.