Skip to content

Commit

Permalink
Merge branch 'main' into prevent-collateral-update-with-pending-orders
Browse files Browse the repository at this point in the history
  • Loading branch information
leomassazza authored Jul 11, 2023
2 parents 3663cf0 + aaf47e6 commit 90f485e
Show file tree
Hide file tree
Showing 20 changed files with 322 additions and 119 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion markets/perps-market/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@synthetixio/router": "^3.1.3",
"@synthetixio/spot-market": "workspace:*",
"@synthetixio/wei": "2.74.4",
"@usecannon/cli": "^2.4.17",
"@usecannon/cli": "^2.4.20",
"ethers": "^5.7.2",
"hardhat": "2.15.0",
"solidity-docgen": "0.6.0-beta.35",
Expand Down
1 change: 1 addition & 0 deletions markets/perps-market/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"version": "1.0.0",
"scripts": {
"subgraphgen": "yarn prepare && graph codegen && prettier --write . && yarn codegen",
"build": "yarn build:optimism-goerli",
"auth": "graph auth --product hosted-service $V3_GRAPH_KEY",
"prepare": "cp ./subgraph.base.yaml ./subgraph.yaml",
Expand Down
3 changes: 3 additions & 0 deletions markets/spot-market/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const config = {
default: 'off',
},
},
mocha: {
timeout: 200_000,
},
};

export default config;
2 changes: 1 addition & 1 deletion markets/spot-market/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@synthetixio/router": "^3.1.3",
"@synthetixio/wei": "2.74.4",
"@types/node-fetch": "2.6.4",
"@usecannon/cli": "^2.4.17",
"@usecannon/cli": "^2.4.20",
"ethers": "^5.7.2",
"hardhat": "2.15.0",
"node-fetch": "2.6.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ export class OrderSettled__Params {
get price(): BigInt {
return this._event.parameters[6].value.toBigInt();
}

get orderType(): i32 {
return this._event.parameters[7].value.toI32();
}
}

export class OrderSettledFeesStruct extends ethereum.Tuple {
Expand Down
3 changes: 2 additions & 1 deletion markets/spot-market/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"version": "1.0.0",
"scripts": {
"subgraphgen": "yarn deployments:optimism-goerli && yarn codegen",
"deployments": "yarn deployments:optimism-mainnet && yarn deployments:optimism-goerli",
"auth": "graph auth --product hosted-service $V3_GRAPH_KEY",
"deployments:optimism-mainnet": "cannon inspect synthetix-spot-market:latest --chain-id 10 --write-deployments ./deployments/optimism-mainnet",
Expand All @@ -23,7 +24,7 @@
"devDependencies": {
"@graphprotocol/graph-cli": "^0.50.1",
"@graphprotocol/graph-ts": "^0.30.0",
"@usecannon/cli": "^2.4.17",
"@usecannon/cli": "^2.4.20",
"ethers": "^5.7.2",
"prettier": "^2.8.8"
}
Expand Down
2 changes: 1 addition & 1 deletion markets/spot-market/subgraph/subgraph.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dataSources:
- SettlementStrategy
- SynthWrapped
eventHandlers:
- event: OrderSettled(indexed uint128,indexed uint128,uint256,(uint256,uint256,int256,int256),uint256,indexed address,uint256)
- event: OrderSettled(indexed uint128,indexed uint128,uint256,(uint256,uint256,int256,int256),uint256,indexed address,uint256,uint8)
handler: handleOrderSettled
- event: SynthWrapped(indexed uint256,uint256,(uint256,uint256,int256,int256),uint256)
handler: handleSynthWrapped
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"publish:dev": "lerna publish --force-publish --canary --dist-tag dev --preid dev.$(git rev-parse --short HEAD)",
"publish-contracts": "yarn workspaces foreach --verbose run publish-contracts",
"prepublishOnly": "node ./prepublishOnly.js",
"docgen": "yarn workspaces foreach --verbose run docgen"
"docgen": "yarn workspaces foreach --verbose run docgen",
"subgraphgen": "yarn workspaces foreach --verbose run subgraphgen"
},
"devDependencies": {
"@ethersproject/abi": "^5.7.0",
Expand All @@ -50,7 +51,7 @@
"@types/node": "18.11.10",
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/parser": "5.45.0",
"@usecannon/cli": "^2.4.19",
"@usecannon/cli": "^2.4.20",
"eslint": "8.29.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-no-only-tests": "3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion protocol/synthetix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@synthetixio/oracle-manager": "workspace:*",
"@synthetixio/router": "^3.1.3",
"@synthetixio/wei": "2.74.4",
"@usecannon/builder": "^2.4.16",
"@usecannon/builder": "^2.4.20",
"ethers": "^5.7.2",
"hardhat": "2.15.0",
"solidity-ast": "0.4.46",
Expand Down
Loading

0 comments on commit 90f485e

Please sign in to comment.