GovernorCompMock.sol 893 B

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../governance/extensions/GovernorCountingSimple.sol";
  4. import "../governance/extensions/GovernorVotesComp.sol";
  5. contract GovernorCompMock is GovernorVotesComp, GovernorCountingSimple {
  6. constructor(string memory name_, ERC20VotesComp token_) Governor(name_) GovernorVotesComp(token_) {}
  7. function quorum(uint256) public pure override returns (uint256) {
  8. return 0;
  9. }
  10. function votingDelay() public pure override returns (uint256) {
  11. return 4;
  12. }
  13. function votingPeriod() public pure override returns (uint256) {
  14. return 16;
  15. }
  16. function cancel(
  17. address[] memory targets,
  18. uint256[] memory values,
  19. bytes[] memory calldatas,
  20. bytes32 salt
  21. ) public returns (uint256 proposalId) {
  22. return _cancel(targets, values, calldatas, salt);
  23. }
  24. }