Fix governance tutorial contract (#3948)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
@ -145,11 +145,11 @@ We can optionally set a proposal threshold as well. This restricts proposal crea
|
|||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
pragma solidity ^0.8.2;
|
pragma solidity ^0.8.2;
|
||||||
|
|
||||||
import "./governance/Governor.sol";
|
import "@openzeppelin/contracts/governance/Governor.sol";
|
||||||
import "./governance/compatibility/GovernorCompatibilityBravo.sol";
|
import "@openzeppelin/contracts/governance/compatibility/GovernorCompatibilityBravo.sol";
|
||||||
import "./governance/extensions/GovernorVotes.sol";
|
import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
|
||||||
import "./governance/extensions/GovernorVotesQuorumFraction.sol";
|
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
|
||||||
import "./governance/extensions/GovernorTimelockControl.sol";
|
import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";
|
||||||
|
|
||||||
contract MyGovernor is Governor, GovernorCompatibilityBravo, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {
|
contract MyGovernor is Governor, GovernorCompatibilityBravo, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {
|
||||||
constructor(IVotes _token, TimelockController _timelock)
|
constructor(IVotes _token, TimelockController _timelock)
|
||||||
@ -173,24 +173,6 @@ contract MyGovernor is Governor, GovernorCompatibilityBravo, GovernorVotes, Gove
|
|||||||
|
|
||||||
// The functions below are overrides required by Solidity.
|
// 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)
|
function state(uint256 proposalId)
|
||||||
public
|
public
|
||||||
view
|
view
|
||||||
|
|||||||
Reference in New Issue
Block a user