-
Notifications
You must be signed in to change notification settings - Fork 976
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
Migrate SqrtPriceMath tests from HardHat to Foundry #317
Migrate SqrtPriceMath tests from HardHat to Foundry #317
Conversation
ab5bcd1
to
f7bce47
Compare
I force pushed the branch after signing commits, no changes were made. PR ready for the review. |
The constants library will allow to directly access constants from multiple Foundry tests. Ref: Uniswap#315
f7bce47
to
3e2eb6e
Compare
Rebased to latest main branch. |
…s and JS references. Refactor after PR review findings.
hi @ewilz I applied the suggested changes, the pr is ready for another review round. |
cool! can you please delete |
done added at a72796e |
aha! I noticed one copy-paste error, as one snapshot was duplicated, fixing asap |
getNextSqrtPriceFromInput_zeroForOneEqualsFalseGas.
@ewilz new forge gas snapshots were generated and pushed, PR is ready for the new review round. |
.forge-snapshots/getAmount0Delta_gasCostForAmount0WhereRoundUpIsFalse.snap
Outdated
Show resolved
Hide resolved
The test contract was a middle layer between library and was used by javascript / HardHat tests. Due to the middle layer using Foundry, gas cost usage was calculated incorrectly. Generate correct gas snapshots using direct library calls. Ref: Uniswap#315
Related Issue
This pull request migrates SqrtPriceMath tests from HardHat to Foundry (41 test cases), a part of #315 .
Description of changes