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

fix(core): forge event tests #4581

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Conversation

Reinis-FRP
Copy link
Contributor

Motivation

This update in foundry requires that expected events are emitted immediately in the next transaction. Without the fix protocol CI is blocking all PRs to be merged.

Summary

Fixes the issue by reorganizing foundry test logic so that there are no other transactions in between vm.expectEmit and the transaction that should trigger expected events.

Details

We were using _disputeAndGetOracleRequest subroutine after vm.expectEmit that mints and approves dispute bond. We move this funding logic before the vm.expectEmit to fix the issue.

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

  • Ran end-to-end test, running the code as in production
  • New unit tests created
  • Existing tests adequate, no new tests required
  • All existing tests pass
  • Untested

Issue(s)

Fixes #XXXX

Signed-off-by: Reinis Martinsons <reinis@umaproject.org>
Copy link
Contributor

@md0x md0x left a comment

Choose a reason for hiding this comment

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

Nice.

Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice find!

@Reinis-FRP Reinis-FRP merged commit 6ceda11 into master Jun 22, 2023
@Reinis-FRP Reinis-FRP deleted the reinis-frp/fix-foundry-tests branch June 22, 2023 17:38
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.

3 participants