fixed executeOnly rule

pull/2997/head
Michael George 3 years ago
parent ec5d501791
commit 5888bee853
  1. 8
      certora/specs/GovernorBase.spec

@ -318,17 +318,15 @@ rule allFunctionsRevertIfCanceled(method f) filtered {
/* /*
* Proposal can be switched to executed only via execute() function * Proposal can be switched to executed only via execute() function
*/ */
rule executedOnlyAfterExecuteFunc(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash, method f) filtered { rule executedOnlyAfterExecuteFunc(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash, method f) {
f -> f.selector != queue(address[],uint256[],bytes[],bytes32).selector
} {
env e; calldataarg args; env e; calldataarg args;
uint256 pId; uint256 pId;
bool executedBefore = isExecuted(pId); bool executedBefore = isExecuted(pId);
require(!executedBefore); require(!executedBefore);
helperFunctionsWithRevert(pId, f, e); helperFunctionsWithRevert(pId, f, e);
require(!lastReverted);
bool executedAfter = isExecuted(pId); bool executedAfter = isExecuted(pId);
assert(executedAfter != executedBefore, "executed property did not change"); assert(executedAfter != executedBefore => f.selector == execute(address[], uint256[], bytes[], bytes32).selector, "isExecuted only changes in the execute method");
} }

Loading…
Cancel
Save