cleaning in process

This commit is contained in:
Aleksander Kryukov
2021-11-25 13:30:09 +02:00
parent 37725a0f2c
commit 73080c79d0
9 changed files with 16 additions and 77 deletions

View File

@ -21,7 +21,7 @@ contract WizardFirstTry is Governor, GovernorCountingSimple, GovernorVotes, Gove
GovernorTimelockCompound(_timelock)
{}
//HARNESS
function isExecuted(uint256 proposalId) public view returns (bool) {
return _proposals[proposalId].executed;
@ -31,18 +31,18 @@ contract WizardFirstTry is Governor, GovernorCountingSimple, GovernorVotes, Gove
return _proposals[proposalId].canceled;
}
function snapshot(uint256 proposalId) public view returns (uint64) {
return _proposals[proposalId].voteStart._deadline;
}
function getExecutor() public view returns (address){
return _executor();
}
uint256 _votingDelay;
function votingDelay() public view override virtual returns (uint256) { // HARNESS: pure -> view
return _votingDelay;
}
uint256 _votingPeriod;
function votingPeriod() public view override virtual returns (uint256) { // HARNESS: pure -> view
return _votingPeriod;
}
mapping(uint256 => uint256) public ghost_sum_vote_power_by_id;
function _castVote(
@ -58,21 +58,14 @@ contract WizardFirstTry is Governor, GovernorCountingSimple, GovernorVotes, Gove
return deltaWeight;
}
function callPropose(address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas) public virtual returns (uint256) {
return super.propose(targets, values, calldatas, "");
// original code, harnessed
function votingDelay() public view override virtual returns (uint256) { // HARNESS: pure -> view
return _votingDelay; // HARNESS: parametric
}
// Harness of castVoteWithReason to be able to impose requirement on the proposal ID.
uint256 public _pId_Harness;
function castVoteWithReason(uint256 proposalId, uint8 support, string calldata reason)
public
override(IGovernor, Governor)
returns (uint256)
{
require(proposalId == _pId_Harness);
return super.castVoteWithReason(proposalId, support, reason);
function votingPeriod() public view override virtual returns (uint256) { // HARNESS: pure -> view
return _votingPeriod; // HARNESS: parametric
}
// The following functions are overrides required by Solidity.