@mysten/deepbook-v3 2.9.2 → 2.10.1
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 +58 -0
- package/README.md +21 -0
- package/dist/account-bindings/account-registry.d.mts +109 -0
- package/dist/account-bindings/account-registry.d.mts.map +1 -0
- package/dist/account-bindings/account-registry.mjs +56 -0
- package/dist/account-bindings/account-registry.mjs.map +1 -0
- package/dist/account-bindings/account.d.mts +176 -0
- package/dist/account-bindings/account.d.mts.map +1 -0
- package/dist/account-bindings/account.mjs +94 -0
- package/dist/account-bindings/account.mjs.map +1 -0
- package/dist/account-bindings/latest.d.mts +12 -0
- package/dist/account-bindings/latest.d.mts.map +1 -0
- package/dist/account-bindings/latest.mjs +19 -0
- package/dist/account-bindings/latest.mjs.map +1 -0
- package/dist/account.d.mts +46 -3
- package/dist/account.d.mts.map +1 -1
- package/dist/account.mjs +51 -2
- package/dist/account.mjs.map +1 -1
- package/dist/contracts/account/account.d.mts +25 -97
- package/dist/contracts/account/account.d.mts.map +1 -1
- package/dist/contracts/account/account.mjs +43 -35
- package/dist/contracts/account/account.mjs.map +1 -1
- package/dist/contracts/account/account_events.d.mts +20 -20
- package/dist/contracts/account/account_events.d.mts.map +1 -1
- package/dist/contracts/account/account_registry.d.mts +7 -54
- package/dist/contracts/account/account_registry.d.mts.map +1 -1
- package/dist/contracts/account/account_registry.mjs +2 -22
- package/dist/contracts/account/account_registry.mjs.map +1 -1
- 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/admin.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/builder_code.d.mts +60 -13
- package/dist/contracts/deepbook_predict/builder_code.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/builder_code.mjs +55 -1
- package/dist/contracts/deepbook_predict/builder_code.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/builder_code_events.d.mts +10 -10
- package/dist/contracts/deepbook_predict/config_events.d.mts +88 -84
- package/dist/contracts/deepbook_predict/config_events.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/config_events.mjs +8 -0
- package/dist/contracts/deepbook_predict/config_events.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/expiry_market.d.mts +262 -101
- package/dist/contracts/deepbook_predict/expiry_market.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/expiry_market.mjs +320 -41
- package/dist/contracts/deepbook_predict/expiry_market.mjs.map +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 +56 -54
- package/dist/contracts/deepbook_predict/order_events.d.mts.map +1 -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 +74 -74
- package/dist/contracts/deepbook_predict/plp.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/pool_valuation_cap.d.mts +5 -5
- package/dist/contracts/deepbook_predict/predict_account.d.mts +22 -17
- package/dist/contracts/deepbook_predict/predict_account.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/predict_account.mjs +12 -6
- package/dist/contracts/deepbook_predict/predict_account.mjs.map +1 -1
- package/dist/contracts/deepbook_predict/pricing.d.mts +67 -67
- package/dist/contracts/deepbook_predict/pricing.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.d.mts +127 -83
- package/dist/contracts/deepbook_predict/protocol_config.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict/protocol_config.mjs +59 -1
- 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 +32 -32
- package/dist/contracts/deepbook_predict/vault_events.d.mts +131 -131
- package/dist/contracts/deepbook_predict_math/lazer_price.d.mts +13 -13
- package/dist/contracts/deepbook_predict_math/math.d.mts +14 -14
- package/dist/contracts/deepbook_predict_orders/delayed_execution_config.d.mts +30 -30
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs +6 -0
- package/dist/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.mjs.map +1 -1
- package/dist/contracts/deepbook_predict_orders/desk.d.mts +28 -28
- package/dist/contracts/deepbook_predict_orders/order_queue.d.mts +187 -187
- package/dist/contracts/deepbook_predict_orders/queue.d.mts +240 -62
- package/dist/contracts/deepbook_predict_orders/queue.d.mts.map +1 -1
- package/dist/contracts/deepbook_predict_orders/queue.mjs +306 -41
- package/dist/contracts/deepbook_predict_orders/queue.mjs.map +1 -1
- package/dist/contracts/deepbook_predict_orders/queue_events.d.mts +140 -140
- package/dist/contracts/deepbook_sessions/session_config.d.mts +8 -8
- package/dist/contracts/deepbook_sessions/session_config.d.mts.map +1 -1
- package/dist/contracts/deepbook_sessions/sessions.d.mts +271 -31
- package/dist/contracts/deepbook_sessions/sessions.d.mts.map +1 -1
- package/dist/contracts/deepbook_sessions/sessions.mjs +363 -3
- package/dist/contracts/deepbook_sessions/sessions.mjs.map +1 -1
- package/dist/deployments/mainnet.mjs.map +1 -1
- package/dist/deployments/testnet.d.mts.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 +57 -7
- package/dist/predict/bindings/expiry-market.d.mts.map +1 -1
- package/dist/predict/bindings/expiry-market.mjs +48 -2
- package/dist/predict/bindings/expiry-market.mjs.map +1 -1
- package/dist/predict/bindings/protocol-config.d.mts +5 -5
- package/dist/predict/bindings/protocol-config.mjs +4 -1
- package/dist/predict/bindings/protocol-config.mjs.map +1 -1
- package/dist/predict/bindings/queue.d.mts +30 -0
- package/dist/predict/bindings/queue.d.mts.map +1 -0
- package/dist/predict/bindings/queue.mjs +59 -0
- package/dist/predict/bindings/queue.mjs.map +1 -0
- package/dist/predict/bindings/rename.mjs +5 -1
- package/dist/predict/bindings/rename.mjs.map +1 -1
- package/dist/predict/client.d.mts.map +1 -1
- package/dist/predict/client.mjs +11 -5
- package/dist/predict/client.mjs.map +1 -1
- package/dist/predict/config/generated.d.mts +1 -1
- package/dist/predict/config/generated.d.mts.map +1 -1
- package/dist/predict/config/generated.mjs +1 -0
- package/dist/predict/config/generated.mjs.map +1 -1
- package/dist/predict/config/mainnet.mjs +3 -1
- package/dist/predict/config/mainnet.mjs.map +1 -1
- package/dist/predict/config/testnet.mjs +3 -1
- package/dist/predict/config/testnet.mjs.map +1 -1
- package/dist/predict/config/types.d.mts +23 -0
- package/dist/predict/config/types.d.mts.map +1 -1
- package/dist/predict/cost.d.mts +9 -1
- package/dist/predict/cost.d.mts.map +1 -1
- package/dist/predict/cost.mjs.map +1 -1
- package/dist/predict/errors.d.mts.map +1 -1
- package/dist/predict/errors.mjs +6 -2
- package/dist/predict/errors.mjs.map +1 -1
- package/dist/predict/index.d.mts +1 -1
- package/dist/predict/index.mjs +2 -2
- package/dist/predict/queue.d.mts +8 -4
- package/dist/predict/queue.d.mts.map +1 -1
- package/dist/predict/queue.mjs +8 -4
- package/dist/predict/queue.mjs.map +1 -1
- package/dist/predict/reads/balances.mjs +1 -1
- package/dist/predict/reads/queue.d.mts +3 -2
- package/dist/predict/reads/queue.d.mts.map +1 -1
- package/dist/predict/reads/queue.mjs +5 -4
- package/dist/predict/reads/queue.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 +3 -2
- package/dist/predict/tx/common.mjs.map +1 -1
- package/dist/predict/tx/trade.d.mts.map +1 -1
- package/dist/predict/tx/trade.mjs +3 -2
- package/dist/predict/tx/trade.mjs.map +1 -1
- package/dist/sessions.d.mts +10 -1
- package/dist/sessions.d.mts.map +1 -1
- 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/marginPool.d.mts.map +1 -1
- 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/dist/utils/constants.d.mts.map +1 -1
- package/dist/utils/constants.mjs +2 -2
- package/dist/utils/constants.mjs.map +1 -1
- package/package.json +1 -1
- package/src/account-bindings/account-registry.ts +39 -0
- package/src/account-bindings/account.ts +73 -0
- package/src/account-bindings/latest.ts +41 -0
- package/src/account.ts +89 -5
- package/src/contracts/account/account.ts +73 -4
- package/src/contracts/account/account_registry.ts +1 -1
- package/src/contracts/deepbook_predict/builder_code.ts +94 -2
- package/src/contracts/deepbook_predict/config_events.ts +7 -0
- package/src/contracts/deepbook_predict/expiry_market.ts +490 -44
- package/src/contracts/deepbook_predict/order_events.ts +6 -4
- package/src/contracts/deepbook_predict/predict_account.ts +12 -6
- package/src/contracts/deepbook_predict/protocol_config.ts +85 -0
- package/src/contracts/deepbook_predict_orders/deps/deepbook_predict/expiry_market.ts +14 -0
- package/src/contracts/deepbook_predict_orders/order_flow.ts +4 -0
- package/src/contracts/deepbook_predict_orders/queue.ts +495 -9
- package/src/contracts/deepbook_sessions/sessions.ts +538 -3
- package/src/deployments/mainnet.ts +4 -4
- package/src/deployments/testnet.ts +18 -7
- package/src/deployments/types.ts +14 -0
- package/src/predict/bindings/expiry-market.ts +87 -0
- package/src/predict/bindings/queue.ts +42 -0
- package/src/predict/bindings/rename.ts +5 -1
- package/src/predict/client.ts +25 -3
- package/src/predict/config/generated.ts +3 -0
- package/src/predict/config/mainnet.ts +4 -0
- package/src/predict/config/testnet.ts +4 -0
- package/src/predict/config/types.ts +23 -0
- package/src/predict/cost.ts +9 -1
- package/src/predict/errors.ts +11 -1
- package/src/predict/index.ts +1 -1
- package/src/predict/queue.ts +8 -4
- package/src/predict/reads/queue.ts +7 -4
- package/src/predict/tx/common.ts +2 -0
- package/src/predict/tx/trade.ts +3 -1
- package/src/sessions.ts +10 -1
- package/src/utils/constants.ts +8 -3
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
* Owns time-limited trading session grants attached to canonical Accounts. Account
|
|
7
7
|
* owners grant and revoke sessions; an active session can only generate app auth
|
|
8
8
|
* inside the Predict and DeepBook spot wrappers exposed here.
|
|
9
|
+
*
|
|
10
|
+
* A session-key trade that names a Predict builder code pays that builder a fee
|
|
11
|
+
* the session holder picks, so the owner approves one code and a maximum fee per
|
|
12
|
+
* session (`approve_session_builder`), and the `_with_builder` wrappers accept
|
|
13
|
+
* only that code at or below that fee.
|
|
9
14
|
*/
|
|
10
15
|
|
|
11
16
|
import {
|
|
@@ -47,6 +52,41 @@ export const SessionRevoked = new MoveStruct({
|
|
|
47
52
|
expires_at_ms: U64,
|
|
48
53
|
},
|
|
49
54
|
});
|
|
55
|
+
export const SessionBuildersApp = new MoveStruct({
|
|
56
|
+
name: `${$moduleName}::SessionBuildersApp`,
|
|
57
|
+
fields: {
|
|
58
|
+
dummy_field: bcs.bool(),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
export const SessionBuilder = new MoveStruct({
|
|
62
|
+
name: `${$moduleName}::SessionBuilder`,
|
|
63
|
+
fields: {
|
|
64
|
+
code_id: bcs.Address,
|
|
65
|
+
max_fee_per_contract: U64,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const SessionBuilders = new MoveStruct({
|
|
69
|
+
name: `${$moduleName}::SessionBuilders`,
|
|
70
|
+
fields: {
|
|
71
|
+
approvals: vec_map.VecMap(bcs.Address, SessionBuilder),
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
export const SessionBuilderApproved = new MoveStruct({
|
|
75
|
+
name: `${$moduleName}::SessionBuilderApproved`,
|
|
76
|
+
fields: {
|
|
77
|
+
account_id: bcs.Address,
|
|
78
|
+
session: bcs.Address,
|
|
79
|
+
code_id: bcs.Address,
|
|
80
|
+
max_fee_per_contract: U64,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
export const SessionBuilderCleared = new MoveStruct({
|
|
84
|
+
name: `${$moduleName}::SessionBuilderCleared`,
|
|
85
|
+
fields: {
|
|
86
|
+
account_id: bcs.Address,
|
|
87
|
+
session: bcs.Address,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
50
90
|
export interface SessionExpirationMsArguments {
|
|
51
91
|
wrapper: RawTransactionArgument<string>;
|
|
52
92
|
session: RawTransactionArgument<string>;
|
|
@@ -74,6 +114,81 @@ export function sessionExpirationMs(options: SessionExpirationMsOptions) {
|
|
|
74
114
|
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
75
115
|
});
|
|
76
116
|
}
|
|
117
|
+
export interface SessionBuilderArguments {
|
|
118
|
+
wrapper: RawTransactionArgument<string>;
|
|
119
|
+
session: RawTransactionArgument<string>;
|
|
120
|
+
}
|
|
121
|
+
export interface SessionBuilderOptions {
|
|
122
|
+
package?: string;
|
|
123
|
+
arguments:
|
|
124
|
+
| SessionBuilderArguments
|
|
125
|
+
| [wrapper: RawTransactionArgument<string>, session: RawTransactionArgument<string>];
|
|
126
|
+
config?: {
|
|
127
|
+
sessionsPackageId?: string;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Return a session's approved builder, or `none`, for SDK and devInspect reads. */
|
|
131
|
+
export function sessionBuilder(options: SessionBuilderOptions) {
|
|
132
|
+
const packageAddress =
|
|
133
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
134
|
+
const argumentsTypes = [null, 'address'] satisfies (string | null)[];
|
|
135
|
+
const parameterNames = ['wrapper', 'session'];
|
|
136
|
+
return (tx: Transaction) =>
|
|
137
|
+
tx.moveCall({
|
|
138
|
+
package: packageAddress,
|
|
139
|
+
module: 'sessions',
|
|
140
|
+
function: 'session_builder',
|
|
141
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
export interface ApprovedCodeIdArguments {
|
|
145
|
+
builder: TransactionArgument;
|
|
146
|
+
}
|
|
147
|
+
export interface ApprovedCodeIdOptions {
|
|
148
|
+
package?: string;
|
|
149
|
+
arguments: ApprovedCodeIdArguments | [builder: TransactionArgument];
|
|
150
|
+
config?: {
|
|
151
|
+
sessionsPackageId?: string;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/** Return the builder code an approval allows, for SDK and devInspect reads. */
|
|
155
|
+
export function approvedCodeId(options: ApprovedCodeIdOptions) {
|
|
156
|
+
const packageAddress =
|
|
157
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
158
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
159
|
+
const parameterNames = ['builder'];
|
|
160
|
+
return (tx: Transaction) =>
|
|
161
|
+
tx.moveCall({
|
|
162
|
+
package: packageAddress,
|
|
163
|
+
module: 'sessions',
|
|
164
|
+
function: 'approved_code_id',
|
|
165
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
export interface ApprovedMaxFeePerContractArguments {
|
|
169
|
+
builder: TransactionArgument;
|
|
170
|
+
}
|
|
171
|
+
export interface ApprovedMaxFeePerContractOptions {
|
|
172
|
+
package?: string;
|
|
173
|
+
arguments: ApprovedMaxFeePerContractArguments | [builder: TransactionArgument];
|
|
174
|
+
config?: {
|
|
175
|
+
sessionsPackageId?: string;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/** Return the most an approval allows per contract, for SDK and devInspect reads. */
|
|
179
|
+
export function approvedMaxFeePerContract(options: ApprovedMaxFeePerContractOptions) {
|
|
180
|
+
const packageAddress =
|
|
181
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
182
|
+
const argumentsTypes = [null] satisfies (string | null)[];
|
|
183
|
+
const parameterNames = ['builder'];
|
|
184
|
+
return (tx: Transaction) =>
|
|
185
|
+
tx.moveCall({
|
|
186
|
+
package: packageAddress,
|
|
187
|
+
module: 'sessions',
|
|
188
|
+
function: 'approved_max_fee_per_contract',
|
|
189
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
190
|
+
});
|
|
191
|
+
}
|
|
77
192
|
export interface AuthorizeSessionArguments {
|
|
78
193
|
wrapper: RawTransactionArgument<string>;
|
|
79
194
|
sessionsConfig?: RawTransactionArgument<string>;
|
|
@@ -90,7 +205,10 @@ export interface AuthorizeSessionOptions {
|
|
|
90
205
|
}
|
|
91
206
|
/**
|
|
92
207
|
* Authorize `session` from execution time for at most 30 days. Accounts may store
|
|
93
|
-
* at most 20 addresses; reauthorization replaces in place
|
|
208
|
+
* at most 20 addresses; reauthorization replaces in place and keeps the session's
|
|
209
|
+
* builder approval, while a new grant starts without one. A session that expired
|
|
210
|
+
* but was never revoked is still stored, so granting it again is a reauthorization
|
|
211
|
+
* and keeps its approval.
|
|
94
212
|
*/
|
|
95
213
|
export function authorizeSession(options: AuthorizeSessionOptions) {
|
|
96
214
|
const packageAddress =
|
|
@@ -114,6 +232,53 @@ export function authorizeSession(options: AuthorizeSessionOptions) {
|
|
|
114
232
|
),
|
|
115
233
|
});
|
|
116
234
|
}
|
|
235
|
+
export interface ApproveSessionBuilderArguments {
|
|
236
|
+
wrapper: RawTransactionArgument<string>;
|
|
237
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
238
|
+
session: RawTransactionArgument<string>;
|
|
239
|
+
codeId: RawTransactionArgument<string>;
|
|
240
|
+
maxFeePerContract: RawTransactionArgument<number | bigint>;
|
|
241
|
+
}
|
|
242
|
+
export interface ApproveSessionBuilderOptions {
|
|
243
|
+
package?: string;
|
|
244
|
+
arguments: ApproveSessionBuilderArguments;
|
|
245
|
+
config?: {
|
|
246
|
+
sessionsConfig: ConfigValue;
|
|
247
|
+
sessionsPackageId?: string;
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Approve the builder code `session`'s trades may name, and the most they may
|
|
252
|
+
* charge per contract (`max_fee_per_contract`, in FLOAT_SCALING of the $1 payout),
|
|
253
|
+
* replacing any earlier approval. Only the Account owner may call this, and only
|
|
254
|
+
* for a session already authorized (`ESessionNotAuthorized`), so an app calls it
|
|
255
|
+
* right after `authorize_session` in the same transaction. The approval lasts
|
|
256
|
+
* until `revoke_session`; re-authorizing the session keeps it. Aborts
|
|
257
|
+
* `EBuilderApprovalsNotEnabled` until the `SessionsConfig` watermark reaches the
|
|
258
|
+
* first version that clears stale approvals.
|
|
259
|
+
*/
|
|
260
|
+
export function approveSessionBuilder(options: ApproveSessionBuilderOptions) {
|
|
261
|
+
const packageAddress =
|
|
262
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
263
|
+
const argumentsTypes = [null, null, 'address', '0x2::object::ID', 'u64'] satisfies (
|
|
264
|
+
string | null
|
|
265
|
+
)[];
|
|
266
|
+
const parameterNames = ['wrapper', 'sessionsConfig', 'session', 'codeId', 'maxFeePerContract'];
|
|
267
|
+
return (tx: Transaction) =>
|
|
268
|
+
tx.moveCall({
|
|
269
|
+
package: packageAddress,
|
|
270
|
+
module: 'sessions',
|
|
271
|
+
function: 'approve_session_builder',
|
|
272
|
+
arguments: normalizeMoveArguments(
|
|
273
|
+
{
|
|
274
|
+
...options.arguments,
|
|
275
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
276
|
+
},
|
|
277
|
+
argumentsTypes,
|
|
278
|
+
parameterNames,
|
|
279
|
+
),
|
|
280
|
+
});
|
|
281
|
+
}
|
|
117
282
|
export interface RevokeSessionArguments {
|
|
118
283
|
wrapper: RawTransactionArgument<string>;
|
|
119
284
|
session: RawTransactionArgument<string>;
|
|
@@ -128,8 +293,8 @@ export interface RevokeSessionOptions {
|
|
|
128
293
|
};
|
|
129
294
|
}
|
|
130
295
|
/**
|
|
131
|
-
* Revoke `session`
|
|
132
|
-
* function.
|
|
296
|
+
* Revoke `session` and its builder approval if present. Only the Account owner may
|
|
297
|
+
* call this function.
|
|
133
298
|
*/
|
|
134
299
|
export function revokeSession(options: RevokeSessionOptions) {
|
|
135
300
|
const packageAddress =
|
|
@@ -828,6 +993,100 @@ export function enqueueExactQuantity(options: EnqueueExactQuantityOptions) {
|
|
|
828
993
|
),
|
|
829
994
|
});
|
|
830
995
|
}
|
|
996
|
+
export interface EnqueueExactQuantityWithBuilderArguments {
|
|
997
|
+
queue: RawTransactionArgument<string>;
|
|
998
|
+
market: RawTransactionArgument<string>;
|
|
999
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
1000
|
+
wrapper: RawTransactionArgument<string>;
|
|
1001
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
1002
|
+
desk: RawTransactionArgument<string>;
|
|
1003
|
+
config: RawTransactionArgument<string>;
|
|
1004
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
1005
|
+
pyth: RawTransactionArgument<string>;
|
|
1006
|
+
bsValues: RawTransactionArgument<string>;
|
|
1007
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1008
|
+
code: RawTransactionArgument<string>;
|
|
1009
|
+
builderFeePerContract: RawTransactionArgument<number | bigint>;
|
|
1010
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
1011
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
1012
|
+
quantity: RawTransactionArgument<number | bigint>;
|
|
1013
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
1014
|
+
maxProbability: RawTransactionArgument<number | bigint>;
|
|
1015
|
+
}
|
|
1016
|
+
export interface EnqueueExactQuantityWithBuilderOptions {
|
|
1017
|
+
package?: string;
|
|
1018
|
+
arguments: EnqueueExactQuantityWithBuilderArguments;
|
|
1019
|
+
config?: {
|
|
1020
|
+
sessionsConfig: ConfigValue;
|
|
1021
|
+
sessionsPackageId?: string;
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* `enqueue_exact_quantity` for a session-key mint that names a builder: `code` and
|
|
1026
|
+
* `builder_fee_per_contract` must be the session's approved code and at most its
|
|
1027
|
+
* approved fee (`EBuilderNotApproved`, `EBuilderFeeAboveApproved`), after the
|
|
1028
|
+
* session checks. Returns the new queue record ID.
|
|
1029
|
+
*/
|
|
1030
|
+
export function enqueueExactQuantityWithBuilder(options: EnqueueExactQuantityWithBuilderOptions) {
|
|
1031
|
+
const packageAddress =
|
|
1032
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
1033
|
+
const argumentsTypes = [
|
|
1034
|
+
null,
|
|
1035
|
+
null,
|
|
1036
|
+
null,
|
|
1037
|
+
null,
|
|
1038
|
+
null,
|
|
1039
|
+
null,
|
|
1040
|
+
null,
|
|
1041
|
+
null,
|
|
1042
|
+
null,
|
|
1043
|
+
null,
|
|
1044
|
+
null,
|
|
1045
|
+
null,
|
|
1046
|
+
'u64',
|
|
1047
|
+
'u64',
|
|
1048
|
+
'u64',
|
|
1049
|
+
'u64',
|
|
1050
|
+
'u64',
|
|
1051
|
+
'u64',
|
|
1052
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
1053
|
+
'0x2::clock::Clock',
|
|
1054
|
+
] satisfies (string | null)[];
|
|
1055
|
+
const parameterNames = [
|
|
1056
|
+
'queue',
|
|
1057
|
+
'market',
|
|
1058
|
+
'accountRegistry',
|
|
1059
|
+
'wrapper',
|
|
1060
|
+
'sessionsConfig',
|
|
1061
|
+
'desk',
|
|
1062
|
+
'config',
|
|
1063
|
+
'propbookRegistry',
|
|
1064
|
+
'pyth',
|
|
1065
|
+
'bsValues',
|
|
1066
|
+
'bsSvi',
|
|
1067
|
+
'code',
|
|
1068
|
+
'builderFeePerContract',
|
|
1069
|
+
'lowerTick',
|
|
1070
|
+
'higherTick',
|
|
1071
|
+
'quantity',
|
|
1072
|
+
'maxCost',
|
|
1073
|
+
'maxProbability',
|
|
1074
|
+
];
|
|
1075
|
+
return (tx: Transaction) =>
|
|
1076
|
+
tx.moveCall({
|
|
1077
|
+
package: packageAddress,
|
|
1078
|
+
module: 'sessions',
|
|
1079
|
+
function: 'enqueue_exact_quantity_with_builder',
|
|
1080
|
+
arguments: normalizeMoveArguments(
|
|
1081
|
+
{
|
|
1082
|
+
...options.arguments,
|
|
1083
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
1084
|
+
},
|
|
1085
|
+
argumentsTypes,
|
|
1086
|
+
parameterNames,
|
|
1087
|
+
),
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
831
1090
|
export interface EnqueueExactAmountArguments {
|
|
832
1091
|
queue: RawTransactionArgument<string>;
|
|
833
1092
|
market: RawTransactionArgument<string>;
|
|
@@ -914,6 +1173,100 @@ export function enqueueExactAmount(options: EnqueueExactAmountOptions) {
|
|
|
914
1173
|
),
|
|
915
1174
|
});
|
|
916
1175
|
}
|
|
1176
|
+
export interface EnqueueExactAmountWithBuilderArguments {
|
|
1177
|
+
queue: RawTransactionArgument<string>;
|
|
1178
|
+
market: RawTransactionArgument<string>;
|
|
1179
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
1180
|
+
wrapper: RawTransactionArgument<string>;
|
|
1181
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
1182
|
+
desk: RawTransactionArgument<string>;
|
|
1183
|
+
config: RawTransactionArgument<string>;
|
|
1184
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
1185
|
+
pyth: RawTransactionArgument<string>;
|
|
1186
|
+
bsValues: RawTransactionArgument<string>;
|
|
1187
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1188
|
+
code: RawTransactionArgument<string>;
|
|
1189
|
+
builderFeePerContract: RawTransactionArgument<number | bigint>;
|
|
1190
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
1191
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
1192
|
+
maxPremium: RawTransactionArgument<number | bigint>;
|
|
1193
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
1194
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
1195
|
+
}
|
|
1196
|
+
export interface EnqueueExactAmountWithBuilderOptions {
|
|
1197
|
+
package?: string;
|
|
1198
|
+
arguments: EnqueueExactAmountWithBuilderArguments;
|
|
1199
|
+
config?: {
|
|
1200
|
+
sessionsConfig: ConfigValue;
|
|
1201
|
+
sessionsPackageId?: string;
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* `enqueue_exact_amount` for a session-key mint that names a builder: `code` and
|
|
1206
|
+
* `builder_fee_per_contract` must be the session's approved code and at most its
|
|
1207
|
+
* approved fee (`EBuilderNotApproved`, `EBuilderFeeAboveApproved`), after the
|
|
1208
|
+
* session checks. Returns the new queue record ID.
|
|
1209
|
+
*/
|
|
1210
|
+
export function enqueueExactAmountWithBuilder(options: EnqueueExactAmountWithBuilderOptions) {
|
|
1211
|
+
const packageAddress =
|
|
1212
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
1213
|
+
const argumentsTypes = [
|
|
1214
|
+
null,
|
|
1215
|
+
null,
|
|
1216
|
+
null,
|
|
1217
|
+
null,
|
|
1218
|
+
null,
|
|
1219
|
+
null,
|
|
1220
|
+
null,
|
|
1221
|
+
null,
|
|
1222
|
+
null,
|
|
1223
|
+
null,
|
|
1224
|
+
null,
|
|
1225
|
+
null,
|
|
1226
|
+
'u64',
|
|
1227
|
+
'u64',
|
|
1228
|
+
'u64',
|
|
1229
|
+
'u64',
|
|
1230
|
+
'u64',
|
|
1231
|
+
'u64',
|
|
1232
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
1233
|
+
'0x2::clock::Clock',
|
|
1234
|
+
] satisfies (string | null)[];
|
|
1235
|
+
const parameterNames = [
|
|
1236
|
+
'queue',
|
|
1237
|
+
'market',
|
|
1238
|
+
'accountRegistry',
|
|
1239
|
+
'wrapper',
|
|
1240
|
+
'sessionsConfig',
|
|
1241
|
+
'desk',
|
|
1242
|
+
'config',
|
|
1243
|
+
'propbookRegistry',
|
|
1244
|
+
'pyth',
|
|
1245
|
+
'bsValues',
|
|
1246
|
+
'bsSvi',
|
|
1247
|
+
'code',
|
|
1248
|
+
'builderFeePerContract',
|
|
1249
|
+
'lowerTick',
|
|
1250
|
+
'higherTick',
|
|
1251
|
+
'maxPremium',
|
|
1252
|
+
'minQuantity',
|
|
1253
|
+
'maxCost',
|
|
1254
|
+
];
|
|
1255
|
+
return (tx: Transaction) =>
|
|
1256
|
+
tx.moveCall({
|
|
1257
|
+
package: packageAddress,
|
|
1258
|
+
module: 'sessions',
|
|
1259
|
+
function: 'enqueue_exact_amount_with_builder',
|
|
1260
|
+
arguments: normalizeMoveArguments(
|
|
1261
|
+
{
|
|
1262
|
+
...options.arguments,
|
|
1263
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
1264
|
+
},
|
|
1265
|
+
argumentsTypes,
|
|
1266
|
+
parameterNames,
|
|
1267
|
+
),
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
917
1270
|
export interface EnqueueExactCostArguments {
|
|
918
1271
|
queue: RawTransactionArgument<string>;
|
|
919
1272
|
market: RawTransactionArgument<string>;
|
|
@@ -997,6 +1350,97 @@ export function enqueueExactCost(options: EnqueueExactCostOptions) {
|
|
|
997
1350
|
),
|
|
998
1351
|
});
|
|
999
1352
|
}
|
|
1353
|
+
export interface EnqueueExactCostWithBuilderArguments {
|
|
1354
|
+
queue: RawTransactionArgument<string>;
|
|
1355
|
+
market: RawTransactionArgument<string>;
|
|
1356
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
1357
|
+
wrapper: RawTransactionArgument<string>;
|
|
1358
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
1359
|
+
desk: RawTransactionArgument<string>;
|
|
1360
|
+
config: RawTransactionArgument<string>;
|
|
1361
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
1362
|
+
pyth: RawTransactionArgument<string>;
|
|
1363
|
+
bsValues: RawTransactionArgument<string>;
|
|
1364
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1365
|
+
code: RawTransactionArgument<string>;
|
|
1366
|
+
builderFeePerContract: RawTransactionArgument<number | bigint>;
|
|
1367
|
+
lowerTick: RawTransactionArgument<number | bigint>;
|
|
1368
|
+
higherTick: RawTransactionArgument<number | bigint>;
|
|
1369
|
+
maxCost: RawTransactionArgument<number | bigint>;
|
|
1370
|
+
minQuantity: RawTransactionArgument<number | bigint>;
|
|
1371
|
+
}
|
|
1372
|
+
export interface EnqueueExactCostWithBuilderOptions {
|
|
1373
|
+
package?: string;
|
|
1374
|
+
arguments: EnqueueExactCostWithBuilderArguments;
|
|
1375
|
+
config?: {
|
|
1376
|
+
sessionsConfig: ConfigValue;
|
|
1377
|
+
sessionsPackageId?: string;
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* `enqueue_exact_cost` for a session-key mint that names a builder: `code` and
|
|
1382
|
+
* `builder_fee_per_contract` must be the session's approved code and at most its
|
|
1383
|
+
* approved fee (`EBuilderNotApproved`, `EBuilderFeeAboveApproved`), after the
|
|
1384
|
+
* session checks. Returns the new queue record ID.
|
|
1385
|
+
*/
|
|
1386
|
+
export function enqueueExactCostWithBuilder(options: EnqueueExactCostWithBuilderOptions) {
|
|
1387
|
+
const packageAddress =
|
|
1388
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
1389
|
+
const argumentsTypes = [
|
|
1390
|
+
null,
|
|
1391
|
+
null,
|
|
1392
|
+
null,
|
|
1393
|
+
null,
|
|
1394
|
+
null,
|
|
1395
|
+
null,
|
|
1396
|
+
null,
|
|
1397
|
+
null,
|
|
1398
|
+
null,
|
|
1399
|
+
null,
|
|
1400
|
+
null,
|
|
1401
|
+
null,
|
|
1402
|
+
'u64',
|
|
1403
|
+
'u64',
|
|
1404
|
+
'u64',
|
|
1405
|
+
'u64',
|
|
1406
|
+
'u64',
|
|
1407
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
1408
|
+
'0x2::clock::Clock',
|
|
1409
|
+
] satisfies (string | null)[];
|
|
1410
|
+
const parameterNames = [
|
|
1411
|
+
'queue',
|
|
1412
|
+
'market',
|
|
1413
|
+
'accountRegistry',
|
|
1414
|
+
'wrapper',
|
|
1415
|
+
'sessionsConfig',
|
|
1416
|
+
'desk',
|
|
1417
|
+
'config',
|
|
1418
|
+
'propbookRegistry',
|
|
1419
|
+
'pyth',
|
|
1420
|
+
'bsValues',
|
|
1421
|
+
'bsSvi',
|
|
1422
|
+
'code',
|
|
1423
|
+
'builderFeePerContract',
|
|
1424
|
+
'lowerTick',
|
|
1425
|
+
'higherTick',
|
|
1426
|
+
'maxCost',
|
|
1427
|
+
'minQuantity',
|
|
1428
|
+
];
|
|
1429
|
+
return (tx: Transaction) =>
|
|
1430
|
+
tx.moveCall({
|
|
1431
|
+
package: packageAddress,
|
|
1432
|
+
module: 'sessions',
|
|
1433
|
+
function: 'enqueue_exact_cost_with_builder',
|
|
1434
|
+
arguments: normalizeMoveArguments(
|
|
1435
|
+
{
|
|
1436
|
+
...options.arguments,
|
|
1437
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
1438
|
+
},
|
|
1439
|
+
argumentsTypes,
|
|
1440
|
+
parameterNames,
|
|
1441
|
+
),
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1000
1444
|
export interface EnqueueRedeemOpenArguments {
|
|
1001
1445
|
queue: RawTransactionArgument<string>;
|
|
1002
1446
|
market: RawTransactionArgument<string>;
|
|
@@ -1080,3 +1524,94 @@ export function enqueueRedeemOpen(options: EnqueueRedeemOpenOptions) {
|
|
|
1080
1524
|
),
|
|
1081
1525
|
});
|
|
1082
1526
|
}
|
|
1527
|
+
export interface EnqueueRedeemOpenWithBuilderArguments {
|
|
1528
|
+
queue: RawTransactionArgument<string>;
|
|
1529
|
+
market: RawTransactionArgument<string>;
|
|
1530
|
+
accountRegistry: RawTransactionArgument<string>;
|
|
1531
|
+
wrapper: RawTransactionArgument<string>;
|
|
1532
|
+
sessionsConfig?: RawTransactionArgument<string>;
|
|
1533
|
+
desk: RawTransactionArgument<string>;
|
|
1534
|
+
config: RawTransactionArgument<string>;
|
|
1535
|
+
propbookRegistry: RawTransactionArgument<string>;
|
|
1536
|
+
pyth: RawTransactionArgument<string>;
|
|
1537
|
+
bsValues: RawTransactionArgument<string>;
|
|
1538
|
+
bsSvi: RawTransactionArgument<string>;
|
|
1539
|
+
code: RawTransactionArgument<string>;
|
|
1540
|
+
builderFeePerContract: RawTransactionArgument<number | bigint>;
|
|
1541
|
+
recordId: RawTransactionArgument<number | bigint>;
|
|
1542
|
+
closeQuantity: RawTransactionArgument<number | bigint>;
|
|
1543
|
+
minProbability: RawTransactionArgument<number | bigint>;
|
|
1544
|
+
minProceeds: RawTransactionArgument<number | bigint>;
|
|
1545
|
+
}
|
|
1546
|
+
export interface EnqueueRedeemOpenWithBuilderOptions {
|
|
1547
|
+
package?: string;
|
|
1548
|
+
arguments: EnqueueRedeemOpenWithBuilderArguments;
|
|
1549
|
+
config?: {
|
|
1550
|
+
sessionsConfig: ConfigValue;
|
|
1551
|
+
sessionsPackageId?: string;
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
/**
|
|
1555
|
+
* `enqueue_redeem_open` for a session-key sell that names a builder: `code` and
|
|
1556
|
+
* `builder_fee_per_contract` must be the session's approved code and at most its
|
|
1557
|
+
* approved fee (`EBuilderNotApproved`, `EBuilderFeeAboveApproved`), after the
|
|
1558
|
+
* session checks. Returns the new queue record ID.
|
|
1559
|
+
*/
|
|
1560
|
+
export function enqueueRedeemOpenWithBuilder(options: EnqueueRedeemOpenWithBuilderOptions) {
|
|
1561
|
+
const packageAddress =
|
|
1562
|
+
options.package ?? options.config?.sessionsPackageId ?? '@local-pkg/deepbook_sessions';
|
|
1563
|
+
const argumentsTypes = [
|
|
1564
|
+
null,
|
|
1565
|
+
null,
|
|
1566
|
+
null,
|
|
1567
|
+
null,
|
|
1568
|
+
null,
|
|
1569
|
+
null,
|
|
1570
|
+
null,
|
|
1571
|
+
null,
|
|
1572
|
+
null,
|
|
1573
|
+
null,
|
|
1574
|
+
null,
|
|
1575
|
+
null,
|
|
1576
|
+
'u64',
|
|
1577
|
+
'u64',
|
|
1578
|
+
'u64',
|
|
1579
|
+
'u64',
|
|
1580
|
+
'u64',
|
|
1581
|
+
'0x2::accumulator::AccumulatorRoot',
|
|
1582
|
+
'0x2::clock::Clock',
|
|
1583
|
+
] satisfies (string | null)[];
|
|
1584
|
+
const parameterNames = [
|
|
1585
|
+
'queue',
|
|
1586
|
+
'market',
|
|
1587
|
+
'accountRegistry',
|
|
1588
|
+
'wrapper',
|
|
1589
|
+
'sessionsConfig',
|
|
1590
|
+
'desk',
|
|
1591
|
+
'config',
|
|
1592
|
+
'propbookRegistry',
|
|
1593
|
+
'pyth',
|
|
1594
|
+
'bsValues',
|
|
1595
|
+
'bsSvi',
|
|
1596
|
+
'code',
|
|
1597
|
+
'builderFeePerContract',
|
|
1598
|
+
'recordId',
|
|
1599
|
+
'closeQuantity',
|
|
1600
|
+
'minProbability',
|
|
1601
|
+
'minProceeds',
|
|
1602
|
+
];
|
|
1603
|
+
return (tx: Transaction) =>
|
|
1604
|
+
tx.moveCall({
|
|
1605
|
+
package: packageAddress,
|
|
1606
|
+
module: 'sessions',
|
|
1607
|
+
function: 'enqueue_redeem_open_with_builder',
|
|
1608
|
+
arguments: normalizeMoveArguments(
|
|
1609
|
+
{
|
|
1610
|
+
...options.arguments,
|
|
1611
|
+
sessionsConfig: options.arguments?.sessionsConfig ?? options.config?.sessionsConfig,
|
|
1612
|
+
},
|
|
1613
|
+
argumentsTypes,
|
|
1614
|
+
parameterNames,
|
|
1615
|
+
),
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
// GENERATED by `pnpm sync-deployment` from the deploy tooling's own manifest
|
|
5
|
-
// (`packages/predict/deployment/deployment.mainnet.json`) and the Predict
|
|
6
|
-
// `Published.toml` records for current call targets and original type IDs. Do not
|
|
7
|
-
// the next regeneration overwrites it, and a hand-patched id is exactly the drift
|
|
8
|
-
// file exists to prevent. To move to a new deployment, check the sibling deepbookv3
|
|
5
|
+
// (`packages/predict/deployment/deployment.mainnet.json`) and the Predict, Sessions and
|
|
6
|
+
// account `Published.toml` records for current call targets and original type IDs. Do not
|
|
7
|
+
// hand-edit: the next regeneration overwrites it, and a hand-patched id is exactly the drift
|
|
8
|
+
// this file exists to prevent. To move to a new deployment, check the sibling deepbookv3
|
|
9
9
|
// checkout out to the new anchor and re-run the script.
|
|
10
10
|
//
|
|
11
11
|
// Deployment: deepbook-predict-mainnet
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
// GENERATED by `pnpm sync-deployment` from the deploy tooling's own manifest
|
|
5
|
-
// (`packages/predict/deployment/deployment.testnet.json`) and the Predict
|
|
6
|
-
// `Published.toml` records for current call targets and original type IDs. Do not
|
|
7
|
-
// the next regeneration overwrites it, and a hand-patched id is exactly the drift
|
|
8
|
-
// file exists to prevent. To move to a new deployment, check the sibling deepbookv3
|
|
5
|
+
// (`packages/predict/deployment/deployment.testnet.json`) and the Predict, Sessions and
|
|
6
|
+
// account `Published.toml` records for current call targets and original type IDs. Do not
|
|
7
|
+
// hand-edit: the next regeneration overwrites it, and a hand-patched id is exactly the drift
|
|
8
|
+
// this file exists to prevent. To move to a new deployment, check the sibling deepbookv3
|
|
9
9
|
// checkout out to the new anchor and re-run the script.
|
|
10
10
|
//
|
|
11
11
|
// Deployment: deepbook-predict-testnet
|
|
@@ -37,6 +37,11 @@ export const TESTNET_DEPLOYMENT: DeploymentInfo = Object.freeze({
|
|
|
37
37
|
export const TESTNET_ACCOUNT: AccountIds = Object.freeze({
|
|
38
38
|
accountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
|
|
39
39
|
accountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',
|
|
40
|
+
/**
|
|
41
|
+
* Call target of every account call. Type tags and derived addresses keep
|
|
42
|
+
* `accountPackageId`, the original.
|
|
43
|
+
*/
|
|
44
|
+
accountPackageIdLatest: '0x4401eae9984271faf178b6a43c0f2f144b6274b6406aab09bf9db0b3c2b441a1',
|
|
40
45
|
});
|
|
41
46
|
|
|
42
47
|
/**
|
|
@@ -47,11 +52,16 @@ export const TESTNET_ACCOUNT: AccountIds = Object.freeze({
|
|
|
47
52
|
* the package root for one id.
|
|
48
53
|
*/
|
|
49
54
|
export const TESTNET_SESSIONS: SessionsIds = Object.freeze({
|
|
50
|
-
sessionsPackageId: '
|
|
55
|
+
sessionsPackageId: '0x13108df3e049a45ef396e49477b50fea157e7b9994ab835e72d3726855a9d651',
|
|
51
56
|
sessionsPackageIdV1: '0x1908eee49d7a08d74a537d7f23766b363a145517fe0d3e0d85635d1682831ffd',
|
|
52
57
|
sessionsConfig: '0xc096b97289821b27badfdf758d614bbbfa386f93d3faa409ecc1fcc6075d1186',
|
|
53
58
|
accountPackageId: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
|
|
54
59
|
accountRegistry: '0x511e11f7f5d5c1043d795180657603d59e06e90fbfcafd3f90c67ff0836bbd0c',
|
|
60
|
+
/**
|
|
61
|
+
* Call target of every account call. Type tags and derived addresses keep
|
|
62
|
+
* `accountPackageId`, the original.
|
|
63
|
+
*/
|
|
64
|
+
accountPackageIdLatest: '0x4401eae9984271faf178b6a43c0f2f144b6274b6406aab09bf9db0b3c2b441a1',
|
|
55
65
|
deepbookRegistry: '0x7c256edbda983a2cd6f946655f4bf3f00a41043993781f8674a7046e8c0e11d1',
|
|
56
66
|
deepbookCoreAccountPackageId:
|
|
57
67
|
'0x2a3a5f51e1c566e0a77c667596a8212d036b44aeac32790991c9eb97580fabb1',
|
|
@@ -75,11 +85,12 @@ export const TESTNET_UNITS: DeploymentUnits = Object.freeze({
|
|
|
75
85
|
export const TESTNET_PREDICT: PredictIds = Object.freeze({
|
|
76
86
|
network: 'testnet',
|
|
77
87
|
packages: Object.freeze({
|
|
78
|
-
predict: '
|
|
88
|
+
predict: '0x7fc9677ddefd072c414c6dee981ca04017244087cd45b8386ce7844fb66838ce',
|
|
79
89
|
predictV1: '0x59d71119e990573a738dd3ff9c4c7d28d6893af69c87c1a7f3a2e90e280ce2f4',
|
|
80
90
|
account: '0x1e57d6554b99e4ca68330322c3e5c409ba1b681642726b603bf1be92c1840ca9',
|
|
91
|
+
accountLatest: '0x4401eae9984271faf178b6a43c0f2f144b6274b6406aab09bf9db0b3c2b441a1',
|
|
81
92
|
propbook: '0xa83f9d7651de09672a40cea371c387bf954e0f3092947670d71428d4fbc9edd9',
|
|
82
|
-
predictOrders: '
|
|
93
|
+
predictOrders: '0xc5869f5bc0514da9df93e7aee491045cfcdf6a3d1e436bc337241d6ef75289ae',
|
|
83
94
|
predictOrdersV1: '0xd723ddef890bff70bd492cd384c913b5e7daeb6e8900cb3a5606546ac4f3907f',
|
|
84
95
|
predictMath: '0x2039bac8c1ec51ce3d7cb366ec36b45fdbbafe1aa2aaea0ed9bef52db40e1562',
|
|
85
96
|
}),
|