Skip to content
Snippets Groups Projects
Commit 6f1609bb authored by yonatan.tesfu's avatar yonatan.tesfu
Browse files

fichier governor

parent a868e0b1
No related branches found
No related tags found
No related merge requests found
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/governance/Governor.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction {
constructor(IVotes _token)
Governor("MyGovernor")
GovernorVotes(_token)
GovernorVotesQuorumFraction(1)
{}
function votingDelay() public pure override returns (uint256) {
return 0; // 0 block
}
function votingPeriod() public pure override returns (uint256) {
return 1; // 1 blocks
}
// The following functions are overrides required by Solidity.
function quorum(uint256 blockNumber)
public
view
override(IGovernor, GovernorVotesQuorumFraction)
returns (uint256)
{
return super.quorum(blockNumber);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment