This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure txs in forked mode can access uncommitted code state (#488)
Fixes #454
- Loading branch information
1 parent
ca16291
commit 34cdd8a
Showing
3 changed files
with
40 additions
and
1 deletion.
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,19 @@ | ||
pragma solidity >=0.4.21 <0.6.0; | ||
|
||
contract Test2 { | ||
// Just make sure there really is some code here | ||
uint256 foo; | ||
function test() external { | ||
foo = 1337; | ||
} | ||
} | ||
|
||
contract IntraBlockCache { | ||
function deploy() external { | ||
Test2 x = new Test2(); | ||
address addr = address(x); | ||
uint32 size; | ||
assembly { size := extcodesize(addr) } | ||
require(size > 0, 'extcodesize is broken'); | ||
} | ||
} |
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