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

feat(cheatcodes): tryFfi cheatcode #4908

Closed
wants to merge 8 commits into from
Closed

feat(cheatcodes): tryFfi cheatcode #4908

wants to merge 8 commits into from

Conversation

Evalir
Copy link
Member

@Evalir Evalir commented May 9, 2023

Motivation

Closes #2932 .

Solution

Adds a tryFfi cheatcode, which returns a FfiResult struct which contains:

  • The exit_code
  • The stdout as bytes.
  • The stderr as bytes.

@Evalir Evalir requested a review from mattsse May 9, 2023 16:53
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

sorry forgot to review this.

I like this, but it needs a rebase because we moved cheatcodes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

looks like this just needs a rebase?

@mattsse mattsse marked this pull request as ready for review June 15, 2023 20:56
@mattsse
Copy link
Member

mattsse commented Jun 15, 2023

there's a failing test, otherwise lgtm

@Evalir
Copy link
Member Author

Evalir commented Jun 15, 2023

yeah need to debug why this is failing—the cheatcode actually always reverts for some reason. need to test further before merge

@Evalir Evalir closed this Aug 18, 2023
@DaniPopes DaniPopes deleted the evalir/try_ffi branch November 7, 2023 07:53
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.

forge test/forge script: throw when ffi fails
2 participants