GovernorPreventLateQuorumMock.sol 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../../governance/extensions/GovernorPreventLateQuorum.sol";
  4. import "../../governance/extensions/GovernorSettings.sol";
  5. import "../../governance/extensions/GovernorCountingSimple.sol";
  6. import "../../governance/extensions/GovernorVotes.sol";
  7. abstract contract GovernorPreventLateQuorumMock is
  8. GovernorSettings,
  9. GovernorVotes,
  10. GovernorCountingSimple,
  11. GovernorPreventLateQuorum
  12. {
  13. uint256 private _quorum;
  14. constructor(uint256 quorum_) {
  15. _quorum = quorum_;
  16. }
  17. function quorum(uint256) public view override returns (uint256) {
  18. return _quorum;
  19. }
  20. function proposalDeadline(
  21. uint256 proposalId
  22. ) public view override(Governor, GovernorPreventLateQuorum) returns (uint256) {
  23. return super.proposalDeadline(proposalId);
  24. }
  25. function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {
  26. return super.proposalThreshold();
  27. }
  28. function _castVote(
  29. uint256 proposalId,
  30. address account,
  31. uint8 support,
  32. string memory reason,
  33. bytes memory params
  34. ) internal override(Governor, GovernorPreventLateQuorum) returns (uint256) {
  35. return super._castVote(proposalId, account, support, reason, params);
  36. }
  37. }