-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for tstore/tload (#1286)
* switch to tstore branch on hevm fork. all we should need now is a call to clearTStorages * call clearTStorages after each transaction * test case * bump hevm * bump hevm again --------- Co-authored-by: Sam Alws <[email protected]>
- Loading branch information
1 parent
bf14ea4
commit 08041e4
Showing
4 changed files
with
29 additions
and
4 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
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 @@ | ||
pragma solidity >=0.8.25; | ||
|
||
contract Test { | ||
uint256 x; | ||
uint256 y; | ||
function A() public { | ||
assembly { | ||
if tload(0) { revert(0,0) } | ||
tstore(0, 1) | ||
if iszero(tload(0)) { revert(0,0) } | ||
} | ||
x = 5; | ||
} | ||
function B() public { | ||
if (x != 5) revert(); | ||
assembly { | ||
if tload(0) { revert(0,0) } | ||
} | ||
y = 10; | ||
} | ||
function echidna_foo() public view returns (bool) { | ||
return y != 10; | ||
} | ||
} |