cleaning in process
This commit is contained in:
@ -54,7 +54,6 @@ contract WizardFirstPriority is Governor, GovernorProposalThreshold, GovernorCou
|
||||
return deltaWeight;
|
||||
}
|
||||
|
||||
|
||||
function snapshot(uint256 proposalId) public view returns (uint64) {
|
||||
return _proposals[proposalId].voteStart._deadline;
|
||||
}
|
||||
@ -64,7 +63,7 @@ contract WizardFirstPriority is Governor, GovernorProposalThreshold, GovernorCou
|
||||
return _executor();
|
||||
}
|
||||
|
||||
// original code
|
||||
// original code, harnessed
|
||||
|
||||
function votingDelay() public view override returns (uint256) { // HARNESS: pure -> view
|
||||
return _votingDelay; // HARNESS: parametric
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
for contract in certora/harnesses/Wizard*.sol;
|
||||
do
|
||||
for spec in certora/specs/*.spec;
|
||||
do
|
||||
contractFile=$(basename $contract)
|
||||
specFile=$(basename $spec)
|
||||
echo "Processing ${contractFile%.*} with $specFile"
|
||||
if [ "${contractFile%.*}" = "WizardFirstPriority" ];
|
||||
then
|
||||
certoraRun certora/harnesses/ERC20VotesHarness.sol certora/harnesses/$contractFile \
|
||||
--link WizardFirstPriority:token=ERC20VotesHarness \
|
||||
--verify ${contractFile%.*}:certora/specs/$specFile "$@" \
|
||||
--solc solc8.2 \
|
||||
--staging shelly/forSasha \
|
||||
--optimistic_loop \
|
||||
--settings -copyLoopUnroll=4 \
|
||||
--msg "checking $spec on ${contractFile%.*}"
|
||||
else
|
||||
certoraRun certora/harnesses/ERC20VotesHarness.sol certora/harnesses/$contractFile \
|
||||
--verify ${contractFile%.*}:certora/specs/$specFile "$@" \
|
||||
--solc solc8.2 \
|
||||
--staging shelly/forSasha \
|
||||
--optimistic_loop \
|
||||
--settings -copyLoopUnroll=4 \
|
||||
--msg "checking $spec on ${contractFile%.*}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@ -1,8 +0,0 @@
|
||||
certoraRun certora/harnesses/GovernorCountingSimpleHarness.sol \
|
||||
--verify GovernorCountingSimpleHarness:certora/specs/GovernorBase.spec \
|
||||
--solc solc8.0 \
|
||||
--staging \
|
||||
--optimistic_loop \
|
||||
--settings -copyLoopUnroll=4 \
|
||||
--rule doubleVoting \
|
||||
--msg "$1"
|
||||
@ -1,2 +0,0 @@
|
||||
certoraRun certora/harnesses/GovernorProposalThresholdHarness.sol \
|
||||
--verify GovernorProposalThresholdHarness:certora/specs/Privileged.spec
|
||||
@ -1,2 +0,0 @@
|
||||
certoraRun certora/harnesses/GovernorTimelockCompoundHarness.sol \
|
||||
--verify GovernorTimelockCompoundHarness:certora/specs/Privileged.spec
|
||||
@ -1,2 +0,0 @@
|
||||
certoraRun certora/harnesses/GovernorVotesHarness.sol \
|
||||
--verify GovernorVotesHarness:certora/specs/Privileged.spec
|
||||
@ -1,2 +0,0 @@
|
||||
certoraRun certora/harnesses/GovernorVotesQuorumFractionHarness.sol \
|
||||
--verify GovernorVotesQuorumFractionHarness:certora/specs/Privileged.spec
|
||||
@ -1,9 +0,0 @@
|
||||
echo "Usage: Contract Spec"
|
||||
echo "e.g. GovernorVotes Privileged"
|
||||
Contract=$1
|
||||
Spec=$2
|
||||
shift 2
|
||||
certoraRun certora/harnesses/${Contract}Harness.sol \
|
||||
--verify ${Contract}Harness:certora/specs/${Spec}.spec "$@" \
|
||||
--solc solc8.0 --staging --rule noBothExecutedAndCanceled
|
||||
|
||||
Reference in New Issue
Block a user