-
Notifications
You must be signed in to change notification settings - Fork 74
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
WIP: EVM Object Format Reference Tests #205
Conversation
Section( | ||
kind=SectionKind.CODE, | ||
data=Op.CALLDATACOPY(0, 0, len(self.assembled_output)) | ||
+ Op.RETURN(0, len(self.assembled_output)), |
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.
Some clarification how this should work, maybe it will help:
So in the simplest case init_container
can be something like just
code: RETURNCONTRACT{0}(0, 0)
container: assembled_output
data: empty
and then initcode
can be
code: CREATE3{0}(0, 0, 0, 0) STOP
container: init_container
data: empty
More complicated case can append data to init_container
, by for example getting it from calldata:
init_container
:
code: CALLDATACOPY(0, CALLDATASIZE) RETURNCONTRACT{0}(0, CALLDATASIZE)
container: assembled_output
data: empty
initcode
:
code: CALLDATACOPY(0, CALLDATASIZE) CREATE3{0}(0, 0, 0, CALLDATASIZE) STOP
container: init_container
data: empty
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.
Thanks for the insights! @spencer-tb is helping me to rebase to main right now, which should fix the issues you mentioned on the discord, and I think it would be very helpful if we start collaborating on the same branch to start improving these python tests.
closed in favor of #512 |
Supersedes #23
Works:
Doesn't work: