Skip to content

Commit

Permalink
change Safe spec to Hash spec for more accurate naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Sorensen authored and Derek Sorensen committed Dec 19, 2024
1 parent e15d1a2 commit 43f4cb1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"link": [

],
"verify": "SafeHarness:certora/specs/v1.5/Safe.spec",
"verify": "SafeHarness:certora/specs/v1.5/Hash.spec",

"assert_autofinder_success": true,
"optimistic_summary_recursion": true,
Expand Down
45 changes: 45 additions & 0 deletions certora/specs/v1.5/Hash.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* A specification for the Safe setup function */


// ---- Methods block ----------------------------------------------------------
methods {
function getThreshold() external returns (uint256) envfree;

function SecuredTokenTransfer.transferToken(address token, address receiver, uint256 amount) internal returns (bool) => NONDET ;
}

// ---- Functions and ghosts ---------------------------------------------------


// ---- Invariants -------------------------------------------------------------


// ---- Rules ------------------------------------------------------------------

/// @dev setup can only be called if threshold = 0 and setup sets threshold > 0
/// @status Done: https://prover.certora.com/output/39601/7849e9a464e042ea89bfe68fc226edbc?anonymousKey=5c1387afecb8bc86f23df3be5eb886a5cd82787f

rule setupThresholdZeroAndSetsPositiveThreshold(
address[] _owners,
uint256 _threshold,
address to,
bytes data,
address fallbackHandler,
address paymentToken,
uint256 payment,
address paymentReceiver) {
env e;

uint256 old_threshold = getThreshold();

// a successful call to setup
setup(e,_owners,_threshold,to,data,fallbackHandler,
paymentToken,payment,paymentReceiver);

uint256 new_threshold = getThreshold();

assert (
new_threshold > 0 &&
old_threshold == 0
);
}
47 changes: 0 additions & 47 deletions certora/specs/v1.5/Safe.spec

This file was deleted.

0 comments on commit 43f4cb1

Please sign in to comment.