GovernorNoncesKeyedMock.sol 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.24;
  3. import {Governor, Nonces} from "../../governance/Governor.sol";
  4. import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
  5. import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol";
  6. import {GovernorVotesQuorumFraction} from "../../governance/extensions/GovernorVotesQuorumFraction.sol";
  7. import {GovernorProposalGuardian} from "../../governance/extensions/GovernorProposalGuardian.sol";
  8. import {GovernorNoncesKeyed} from "../../governance/extensions/GovernorNoncesKeyed.sol";
  9. abstract contract GovernorNoncesKeyedMock is
  10. GovernorSettings,
  11. GovernorVotesQuorumFraction,
  12. GovernorCountingSimple,
  13. GovernorNoncesKeyed
  14. {
  15. function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {
  16. return super.proposalThreshold();
  17. }
  18. function _validateVoteSig(
  19. uint256 proposalId,
  20. uint8 support,
  21. address voter,
  22. bytes memory signature
  23. ) internal virtual override(Governor, GovernorNoncesKeyed) returns (bool) {
  24. return super._validateVoteSig(proposalId, support, voter, signature);
  25. }
  26. function _validateExtendedVoteSig(
  27. uint256 proposalId,
  28. uint8 support,
  29. address voter,
  30. string memory reason,
  31. bytes memory params,
  32. bytes memory signature
  33. ) internal virtual override(Governor, GovernorNoncesKeyed) returns (bool) {
  34. return super._validateExtendedVoteSig(proposalId, support, voter, reason, params, signature);
  35. }
  36. function _useCheckedNonce(address owner, uint256 nonce) internal virtual override(Nonces, GovernorNoncesKeyed) {
  37. super._useCheckedNonce(owner, nonce);
  38. }
  39. }