Skip to content
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

feat(contracts): fork mainnet in the tests #36

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

igorline
Copy link
Contributor

@igorline igorline commented Jun 7, 2022

No description provided.

@@ -233,8 +233,8 @@ describe("Hack Money Strategy integration test", async () => {
// const [collateralToAdd2] = await strategy.getRequiredCollateral(strikeObj2);
// const collateralToAdd = collateralToAdd1.add(collateralToAdd2);

const { smallStrikePrice, bigStrikePrice } = await strategy.getStrikes();
console.log(smallStrikePrice.toString(), bigStrikePrice.toString());
// const { smallStrikePrice, bigStrikePrice } = await strategy.getStrikes();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Baraa42 I don't have such a method, so I had to comment this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igorline was just testing it selects strikes correctly, works ok

minTimeToExpiry: lyraConstants.DAY_SEC,
maxTimeToExpiry: lyraConstants.WEEK_SEC * 2,
mintargetDelta: toBN("0.15"),
maxtargetDelta: toBN("0.85"),
maxDeltaGap: toBN("0.05"), // accept delta from 0.10~0.20 or 0.80~0.90
// maxDeltaGap: toBN("0.05"), // accept delta from 0.10~0.20 or 0.80~0.90
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why have you removed this @Baraa42 ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igorline we don't use it in the strategy, and you asked to remove redundant vars

@igorline
Copy link
Contributor Author

igorline commented Jun 7, 2022

@Baraa42, here the test is failing with error: Not approved to act on behalf. This happens when you are trying to trade premiums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants