mirror of https://github.com/crytic/echidna
fix issue where libraries would get loaded at extreme timestamps and block numbers, also switch to the new hevm stripBytecodeMetadata (#510)
* fix issue where libraries would get loaded at extreme timestamps and block numbers, also switch to the new hevm stripBytecodeMetadata * no longer doing cbor parsing * added test Co-authored-by: ggrieco-tob <gustavo.grieco@trailofbits.com>pull/517/head
parent
afb84d653a
commit
9149d95dda
@ -1,23 +1,28 @@ |
||||
library Test{ |
||||
library Test { |
||||
struct Storage{ |
||||
bool flag; |
||||
} |
||||
|
||||
function set(Storage storage st) public{ |
||||
function set(Storage storage st) public{ |
||||
st.flag = true; |
||||
} |
||||
|
||||
} |
||||
|
||||
contract Contract{ |
||||
contract Contract { |
||||
using Test for Test.Storage; |
||||
Test.Storage st; |
||||
|
||||
function set() public{ |
||||
function set() public{ |
||||
st.set(); |
||||
} |
||||
|
||||
function echidna_library_call() external view returns (bool) { |
||||
function echidna_library_call() external view returns (bool) { |
||||
return (!st.flag); |
||||
} |
||||
|
||||
function echidna_valid_timestamp() external view returns (bool) { |
||||
require(block.timestamp >= 1524785992 && block.number >= 4370000); |
||||
return (block.timestamp <= 1524785992 + 100 weeks && block.number < 4370000 + 10000000); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue