Running yarn test gives an absolute flood of warnings before the actual tests begins - a tide of yellow that we all just ignore, hoping to see that sweet green of passing tests at the end. A lot of it is warning about the init size of contracts (e.g. Mocks) that will never be deployed, or the size of contracts we know are temporarily over, but will be fixed.
There's also a ton of forge errors arising from applying storage rules for contracts to test contracts (e.g., "function can be view" or "function can be pure", because the test doesn't write or read state).
What if there are "real" warnings lurking in there, though? We'd have to inspect the output very carefully to find them. Much better to drain that swamp, suppress spurious warnings, fix all the minor ones, and see what lurks in the mud below.
Turns out there were at least two hidden bugs: one that worked accidentally because the protocol and regular swap fees happened to have the same value.
Type of change
[ ] Bug fix
[ ] New feature
[ ] Breaking change
[ ] Dependency changes
[X] Code refactor / cleanup
[ ] Documentation or wording changes
[ ] Other
Checklist:
[X] The diff is legible and has no extraneous changes
[ ] Complex code has been commented, including external interfaces
[ ] Tests have 100% code coverage
[X] The base branch is either main, or there's a description of how to merge
Description
Running
yarn test
gives an absolute flood of warnings before the actual tests begins - a tide of yellow that we all just ignore, hoping to see that sweet green of passing tests at the end. A lot of it is warning about the init size of contracts (e.g. Mocks) that will never be deployed, or the size of contracts we know are temporarily over, but will be fixed.There's also a ton of forge errors arising from applying storage rules for contracts to test contracts (e.g., "function can be view" or "function can be pure", because the test doesn't write or read state).
What if there are "real" warnings lurking in there, though? We'd have to inspect the output very carefully to find them. Much better to drain that swamp, suppress spurious warnings, fix all the minor ones, and see what lurks in the mud below.
Turns out there were at least two hidden bugs: one that worked accidentally because the protocol and regular swap fees happened to have the same value.
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution