GovernorNoncesKeyedMock.sol 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 {GovernorNoncesKeyed} from "../../governance/extensions/GovernorNoncesKeyed.sol";
  8. abstract contract GovernorNoncesKeyedMock is
  9. GovernorSettings,
  10. GovernorVotesQuorumFraction,
  11. GovernorCountingSimple,
  12. GovernorNoncesKeyed
  13. {
  14. function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {
  15. return super.proposalThreshold();
  16. }
  17. function _validateVoteSig(
  18. uint256 proposalId,
  19. uint8 support,
  20. address voter,
  21. bytes memory signature
  22. ) internal virtual override(Governor, GovernorNoncesKeyed) returns (bool) {
  23. return super._validateVoteSig(proposalId, support, voter, signature);
  24. }
  25. function _validateExtendedVoteSig(
  26. uint256 proposalId,
  27. uint8 support,
  28. address voter,
  29. string memory reason,
  30. bytes memory params,
  31. bytes memory signature
  32. ) internal virtual override(Governor, GovernorNoncesKeyed) returns (bool) {
  33. return super._validateExtendedVoteSig(proposalId, support, voter, reason, params, signature);
  34. }
  35. function _useCheckedNonce(address owner, uint256 nonce) internal virtual override(Nonces, GovernorNoncesKeyed) {
  36. super._useCheckedNonce(owner, nonce);
  37. }
  38. }