From 5dbde1a5c954a79338959d4eb9c7e716a217d6a1 Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 12 Jan 2023 05:43:29 -0800 Subject: [PATCH] Fix governance tutorial contract (#3948) Co-authored-by: Francisco Giordano Co-authored-by: Hadrien Croubois --- docs/modules/ROOT/pages/governance.adoc | 28 +++++-------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/docs/modules/ROOT/pages/governance.adoc b/docs/modules/ROOT/pages/governance.adoc index 00a997db5..aa27c0ba8 100644 --- a/docs/modules/ROOT/pages/governance.adoc +++ b/docs/modules/ROOT/pages/governance.adoc @@ -145,11 +145,11 @@ We can optionally set a proposal threshold as well. This restricts proposal crea // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; -import "./governance/Governor.sol"; -import "./governance/compatibility/GovernorCompatibilityBravo.sol"; -import "./governance/extensions/GovernorVotes.sol"; -import "./governance/extensions/GovernorVotesQuorumFraction.sol"; -import "./governance/extensions/GovernorTimelockControl.sol"; +import "@openzeppelin/contracts/governance/Governor.sol"; +import "@openzeppelin/contracts/governance/compatibility/GovernorCompatibilityBravo.sol"; +import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol"; +import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol"; +import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol"; contract MyGovernor is Governor, GovernorCompatibilityBravo, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl { constructor(IVotes _token, TimelockController _timelock) @@ -173,24 +173,6 @@ contract MyGovernor is Governor, GovernorCompatibilityBravo, GovernorVotes, Gove // The functions below are overrides required by Solidity. - function quorum(uint256 blockNumber) - public - view - override(IGovernor, GovernorVotesQuorumFraction) - returns (uint256) - { - return super.quorum(blockNumber); - } - - function getVotes(address account, uint256 blockNumber) - public - view - override(IGovernor, GovernorVotes) - returns (uint256) - { - return super.getVotes(account, blockNumber); - } - function state(uint256 proposalId) public view