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

WIP: forge coverage cause safeTransfer to fail in existing test suites #13

Open
funkyenough opened this issue Jan 24, 2025 · 0 comments
Assignees

Comments

@funkyenough
Copy link
Collaborator

funkyenough commented Jan 24, 2025

If we execute forge coverage based on the existing test suite, many tests revert when
VotingTokenConcrete::transfer is called.

Subsequent execution of forge test will return the same errors.
The tests will pass again after execution of forge clean.

We also encounter the same behavior if we set via_ir in foundry.toml to false.

My guess is that forge coverage can only be executed with via_ir set to false.

What I am not sure is if this is a problem the test suite had to begin with, or this is some problem with foundry.

The test suite uses Solmate implementation of ERC20, while the VotingTokenConcrete contract uses OpenZeppelin implementation of ERC20, presumably to enable the ERC20Votes extension.

@funkyenough funkyenough self-assigned this Jan 24, 2025
@funkyenough funkyenough changed the title forge coverage cause safeTransfer to fail in existing test suites WIP: forge coverage cause safeTransfer to fail in existing test suites Jan 24, 2025
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

No branches or pull requests

1 participant