fixed executeOnly rule
This commit is contained in:
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user