Skip to content
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

Improve Escrow.t.sol hook input and revert tests #430

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

BenSparksCode
Copy link
Contributor

@BenSparksCode BenSparksCode commented Sep 16, 2024

Changes:

  • Decouple userOp.data encoded input, with the logic in the DummyDAppControl that determines if a hook reverts or not.
  • DummyDAppControl hooks can be individually preset to revert.
  • DummyDAppControl hooks each store their input data in a persistent storage var to be checked in tests after metacall is performed

@BenSparksCode BenSparksCode marked this pull request as ready for review September 18, 2024 13:31
@@ -21,6 +21,14 @@ contract DummyDAppControl is DAppControl {
bool public allocateValueShouldRevert;
bool public postOpsShouldRevert;

// TODO add storage vars to store input data for each hook, then test hooks were passed the correct data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof yes it is. Will remove

Copy link
Contributor

@jj1980a jj1980a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@BenSparksCode BenSparksCode merged commit cca606d into solver-returndata-fix Sep 18, 2024
3 checks passed
@BenSparksCode BenSparksCode deleted the escrow-test-refactor branch September 18, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants