Open
Conversation
Codecov Report
@@ Coverage Diff @@
## main #70 +/- ##
=======================================
Coverage 92.50% 92.50%
=======================================
Files 6 6
Lines 160 160
Branches 26 26
=======================================
Hits 148 148
Misses 12 12
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
developerfred
requested changes
Mar 20, 2023
developerfred
left a comment
There was a problem hiding this comment.
The Sector3Governor contract now directly inherits from GovernorVotes, GovernorVotesQuorumFraction, and GovernorCountingSimple.
Removed the separate inheritance of Governor and GovernorSettings from Sector3Governor, as GovernorVotes already inherits from these contracts.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";
contract Sector3Governor is GovernorVotes, GovernorVotesQuorumFraction, GovernorCountingSimple {
constructor(IVotes _token)
Governor("Sector#3 Governor")
GovernorSettings(1 /* 1 block */, 50400 /* ~1 week */, 2049e15 /* 2.049 */)
GovernorVotes(_token)
GovernorVotesQuorumFraction(1)
{}
// The following functions are overrides required by Solidity.
function proposalThreshold()
public
view
override(Governor, GovernorSettings)
returns (uint256)
{
return super.proposalThreshold();
}
}
Member
Author
|
@developerfred Can you do that refactoring in a separate PR? 😄 (This PR is for changing the proposal threshold.) |
developerfred
added a commit
that referenced
this pull request
Mar 21, 2023
The Sector3Governor contract now directly inherits from GovernorVotes, GovernorVotesQuorumFraction, and GovernorCountingSimple. Removed the separate inheritance of Governor and GovernorSettings from Sector3Governor, as GovernorVotes already inherits from these contracts. ref: #70 (review)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reflects the parameter change at https://www.tally.xyz/gov/sector-3/proposal/88036500606289662177521211200503660601961220224900564422598757855574876854748
Related GitHub Issue
How Has This Been Tested?
Sector#3 Contribution