moved contract modifications into munged directory
This commit is contained in:
@ -38,8 +38,8 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
|
||||
|
||||
string private _name;
|
||||
|
||||
mapping(uint256 => ProposalCore) public _proposals;
|
||||
|
||||
mapping(uint256 => ProposalCore) private _proposals;
|
||||
|
||||
/**
|
||||
* @dev Restrict access to governor executing address. Some module might override the _executor function to make
|
||||
* sure this modifier is consistant with the execution model.
|
||||
@ -154,12 +154,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 from internal
|
||||
function _quorumReached(uint256 proposalId) internal view virtual returns (bool);
|
||||
|
||||
/**
|
||||
* @dev Is the proposal successful or not.
|
||||
*/
|
||||
function _voteSucceeded(uint256 proposalId) public view virtual returns (bool); // HARNESS: changed to public from internal
|
||||
function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool);
|
||||
|
||||
/**
|
||||
* @dev Register a vote with a given support and voting weight.
|
||||
@ -320,7 +320,7 @@ abstract contract Governor is Context, ERC165, EIP712, IGovernor {
|
||||
v,
|
||||
r,
|
||||
s
|
||||
); // mention that we assume that hashing works correctly
|
||||
);
|
||||
return _castVote(proposalId, voter, support, "");
|
||||
}
|
||||
|
||||
|
||||
@ -299,7 +299,6 @@ contract TimelockController is AccessControl {
|
||||
_call(id, i, targets[i], values[i], datas[i]);
|
||||
}
|
||||
_afterCall(id);
|
||||
// ASSUME THAT THERE IS NO REENTRANCY IN WIZARDHARNESS1
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -245,7 +245,7 @@ abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorComp
|
||||
/**
|
||||
* @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum.
|
||||
*/
|
||||
function _quorumReached(uint256 proposalId) public view virtual override returns (bool) { // HARNESS: changed to public from internal
|
||||
function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
|
||||
ProposalDetails storage details = _proposalDetails[proposalId];
|
||||
return quorum(proposalSnapshot(proposalId)) < details.forVotes;
|
||||
}
|
||||
@ -253,7 +253,7 @@ abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorComp
|
||||
/**
|
||||
* @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.
|
||||
*/
|
||||
function _voteSucceeded(uint256 proposalId) public view virtual override returns (bool) { // HARNESS: changed to public from internal
|
||||
function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
|
||||
ProposalDetails storage details = _proposalDetails[proposalId];
|
||||
return details.forVotes > details.againstVotes;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ abstract contract GovernorCountingSimple is Governor {
|
||||
/**
|
||||
* @dev See {Governor-_quorumReached}.
|
||||
*/
|
||||
function _quorumReached(uint256 proposalId) public view virtual override returns (bool) {
|
||||
function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
|
||||
ProposalVote storage proposalvote = _proposalVotes[proposalId];
|
||||
|
||||
return quorum(proposalSnapshot(proposalId)) <= proposalvote.forVotes + proposalvote.abstainVotes;
|
||||
@ -73,7 +73,7 @@ abstract contract GovernorCountingSimple is Governor {
|
||||
/**
|
||||
* @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes.
|
||||
*/
|
||||
function _voteSucceeded(uint256 proposalId) public view virtual override returns (bool) {
|
||||
function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
|
||||
ProposalVote storage proposalvote = _proposalVotes[proposalId];
|
||||
|
||||
return proposalvote.forVotes > proposalvote.againstVotes;
|
||||
|
||||
@ -109,7 +109,7 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
|
||||
bytes[] memory calldatas,
|
||||
bytes32 descriptionHash
|
||||
) internal virtual override {
|
||||
_timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);
|
||||
_timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -84,7 +84,7 @@ abstract contract ERC20Votes is ERC20Permit {
|
||||
*
|
||||
* - `blockNumber` must have been already mined
|
||||
*/
|
||||
function getPastVotes(address account, uint256 blockNumber) public view virtual returns (uint256) {
|
||||
function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {
|
||||
require(blockNumber < block.number, "ERC20Votes: block not yet mined");
|
||||
return _checkpointsLookup(_checkpoints[account], blockNumber);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user