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
tests/cancun/eip6780: add test cases which use revert #270
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.
Looks very good, just some comments that would be nice to have.
f499142
to
c33abe6
Compare
Co-authored-by: Mario Vega <marioevz@gmail.com>
af450d7
to
c33abe6
Compare
@marioevz I have addressed your points above and I think this is ready for further review when you get the time. |
Thanks! I'll try to get it done today :) |
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.
LGTM! Thanks for implementing these
* introduce eip6780 tests which make use of revert * fixed another test * better comments for tests * format comments * try to appease the linter * try again * wip * make outer selfdestruct optional via parametrization * Update tests/cancun/eip6780_selfdestruct/test_selfdestruct_revert.py Co-authored-by: Mario Vega <marioevz@gmail.com> * check that selfdestructable address was created * wip * fix lint * fix lint * try fix lint again * try fix lint * fix typo * Add another variant of outer selfdestruct --------- Co-authored-by: Mario Vega <marioevz@gmail.com>
This adds two test cases based on a go-ethereum implementation mistake that was caught in PR review:
given contract A which has methods to receive balance (a no-op) and selfdestruct, and was created in current tx.
Test the following call sequence in the same transaction:
Transfer value to A and call A.selfdestruct. Recurse into a new call which transfers value to A, calls A.selfdestruct, and reverts.
I have add two variants of this scenario: one test where
A
is pre-existing and another where it is created in the same transaction that the test occurs in.