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

expectEmit does not work when making a constant call #1214

Closed
2 tasks done
PaulRBerg opened this issue Apr 6, 2022 · 1 comment · Fixed by #1215
Closed
2 tasks done

expectEmit does not work when making a constant call #1214

PaulRBerg opened this issue Apr 6, 2022 · 1 comment · Fixed by #1215
Assignees
Labels
A-cheatcodes Area: cheatcodes C-forge Command: forge Cmd-forge-test Command: forge test T-bug Type: bug

Comments

@PaulRBerg
Copy link
Contributor

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (6130af7 2022-04-06T00:04:11.858449+00:00)

What command(s) is the bug in?

forge test

Operating System

macOS (M1)

Describe the bug

I created a repo for reproducing this bug:

https://github.com/paulrberg/foundry-expect-emit-bug

testEmitMyEvent_v1 passes, but testEmitMyEvent_v2 doesn't. The only different is the fact that v2 adds a constant call after the expectEmit call and the function that emits the event.

@onbjerg
Copy link
Member

onbjerg commented Apr 6, 2022

This is some annoying depth check stuff, I have a fix but I need to check how sound it is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes C-forge Command: forge Cmd-forge-test Command: forge test T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants