-
Notifications
You must be signed in to change notification settings - Fork 51
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
test(contracts): improve unit and e2e gas pump tests #1817
Conversation
9846c18
to
03bdedb
Compare
03bdedb
to
7661ae0
Compare
@@ -161,7 +163,7 @@ contract OmniGasPump is XAppUpgradeable, OwnableUpgradeable, PausableUpgradeable | |||
uint256 amtETH = _toEth(amtOMNI); | |||
|
|||
// "undo" toll | |||
amtETH += (amtETH * TOLL_DENOM / (TOLL_DENOM - toll)); | |||
amtETH = (amtETH * TOLL_DENOM / (TOLL_DENOM - toll)); |
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.
This was bug
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.
bye bug
7661ae0
to
e92851e
Compare
@@ -161,7 +163,7 @@ contract OmniGasPump is XAppUpgradeable, OwnableUpgradeable, PausableUpgradeable | |||
uint256 amtETH = _toEth(amtOMNI); | |||
|
|||
// "undo" toll | |||
amtETH += (amtETH * TOLL_DENOM / (TOLL_DENOM - toll)); | |||
amtETH = (amtETH * TOLL_DENOM / (TOLL_DENOM - toll)); |
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.
bye bug
|
||
// assert quoted and actual within 10 wei of each other | ||
// allows for rounding errors in different between taking / undoing toll | ||
_assertWithinEpisilon(dryRunOMNI, targetOMNI, 10); |
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.
_assertWithinEpisilon(dryRunOMNI, targetOMNI, 10); | |
_assertWithinEpsilon(dryRunOMNI, targetOMNI, 10); |
e92851e
to
b26e494
Compare
Improve unit and e2e gas pump tests. Fix bug in OmniGasPump.quote()
b26e494
to
8f7a480
Compare
Improve unit and e2e gas pump tests.
Additional:
issue: #1686