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
MarketCollateralPool Test #166
Conversation
8de0f8f
to
c0e9313
Compare
@perfectmak Is this WIP PR tied to a specific issue? If so, go ahead and connect it to the PR. If not, set the |
I found the issue and connected it! |
@perfectmak - rebase when you have a chance, everything is deploying properly and tests can now be ran. The first basic minting test works, so hopefully, now your able to move forward without dealing with the complexities before! |
c0e9313
to
cae6d80
Compare
@perfectmak - reviewing and changing removing WIP from title |
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.
@perfectmak this looks very good!
Nice work with how you are forcing the contracts to settlement, I think this is much cleaner than our old approach.
I think we are still missing a few tests. Let me confirm and add another comments if so.
// 3. force contract to settlement | ||
const settlementPrice = await settleContract(); | ||
|
||
// 4. redeem all shorts on settlement |
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.
@perfectmak should we do the same thing here for the long tokens to ensure it works for both sides (long, short) sides of the market.
test/MarketCollateralPool.js
Outdated
@@ -21,95 +21,237 @@ contract('MarketCollateralPool', function(accounts) { | |||
const entryOrderPrice = 33025; |
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.
some of these vars are no longer used, can we clean them up?
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.
Sure, cleaning those up now.
Missing tests (I think)
I also think we should consider looking at the totalSupply_ of the erc20 short and long tokens to make sure that is being accounted for correctly, but perhaps @eswarasai is tackling that in his tests of |
@pelsasser @perfectmak -- So the tests in regards with the |
@pelsasser I believe all the case should have been checked now. Kindly take a look. |
Description
Tests for Market Collateral Pool minting, redeeming and settle and close.
Checklist
Refers/Fixes
Fixes: #159
Fixes: #160