GovernorTimelockCompoundMock.sol 2.1 KB

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