GovernorPreventLateQuorumMock.sol 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.20;
  3. import {Governor} from "../../governance/Governor.sol";
  4. import {GovernorPreventLateQuorum} from "../../governance/extensions/GovernorPreventLateQuorum.sol";
  5. import {GovernorSettings} from "../../governance/extensions/GovernorSettings.sol";
  6. import {GovernorCountingSimple} from "../../governance/extensions/GovernorCountingSimple.sol";
  7. import {GovernorVotes} from "../../governance/extensions/GovernorVotes.sol";
  8. abstract contract GovernorPreventLateQuorumMock is
  9. GovernorSettings,
  10. GovernorVotes,
  11. GovernorCountingSimple,
  12. GovernorPreventLateQuorum
  13. {
  14. uint256 private _quorum;
  15. constructor(uint256 quorum_) {
  16. _quorum = quorum_;
  17. }
  18. function quorum(uint256) public view override returns (uint256) {
  19. return _quorum;
  20. }
  21. function proposalDeadline(
  22. uint256 proposalId
  23. ) public view override(Governor, GovernorPreventLateQuorum) returns (uint256) {
  24. return super.proposalDeadline(proposalId);
  25. }
  26. function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) {
  27. return super.proposalThreshold();
  28. }
  29. function _tallyUpdated(uint256 proposalId) internal override(Governor, GovernorPreventLateQuorum) {
  30. super._tallyUpdated(proposalId);
  31. }
  32. }