-
Notifications
You must be signed in to change notification settings - Fork 17
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
chore: Adding Core unit tests #55
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this PR have a gas-pessimizing effect?
// Broken usage of OtcOrderSettlement.OtcOrderFilled in 0.8.21 | ||
// https://github.com/foundry-rs/foundry/issues/6206 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see that this is fixed in 0.8.22. There's a bunch of places in this codebase and others where I ought to refactor
_mockExpectCall( | ||
address(TOKEN), | ||
abi.encodeWithSelector(IERC20.allowance.selector, address(basic), address(POOL)), | ||
abi.encode(amount) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish there was a way to do this in a "ask forgiveness, not permission" way. it seems so wasteful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the fence, we could make it a default success dummy (instead of rejection dummy), but we do want to test that it checks the allowance, and we do want to test that when the allowance isn't set, that it does set the approval. At least in a few tests.
I don't entirely mind repeating ourselves here for the time being.
No description provided.