-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix(precision): increase amount to test precision #75
Conversation
yarn test test/integration/Hub/UpdateCurveDetails.ts fails |
it is not the fee it is because somehow calculateMeTokensMinted doesn't returns the same thing when I call it before minting and when it is called inside the mint function . My guess is the weighted average is a little bit different because on the time spent when I ask for the calculateMeTokensMinted block timestamp is a little lower than when it is called inside the mint function |
are you sure? Shouldn't we be on the same block |
This is weird indeed I double checked only one tx so block height must be the same... |
Try comparing output to |
it is indeed because block.timestamp is slightly different between when we ask for the foundry.calculateMeTokensMinted and when we mint it when we calculate the weighted average |
WA targetAmount > amount targetAmount:688041225234449977308 amount:1282213392634488692WA targetAmount > amount block.timestamp:1633906778 startTime:1633816758 endTime:1634421558targetCurve ==== address(0) meTokensMinted:103501205201497303317WA targetAmount > amount targetAmount:688041225234449977308 amount:1282213392634488692WA targetAmount > amount block.timestamp:1633906780 startTime:1633816758 endTime:1634421558targetCurve ==== address(0) meTokensMinted:103503476229975616198 |
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.
automine helper func and usage look good 👍
No description provided.