From 66a07048f2709e3ed8e4c57e6aecfac506f17ecf Mon Sep 17 00:00:00 2001 From: 0xbigz <83473873+0xbigz@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:01:38 -0400 Subject: [PATCH] update idl to 2.25.0 --- src/driftpy/idl/drift.json | 230 ++++++++++++++++++++++++++++++++++--- 1 file changed, 216 insertions(+), 14 deletions(-) diff --git a/src/driftpy/idl/drift.json b/src/driftpy/idl/drift.json index 3f6a923e..06696e7f 100644 --- a/src/driftpy/idl/drift.json +++ b/src/driftpy/idl/drift.json @@ -1,5 +1,5 @@ { - "version": "2.23.0", + "version": "2.25.0", "name": "drift", "instructions": [ { @@ -428,6 +428,72 @@ } ] }, + { + "name": "modifyOrder", + "accounts": [ + { + "name": "state", + "isMut": false, + "isSigner": false + }, + { + "name": "user", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "orderId", + "type": { + "option": "u32" + } + }, + { + "name": "modifyOrderParams", + "type": { + "defined": "ModifyOrderParams" + } + } + ] + }, + { + "name": "modifyOrderByUserId", + "accounts": [ + { + "name": "state", + "isMut": false, + "isSigner": false + }, + { + "name": "user", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "userOrderId", + "type": "u8" + }, + { + "name": "modifyOrderParams", + "type": { + "defined": "ModifyOrderParams" + } + } + ] + }, { "name": "placeAndTakePerpOrder", "accounts": [ @@ -2283,6 +2349,10 @@ } ], "args": [ + { + "name": "marketIndex", + "type": "u16" + }, { "name": "ammBaseAssetReserve", "type": "u128" @@ -2332,6 +2402,32 @@ } ] }, + { + "name": "deleteInitializedPerpMarket", + "accounts": [ + { + "name": "admin", + "isMut": true, + "isSigner": true + }, + { + "name": "state", + "isMut": true, + "isSigner": false + }, + { + "name": "perpMarket", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "marketIndex", + "type": "u16" + } + ] + }, { "name": "moveAmmPrice", "accounts": [ @@ -4852,6 +4948,98 @@ ] } }, + { + "name": "ModifyOrderParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "direction", + "type": { + "option": { + "defined": "PositionDirection" + } + } + }, + { + "name": "baseAssetAmount", + "type": { + "option": "u64" + } + }, + { + "name": "price", + "type": { + "option": "u64" + } + }, + { + "name": "reduceOnly", + "type": { + "option": "bool" + } + }, + { + "name": "postOnly", + "type": { + "option": { + "defined": "PostOnlyParam" + } + } + }, + { + "name": "immediateOrCancel", + "type": { + "option": "bool" + } + }, + { + "name": "maxTs", + "type": { + "option": "i64" + } + }, + { + "name": "triggerPrice", + "type": { + "option": "u64" + } + }, + { + "name": "triggerCondition", + "type": { + "option": { + "defined": "OrderTriggerCondition" + } + } + }, + { + "name": "oraclePriceOffset", + "type": { + "option": "i32" + } + }, + { + "name": "auctionDuration", + "type": { + "option": "u8" + } + }, + { + "name": "auctionStartPrice", + "type": { + "option": "i64" + } + }, + { + "name": "auctionEndPrice", + "type": { + "option": "i64" + } + } + ] + } + }, { "name": "LiquidatePerpRecord", "type": { @@ -5127,7 +5315,7 @@ "fields": [ { "name": "revenueWithdrawSinceLastSettle", - "type": "u64" + "type": "i64" }, { "name": "maxRevenueWithdrawPerPeriod", @@ -5981,31 +6169,35 @@ } }, { - "name": "PositionDirection", + "name": "ModifyOrderId", "type": { "kind": "enum", "variants": [ { - "name": "Long" + "name": "UserOrderId", + "fields": [ + "u8" + ] }, { - "name": "Short" + "name": "OrderId", + "fields": [ + "u32" + ] } ] } }, { - "name": "FulfillmentParams", + "name": "PositionDirection", "type": { "kind": "enum", "variants": [ { - "name": "SerumFulfillmentParams", - "fields": [ - { - "defined": "SerumFulfillmentParams<'a,'b>" - } - ] + "name": "Long" + }, + { + "name": "Short" } ] } @@ -6019,7 +6211,7 @@ "name": "SerumV3" }, { - "name": "None" + "name": "Match" } ] } @@ -6380,7 +6572,7 @@ "kind": "enum", "variants": [ { - "name": "SerumV3" + "name": "ExternalMarket" }, { "name": "Match" @@ -8826,6 +9018,16 @@ "code": 6239, "name": "RevertFill", "msg": "RevertFill" + }, + { + "code": 6240, + "name": "InvalidMarketAccountforDeletion", + "msg": "Invalid MarketAccount for Deletion" + }, + { + "code": 6241, + "name": "InvalidSpotFulfillmentParams", + "msg": "Invalid Spot Fulfillment Params" } ] } \ No newline at end of file