Skip to content

Commit

Permalink
fix: small margin test liq margin test error (#1961)
Browse files Browse the repository at this point in the history
Co-authored-by: tommyrharper <[email protected]>
Co-authored-by: cavalier_eth <[email protected]>
  • Loading branch information
3 people authored Dec 7, 2023
1 parent a64499f commit aa17203
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
41 changes: 33 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,16 @@ jobs:
build-testable:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
steps:
- checkout
- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install
- wait-for-ipfs

- run: yarn workspaces foreach --all --topological-dev --verbose run build:ts

- restore_cache:
Expand Down Expand Up @@ -201,10 +207,15 @@ jobs:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
parallelism: << parameters.parallelism >>
environment:
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
steps:
- checkout
- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install
- wait-for-ipfs

- restore_cache:
keys:
Expand Down Expand Up @@ -278,10 +289,15 @@ jobs:
parallelism: << parameters.parallelism >>
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
steps:
- checkout
- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install
- wait-for-ipfs

- restore_cache:
keys:
Expand Down Expand Up @@ -398,13 +414,15 @@ jobs:
type: string
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
steps:
- checkout
- install-foundry
#- install-ipfs
#- run-ipfs-daemon
- install-ipfs
- run-ipfs-daemon
- yarn-install
#- wait-for-ipfs
- wait-for-ipfs
- restore_cache:
keys:
- hardhat-{{ .Environment.SOLC_VERSION }}
Expand Down Expand Up @@ -442,7 +460,7 @@ jobs:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
#- CANNON_IPFS_URL: "https://ipfs.synthetix.io"
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
- GIT_PAGER: cat
working_directory: ~/synthetix-v3
steps:
Expand All @@ -456,9 +474,11 @@ jobs:
git clone [email protected]:Synthetixio/Synthetix-Gitbook-v3.git --verbose --depth 1 --no-tags --single-branch synthetix-gitbook-v3
- checkout

- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install
- wait-for-ipfs

- run:
name: "Build TS"
Expand Down Expand Up @@ -497,7 +517,7 @@ jobs:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
#- CANNON_IPFS_URL: "https://ipfs.synthetix.io"
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
- GIT_PAGER: cat
working_directory: ~/synthetix-v3
steps:
Expand All @@ -511,9 +531,11 @@ jobs:
git clone [email protected]:Synthetixio/Synthetix-Gitbook-v3.git --verbose --depth 1 --no-tags --single-branch synthetix-gitbook-v3
- checkout

- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install
- wait-for-ipfs

- run:
name: "Generate combined addresses-+-abis.md"
Expand All @@ -538,7 +560,7 @@ jobs:
docker:
- image: cimg/node:<< pipeline.parameters.node-version >>
environment:
#- CANNON_IPFS_URL: "https://ipfs.synthetix.io"
- CANNON_IPFS_URL: "http://127.0.0.1:5001"
- GIT_PAGER: cat
working_directory: ~/synthetix-v3
steps:
Expand All @@ -553,7 +575,10 @@ jobs:
git checkout $CIRCLE_SHA1
- install-foundry
- install-ipfs
- run-ipfs-daemon
- yarn-install
- wait-for-ipfs

- run:
name: "Generate updated subgraph code"
Expand Down
4 changes: 2 additions & 2 deletions markets/perps-market/test/integration/Account/Margins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ describe('Account margins test', () => {
btcInitialMargin = notionalBtcValue.mul(btcInitialMarginRatio);
ethInitialMargin = notionalEthValue.mul(ethInitialMarginRatio);

ethLiqMargin = notionalBtcValue.mul(0.05);
btcLiqMargin = notionalEthValue.mul(0.05);
btcLiqMargin = notionalBtcValue.mul(0.05);
ethLiqMargin = notionalEthValue.mul(0.05);

// maintenance margin ratio == 1
btcMaintenanceMargin = btcInitialMargin.mul(wei(0.5));
Expand Down

0 comments on commit aa17203

Please sign in to comment.