From f3fecee0226b58a9895f5ec8dc2fabe631ed9caf Mon Sep 17 00:00:00 2001 From: filipzeta <103913117+filipzeta@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:26:59 +1000 Subject: [PATCH] Add asset and marginAccount to PlaceOrderEvent (#266) --- CHANGELOG.md | 1 + package.json | 8 ++++---- src/idl/zeta.json | 12 ++++++++++++ src/program-types.ts | 2 ++ src/types/zeta.ts | 24 ++++++++++++++++++++++++ 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e12393c35..893ae431f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Version changes are pinned to SDK releases. ## Unreleased +- Add asset and marginAccount to PlaceOrderEvent. ([#266](https://github.com/zetamarkets/sdk/pull/266)) - Add trigger admin to state account. ([#264](https://github.com/zetamarkets/sdk/pull/264)) ## [1.8.1] 2023-09-01 diff --git a/package.json b/package.json index d16b0b22a..9b542220f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@zetamarkets/sdk", "repository": "https://github.com/zetamarkets/sdk/", - "version": "1.8.1", + "version": "1.8.2", "description": "Zeta SDK", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -19,8 +19,6 @@ "@solana/web3.js": "1.68.0", "bs58": "^4.0.1", "lodash": "^4.17.21", - "ts-node": "^10.7.0", - "typescript": "^4.4.2", "cross-fetch": "^3.1.6", "lodash.clonedeep": "^4.5.0" }, @@ -28,7 +26,9 @@ "@types/mocha": "^9.0.0", "@types/node": "^16.11.12", "mocha": "^9.1.1", - "typedoc": "^0.22.10" + "typedoc": "^0.22.10", + "ts-node": "^10.7.0", + "typescript": "^4.4.2" }, "resolutions": { "@solana/buffer-layout": "4.0.0" diff --git a/src/idl/zeta.json b/src/idl/zeta.json index e2346747b..40ed846e0 100644 --- a/src/idl/zeta.json +++ b/src/idl/zeta.json @@ -9159,6 +9159,18 @@ "name": "expiryTs", "type": "u64", "index": false + }, + { + "name": "asset", + "type": { + "defined": "Asset" + }, + "index": false + }, + { + "name": "marginAccount", + "type": "publicKey", + "index": false } ] }, diff --git a/src/program-types.ts b/src/program-types.ts index e74c5c7f4..0638306b3 100644 --- a/src/program-types.ts +++ b/src/program-types.ts @@ -334,6 +334,8 @@ export interface PlaceOrderEvent { oraclePrice: anchor.BN; orderId: anchor.BN; expiryTs: anchor.BN; + asset: any; + margin_account: PublicKey; } /** diff --git a/src/types/zeta.ts b/src/types/zeta.ts index 6417b9293..b9553f0fe 100644 --- a/src/types/zeta.ts +++ b/src/types/zeta.ts @@ -9159,6 +9159,18 @@ export type Zeta = { "name": "expiryTs", "type": "u64", "index": false + }, + { + "name": "asset", + "type": { + "defined": "Asset" + }, + "index": false + }, + { + "name": "marginAccount", + "type": "publicKey", + "index": false } ] }, @@ -19273,6 +19285,18 @@ export const IDL: Zeta = { "name": "expiryTs", "type": "u64", "index": false + }, + { + "name": "asset", + "type": { + "defined": "Asset" + }, + "index": false + }, + { + "name": "marginAccount", + "type": "publicKey", + "index": false } ] },