GovernorTimelockControlMock.sol 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../../governance/extensions/GovernorTimelockControl.sol";
  4. import "../../governance/extensions/GovernorSettings.sol";
  5. import "../../governance/extensions/GovernorCountingSimple.sol";
  6. import "../../governance/extensions/GovernorVotesQuorumFraction.sol";
  7. abstract contract GovernorTimelockControlMock is
  8. GovernorSettings,
  9. GovernorTimelockControl,
  10. GovernorVotesQuorumFraction,
  11. GovernorCountingSimple
  12. {
  13. function supportsInterface(
  14. bytes4 interfaceId
  15. ) public view override(Governor, GovernorTimelockControl) returns (bool) {
  16. return super.supportsInterface(interfaceId);
  17. }
  18. function quorum(
  19. uint256 blockNumber
  20. ) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) {
  21. return super.quorum(blockNumber);
  22. }
  23. function state(uint256 proposalId) public view override(Governor, GovernorTimelockControl) returns (ProposalState) {
  24. return super.state(proposalId);
  25. }
  26. function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {
  27. return super.proposalThreshold();
  28. }
  29. function _execute(
  30. uint256 proposalId,
  31. address[] memory targets,
  32. uint256[] memory values,
  33. bytes[] memory calldatas,
  34. bytes32 descriptionHash
  35. ) internal override(Governor, GovernorTimelockControl) {
  36. super._execute(proposalId, targets, values, calldatas, descriptionHash);
  37. }
  38. function _cancel(
  39. address[] memory targets,
  40. uint256[] memory values,
  41. bytes[] memory calldatas,
  42. bytes32 descriptionHash
  43. ) internal override(Governor, GovernorTimelockControl) returns (uint256 proposalId) {
  44. return super._cancel(targets, values, calldatas, descriptionHash);
  45. }
  46. function _executor() internal view override(Governor, GovernorTimelockControl) returns (address) {
  47. return super._executor();
  48. }
  49. function nonGovernanceFunction() external {}
  50. }