GovernorTimelockCompoundMock.sol 1.9 KB

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