forked from safe-global/safe-smart-account
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
certora audit for safe v1.5 --------- Co-authored-by: Derek Sorensen <[email protected]>
- Loading branch information
1 parent
489b2bc
commit a38212b
Showing
22 changed files
with
1,191 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"files": [ | ||
"certora/harnesses/SafeHarness.sol", | ||
"certora/mocks/ModuleGuardMock.sol", // a module guard | ||
"certora/mocks/TxnGuardMock.sol", // a (safe) guard | ||
], | ||
"link": [ | ||
|
||
], | ||
"verify": "SafeHarness:certora/specs/Execute.spec", | ||
|
||
"assert_autofinder_success": true, | ||
"optimistic_summary_recursion": true, | ||
"optimistic_contract_recursion": true, | ||
|
||
"summary_recursion_limit": "2", | ||
"contract_recursion_limit": "2", | ||
"loop_iter": "3", | ||
"optimistic_loop": true, | ||
"optimistic_hashing": true, | ||
"optimistic_fallback": true, | ||
|
||
"rule_sanity": "basic", | ||
|
||
"solc": "solc7.6", | ||
"solc_via_ir": false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"files": [ | ||
"certora/harnesses/SafeHarness.sol", | ||
"certora/harnesses/ExtensibleFallbackHandlerHarness.sol", | ||
"certora/mocks/DummyHandler.sol" | ||
], | ||
"link": [ | ||
|
||
], | ||
"verify": "SafeHarness:certora/specs/Extensible.spec", | ||
|
||
"assert_autofinder_success": true, | ||
"optimistic_summary_recursion": true, | ||
"optimistic_contract_recursion": true, | ||
|
||
"summary_recursion_limit": "2", | ||
"contract_recursion_limit": "2", | ||
"loop_iter": "3", | ||
"optimistic_loop": true, | ||
"optimistic_hashing": true, | ||
"optimistic_fallback": true, | ||
|
||
"rule_sanity": "basic", | ||
|
||
"solc": "solc7.6", | ||
"solc_via_ir": false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"files": [ | ||
"certora/harnesses/SafeHarness.sol", | ||
"certora/harnesses/ExtensibleFallbackHandlerHarness.sol", | ||
"certora/mocks/DummyHandler.sol" | ||
], | ||
"link": [ | ||
|
||
], | ||
"verify": "SafeHarness:certora/specs/Fallback.spec", | ||
|
||
"assert_autofinder_success": true, | ||
"optimistic_summary_recursion": true, | ||
"optimistic_contract_recursion": true, | ||
|
||
"summary_recursion_limit": "2", | ||
"contract_recursion_limit": "2", | ||
"loop_iter": "3", | ||
"optimistic_loop": true, | ||
"optimistic_hashing": true, | ||
"optimistic_fallback": true, | ||
|
||
"rule_sanity": "basic", | ||
|
||
"solc": "solc7.6", | ||
"solc_via_ir": false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// a conf file for safe module guards | ||
{ | ||
"files": [ | ||
"certora/harnesses/SafeHarness.sol", | ||
"certora/mocks/ModuleGuardMock.sol", // a module guard | ||
"certora/mocks/ModuleGuardMockDuplicate.sol", | ||
"certora/mocks/TxnGuardMock.sol", // a (safe) guard | ||
"certora/mocks/TxnGuardMockDuplicate.sol", | ||
], | ||
"link": [ | ||
|
||
], | ||
"verify": "SafeHarness:certora/specs/Guards.spec", | ||
|
||
"assert_autofinder_success": true, | ||
"optimistic_summary_recursion": true, | ||
"optimistic_contract_recursion": true, | ||
|
||
"summary_recursion_limit": "2", | ||
"contract_recursion_limit": "2", | ||
"loop_iter": "3", | ||
"optimistic_loop": true, | ||
"optimistic_hashing": true, | ||
"optimistic_fallback": true, | ||
|
||
"rule_sanity": "basic", | ||
|
||
"solc": "solc7.6", | ||
"solc_via_ir": false, | ||
|
||
"prover_args": [ | ||
" -verifyCache -verifyTACDumps -testMode -checkRuleDigest -callTraceHardFail on", | ||
"-enableSolidityBasedInlining true" | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"files": [ | ||
"certora/harnesses/SafeHarness.sol" | ||
], | ||
"link": [ | ||
|
||
], | ||
"verify": "SafeHarness:certora/specs/Hash.spec", | ||
|
||
"assert_autofinder_success": true, | ||
"optimistic_summary_recursion": true, | ||
"optimistic_contract_recursion": true, | ||
|
||
"summary_recursion_limit": "2", | ||
"contract_recursion_limit": "2", | ||
"loop_iter": "3", | ||
"optimistic_loop": true, | ||
"optimistic_hashing": true, | ||
"optimistic_fallback": true, | ||
|
||
"rule_sanity": "basic", | ||
|
||
"solc": "solc7.6", | ||
"solc_via_ir": false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"files": [ | ||
"certora/harnesses/SafeHarness.sol" | ||
], | ||
"link": [ | ||
|
||
], | ||
"verify": "SafeHarness:certora/specs/Setup.spec", | ||
|
||
"assert_autofinder_success": true, | ||
"optimistic_summary_recursion": true, | ||
"optimistic_contract_recursion": true, | ||
|
||
"summary_recursion_limit": "2", | ||
"contract_recursion_limit": "2", | ||
"loop_iter": "3", | ||
"optimistic_loop": true, | ||
"optimistic_hashing": true, | ||
"optimistic_fallback": true, | ||
|
||
"rule_sanity": "basic", | ||
|
||
"solc": "solc7.6", | ||
"solc_via_ir": false, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
import "../munged/handler/ExtensibleFallbackHandler.sol"; | ||
import {ISafe} from "../munged/interfaces/ISafe.sol"; | ||
|
||
contract ExtensibleFallbackHandlerHarness is ExtensibleFallbackHandler { | ||
|
||
function getSafeMethod(ISafe safe, bytes4 selector) public view returns (bytes32) { | ||
return safeMethods[safe][selector]; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// a dummy handler contract | ||
import {ISafe, IStaticFallbackMethod, IFallbackMethod, ExtensibleBase} from "../munged/handler/extensible/ExtensibleBase.sol"; | ||
|
||
contract DummyHandler is IFallbackMethod { | ||
constructor(){ | ||
methodCalled = false ; | ||
} | ||
|
||
bool public methodCalled ; | ||
function resetMethodCalled() public { | ||
methodCalled = false; | ||
} | ||
|
||
// the DUMMY method | ||
function handle(ISafe safe, address sender, uint256 value, bytes calldata data) external override returns (bytes memory result) { | ||
methodCalled = true ; | ||
|
||
return "Hello, world!"; | ||
} | ||
|
||
function dummyMethod() public { | ||
methodCalled = true ; | ||
} | ||
} |
Oops, something went wrong.