-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: empty initial network state #352
Conversation
def mk_this() -> Address: | ||
# NOTE: Do NOT remove the `con_addr()` wrapper. | ||
# The return type should be BitVecSort(160) as it is used as a key for ex.code. | ||
# The keys of ex.code are compared using structural equality with other BitVecRef addresses. | ||
return con_addr(magic_address + 1) | ||
return con_addr(FOUNDRY_TEST) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be nice to standardize on address()
rather than con_addr()
, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea. they are slightly different though right now--value range check only in con_addr. perhaps it would be better to add the value range check in the con(), and then replace con_addr() with address(). but we need to make sure this doesn't break others. let's work on it in a separate pr.
src/halmos/cheatcodes.py
Outdated
@@ -687,7 +690,7 @@ def handle(sevm, ex, arg: ByteVec, stack, step_id) -> ByteVec | None: | |||
|
|||
return ret | |||
|
|||
# getBlockNumber() return (uint256) | |||
# vm.getBlockNumber() return (uint256) | |||
elif funsig == hevm_cheat_code.get_block_nunber_sig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated, but typo here
elif funsig == hevm_cheat_code.get_block_nunber_sig: | |
elif funsig == hevm_cheat_code.get_block_number_sig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(needs to be fixed at definition site too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, fixed, thanks!
symbolic_msg_sender: bool = arg( | ||
help="set msg.sender symbolic", | ||
global_default=False, | ||
) | ||
|
||
no_test_constructor: bool = arg( | ||
help="do not run the constructor of test contracts", | ||
global_default=False, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're really cleaning up 🤗
@@ -6,6 +6,10 @@ import "forge-std/Test.sol"; | |||
contract DealTest is Test { | |||
C c; | |||
|
|||
function check_initial_balance(address addr) public { | |||
assertEq(addr.balance, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
changes: