-
Notifications
You must be signed in to change notification settings - Fork 555
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: add bytecode_address from CallInputs to Contract during construction. #1568
Conversation
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.
This seems reasonable to add.
But would make bytecode_address
a Option
in a similar way as the Contract
hash
is, and would put it to None
if it is a creation call.
@@ -60,6 +65,7 @@ impl Contract { | |||
bytecode, | |||
hash, | |||
contract_address, | |||
None, |
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.
This should be added from env.tx.kind
if kind is To
we should set that address.
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.
I think I get your meaning. I set it to None in the case of create and to the destination address in the case of Call
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.
One more nit
It's completely possible I am missing something, but I couldn't find a good way to access the address of the account which owns the bytecode being executed while using the Inspector::step hook. It would be really convenient if the contract stored on the interpreter also contained the bytecode address like the CallInputs it is constructed from do.