specificSpecForSumRule

This commit is contained in:
Aleksander Kryukov
2021-11-09 15:10:07 +02:00
parent 07d637980c
commit 96df9799c3
7 changed files with 114 additions and 34 deletions

View File

@ -146,12 +146,12 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
/**
* @dev Amount of votes already cast passes the threshold limit.
*/
function _quorumReached(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public
function _quorumReached(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public from internal
/**
* @dev Is the proposal successful or not.
*/
function _voteSucceeded(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public
function _voteSucceeded(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public from internal
/**
* @dev Register a vote with a given support and voting weight.

View File

@ -260,7 +260,7 @@ abstract contract GovernorCompatibilityBravo is
/**
* @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum.
*/
function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
function _quorumReached(uint256 proposalId) public view virtual override returns (bool) { // HARNESS: changed to public from internal
ProposalDetails storage details = _proposalDetails[proposalId];
return quorum(proposalSnapshot(proposalId)) < details.forVotes;
}
@ -268,7 +268,7 @@ abstract contract GovernorCompatibilityBravo is
/**
* @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.
*/
function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
function _voteSucceeded(uint256 proposalId) public view virtual override returns (bool) { // HARNESS: changed to public from internal
ProposalDetails storage details = _proposalDetails[proposalId];
return details.forVotes > details.againstVotes;
}

View File

@ -97,7 +97,7 @@ abstract contract GovernorCountingSimple is Governor {
} else if (support == uint8(VoteType.For)) {
proposalvote.forVotes += weight;
} else if (support == uint8(VoteType.Abstain)) {
proposalvote.abstainVotes += weight;
// proposalvote.abstainVotes += weight;
} else {
revert("GovernorVotingSimple: invalid value for enum VoteType");
}