@mysten/deepbook-v3 2.6.4 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/PREDICT.md +389 -61
- package/dist/contracts/account/account.d.mts +23 -23
- package/dist/contracts/account/account.d.mts.map +1 -1
- package/dist/contracts/account/account_registry.d.mts +13 -13
- package/dist/contracts/deepbook/account.d.mts +18 -18
- package/dist/contracts/deepbook/balances.d.mts +4 -4
- package/dist/contracts/deepbook/deep_price.d.mts +3 -3
- package/dist/contracts/deepbook/order.d.mts +12 -12
- package/dist/contracts/deepbook_predict/admin.d.mts +4 -4
- package/dist/contracts/deepbook_predict/builder_code.d.mts +11 -11
- package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
- package/dist/contracts/deepbook_predict/config_events.d.mts +93 -68
- package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/config_events.mjs +45 -1
- package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/deps/std/type_name.mjs +17 -0
- package/dist/contracts/deepbook_predict/deps/std/type_name.mjs.map +1 -0
- package/dist/contracts/deepbook_predict/expiry_market.d.mts +652 -235
- package/dist/contracts/deepbook_predict/expiry_market.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/expiry_market.mjs +652 -186
- package/dist/contracts/deepbook_predict/expiry_market.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/lp_book.mjs +1 -1
- package/dist/contracts/deepbook_predict/market_lifecycle_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/market_manager.d.mts +27 -27
- package/dist/contracts/deepbook_predict/order_events.d.mts +50 -50
- package/dist/contracts/deepbook_predict/order_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/order_events.mjs +3 -1
- package/dist/contracts/deepbook_predict/order_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pause_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/plp.d.mts +184 -82
- package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/plp.mjs +126 -7
- package/dist/contracts/deepbook_predict/plp.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pool_accounting.mjs +1 -1
- package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/predict_account.d.mts +14 -14
- package/dist/contracts/deepbook_predict/pricing.d.mts +91 -58
- package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/pricing.mjs +30 -3
- package/dist/contracts/deepbook_predict/pricing.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pricing_config.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.d.mts +400 -92
- package/dist/contracts/deepbook_predict/protocol_config.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.mjs +451 -61
- package/dist/contracts/deepbook_predict/protocol_config.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/range_codec.d.mts +2 -2
- package/dist/contracts/deepbook_predict/registry.d.mts +28 -28
- package/dist/contracts/deepbook_predict/strike_exposure.mjs +1 -1
- package/dist/contracts/deepbook_predict/strike_payout_tree.mjs +17 -12
- package/dist/contracts/deepbook_predict/strike_payout_tree.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/vault_events.d.mts +154 -106
- package/dist/contracts/deepbook_predict/vault_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/vault_events.mjs +57 -1
- package/dist/contracts/deepbook_predict/vault_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict_math/config-arguments.d.mts +10 -0
- package/dist/contracts/deepbook_predict_math/config-arguments.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +106 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.mjs +125 -0
- package/dist/contracts/deepbook_predict_math/lazer_price.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_math/math.d.mts +284 -0
- package/dist/contracts/deepbook_predict_math/math.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_math/math.mjs +364 -0
- package/dist/contracts/deepbook_predict_math/math.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/config-arguments.d.mts +13 -0
- package/dist/contracts/deepbook_predict_orders/config-arguments.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +215 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.mjs +215 -0
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs +87 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.mjs +52 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/fixed_math/i64.mjs +25 -0
- package/dist/contracts/deepbook_predict_orders/deps/fixed_math/i64.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/balance.mjs +21 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/balance.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/table.mjs +39 -0
- package/dist/contracts/deepbook_predict_orders/deps/sui/table.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/desk.d.mts +187 -0
- package/dist/contracts/deepbook_predict_orders/desk.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/desk.mjs +261 -0
- package/dist/contracts/deepbook_predict_orders/desk.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +1042 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.mjs +849 -0
- package/dist/contracts/deepbook_predict_orders/order_queue.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue.d.mts +683 -0
- package/dist/contracts/deepbook_predict_orders/queue.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue.mjs +912 -0
- package/dist/contracts/deepbook_predict_orders/queue.mjs.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +195 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.d.mts.map +1 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.mjs +187 -0
- package/dist/contracts/deepbook_predict_orders/queue_events.mjs.map +1 -0
- package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
- package/dist/contracts/deepbook_sessions/sessions.d.mts +163 -28
- package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
- package/dist/contracts/deepbook_sessions/sessions.mjs +234 -5
- package/dist/contracts/deepbook_sessions/sessions.mjs.map +1 -1
- package/dist/deployments/mainnet.mjs +7 -4
- package/dist/deployments/mainnet.mjs.map +1 -1
- package/dist/deployments/testnet.mjs +7 -4
- package/dist/deployments/testnet.mjs.map +1 -1
- package/dist/predict/bindings/expiry-market.d.mts +77 -0
- package/dist/predict/bindings/expiry-market.d.mts.map +1 -0
- package/dist/predict/bindings/expiry-market.mjs +139 -0
- package/dist/predict/bindings/expiry-market.mjs.map +1 -0
- package/dist/predict/bindings/protocol-config.d.mts +39 -0
- package/dist/predict/bindings/protocol-config.d.mts.map +1 -0
- package/dist/predict/bindings/protocol-config.mjs +90 -0
- package/dist/predict/bindings/protocol-config.mjs.map +1 -0
- package/dist/predict/bindings/rename.mjs +9 -0
- package/dist/predict/bindings/rename.mjs.map +1 -0
- package/dist/predict/client.d.mts +595 -16
- package/dist/predict/client.d.mts.map +1 -1
- package/dist/predict/client.mjs +986 -10
- package/dist/predict/client.mjs.map +1 -1
- package/dist/predict/config/generated.d.mts +22 -1
- package/dist/predict/config/generated.d.mts.map +1 -1
- package/dist/predict/config/generated.mjs +30 -1
- package/dist/predict/config/generated.mjs.map +1 -1
- package/dist/predict/config/mainnet.mjs +11 -3
- package/dist/predict/config/mainnet.mjs.map +1 -1
- package/dist/predict/config/testnet.mjs +11 -3
- package/dist/predict/config/testnet.mjs.map +1 -1
- package/dist/predict/config/types.d.mts +50 -1
- package/dist/predict/config/types.d.mts.map +1 -1
- package/dist/predict/cost.d.mts +38 -11
- package/dist/predict/cost.d.mts.map +1 -1
- package/dist/predict/cost.mjs +37 -11
- package/dist/predict/cost.mjs.map +1 -1
- package/dist/predict/decode.d.mts +251 -1
- package/dist/predict/decode.d.mts.map +1 -1
- package/dist/predict/decode.mjs +342 -4
- package/dist/predict/decode.mjs.map +1 -1
- package/dist/predict/errors.d.mts +69 -6
- package/dist/predict/errors.d.mts.map +1 -1
- package/dist/predict/errors.mjs +277 -4
- package/dist/predict/errors.mjs.map +1 -1
- package/dist/predict/index.d.mts +21 -10
- package/dist/predict/index.mjs +24 -12
- package/dist/predict/queue-id.d.mts +13 -0
- package/dist/predict/queue-id.d.mts.map +1 -0
- package/dist/predict/queue-id.mjs +19 -0
- package/dist/predict/queue-id.mjs.map +1 -0
- package/dist/predict/queue.d.mts +505 -0
- package/dist/predict/queue.d.mts.map +1 -0
- package/dist/predict/queue.mjs +774 -0
- package/dist/predict/queue.mjs.map +1 -0
- package/dist/predict/reads/balances.mjs +1 -1
- package/dist/predict/reads/markets.mjs +46 -5
- package/dist/predict/reads/markets.mjs.map +1 -1
- package/dist/predict/reads/pool.mjs +1 -1
- package/dist/predict/reads/pricing.d.mts +1 -1
- package/dist/predict/reads/queue.d.mts +105 -0
- package/dist/predict/reads/queue.d.mts.map +1 -0
- package/dist/predict/reads/queue.mjs +445 -0
- package/dist/predict/reads/queue.mjs.map +1 -0
- package/dist/predict/ticks.d.mts +9 -1
- package/dist/predict/ticks.d.mts.map +1 -1
- package/dist/predict/ticks.mjs +18 -1
- package/dist/predict/ticks.mjs.map +1 -1
- package/dist/predict/tx/authed.mjs +1 -1
- package/dist/predict/tx/common.d.mts.map +1 -1
- package/dist/predict/tx/common.mjs +12 -1
- package/dist/predict/tx/common.mjs.map +1 -1
- package/dist/predict/tx/queue.d.mts +220 -0
- package/dist/predict/tx/queue.d.mts.map +1 -0
- package/dist/predict/tx/queue.mjs +399 -0
- package/dist/predict/tx/queue.mjs.map +1 -0
- package/dist/predict/tx/trade.d.mts.map +1 -1
- package/dist/predict/tx/trade.mjs +61 -43
- package/dist/predict/tx/trade.mjs.map +1 -1
- package/dist/sessions.d.mts +90 -2
- package/dist/sessions.d.mts.map +1 -1
- package/dist/sessions.mjs +107 -2
- package/dist/sessions.mjs.map +1 -1
- package/dist/transactions/balanceManager.d.mts +12 -12
- package/dist/transactions/balanceManager.d.mts.map +1 -1
- package/dist/transactions/deepbook.d.mts +20 -20
- package/dist/transactions/deepbook.d.mts.map +1 -1
- package/dist/transactions/deepbookAdmin.d.mts +4 -4
- package/dist/transactions/deepbookAdmin.d.mts.map +1 -1
- package/dist/transactions/marginAdmin.d.mts +7 -7
- package/dist/transactions/marginAdmin.d.mts.map +1 -1
- package/dist/transactions/marginLiquidations.d.mts +3 -3
- package/dist/transactions/marginMaintainer.d.mts +5 -5
- package/dist/transactions/marginMaintainer.d.mts.map +1 -1
- package/dist/transactions/marginManager.d.mts +32 -32
- package/dist/transactions/marginManager.d.mts.map +1 -1
- package/dist/transactions/marginPool.d.mts +18 -18
- package/dist/transactions/marginRegistry.d.mts +16 -16
- package/dist/transactions/marginTPSL.d.mts +10 -10
- package/dist/transactions/marginTPSL.d.mts.map +1 -1
- package/dist/transactions/poolProxy.d.mts +8 -8
- package/dist/transactions/poolProxy.d.mts.map +1 -1
- package/package.json +4 -4
- package/src/contracts/deepbook_predict/config_events.ts +39 -0
- package/src/contracts/deepbook_predict/deps/std/type_name.ts +24 -0
- package/src/contracts/deepbook_predict/expiry_market.ts +960 -169
- package/src/contracts/deepbook_predict/order_events.ts +3 -1
- package/src/contracts/deepbook_predict/plp.ts +150 -9
- package/src/contracts/deepbook_predict/pricing.ts +46 -7
- package/src/contracts/deepbook_predict/pricing_config.ts +3 -1
- package/src/contracts/deepbook_predict/protocol_config.ts +648 -33
- package/src/contracts/deepbook_predict/strike_payout_tree.ts +25 -21
- package/src/contracts/deepbook_predict/vault_events.ts +65 -0
- package/src/contracts/deepbook_predict_math/config-arguments.ts +6 -0
- package/src/contracts/deepbook_predict_math/lazer_price.ts +196 -0
- package/src/contracts/deepbook_predict_math/math.ts +553 -0
- package/src/contracts/deepbook_predict_orders/config-arguments.ts +11 -0
- package/src/contracts/deepbook_predict_orders/delayed_execution_config.ts +430 -0
- package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.ts +108 -0
- package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/pricing.ts +58 -0
- package/src/contracts/deepbook_predict_orders/deps/fixed_math/i64.ts +21 -0
- package/src/contracts/deepbook_predict_orders/deps/sui/balance.ts +19 -0
- package/src/contracts/deepbook_predict_orders/deps/sui/table.ts +37 -0
- package/src/contracts/deepbook_predict_orders/desk.ts +419 -0
- package/src/contracts/deepbook_predict_orders/order_flow.ts +19 -0
- package/src/contracts/deepbook_predict_orders/order_queue.ts +1670 -0
- package/src/contracts/deepbook_predict_orders/queue.ts +1394 -0
- package/src/contracts/deepbook_predict_orders/queue_events.ts +189 -0
- package/src/contracts/deepbook_sessions/sessions.ts +355 -4
- package/src/deployments/mainnet.ts +7 -2
- package/src/deployments/testnet.ts +7 -2
- package/src/deployments/types.ts +14 -1
- package/src/predict/bindings/expiry-market.ts +127 -0
- package/src/predict/bindings/protocol-config.ts +59 -0
- package/src/predict/bindings/rename.ts +14 -0
- package/src/predict/client.ts +2076 -13
- package/src/predict/config/generated.ts +50 -0
- package/src/predict/config/mainnet.ts +16 -2
- package/src/predict/config/testnet.ts +16 -2
- package/src/predict/config/types.ts +51 -1
- package/src/predict/cost.ts +62 -14
- package/src/predict/decode.ts +691 -2
- package/src/predict/errors.ts +391 -14
- package/src/predict/index.ts +87 -6
- package/src/predict/queue-id.ts +22 -0
- package/src/predict/queue.ts +1231 -0
- package/src/predict/reads/markets.ts +30 -0
- package/src/predict/reads/queue.ts +606 -0
- package/src/predict/ticks.ts +35 -0
- package/src/predict/tx/common.ts +25 -1
- package/src/predict/tx/queue.ts +525 -0
- package/src/predict/tx/trade.ts +80 -49
- package/src/sessions.ts +206 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The order-flow companion's events. Predict still emits `OrderMinted` and
|
|
7
|
+
* `LiveOrderRedeemed` from its fills; these sit next to them. The placement, fill,
|
|
8
|
+
* and refund events carry the market's post-call cash, required cash, and waiting
|
|
9
|
+
* cash need, so the keeper tracks spare cash from events alone.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { MoveStruct } from '../utils/index.js';
|
|
13
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
14
|
+
import { U64, U256 } from '../../bcs/integers.js';
|
|
15
|
+
import * as order_queue from './order_queue.js';
|
|
16
|
+
import * as pricing from './deps/deepbook_predict/pricing.js';
|
|
17
|
+
import * as delayed_execution_config from './delayed_execution_config.js';
|
|
18
|
+
const $moduleName = '@local-pkg/deepbook_predict_orders::queue_events';
|
|
19
|
+
export const OrderEnqueued = new MoveStruct({
|
|
20
|
+
name: `${$moduleName}::OrderEnqueued`,
|
|
21
|
+
fields: {
|
|
22
|
+
expiry_market_id: bcs.Address,
|
|
23
|
+
record_id: U64,
|
|
24
|
+
account_id: bcs.Address,
|
|
25
|
+
/** An `order_queue` kind code. */
|
|
26
|
+
kind: bcs.u8(),
|
|
27
|
+
request: order_queue.OrderRequest,
|
|
28
|
+
/** The position a sell moved into the record; zero for a mint. */
|
|
29
|
+
position: order_queue.HeldPosition,
|
|
30
|
+
timing: order_queue.OrderTiming,
|
|
31
|
+
vol: pricing.VolSnapshot,
|
|
32
|
+
budget: U64,
|
|
33
|
+
order_fee: U64,
|
|
34
|
+
/** The order's worst-case cash need, added to the waiting total. */
|
|
35
|
+
cash_need: U64,
|
|
36
|
+
subsidy_bound: U64,
|
|
37
|
+
builder_code_id: bcs.option(bcs.Address),
|
|
38
|
+
referrer_account_id: bcs.option(bcs.Address),
|
|
39
|
+
/** The Open record a sell took its position from. `none` for a mint. */
|
|
40
|
+
source_record_id: bcs.option(U64),
|
|
41
|
+
/** The market's cash, required cash, and waiting cash need after the call. */
|
|
42
|
+
market_cash: U64,
|
|
43
|
+
required_cash: U64,
|
|
44
|
+
waiting_cash_need: U64,
|
|
45
|
+
onchain_timestamp_ms: U64,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export const CohortCommitted = new MoveStruct({
|
|
49
|
+
name: `${$moduleName}::CohortCommitted`,
|
|
50
|
+
fields: {
|
|
51
|
+
expiry_market_id: bcs.Address,
|
|
52
|
+
tau_ms: U64,
|
|
53
|
+
/** The update's envelope in ms: τ, or the backup tick one channel tick later. */
|
|
54
|
+
tick_ms: U64,
|
|
55
|
+
first_record_id: U64,
|
|
56
|
+
last_record_id: U64,
|
|
57
|
+
/** The committed price of the cohort's first order, normalized to 1e9. */
|
|
58
|
+
spot: U64,
|
|
59
|
+
/** That price's own update time, in µs. */
|
|
60
|
+
generation_us: U64,
|
|
61
|
+
pyth_source_id: bcs.u32(),
|
|
62
|
+
pyth_channel: bcs.u8(),
|
|
63
|
+
/** The transaction sender, so monitoring sees commits by third parties. */
|
|
64
|
+
sender: bcs.Address,
|
|
65
|
+
onchain_timestamp_ms: U64,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const QueuedOrderFilled = new MoveStruct({
|
|
69
|
+
name: `${$moduleName}::QueuedOrderFilled`,
|
|
70
|
+
fields: {
|
|
71
|
+
/** The market's cash, required cash, and waiting cash need after the call. */
|
|
72
|
+
market_cash: U64,
|
|
73
|
+
required_cash: U64,
|
|
74
|
+
waiting_cash_need: U64,
|
|
75
|
+
expiry_market_id: bcs.Address,
|
|
76
|
+
record_id: U64,
|
|
77
|
+
account_id: bcs.Address,
|
|
78
|
+
kind: bcs.u8(),
|
|
79
|
+
/** Filled quantity (mint) or closed quantity (sell). */
|
|
80
|
+
quantity: U64,
|
|
81
|
+
/** Cost paid (mint) or proceeds (sell). */
|
|
82
|
+
amount: U64,
|
|
83
|
+
trading_fee: U64,
|
|
84
|
+
builder_fee: U64,
|
|
85
|
+
referral_fee: U64,
|
|
86
|
+
order_fee: U64,
|
|
87
|
+
/** Reserved fee subsidy the fill used. */
|
|
88
|
+
subsidy_used: U64,
|
|
89
|
+
inventory_impact: U64,
|
|
90
|
+
tau_ms: U64,
|
|
91
|
+
tick_ms: U64,
|
|
92
|
+
/**
|
|
93
|
+
* The position the record now holds: a mint's new position or a partial sell's
|
|
94
|
+
* replacement; zero after a full close.
|
|
95
|
+
*/
|
|
96
|
+
position: order_queue.HeldPosition,
|
|
97
|
+
sender: bcs.Address,
|
|
98
|
+
onchain_timestamp_ms: U64,
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
export const QueuedOrderRefunded = new MoveStruct({
|
|
102
|
+
name: `${$moduleName}::QueuedOrderRefunded`,
|
|
103
|
+
fields: {
|
|
104
|
+
/** The market's cash, required cash, and waiting cash need after the call. */
|
|
105
|
+
market_cash: U64,
|
|
106
|
+
required_cash: U64,
|
|
107
|
+
waiting_cash_need: U64,
|
|
108
|
+
expiry_market_id: bcs.Address,
|
|
109
|
+
record_id: U64,
|
|
110
|
+
account_id: bcs.Address,
|
|
111
|
+
kind: bcs.u8(),
|
|
112
|
+
/** An `order_queue` reason code. */
|
|
113
|
+
reason: bcs.u8(),
|
|
114
|
+
escrow_returned: U64,
|
|
115
|
+
order_fee_returned: U64,
|
|
116
|
+
subsidy_returned: U64,
|
|
117
|
+
/** True when a sell's record went back to Open holding its position. */
|
|
118
|
+
position_returned: bcs.bool(),
|
|
119
|
+
sender: bcs.Address,
|
|
120
|
+
onchain_timestamp_ms: U64,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
export const QueuedOrdersCleaned = new MoveStruct({
|
|
124
|
+
name: `${$moduleName}::QueuedOrdersCleaned`,
|
|
125
|
+
fields: {
|
|
126
|
+
expiry_market_id: bcs.Address,
|
|
127
|
+
record_ids: bcs.vector(U64),
|
|
128
|
+
onchain_timestamp_ms: U64,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
export const OpenRecordSettled = new MoveStruct({
|
|
132
|
+
name: `${$moduleName}::OpenRecordSettled`,
|
|
133
|
+
fields: {
|
|
134
|
+
expiry_market_id: bcs.Address,
|
|
135
|
+
record_id: U64,
|
|
136
|
+
account_id: bcs.Address,
|
|
137
|
+
order_id: U256,
|
|
138
|
+
payout: U64,
|
|
139
|
+
onchain_timestamp_ms: U64,
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
export const OpenRecordPayoutSkipped = new MoveStruct({
|
|
143
|
+
name: `${$moduleName}::OpenRecordPayoutSkipped`,
|
|
144
|
+
fields: {
|
|
145
|
+
expiry_market_id: bcs.Address,
|
|
146
|
+
record_id: U64,
|
|
147
|
+
account_id: bcs.Address,
|
|
148
|
+
order_id: U256,
|
|
149
|
+
payout: U64,
|
|
150
|
+
onchain_timestamp_ms: U64,
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
export const RecordFundsParked = new MoveStruct({
|
|
154
|
+
name: `${$moduleName}::RecordFundsParked`,
|
|
155
|
+
fields: {
|
|
156
|
+
expiry_market_id: bcs.Address,
|
|
157
|
+
record_id: U64,
|
|
158
|
+
account_id: bcs.Address,
|
|
159
|
+
receive_address: bcs.Address,
|
|
160
|
+
amount: U64,
|
|
161
|
+
onchain_timestamp_ms: U64,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
export const RecordFundsClaimed = new MoveStruct({
|
|
165
|
+
name: `${$moduleName}::RecordFundsClaimed`,
|
|
166
|
+
fields: {
|
|
167
|
+
expiry_market_id: bcs.Address,
|
|
168
|
+
record_id: U64,
|
|
169
|
+
account_id: bcs.Address,
|
|
170
|
+
receive_address: bcs.Address,
|
|
171
|
+
amount: U64,
|
|
172
|
+
onchain_timestamp_ms: U64,
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
export const MarketPayoutsCompleted = new MoveStruct({
|
|
176
|
+
name: `${$moduleName}::MarketPayoutsCompleted`,
|
|
177
|
+
fields: {
|
|
178
|
+
expiry_market_id: bcs.Address,
|
|
179
|
+
onchain_timestamp_ms: U64,
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
export const DelayedExecutionPolicyUpdated = new MoveStruct({
|
|
183
|
+
name: `${$moduleName}::DelayedExecutionPolicyUpdated`,
|
|
184
|
+
fields: {
|
|
185
|
+
desk_id: bcs.Address,
|
|
186
|
+
policy: delayed_execution_config.DelayedExecutionPolicy,
|
|
187
|
+
onchain_timestamp_ms: U64,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
@@ -428,7 +428,11 @@ export interface MintExactQuantityOptions {
|
|
|
428
428
|
sessionsPackageId?: string;
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
/**
|
|
431
|
+
/**
|
|
432
|
+
* Mint an exact Predict position quantity for an Account with an active session.
|
|
433
|
+
* Always aborts through Predict, whose immediate mints are retired; use
|
|
434
|
+
* `enqueue_exact_quantity`.
|
|
435
|
+
*/
|
|
432
436
|
export function mintExactQuantity(options: MintExactQuantityOptions) {
|
|
433
437
|
const packageAddress =
|
|
434
438
|
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
@@ -496,7 +500,11 @@ export interface MintExactAmountOptions {
|
|
|
496
500
|
sessionsPackageId?: string;
|
|
497
501
|
};
|
|
498
502
|
}
|
|
499
|
-
/**
|
|
503
|
+
/**
|
|
504
|
+
* Mint a budget-sized Predict position for an Account with an active session.
|
|
505
|
+
* Always aborts through Predict, whose immediate mints are retired; use
|
|
506
|
+
* `enqueue_exact_amount`.
|
|
507
|
+
*/
|
|
500
508
|
export function mintExactAmount(options: MintExactAmountOptions) {
|
|
501
509
|
const packageAddress =
|
|
502
510
|
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
@@ -565,7 +573,8 @@ export interface MintExactCostOptions {
|
|
|
565
573
|
}
|
|
566
574
|
/**
|
|
567
575
|
* Mint a Predict position sized to an all-in cost for an Account with an active
|
|
568
|
-
* session.
|
|
576
|
+
* session. Always aborts through Predict, whose immediate mints are retired; use
|
|
577
|
+
* `enqueue_exact_cost`.
|
|
569
578
|
*/
|
|
570
579
|
export function mintExactCost(options: MintExactCostOptions) {
|
|
571
580
|
const packageAddress =
|
|
@@ -631,7 +640,11 @@ export interface RedeemLiveOptions {
|
|
|
631
640
|
sessionsPackageId?: string;
|
|
632
641
|
};
|
|
633
642
|
}
|
|
634
|
-
/**
|
|
643
|
+
/**
|
|
644
|
+
* Redeem a live Predict order for an Account with an active session. Always aborts
|
|
645
|
+
* through Predict, whose live redeem is retired. Early sells of queued positions
|
|
646
|
+
* go through `enqueue_redeem_open`.
|
|
647
|
+
*/
|
|
635
648
|
export function redeemLive(options: RedeemLiveOptions) {
|
|
636
649
|
const packageAddress =
|
|
637
650
|
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
@@ -729,3 +742,341 @@ export function redeemSettled(options: RedeemSettledOptions) {
|
|
|
729
742
|
),
|
|
730
743
|
});
|
|
731
744
|
}
|
|
745
|
+
export interface EnqueueExactQuantityArguments {
|
|
746
|
+
queue: RawTransactionArgument<string>;
|
|
747
|
+
market: RawTransactionArgument<string>;
|
|
748
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
749
|
+
wrapper: RawTransactionArgument<string>;
|
|
750
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
751
|
+
desk: RawTransactionArgument<string>;
|
|
752
|
+
config: RawTransactionArgument<string>;
|
|
753
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
754
|
+
pyth: RawTransactionArgument<string>;
|
|
755
|
+
bsValues: RawTransactionArgument<string>;
|
|
756
|
+
bsSvi: RawTransactionArgument<string>;
|
|
757
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
758
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
759
|
+
quantity: RawTransactionArgument<number | bigint>;
|
|
760
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
761
|
+
maxProbability: RawTransactionArgument<number | bigint>;
|
|
762
|
+
}
|
|
763
|
+
export interface EnqueueExactQuantityOptions {
|
|
764
|
+
package?: string;
|
|
765
|
+
arguments: EnqueueExactQuantityArguments;
|
|
766
|
+
config?: {
|
|
767
|
+
sessionsConfig: ConfigValue;
|
|
768
|
+
sessionsPackageId?: string;
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Queue an exact-quantity Predict mint in `market`'s order-flow queue for an
|
|
773
|
+
* Account with an active session. Returns the queue record ID.
|
|
774
|
+
*/
|
|
775
|
+
export function enqueueExactQuantity(options: EnqueueExactQuantityOptions) {
|
|
776
|
+
const packageAddress =
|
|
777
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
778
|
+
const argumentsTypes = [
|
|
779
|
+
null,
|
|
780
|
+
null,
|
|
781
|
+
null,
|
|
782
|
+
null,
|
|
783
|
+
null,
|
|
784
|
+
null,
|
|
785
|
+
null,
|
|
786
|
+
null,
|
|
787
|
+
null,
|
|
788
|
+
null,
|
|
789
|
+
null,
|
|
790
|
+
'u64',
|
|
791
|
+
'u64',
|
|
792
|
+
'u64',
|
|
793
|
+
'u64',
|
|
794
|
+
'u64',
|
|
795
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
796
|
+
'0x2::clock::Clock',
|
|
797
|
+
] satisfies (string | null)[];
|
|
798
|
+
const parameterNames = [
|
|
799
|
+
'queue',
|
|
800
|
+
'market',
|
|
801
|
+
'accountRegistry',
|
|
802
|
+
'wrapper',
|
|
803
|
+
'sessionsConfig',
|
|
804
|
+
'desk',
|
|
805
|
+
'config',
|
|
806
|
+
'propbookRegistry',
|
|
807
|
+
'pyth',
|
|
808
|
+
'bsValues',
|
|
809
|
+
'bsSvi',
|
|
810
|
+
'lowerTick',
|
|
811
|
+
'higherTick',
|
|
812
|
+
'quantity',
|
|
813
|
+
'maxCost',
|
|
814
|
+
'maxProbability',
|
|
815
|
+
];
|
|
816
|
+
return (tx: Transaction) =>
|
|
817
|
+
tx.moveCall({
|
|
818
|
+
package: packageAddress,
|
|
819
|
+
module: 'sessions',
|
|
820
|
+
function: 'enqueue_exact_quantity',
|
|
821
|
+
arguments: normalizeMoveArguments(
|
|
822
|
+
{
|
|
823
|
+
...options.arguments,
|
|
824
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
825
|
+
},
|
|
826
|
+
argumentsTypes,
|
|
827
|
+
parameterNames,
|
|
828
|
+
),
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
export interface EnqueueExactAmountArguments {
|
|
832
|
+
queue: RawTransactionArgument<string>;
|
|
833
|
+
market: RawTransactionArgument<string>;
|
|
834
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
835
|
+
wrapper: RawTransactionArgument<string>;
|
|
836
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
837
|
+
desk: RawTransactionArgument<string>;
|
|
838
|
+
config: RawTransactionArgument<string>;
|
|
839
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
840
|
+
pyth: RawTransactionArgument<string>;
|
|
841
|
+
bsValues: RawTransactionArgument<string>;
|
|
842
|
+
bsSvi: RawTransactionArgument<string>;
|
|
843
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
844
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
845
|
+
maxPremium: RawTransactionArgument<number | bigint>;
|
|
846
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
847
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
848
|
+
}
|
|
849
|
+
export interface EnqueueExactAmountOptions {
|
|
850
|
+
package?: string;
|
|
851
|
+
arguments: EnqueueExactAmountArguments;
|
|
852
|
+
config?: {
|
|
853
|
+
sessionsConfig: ConfigValue;
|
|
854
|
+
sessionsPackageId?: string;
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* Queue a premium-budget Predict mint in `market`'s order-flow queue for an
|
|
859
|
+
* Account with an active session. Returns the queue record ID.
|
|
860
|
+
*/
|
|
861
|
+
export function enqueueExactAmount(options: EnqueueExactAmountOptions) {
|
|
862
|
+
const packageAddress =
|
|
863
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
864
|
+
const argumentsTypes = [
|
|
865
|
+
null,
|
|
866
|
+
null,
|
|
867
|
+
null,
|
|
868
|
+
null,
|
|
869
|
+
null,
|
|
870
|
+
null,
|
|
871
|
+
null,
|
|
872
|
+
null,
|
|
873
|
+
null,
|
|
874
|
+
null,
|
|
875
|
+
null,
|
|
876
|
+
'u64',
|
|
877
|
+
'u64',
|
|
878
|
+
'u64',
|
|
879
|
+
'u64',
|
|
880
|
+
'u64',
|
|
881
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
882
|
+
'0x2::clock::Clock',
|
|
883
|
+
] satisfies (string | null)[];
|
|
884
|
+
const parameterNames = [
|
|
885
|
+
'queue',
|
|
886
|
+
'market',
|
|
887
|
+
'accountRegistry',
|
|
888
|
+
'wrapper',
|
|
889
|
+
'sessionsConfig',
|
|
890
|
+
'desk',
|
|
891
|
+
'config',
|
|
892
|
+
'propbookRegistry',
|
|
893
|
+
'pyth',
|
|
894
|
+
'bsValues',
|
|
895
|
+
'bsSvi',
|
|
896
|
+
'lowerTick',
|
|
897
|
+
'higherTick',
|
|
898
|
+
'maxPremium',
|
|
899
|
+
'minQuantity',
|
|
900
|
+
'maxCost',
|
|
901
|
+
];
|
|
902
|
+
return (tx: Transaction) =>
|
|
903
|
+
tx.moveCall({
|
|
904
|
+
package: packageAddress,
|
|
905
|
+
module: 'sessions',
|
|
906
|
+
function: 'enqueue_exact_amount',
|
|
907
|
+
arguments: normalizeMoveArguments(
|
|
908
|
+
{
|
|
909
|
+
...options.arguments,
|
|
910
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
911
|
+
},
|
|
912
|
+
argumentsTypes,
|
|
913
|
+
parameterNames,
|
|
914
|
+
),
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
export interface EnqueueExactCostArguments {
|
|
918
|
+
queue: RawTransactionArgument<string>;
|
|
919
|
+
market: RawTransactionArgument<string>;
|
|
920
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
921
|
+
wrapper: RawTransactionArgument<string>;
|
|
922
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
923
|
+
desk: RawTransactionArgument<string>;
|
|
924
|
+
config: RawTransactionArgument<string>;
|
|
925
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
926
|
+
pyth: RawTransactionArgument<string>;
|
|
927
|
+
bsValues: RawTransactionArgument<string>;
|
|
928
|
+
bsSvi: RawTransactionArgument<string>;
|
|
929
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
930
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
931
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
932
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
933
|
+
}
|
|
934
|
+
export interface EnqueueExactCostOptions {
|
|
935
|
+
package?: string;
|
|
936
|
+
arguments: EnqueueExactCostArguments;
|
|
937
|
+
config?: {
|
|
938
|
+
sessionsConfig: ConfigValue;
|
|
939
|
+
sessionsPackageId?: string;
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Queue an all-in-budget Predict mint in `market`'s order-flow queue for an
|
|
944
|
+
* Account with an active session. Returns the queue record ID.
|
|
945
|
+
*/
|
|
946
|
+
export function enqueueExactCost(options: EnqueueExactCostOptions) {
|
|
947
|
+
const packageAddress =
|
|
948
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
949
|
+
const argumentsTypes = [
|
|
950
|
+
null,
|
|
951
|
+
null,
|
|
952
|
+
null,
|
|
953
|
+
null,
|
|
954
|
+
null,
|
|
955
|
+
null,
|
|
956
|
+
null,
|
|
957
|
+
null,
|
|
958
|
+
null,
|
|
959
|
+
null,
|
|
960
|
+
null,
|
|
961
|
+
'u64',
|
|
962
|
+
'u64',
|
|
963
|
+
'u64',
|
|
964
|
+
'u64',
|
|
965
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
966
|
+
'0x2::clock::Clock',
|
|
967
|
+
] satisfies (string | null)[];
|
|
968
|
+
const parameterNames = [
|
|
969
|
+
'queue',
|
|
970
|
+
'market',
|
|
971
|
+
'accountRegistry',
|
|
972
|
+
'wrapper',
|
|
973
|
+
'sessionsConfig',
|
|
974
|
+
'desk',
|
|
975
|
+
'config',
|
|
976
|
+
'propbookRegistry',
|
|
977
|
+
'pyth',
|
|
978
|
+
'bsValues',
|
|
979
|
+
'bsSvi',
|
|
980
|
+
'lowerTick',
|
|
981
|
+
'higherTick',
|
|
982
|
+
'maxCost',
|
|
983
|
+
'minQuantity',
|
|
984
|
+
];
|
|
985
|
+
return (tx: Transaction) =>
|
|
986
|
+
tx.moveCall({
|
|
987
|
+
package: packageAddress,
|
|
988
|
+
module: 'sessions',
|
|
989
|
+
function: 'enqueue_exact_cost',
|
|
990
|
+
arguments: normalizeMoveArguments(
|
|
991
|
+
{
|
|
992
|
+
...options.arguments,
|
|
993
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
994
|
+
},
|
|
995
|
+
argumentsTypes,
|
|
996
|
+
parameterNames,
|
|
997
|
+
),
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
export interface EnqueueRedeemOpenArguments {
|
|
1001
|
+
queue: RawTransactionArgument<string>;
|
|
1002
|
+
market: RawTransactionArgument<string>;
|
|
1003
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
1004
|
+
wrapper: RawTransactionArgument<string>;
|
|
1005
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
1006
|
+
desk: RawTransactionArgument<string>;
|
|
1007
|
+
config: RawTransactionArgument<string>;
|
|
1008
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
1009
|
+
pyth: RawTransactionArgument<string>;
|
|
1010
|
+
bsValues: RawTransactionArgument<string>;
|
|
1011
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1012
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
1013
|
+
closeQuantity: RawTransactionArgument<number | bigint>;
|
|
1014
|
+
minProbability: RawTransactionArgument<number | bigint>;
|
|
1015
|
+
minProceeds: RawTransactionArgument<number | bigint>;
|
|
1016
|
+
}
|
|
1017
|
+
export interface EnqueueRedeemOpenOptions {
|
|
1018
|
+
package?: string;
|
|
1019
|
+
arguments: EnqueueRedeemOpenArguments;
|
|
1020
|
+
config?: {
|
|
1021
|
+
sessionsConfig: ConfigValue;
|
|
1022
|
+
sessionsPackageId?: string;
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Queue an early sell of an Open order-flow queue record for an Account with an
|
|
1027
|
+
* active session. Returns the new queue record ID.
|
|
1028
|
+
*/
|
|
1029
|
+
export function enqueueRedeemOpen(options: EnqueueRedeemOpenOptions) {
|
|
1030
|
+
const packageAddress =
|
|
1031
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
1032
|
+
const argumentsTypes = [
|
|
1033
|
+
null,
|
|
1034
|
+
null,
|
|
1035
|
+
null,
|
|
1036
|
+
null,
|
|
1037
|
+
null,
|
|
1038
|
+
null,
|
|
1039
|
+
null,
|
|
1040
|
+
null,
|
|
1041
|
+
null,
|
|
1042
|
+
null,
|
|
1043
|
+
null,
|
|
1044
|
+
'u64',
|
|
1045
|
+
'u64',
|
|
1046
|
+
'u64',
|
|
1047
|
+
'u64',
|
|
1048
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
1049
|
+
'0x2::clock::Clock',
|
|
1050
|
+
] satisfies (string | null)[];
|
|
1051
|
+
const parameterNames = [
|
|
1052
|
+
'queue',
|
|
1053
|
+
'market',
|
|
1054
|
+
'accountRegistry',
|
|
1055
|
+
'wrapper',
|
|
1056
|
+
'sessionsConfig',
|
|
1057
|
+
'desk',
|
|
1058
|
+
'config',
|
|
1059
|
+
'propbookRegistry',
|
|
1060
|
+
'pyth',
|
|
1061
|
+
'bsValues',
|
|
1062
|
+
'bsSvi',
|
|
1063
|
+
'recordId',
|
|
1064
|
+
'closeQuantity',
|
|
1065
|
+
'minProbability',
|
|
1066
|
+
'minProceeds',
|
|
1067
|
+
];
|
|
1068
|
+
return (tx: Transaction) =>
|
|
1069
|
+
tx.moveCall({
|
|
1070
|
+
package: packageAddress,
|
|
1071
|
+
module: 'sessions',
|
|
1072
|
+
function: 'enqueue_redeem_open',
|
|
1073
|
+
arguments: normalizeMoveArguments(
|
|
1074
|
+
{
|
|
1075
|
+
...options.arguments,
|
|
1076
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
1077
|
+
},
|
|
1078
|
+
argumentsTypes,
|
|
1079
|
+
parameterNames,
|
|
1080
|
+
),
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
@@ -47,7 +47,7 @@ export const MAINNET_ACCOUNT: AccountIds = Object.freeze({
|
|
|
47
47
|
* the package root for one id.
|
|
48
48
|
*/
|
|
49
49
|
export const MAINNET_SESSIONS: SessionsIds = Object.freeze({
|
|
50
|
-
sessionsPackageId: '
|
|
50
|
+
sessionsPackageId: '0xfd9ef53ca443517d6a3a4d8742e00eaa1e7f35b0997697caab8c3e62870c0ce5',
|
|
51
51
|
sessionsPackageIdV1: '0x9a068beffa019ae756f4a6d2611e9899d3c6dd888812dd9eca87535d2ac55e2a',
|
|
52
52
|
sessionsConfig: '0xb2fba483748aac7508676020d4e691d68239b66f8bf7c5e7634dd1a76a329317',
|
|
53
53
|
accountPackageId: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',
|
|
@@ -75,10 +75,12 @@ export const MAINNET_UNITS: DeploymentUnits = Object.freeze({
|
|
|
75
75
|
export const MAINNET_PREDICT: PredictIds = Object.freeze({
|
|
76
76
|
network: 'mainnet',
|
|
77
77
|
packages: Object.freeze({
|
|
78
|
-
predict: '
|
|
78
|
+
predict: '0x98235c5842831c9b5f51dc637cf34c91db2aca5510802eb6ebfec63f5b71a7bb',
|
|
79
79
|
predictV1: '0x89aea622e7bb3bdd598bde87dde40ee31c9eed4971b9546e23ec83de3c48bbba',
|
|
80
80
|
account: '0x4e1dd01465713c9d832313fed5f45c222a4d5c62a533d6da96764c8b2a245d58',
|
|
81
81
|
propbook: '0xa6c8f32015b5b41d34ee09995a2e9d7a21cdecf0e1910a50b264fd252cd33831',
|
|
82
|
+
predictOrders: '0x7cd41de311f8f3efb2c239b38773a4010fce3bef0120cd55f479843077c98903',
|
|
83
|
+
predictMath: '0x19262d18a3ce9f1c304defbacc89f36585152acde73e626231200d10617fb9a7',
|
|
82
84
|
}),
|
|
83
85
|
objects: Object.freeze({
|
|
84
86
|
registry: '0x94327dbc256a2cfabd164c2bf4b3fe033bfaa4771f7a6f716954e07cb1b4beba',
|
|
@@ -107,4 +109,7 @@ export const MAINNET_PREDICT: PredictIds = Object.freeze({
|
|
|
107
109
|
blockScholesSviStore: '0xfdd447be39d847747caf18ecf3355031bb33979c472581f1a5481375d3748bfb',
|
|
108
110
|
}),
|
|
109
111
|
}),
|
|
112
|
+
oracle: Object.freeze({
|
|
113
|
+
pythLazerState: '0xd0db9c1e9212a98120384bf78d8b8c985d87b9ee6921dffcf9d1394062911573',
|
|
114
|
+
}),
|
|
110
115
|
});
|
|
@@ -47,7 +47,7 @@ export const TESTNET_ACCOUNT: AccountIds = Object.freeze({
|
|
|
47
47
|
* the package root for one id.
|
|
48
48
|
*/
|
|
49
49
|
export const TESTNET_SESSIONS: SessionsIds = Object.freeze({
|
|
50
|
-
sessionsPackageId: '
|
|
50
|
+
sessionsPackageId: '0x25cfc04f97ef75c530872e630c1b3e21845e615a5a68d185291372e196cbd3de',
|
|
51
51
|
sessionsPackageIdV1: '0x1908eee49d7a08d74a537d7f23766b363a145517fe0d3e0d85635d1682831ffd',
|
|
52
52
|
sessionsConfig: '0xc096b97289821b27badfdf758d614bbbfa386f93d3faa409ecc1fcc6075d1186',
|
|
53
53
|
accountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
|
|
@@ -75,10 +75,12 @@ export const TESTNET_UNITS: DeploymentUnits = Object.freeze({
|
|
|
75
75
|
export const TESTNET_PREDICT: PredictIds = Object.freeze({
|
|
76
76
|
network: 'testnet',
|
|
77
77
|
packages: Object.freeze({
|
|
78
|
-
predict: '
|
|
78
|
+
predict: '0x0654ecbed7c0f2645d9de7cb6cf08e65c2ee05cdbb39a415f17a6bd1cd92e267',
|
|
79
79
|
predictV1: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4',
|
|
80
80
|
account: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
|
|
81
81
|
propbook: '0xa83f9d7651de09672a40cea371c387bf954e0f3092947670d71428d4fbc9edd9',
|
|
82
|
+
predictOrders: '0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f',
|
|
83
|
+
predictMath: '0x471592f682a9560b7046ca1bbf240e608bf5b2071ff1a9bd129b8011166a43c5',
|
|
82
84
|
}),
|
|
83
85
|
objects: Object.freeze({
|
|
84
86
|
registry: '0x85cfaa857f9dfca75f6ba624eead063c4a1bc9b701201b8f21e1f9c15833ccc4',
|
|
@@ -107,4 +109,7 @@ export const TESTNET_PREDICT: PredictIds = Object.freeze({
|
|
|
107
109
|
blockScholesSviStore: '0x0f1cbefd1dd2ba08ae700a7067c32e0718edf926fa18cea80bd231c02d509ece',
|
|
108
110
|
}),
|
|
109
111
|
}),
|
|
112
|
+
oracle: Object.freeze({
|
|
113
|
+
pythLazerState: '0xe2b9096a5ea341a9f1eef126b2203727e29e73fdb0641ade2e1e32942f97e4d8',
|
|
114
|
+
}),
|
|
110
115
|
});
|
package/src/deployments/types.ts
CHANGED
|
@@ -68,7 +68,18 @@ export interface UnderlyingIds {
|
|
|
68
68
|
/** Ids for DeepBook Predict. */
|
|
69
69
|
export interface PredictIds {
|
|
70
70
|
network: string;
|
|
71
|
-
packages: {
|
|
71
|
+
packages: {
|
|
72
|
+
predict: string;
|
|
73
|
+
predictV1: string;
|
|
74
|
+
account: string;
|
|
75
|
+
propbook: string;
|
|
76
|
+
/** Latest `deepbook_predict_orders`, once the network records delayed execution. */
|
|
77
|
+
predictOrders?: string;
|
|
78
|
+
/** Its original ID, only once it differs from `predictOrders`. */
|
|
79
|
+
predictOrdersV1?: string;
|
|
80
|
+
/** `deepbook_predict_math`, once the network records delayed execution. */
|
|
81
|
+
predictMath?: string;
|
|
82
|
+
};
|
|
72
83
|
objects: {
|
|
73
84
|
registry: string;
|
|
74
85
|
protocolConfig: string;
|
|
@@ -80,4 +91,6 @@ export interface PredictIds {
|
|
|
80
91
|
coinTypes: { plp: string; deep: string };
|
|
81
92
|
units: DeploymentUnits;
|
|
82
93
|
underlyings: Record<string, UnderlyingIds>;
|
|
94
|
+
/** Pyth Lazer's shared `State`, recorded with delayed execution. */
|
|
95
|
+
oracle?: { pythLazerState: string };
|
|
83
96
|
}
|