@typemove/sui 1.0.0-rc.10

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.
Files changed (30) hide show
  1. package/LICENSE +201 -0
  2. package/dist/codegen/run.js +19 -0
  3. package/dist/index.js +5 -0
  4. package/package.json +43 -0
  5. package/src/abis/0x1.json +2063 -0
  6. package/src/abis/0x2.json +13410 -0
  7. package/src/abis/0x3.json +8645 -0
  8. package/src/builtin/0x1.ts +2909 -0
  9. package/src/builtin/0x2.ts +14389 -0
  10. package/src/builtin/0x3.ts +4385 -0
  11. package/src/builtin/index.ts +6 -0
  12. package/src/codegen/codegen.ts +244 -0
  13. package/src/codegen/index.ts +1 -0
  14. package/src/codegen/run.ts +20 -0
  15. package/src/index.ts +8 -0
  16. package/src/models.ts +24 -0
  17. package/src/module-client.ts +23 -0
  18. package/src/move-coder.ts +147 -0
  19. package/src/sui-chain-adapter.ts +113 -0
  20. package/src/tests/abis/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.json +265 -0
  21. package/src/tests/abis/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.json +2429 -0
  22. package/src/tests/abis/testnet/0xdee9.json +5523 -0
  23. package/src/tests/abis/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.json +10060 -0
  24. package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +295 -0
  25. package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +2745 -0
  26. package/src/tests/types/testnet/0xdee9.ts +3148 -0
  27. package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +10516 -0
  28. package/src/tests/types/testnet/index.ts +7 -0
  29. package/src/to-internal.ts +129 -0
  30. package/src/utils.ts +62 -0
@@ -0,0 +1,3148 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ /* Generated modules for account 0xdee9 */
6
+
7
+ import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
8
+ import { MoveCoder, defaultMoveCoder, TypedEventInstance } from "@typemove/sui";
9
+ import { SuiAddress, ObjectId } from "@mysten/sui.js";
10
+
11
+ import { ZERO_ADDRESS } from "@typemove/sui";
12
+ import {
13
+ TransactionBlock,
14
+ TransactionArgument,
15
+ ObjectCallArg,
16
+ JsonRpcProvider,
17
+ } from "@mysten/sui.js";
18
+
19
+ import { _0x2 } from "@typemove/sui/builtin";
20
+ import { _0x1 } from "@typemove/sui/builtin";
21
+
22
+ export namespace clob {
23
+ export interface Order {
24
+ order_id: bigint;
25
+ price: bigint;
26
+ quantity: bigint;
27
+ is_bid: Boolean;
28
+ owner: _0x2.object_.ID;
29
+ expire_timestamp: bigint;
30
+ }
31
+
32
+ export namespace Order {
33
+ export const TYPE_QNAME = "0xdee9::clob::Order";
34
+
35
+ const TYPE = new TypeDescriptor<Order>(Order.TYPE_QNAME);
36
+
37
+ export function type(): TypeDescriptor<Order> {
38
+ return TYPE.apply();
39
+ }
40
+ }
41
+
42
+ export interface OrderCanceled<T0, T1> {
43
+ pool_id: _0x2.object_.ID;
44
+ order_id: bigint;
45
+ is_bid: Boolean;
46
+ owner: _0x2.object_.ID;
47
+ base_asset_quantity_canceled: bigint;
48
+ price: bigint;
49
+ }
50
+
51
+ export namespace OrderCanceled {
52
+ export const TYPE_QNAME = "0xdee9::clob::OrderCanceled";
53
+
54
+ const TYPE = new TypeDescriptor<OrderCanceled<any, any>>(
55
+ OrderCanceled.TYPE_QNAME
56
+ );
57
+
58
+ export function type<T0, T1>(
59
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
60
+ arg1: TypeDescriptor<T1> = ANY_TYPE
61
+ ): TypeDescriptor<OrderCanceled<T0, T1>> {
62
+ return TYPE.apply(arg0, arg1);
63
+ }
64
+ }
65
+
66
+ export interface OrderCanceledInstance
67
+ extends TypedEventInstance<OrderCanceled<any, any>> {
68
+ data_decoded: OrderCanceled<any, any>;
69
+ type_arguments: [string, string];
70
+ }
71
+
72
+ export interface OrderFilled<T0, T1> {
73
+ pool_id: _0x2.object_.ID;
74
+ order_id: bigint;
75
+ is_bid: Boolean;
76
+ owner: _0x2.object_.ID;
77
+ total_quantity: bigint;
78
+ base_asset_quantity_filled: bigint;
79
+ base_asset_quantity_remaining: bigint;
80
+ price: bigint;
81
+ }
82
+
83
+ export namespace OrderFilled {
84
+ export const TYPE_QNAME = "0xdee9::clob::OrderFilled";
85
+
86
+ const TYPE = new TypeDescriptor<OrderFilled<any, any>>(
87
+ OrderFilled.TYPE_QNAME
88
+ );
89
+
90
+ export function type<T0, T1>(
91
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
92
+ arg1: TypeDescriptor<T1> = ANY_TYPE
93
+ ): TypeDescriptor<OrderFilled<T0, T1>> {
94
+ return TYPE.apply(arg0, arg1);
95
+ }
96
+ }
97
+
98
+ export interface OrderFilledInstance
99
+ extends TypedEventInstance<OrderFilled<any, any>> {
100
+ data_decoded: OrderFilled<any, any>;
101
+ type_arguments: [string, string];
102
+ }
103
+
104
+ export interface OrderFilledV2<T0, T1> {
105
+ pool_id: _0x2.object_.ID;
106
+ order_id: bigint;
107
+ is_bid: Boolean;
108
+ owner: _0x2.object_.ID;
109
+ total_quantity: bigint;
110
+ base_asset_quantity_filled: bigint;
111
+ base_asset_quantity_remaining: bigint;
112
+ price: bigint;
113
+ taker_commission: bigint;
114
+ maker_rebates: bigint;
115
+ }
116
+
117
+ export namespace OrderFilledV2 {
118
+ export const TYPE_QNAME = "0xdee9::clob::OrderFilledV2";
119
+
120
+ const TYPE = new TypeDescriptor<OrderFilledV2<any, any>>(
121
+ OrderFilledV2.TYPE_QNAME
122
+ );
123
+
124
+ export function type<T0, T1>(
125
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
126
+ arg1: TypeDescriptor<T1> = ANY_TYPE
127
+ ): TypeDescriptor<OrderFilledV2<T0, T1>> {
128
+ return TYPE.apply(arg0, arg1);
129
+ }
130
+ }
131
+
132
+ export interface OrderFilledV2Instance
133
+ extends TypedEventInstance<OrderFilledV2<any, any>> {
134
+ data_decoded: OrderFilledV2<any, any>;
135
+ type_arguments: [string, string];
136
+ }
137
+
138
+ export interface OrderPlaced<T0, T1> {
139
+ pool_id: _0x2.object_.ID;
140
+ order_id: bigint;
141
+ is_bid: Boolean;
142
+ owner: _0x2.object_.ID;
143
+ base_asset_quantity_placed: bigint;
144
+ price: bigint;
145
+ }
146
+
147
+ export namespace OrderPlaced {
148
+ export const TYPE_QNAME = "0xdee9::clob::OrderPlaced";
149
+
150
+ const TYPE = new TypeDescriptor<OrderPlaced<any, any>>(
151
+ OrderPlaced.TYPE_QNAME
152
+ );
153
+
154
+ export function type<T0, T1>(
155
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
156
+ arg1: TypeDescriptor<T1> = ANY_TYPE
157
+ ): TypeDescriptor<OrderPlaced<T0, T1>> {
158
+ return TYPE.apply(arg0, arg1);
159
+ }
160
+ }
161
+
162
+ export interface OrderPlacedInstance
163
+ extends TypedEventInstance<OrderPlaced<any, any>> {
164
+ data_decoded: OrderPlaced<any, any>;
165
+ type_arguments: [string, string];
166
+ }
167
+
168
+ export interface OrderPlacedV2<T0, T1> {
169
+ pool_id: _0x2.object_.ID;
170
+ order_id: bigint;
171
+ is_bid: Boolean;
172
+ owner: _0x2.object_.ID;
173
+ base_asset_quantity_placed: bigint;
174
+ price: bigint;
175
+ expire_timestamp: bigint;
176
+ }
177
+
178
+ export namespace OrderPlacedV2 {
179
+ export const TYPE_QNAME = "0xdee9::clob::OrderPlacedV2";
180
+
181
+ const TYPE = new TypeDescriptor<OrderPlacedV2<any, any>>(
182
+ OrderPlacedV2.TYPE_QNAME
183
+ );
184
+
185
+ export function type<T0, T1>(
186
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
187
+ arg1: TypeDescriptor<T1> = ANY_TYPE
188
+ ): TypeDescriptor<OrderPlacedV2<T0, T1>> {
189
+ return TYPE.apply(arg0, arg1);
190
+ }
191
+ }
192
+
193
+ export interface OrderPlacedV2Instance
194
+ extends TypedEventInstance<OrderPlacedV2<any, any>> {
195
+ data_decoded: OrderPlacedV2<any, any>;
196
+ type_arguments: [string, string];
197
+ }
198
+
199
+ export interface Pool<T0, T1> {
200
+ id: _0x2.object_.UID;
201
+ bids: critbit.CritbitTree<clob.TickLevel>;
202
+ asks: critbit.CritbitTree<clob.TickLevel>;
203
+ next_bid_order_id: bigint;
204
+ next_ask_order_id: bigint;
205
+ usr_open_orders: _0x2.table.Table<
206
+ _0x2.object_.ID,
207
+ _0x2.linked_table.LinkedTable<bigint, bigint>
208
+ >;
209
+ taker_fee_rate: bigint;
210
+ maker_rebate_rate: bigint;
211
+ tick_size: bigint;
212
+ lot_size: bigint;
213
+ base_custodian: custodian.Custodian<T0>;
214
+ quote_custodian: custodian.Custodian<T1>;
215
+ creation_fee: _0x2.balance.Balance<_0x2.sui.SUI>;
216
+ base_asset_trading_fees: _0x2.balance.Balance<T0>;
217
+ quote_asset_trading_fees: _0x2.balance.Balance<T1>;
218
+ }
219
+
220
+ export namespace Pool {
221
+ export const TYPE_QNAME = "0xdee9::clob::Pool";
222
+
223
+ const TYPE = new TypeDescriptor<Pool<any, any>>(Pool.TYPE_QNAME);
224
+
225
+ export function type<T0, T1>(
226
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
227
+ arg1: TypeDescriptor<T1> = ANY_TYPE
228
+ ): TypeDescriptor<Pool<T0, T1>> {
229
+ return TYPE.apply(arg0, arg1);
230
+ }
231
+ }
232
+
233
+ export interface PoolCreated {
234
+ pool_id: _0x2.object_.ID;
235
+ base_asset: _0x1.type_name.TypeName;
236
+ quote_asset: _0x1.type_name.TypeName;
237
+ taker_fee_rate: bigint;
238
+ maker_rebate_rate: bigint;
239
+ tick_size: bigint;
240
+ lot_size: bigint;
241
+ }
242
+
243
+ export namespace PoolCreated {
244
+ export const TYPE_QNAME = "0xdee9::clob::PoolCreated";
245
+
246
+ const TYPE = new TypeDescriptor<PoolCreated>(PoolCreated.TYPE_QNAME);
247
+
248
+ export function type(): TypeDescriptor<PoolCreated> {
249
+ return TYPE.apply();
250
+ }
251
+ }
252
+
253
+ export interface PoolCreatedInstance extends TypedEventInstance<PoolCreated> {
254
+ data_decoded: PoolCreated;
255
+ type_arguments: [];
256
+ }
257
+
258
+ export interface TickLevel {
259
+ price: bigint;
260
+ open_orders: _0x2.linked_table.LinkedTable<bigint, clob.Order>;
261
+ }
262
+
263
+ export namespace TickLevel {
264
+ export const TYPE_QNAME = "0xdee9::clob::TickLevel";
265
+
266
+ const TYPE = new TypeDescriptor<TickLevel>(TickLevel.TYPE_QNAME);
267
+
268
+ export function type(): TypeDescriptor<TickLevel> {
269
+ return TYPE.apply();
270
+ }
271
+ }
272
+
273
+ export namespace builder {
274
+ export function accountBalance<T0 = any, T1 = any>(
275
+ tx: TransactionBlock,
276
+ args: [
277
+ ObjectId | ObjectCallArg | TransactionArgument,
278
+ ObjectId | ObjectCallArg | TransactionArgument
279
+ ],
280
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
281
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
282
+ const _args: any[] = [];
283
+ _args.push(
284
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
285
+ );
286
+ _args.push(
287
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
288
+ );
289
+
290
+ // @ts-ignore
291
+ return tx.moveCall({
292
+ target: "0xdee9::clob::account_balance",
293
+ arguments: _args,
294
+ typeArguments: [
295
+ typeof typeArguments[0] === "string"
296
+ ? typeArguments[0]
297
+ : typeArguments[0].getSignature(),
298
+ typeof typeArguments[1] === "string"
299
+ ? typeArguments[1]
300
+ : typeArguments[1].getSignature(),
301
+ ],
302
+ });
303
+ }
304
+ export function batchCancelOrder<T0 = any, T1 = any>(
305
+ tx: TransactionBlock,
306
+ args: [
307
+ ObjectId | ObjectCallArg | TransactionArgument,
308
+ (ObjectId | ObjectCallArg)[] | TransactionArgument,
309
+ ObjectId | ObjectCallArg | TransactionArgument
310
+ ],
311
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
312
+ ): TransactionArgument &
313
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
314
+ const _args: any[] = [];
315
+ _args.push(
316
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
317
+ );
318
+ _args.push(
319
+ TransactionArgument.is(args[1])
320
+ ? args[1]
321
+ : tx.makeMoveVec({
322
+ objects: args[1].map((a: any) => tx.object(a)),
323
+ // type: TODO
324
+ })
325
+ );
326
+ _args.push(
327
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
328
+ );
329
+
330
+ // @ts-ignore
331
+ return tx.moveCall({
332
+ target: "0xdee9::clob::batch_cancel_order",
333
+ arguments: _args,
334
+ typeArguments: [
335
+ typeof typeArguments[0] === "string"
336
+ ? typeArguments[0]
337
+ : typeArguments[0].getSignature(),
338
+ typeof typeArguments[1] === "string"
339
+ ? typeArguments[1]
340
+ : typeArguments[1].getSignature(),
341
+ ],
342
+ });
343
+ }
344
+ export function cancelAllOrders<T0 = any, T1 = any>(
345
+ tx: TransactionBlock,
346
+ args: [
347
+ ObjectId | ObjectCallArg | TransactionArgument,
348
+ ObjectId | ObjectCallArg | TransactionArgument
349
+ ],
350
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
351
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
352
+ const _args: any[] = [];
353
+ _args.push(
354
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
355
+ );
356
+ _args.push(
357
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
358
+ );
359
+
360
+ // @ts-ignore
361
+ return tx.moveCall({
362
+ target: "0xdee9::clob::cancel_all_orders",
363
+ arguments: _args,
364
+ typeArguments: [
365
+ typeof typeArguments[0] === "string"
366
+ ? typeArguments[0]
367
+ : typeArguments[0].getSignature(),
368
+ typeof typeArguments[1] === "string"
369
+ ? typeArguments[1]
370
+ : typeArguments[1].getSignature(),
371
+ ],
372
+ });
373
+ }
374
+ export function cancelOrder<T0 = any, T1 = any>(
375
+ tx: TransactionBlock,
376
+ args: [
377
+ ObjectId | ObjectCallArg | TransactionArgument,
378
+ bigint | TransactionArgument,
379
+ ObjectId | ObjectCallArg | TransactionArgument
380
+ ],
381
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
382
+ ): TransactionArgument &
383
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
384
+ const _args: any[] = [];
385
+ _args.push(
386
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
387
+ );
388
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
389
+ _args.push(
390
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
391
+ );
392
+
393
+ // @ts-ignore
394
+ return tx.moveCall({
395
+ target: "0xdee9::clob::cancel_order",
396
+ arguments: _args,
397
+ typeArguments: [
398
+ typeof typeArguments[0] === "string"
399
+ ? typeArguments[0]
400
+ : typeArguments[0].getSignature(),
401
+ typeof typeArguments[1] === "string"
402
+ ? typeArguments[1]
403
+ : typeArguments[1].getSignature(),
404
+ ],
405
+ });
406
+ }
407
+ export function createAccount(
408
+ tx: TransactionBlock,
409
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
410
+ ): TransactionArgument & [TransactionArgument] {
411
+ const _args: any[] = [];
412
+ _args.push(
413
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
414
+ );
415
+
416
+ // @ts-ignore
417
+ return tx.moveCall({
418
+ target: "0xdee9::clob::create_account",
419
+ arguments: _args,
420
+ });
421
+ }
422
+ export function createPool<T0 = any, T1 = any>(
423
+ tx: TransactionBlock,
424
+ args: [
425
+ bigint | TransactionArgument,
426
+ bigint | TransactionArgument,
427
+ _0x2.coin.Coin<_0x2.sui.SUI> | TransactionArgument,
428
+ ObjectId | ObjectCallArg | TransactionArgument
429
+ ],
430
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
431
+ ): TransactionArgument &
432
+ [
433
+ TransactionArgument,
434
+ TransactionArgument,
435
+ TransactionArgument,
436
+ TransactionArgument
437
+ ] {
438
+ const _args: any[] = [];
439
+ _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
440
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
441
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
442
+ _args.push(
443
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
444
+ );
445
+
446
+ // @ts-ignore
447
+ return tx.moveCall({
448
+ target: "0xdee9::clob::create_pool",
449
+ arguments: _args,
450
+ typeArguments: [
451
+ typeof typeArguments[0] === "string"
452
+ ? typeArguments[0]
453
+ : typeArguments[0].getSignature(),
454
+ typeof typeArguments[1] === "string"
455
+ ? typeArguments[1]
456
+ : typeArguments[1].getSignature(),
457
+ ],
458
+ });
459
+ }
460
+ export function depositBase<T0 = any, T1 = any>(
461
+ tx: TransactionBlock,
462
+ args: [
463
+ ObjectId | ObjectCallArg | TransactionArgument,
464
+ _0x2.coin.Coin<T0> | TransactionArgument,
465
+ ObjectId | ObjectCallArg | TransactionArgument
466
+ ],
467
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
468
+ ): TransactionArgument &
469
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
470
+ const _args: any[] = [];
471
+ _args.push(
472
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
473
+ );
474
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
475
+ _args.push(
476
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
477
+ );
478
+
479
+ // @ts-ignore
480
+ return tx.moveCall({
481
+ target: "0xdee9::clob::deposit_base",
482
+ arguments: _args,
483
+ typeArguments: [
484
+ typeof typeArguments[0] === "string"
485
+ ? typeArguments[0]
486
+ : typeArguments[0].getSignature(),
487
+ typeof typeArguments[1] === "string"
488
+ ? typeArguments[1]
489
+ : typeArguments[1].getSignature(),
490
+ ],
491
+ });
492
+ }
493
+ export function depositQuote<T0 = any, T1 = any>(
494
+ tx: TransactionBlock,
495
+ args: [
496
+ ObjectId | ObjectCallArg | TransactionArgument,
497
+ _0x2.coin.Coin<T1> | TransactionArgument,
498
+ ObjectId | ObjectCallArg | TransactionArgument
499
+ ],
500
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
501
+ ): TransactionArgument &
502
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
503
+ const _args: any[] = [];
504
+ _args.push(
505
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
506
+ );
507
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
508
+ _args.push(
509
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
510
+ );
511
+
512
+ // @ts-ignore
513
+ return tx.moveCall({
514
+ target: "0xdee9::clob::deposit_quote",
515
+ arguments: _args,
516
+ typeArguments: [
517
+ typeof typeArguments[0] === "string"
518
+ ? typeArguments[0]
519
+ : typeArguments[0].getSignature(),
520
+ typeof typeArguments[1] === "string"
521
+ ? typeArguments[1]
522
+ : typeArguments[1].getSignature(),
523
+ ],
524
+ });
525
+ }
526
+ export function getLevel2BookStatusAskSide<T0 = any, T1 = any>(
527
+ tx: TransactionBlock,
528
+ args: [
529
+ ObjectId | ObjectCallArg | TransactionArgument,
530
+ bigint | TransactionArgument,
531
+ bigint | TransactionArgument,
532
+ ObjectId | ObjectCallArg | TransactionArgument
533
+ ],
534
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
535
+ ): TransactionArgument &
536
+ [
537
+ TransactionArgument,
538
+ TransactionArgument,
539
+ TransactionArgument,
540
+ TransactionArgument
541
+ ] {
542
+ const _args: any[] = [];
543
+ _args.push(
544
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
545
+ );
546
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
547
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
548
+ _args.push(
549
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
550
+ );
551
+
552
+ // @ts-ignore
553
+ return tx.moveCall({
554
+ target: "0xdee9::clob::get_level2_book_status_ask_side",
555
+ arguments: _args,
556
+ typeArguments: [
557
+ typeof typeArguments[0] === "string"
558
+ ? typeArguments[0]
559
+ : typeArguments[0].getSignature(),
560
+ typeof typeArguments[1] === "string"
561
+ ? typeArguments[1]
562
+ : typeArguments[1].getSignature(),
563
+ ],
564
+ });
565
+ }
566
+ export function getLevel2BookStatusBidSide<T0 = any, T1 = any>(
567
+ tx: TransactionBlock,
568
+ args: [
569
+ ObjectId | ObjectCallArg | TransactionArgument,
570
+ bigint | TransactionArgument,
571
+ bigint | TransactionArgument,
572
+ ObjectId | ObjectCallArg | TransactionArgument
573
+ ],
574
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
575
+ ): TransactionArgument &
576
+ [
577
+ TransactionArgument,
578
+ TransactionArgument,
579
+ TransactionArgument,
580
+ TransactionArgument
581
+ ] {
582
+ const _args: any[] = [];
583
+ _args.push(
584
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
585
+ );
586
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
587
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
588
+ _args.push(
589
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
590
+ );
591
+
592
+ // @ts-ignore
593
+ return tx.moveCall({
594
+ target: "0xdee9::clob::get_level2_book_status_bid_side",
595
+ arguments: _args,
596
+ typeArguments: [
597
+ typeof typeArguments[0] === "string"
598
+ ? typeArguments[0]
599
+ : typeArguments[0].getSignature(),
600
+ typeof typeArguments[1] === "string"
601
+ ? typeArguments[1]
602
+ : typeArguments[1].getSignature(),
603
+ ],
604
+ });
605
+ }
606
+ export function getMarketPrice<T0 = any, T1 = any>(
607
+ tx: TransactionBlock,
608
+ args: [ObjectId | ObjectCallArg | TransactionArgument],
609
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
610
+ ): TransactionArgument & [TransactionArgument] {
611
+ const _args: any[] = [];
612
+ _args.push(
613
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
614
+ );
615
+
616
+ // @ts-ignore
617
+ return tx.moveCall({
618
+ target: "0xdee9::clob::get_market_price",
619
+ arguments: _args,
620
+ typeArguments: [
621
+ typeof typeArguments[0] === "string"
622
+ ? typeArguments[0]
623
+ : typeArguments[0].getSignature(),
624
+ typeof typeArguments[1] === "string"
625
+ ? typeArguments[1]
626
+ : typeArguments[1].getSignature(),
627
+ ],
628
+ });
629
+ }
630
+ export function getOrderStatus<T0 = any, T1 = any>(
631
+ tx: TransactionBlock,
632
+ args: [
633
+ ObjectId | ObjectCallArg | TransactionArgument,
634
+ bigint | TransactionArgument,
635
+ ObjectId | ObjectCallArg | TransactionArgument
636
+ ],
637
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
638
+ ): TransactionArgument &
639
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
640
+ const _args: any[] = [];
641
+ _args.push(
642
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
643
+ );
644
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
645
+ _args.push(
646
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
647
+ );
648
+
649
+ // @ts-ignore
650
+ return tx.moveCall({
651
+ target: "0xdee9::clob::get_order_status",
652
+ arguments: _args,
653
+ typeArguments: [
654
+ typeof typeArguments[0] === "string"
655
+ ? typeArguments[0]
656
+ : typeArguments[0].getSignature(),
657
+ typeof typeArguments[1] === "string"
658
+ ? typeArguments[1]
659
+ : typeArguments[1].getSignature(),
660
+ ],
661
+ });
662
+ }
663
+ export function listOpenOrders<T0 = any, T1 = any>(
664
+ tx: TransactionBlock,
665
+ args: [
666
+ ObjectId | ObjectCallArg | TransactionArgument,
667
+ ObjectId | ObjectCallArg | TransactionArgument
668
+ ],
669
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
670
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
671
+ const _args: any[] = [];
672
+ _args.push(
673
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
674
+ );
675
+ _args.push(
676
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
677
+ );
678
+
679
+ // @ts-ignore
680
+ return tx.moveCall({
681
+ target: "0xdee9::clob::list_open_orders",
682
+ arguments: _args,
683
+ typeArguments: [
684
+ typeof typeArguments[0] === "string"
685
+ ? typeArguments[0]
686
+ : typeArguments[0].getSignature(),
687
+ typeof typeArguments[1] === "string"
688
+ ? typeArguments[1]
689
+ : typeArguments[1].getSignature(),
690
+ ],
691
+ });
692
+ }
693
+ export function placeLimitOrder<T0 = any, T1 = any>(
694
+ tx: TransactionBlock,
695
+ args: [
696
+ ObjectId | ObjectCallArg | TransactionArgument,
697
+ bigint | TransactionArgument,
698
+ bigint | TransactionArgument,
699
+ Boolean | TransactionArgument,
700
+ bigint | TransactionArgument,
701
+ number | TransactionArgument,
702
+ ObjectId | ObjectCallArg | TransactionArgument,
703
+ ObjectId | ObjectCallArg | TransactionArgument,
704
+ ObjectId | ObjectCallArg | TransactionArgument
705
+ ],
706
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
707
+ ): TransactionArgument &
708
+ [
709
+ TransactionArgument,
710
+ TransactionArgument,
711
+ TransactionArgument,
712
+ TransactionArgument,
713
+ TransactionArgument,
714
+ TransactionArgument,
715
+ TransactionArgument,
716
+ TransactionArgument,
717
+ TransactionArgument
718
+ ] {
719
+ const _args: any[] = [];
720
+ _args.push(
721
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
722
+ );
723
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
724
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
725
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
726
+ _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
727
+ _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
728
+ _args.push(
729
+ TransactionArgument.is(args[6]) ? args[6] : tx.object(args[6])
730
+ );
731
+ _args.push(
732
+ TransactionArgument.is(args[7]) ? args[7] : tx.object(args[7])
733
+ );
734
+ _args.push(
735
+ TransactionArgument.is(args[8]) ? args[8] : tx.object(args[8])
736
+ );
737
+
738
+ // @ts-ignore
739
+ return tx.moveCall({
740
+ target: "0xdee9::clob::place_limit_order",
741
+ arguments: _args,
742
+ typeArguments: [
743
+ typeof typeArguments[0] === "string"
744
+ ? typeArguments[0]
745
+ : typeArguments[0].getSignature(),
746
+ typeof typeArguments[1] === "string"
747
+ ? typeArguments[1]
748
+ : typeArguments[1].getSignature(),
749
+ ],
750
+ });
751
+ }
752
+ export function placeMarketOrder<T0 = any, T1 = any>(
753
+ tx: TransactionBlock,
754
+ args: [
755
+ ObjectId | ObjectCallArg | TransactionArgument,
756
+ bigint | TransactionArgument,
757
+ Boolean | TransactionArgument,
758
+ _0x2.coin.Coin<T0> | TransactionArgument,
759
+ _0x2.coin.Coin<T1> | TransactionArgument,
760
+ ObjectId | ObjectCallArg | TransactionArgument,
761
+ ObjectId | ObjectCallArg | TransactionArgument
762
+ ],
763
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
764
+ ): TransactionArgument &
765
+ [
766
+ TransactionArgument,
767
+ TransactionArgument,
768
+ TransactionArgument,
769
+ TransactionArgument,
770
+ TransactionArgument,
771
+ TransactionArgument,
772
+ TransactionArgument
773
+ ] {
774
+ const _args: any[] = [];
775
+ _args.push(
776
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
777
+ );
778
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
779
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
780
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
781
+ _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
782
+ _args.push(
783
+ TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5])
784
+ );
785
+ _args.push(
786
+ TransactionArgument.is(args[6]) ? args[6] : tx.object(args[6])
787
+ );
788
+
789
+ // @ts-ignore
790
+ return tx.moveCall({
791
+ target: "0xdee9::clob::place_market_order",
792
+ arguments: _args,
793
+ typeArguments: [
794
+ typeof typeArguments[0] === "string"
795
+ ? typeArguments[0]
796
+ : typeArguments[0].getSignature(),
797
+ typeof typeArguments[1] === "string"
798
+ ? typeArguments[1]
799
+ : typeArguments[1].getSignature(),
800
+ ],
801
+ });
802
+ }
803
+ export function swapExactBaseForQuote<T0 = any, T1 = any>(
804
+ tx: TransactionBlock,
805
+ args: [
806
+ ObjectId | ObjectCallArg | TransactionArgument,
807
+ bigint | TransactionArgument,
808
+ _0x2.coin.Coin<T0> | TransactionArgument,
809
+ _0x2.coin.Coin<T1> | TransactionArgument,
810
+ ObjectId | ObjectCallArg | TransactionArgument,
811
+ ObjectId | ObjectCallArg | TransactionArgument
812
+ ],
813
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
814
+ ): TransactionArgument &
815
+ [
816
+ TransactionArgument,
817
+ TransactionArgument,
818
+ TransactionArgument,
819
+ TransactionArgument,
820
+ TransactionArgument,
821
+ TransactionArgument
822
+ ] {
823
+ const _args: any[] = [];
824
+ _args.push(
825
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
826
+ );
827
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
828
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
829
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
830
+ _args.push(
831
+ TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4])
832
+ );
833
+ _args.push(
834
+ TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5])
835
+ );
836
+
837
+ // @ts-ignore
838
+ return tx.moveCall({
839
+ target: "0xdee9::clob::swap_exact_base_for_quote",
840
+ arguments: _args,
841
+ typeArguments: [
842
+ typeof typeArguments[0] === "string"
843
+ ? typeArguments[0]
844
+ : typeArguments[0].getSignature(),
845
+ typeof typeArguments[1] === "string"
846
+ ? typeArguments[1]
847
+ : typeArguments[1].getSignature(),
848
+ ],
849
+ });
850
+ }
851
+ export function swapExactQuoteForBase<T0 = any, T1 = any>(
852
+ tx: TransactionBlock,
853
+ args: [
854
+ ObjectId | ObjectCallArg | TransactionArgument,
855
+ bigint | TransactionArgument,
856
+ ObjectId | ObjectCallArg | TransactionArgument,
857
+ _0x2.coin.Coin<T1> | TransactionArgument,
858
+ ObjectId | ObjectCallArg | TransactionArgument
859
+ ],
860
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
861
+ ): TransactionArgument &
862
+ [
863
+ TransactionArgument,
864
+ TransactionArgument,
865
+ TransactionArgument,
866
+ TransactionArgument,
867
+ TransactionArgument
868
+ ] {
869
+ const _args: any[] = [];
870
+ _args.push(
871
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
872
+ );
873
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
874
+ _args.push(
875
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
876
+ );
877
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
878
+ _args.push(
879
+ TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4])
880
+ );
881
+
882
+ // @ts-ignore
883
+ return tx.moveCall({
884
+ target: "0xdee9::clob::swap_exact_quote_for_base",
885
+ arguments: _args,
886
+ typeArguments: [
887
+ typeof typeArguments[0] === "string"
888
+ ? typeArguments[0]
889
+ : typeArguments[0].getSignature(),
890
+ typeof typeArguments[1] === "string"
891
+ ? typeArguments[1]
892
+ : typeArguments[1].getSignature(),
893
+ ],
894
+ });
895
+ }
896
+ export function withdrawBase<T0 = any, T1 = any>(
897
+ tx: TransactionBlock,
898
+ args: [
899
+ ObjectId | ObjectCallArg | TransactionArgument,
900
+ bigint | TransactionArgument,
901
+ ObjectId | ObjectCallArg | TransactionArgument,
902
+ ObjectId | ObjectCallArg | TransactionArgument
903
+ ],
904
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
905
+ ): TransactionArgument &
906
+ [
907
+ TransactionArgument,
908
+ TransactionArgument,
909
+ TransactionArgument,
910
+ TransactionArgument
911
+ ] {
912
+ const _args: any[] = [];
913
+ _args.push(
914
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
915
+ );
916
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
917
+ _args.push(
918
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
919
+ );
920
+ _args.push(
921
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
922
+ );
923
+
924
+ // @ts-ignore
925
+ return tx.moveCall({
926
+ target: "0xdee9::clob::withdraw_base",
927
+ arguments: _args,
928
+ typeArguments: [
929
+ typeof typeArguments[0] === "string"
930
+ ? typeArguments[0]
931
+ : typeArguments[0].getSignature(),
932
+ typeof typeArguments[1] === "string"
933
+ ? typeArguments[1]
934
+ : typeArguments[1].getSignature(),
935
+ ],
936
+ });
937
+ }
938
+ export function withdrawQuote<T0 = any, T1 = any>(
939
+ tx: TransactionBlock,
940
+ args: [
941
+ ObjectId | ObjectCallArg | TransactionArgument,
942
+ bigint | TransactionArgument,
943
+ ObjectId | ObjectCallArg | TransactionArgument,
944
+ ObjectId | ObjectCallArg | TransactionArgument
945
+ ],
946
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
947
+ ): TransactionArgument &
948
+ [
949
+ TransactionArgument,
950
+ TransactionArgument,
951
+ TransactionArgument,
952
+ TransactionArgument
953
+ ] {
954
+ const _args: any[] = [];
955
+ _args.push(
956
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
957
+ );
958
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
959
+ _args.push(
960
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
961
+ );
962
+ _args.push(
963
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
964
+ );
965
+
966
+ // @ts-ignore
967
+ return tx.moveCall({
968
+ target: "0xdee9::clob::withdraw_quote",
969
+ arguments: _args,
970
+ typeArguments: [
971
+ typeof typeArguments[0] === "string"
972
+ ? typeArguments[0]
973
+ : typeArguments[0].getSignature(),
974
+ typeof typeArguments[1] === "string"
975
+ ? typeArguments[1]
976
+ : typeArguments[1].getSignature(),
977
+ ],
978
+ });
979
+ }
980
+ }
981
+ export namespace view {
982
+ export async function accountBalance<T0 = any, T1 = any>(
983
+ provider: JsonRpcProvider,
984
+ args: [
985
+ ObjectId | ObjectCallArg | TransactionArgument,
986
+ ObjectId | ObjectCallArg | TransactionArgument
987
+ ],
988
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
989
+ ) {
990
+ const tx = new TransactionBlock();
991
+ builder.accountBalance(tx, args, typeArguments);
992
+ const res = await provider.devInspectTransactionBlock({
993
+ transactionBlock: tx,
994
+ sender: ZERO_ADDRESS,
995
+ });
996
+ return res;
997
+ }
998
+ export async function batchCancelOrder<T0 = any, T1 = any>(
999
+ provider: JsonRpcProvider,
1000
+ args: [
1001
+ ObjectId | ObjectCallArg | TransactionArgument,
1002
+ (ObjectId | ObjectCallArg)[] | TransactionArgument,
1003
+ ObjectId | ObjectCallArg | TransactionArgument
1004
+ ],
1005
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1006
+ ) {
1007
+ const tx = new TransactionBlock();
1008
+ builder.batchCancelOrder(tx, args, typeArguments);
1009
+ const res = await provider.devInspectTransactionBlock({
1010
+ transactionBlock: tx,
1011
+ sender: ZERO_ADDRESS,
1012
+ });
1013
+ return res;
1014
+ }
1015
+ export async function cancelAllOrders<T0 = any, T1 = any>(
1016
+ provider: JsonRpcProvider,
1017
+ args: [
1018
+ ObjectId | ObjectCallArg | TransactionArgument,
1019
+ ObjectId | ObjectCallArg | TransactionArgument
1020
+ ],
1021
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1022
+ ) {
1023
+ const tx = new TransactionBlock();
1024
+ builder.cancelAllOrders(tx, args, typeArguments);
1025
+ const res = await provider.devInspectTransactionBlock({
1026
+ transactionBlock: tx,
1027
+ sender: ZERO_ADDRESS,
1028
+ });
1029
+ return res;
1030
+ }
1031
+ export async function cancelOrder<T0 = any, T1 = any>(
1032
+ provider: JsonRpcProvider,
1033
+ args: [
1034
+ ObjectId | ObjectCallArg | TransactionArgument,
1035
+ bigint | TransactionArgument,
1036
+ ObjectId | ObjectCallArg | TransactionArgument
1037
+ ],
1038
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1039
+ ) {
1040
+ const tx = new TransactionBlock();
1041
+ builder.cancelOrder(tx, args, typeArguments);
1042
+ const res = await provider.devInspectTransactionBlock({
1043
+ transactionBlock: tx,
1044
+ sender: ZERO_ADDRESS,
1045
+ });
1046
+ return res;
1047
+ }
1048
+ export async function createAccount(
1049
+ provider: JsonRpcProvider,
1050
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
1051
+ ) {
1052
+ const tx = new TransactionBlock();
1053
+ builder.createAccount(tx, args);
1054
+ const res = await provider.devInspectTransactionBlock({
1055
+ transactionBlock: tx,
1056
+ sender: ZERO_ADDRESS,
1057
+ });
1058
+ return res;
1059
+ }
1060
+ export async function createPool<T0 = any, T1 = any>(
1061
+ provider: JsonRpcProvider,
1062
+ args: [
1063
+ bigint | TransactionArgument,
1064
+ bigint | TransactionArgument,
1065
+ _0x2.coin.Coin<_0x2.sui.SUI> | TransactionArgument,
1066
+ ObjectId | ObjectCallArg | TransactionArgument
1067
+ ],
1068
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1069
+ ) {
1070
+ const tx = new TransactionBlock();
1071
+ builder.createPool(tx, args, typeArguments);
1072
+ const res = await provider.devInspectTransactionBlock({
1073
+ transactionBlock: tx,
1074
+ sender: ZERO_ADDRESS,
1075
+ });
1076
+ return res;
1077
+ }
1078
+ export async function depositBase<T0 = any, T1 = any>(
1079
+ provider: JsonRpcProvider,
1080
+ args: [
1081
+ ObjectId | ObjectCallArg | TransactionArgument,
1082
+ _0x2.coin.Coin<T0> | TransactionArgument,
1083
+ ObjectId | ObjectCallArg | TransactionArgument
1084
+ ],
1085
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1086
+ ) {
1087
+ const tx = new TransactionBlock();
1088
+ builder.depositBase(tx, args, typeArguments);
1089
+ const res = await provider.devInspectTransactionBlock({
1090
+ transactionBlock: tx,
1091
+ sender: ZERO_ADDRESS,
1092
+ });
1093
+ return res;
1094
+ }
1095
+ export async function depositQuote<T0 = any, T1 = any>(
1096
+ provider: JsonRpcProvider,
1097
+ args: [
1098
+ ObjectId | ObjectCallArg | TransactionArgument,
1099
+ _0x2.coin.Coin<T1> | TransactionArgument,
1100
+ ObjectId | ObjectCallArg | TransactionArgument
1101
+ ],
1102
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1103
+ ) {
1104
+ const tx = new TransactionBlock();
1105
+ builder.depositQuote(tx, args, typeArguments);
1106
+ const res = await provider.devInspectTransactionBlock({
1107
+ transactionBlock: tx,
1108
+ sender: ZERO_ADDRESS,
1109
+ });
1110
+ return res;
1111
+ }
1112
+ export async function getLevel2BookStatusAskSide<T0 = any, T1 = any>(
1113
+ provider: JsonRpcProvider,
1114
+ args: [
1115
+ ObjectId | ObjectCallArg | TransactionArgument,
1116
+ bigint | TransactionArgument,
1117
+ bigint | TransactionArgument,
1118
+ ObjectId | ObjectCallArg | TransactionArgument
1119
+ ],
1120
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1121
+ ) {
1122
+ const tx = new TransactionBlock();
1123
+ builder.getLevel2BookStatusAskSide(tx, args, typeArguments);
1124
+ const res = await provider.devInspectTransactionBlock({
1125
+ transactionBlock: tx,
1126
+ sender: ZERO_ADDRESS,
1127
+ });
1128
+ return res;
1129
+ }
1130
+ export async function getLevel2BookStatusBidSide<T0 = any, T1 = any>(
1131
+ provider: JsonRpcProvider,
1132
+ args: [
1133
+ ObjectId | ObjectCallArg | TransactionArgument,
1134
+ bigint | TransactionArgument,
1135
+ bigint | TransactionArgument,
1136
+ ObjectId | ObjectCallArg | TransactionArgument
1137
+ ],
1138
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1139
+ ) {
1140
+ const tx = new TransactionBlock();
1141
+ builder.getLevel2BookStatusBidSide(tx, args, typeArguments);
1142
+ const res = await provider.devInspectTransactionBlock({
1143
+ transactionBlock: tx,
1144
+ sender: ZERO_ADDRESS,
1145
+ });
1146
+ return res;
1147
+ }
1148
+ export async function getMarketPrice<T0 = any, T1 = any>(
1149
+ provider: JsonRpcProvider,
1150
+ args: [ObjectId | ObjectCallArg | TransactionArgument],
1151
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1152
+ ) {
1153
+ const tx = new TransactionBlock();
1154
+ builder.getMarketPrice(tx, args, typeArguments);
1155
+ const res = await provider.devInspectTransactionBlock({
1156
+ transactionBlock: tx,
1157
+ sender: ZERO_ADDRESS,
1158
+ });
1159
+ return res;
1160
+ }
1161
+ export async function getOrderStatus<T0 = any, T1 = any>(
1162
+ provider: JsonRpcProvider,
1163
+ args: [
1164
+ ObjectId | ObjectCallArg | TransactionArgument,
1165
+ bigint | TransactionArgument,
1166
+ ObjectId | ObjectCallArg | TransactionArgument
1167
+ ],
1168
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1169
+ ) {
1170
+ const tx = new TransactionBlock();
1171
+ builder.getOrderStatus(tx, args, typeArguments);
1172
+ const res = await provider.devInspectTransactionBlock({
1173
+ transactionBlock: tx,
1174
+ sender: ZERO_ADDRESS,
1175
+ });
1176
+ return res;
1177
+ }
1178
+ export async function listOpenOrders<T0 = any, T1 = any>(
1179
+ provider: JsonRpcProvider,
1180
+ args: [
1181
+ ObjectId | ObjectCallArg | TransactionArgument,
1182
+ ObjectId | ObjectCallArg | TransactionArgument
1183
+ ],
1184
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1185
+ ) {
1186
+ const tx = new TransactionBlock();
1187
+ builder.listOpenOrders(tx, args, typeArguments);
1188
+ const res = await provider.devInspectTransactionBlock({
1189
+ transactionBlock: tx,
1190
+ sender: ZERO_ADDRESS,
1191
+ });
1192
+ return res;
1193
+ }
1194
+ export async function placeLimitOrder<T0 = any, T1 = any>(
1195
+ provider: JsonRpcProvider,
1196
+ args: [
1197
+ ObjectId | ObjectCallArg | TransactionArgument,
1198
+ bigint | TransactionArgument,
1199
+ bigint | TransactionArgument,
1200
+ Boolean | TransactionArgument,
1201
+ bigint | TransactionArgument,
1202
+ number | TransactionArgument,
1203
+ ObjectId | ObjectCallArg | TransactionArgument,
1204
+ ObjectId | ObjectCallArg | TransactionArgument,
1205
+ ObjectId | ObjectCallArg | TransactionArgument
1206
+ ],
1207
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1208
+ ) {
1209
+ const tx = new TransactionBlock();
1210
+ builder.placeLimitOrder(tx, args, typeArguments);
1211
+ const res = await provider.devInspectTransactionBlock({
1212
+ transactionBlock: tx,
1213
+ sender: ZERO_ADDRESS,
1214
+ });
1215
+ return res;
1216
+ }
1217
+ export async function placeMarketOrder<T0 = any, T1 = any>(
1218
+ provider: JsonRpcProvider,
1219
+ args: [
1220
+ ObjectId | ObjectCallArg | TransactionArgument,
1221
+ bigint | TransactionArgument,
1222
+ Boolean | TransactionArgument,
1223
+ _0x2.coin.Coin<T0> | TransactionArgument,
1224
+ _0x2.coin.Coin<T1> | TransactionArgument,
1225
+ ObjectId | ObjectCallArg | TransactionArgument,
1226
+ ObjectId | ObjectCallArg | TransactionArgument
1227
+ ],
1228
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1229
+ ) {
1230
+ const tx = new TransactionBlock();
1231
+ builder.placeMarketOrder(tx, args, typeArguments);
1232
+ const res = await provider.devInspectTransactionBlock({
1233
+ transactionBlock: tx,
1234
+ sender: ZERO_ADDRESS,
1235
+ });
1236
+ return res;
1237
+ }
1238
+ export async function swapExactBaseForQuote<T0 = any, T1 = any>(
1239
+ provider: JsonRpcProvider,
1240
+ args: [
1241
+ ObjectId | ObjectCallArg | TransactionArgument,
1242
+ bigint | TransactionArgument,
1243
+ _0x2.coin.Coin<T0> | TransactionArgument,
1244
+ _0x2.coin.Coin<T1> | TransactionArgument,
1245
+ ObjectId | ObjectCallArg | TransactionArgument,
1246
+ ObjectId | ObjectCallArg | TransactionArgument
1247
+ ],
1248
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1249
+ ) {
1250
+ const tx = new TransactionBlock();
1251
+ builder.swapExactBaseForQuote(tx, args, typeArguments);
1252
+ const res = await provider.devInspectTransactionBlock({
1253
+ transactionBlock: tx,
1254
+ sender: ZERO_ADDRESS,
1255
+ });
1256
+ return res;
1257
+ }
1258
+ export async function swapExactQuoteForBase<T0 = any, T1 = any>(
1259
+ provider: JsonRpcProvider,
1260
+ args: [
1261
+ ObjectId | ObjectCallArg | TransactionArgument,
1262
+ bigint | TransactionArgument,
1263
+ ObjectId | ObjectCallArg | TransactionArgument,
1264
+ _0x2.coin.Coin<T1> | TransactionArgument,
1265
+ ObjectId | ObjectCallArg | TransactionArgument
1266
+ ],
1267
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1268
+ ) {
1269
+ const tx = new TransactionBlock();
1270
+ builder.swapExactQuoteForBase(tx, args, typeArguments);
1271
+ const res = await provider.devInspectTransactionBlock({
1272
+ transactionBlock: tx,
1273
+ sender: ZERO_ADDRESS,
1274
+ });
1275
+ return res;
1276
+ }
1277
+ export async function withdrawBase<T0 = any, T1 = any>(
1278
+ provider: JsonRpcProvider,
1279
+ args: [
1280
+ ObjectId | ObjectCallArg | TransactionArgument,
1281
+ bigint | TransactionArgument,
1282
+ ObjectId | ObjectCallArg | TransactionArgument,
1283
+ ObjectId | ObjectCallArg | TransactionArgument
1284
+ ],
1285
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1286
+ ) {
1287
+ const tx = new TransactionBlock();
1288
+ builder.withdrawBase(tx, args, typeArguments);
1289
+ const res = await provider.devInspectTransactionBlock({
1290
+ transactionBlock: tx,
1291
+ sender: ZERO_ADDRESS,
1292
+ });
1293
+ return res;
1294
+ }
1295
+ export async function withdrawQuote<T0 = any, T1 = any>(
1296
+ provider: JsonRpcProvider,
1297
+ args: [
1298
+ ObjectId | ObjectCallArg | TransactionArgument,
1299
+ bigint | TransactionArgument,
1300
+ ObjectId | ObjectCallArg | TransactionArgument,
1301
+ ObjectId | ObjectCallArg | TransactionArgument
1302
+ ],
1303
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1304
+ ) {
1305
+ const tx = new TransactionBlock();
1306
+ builder.withdrawQuote(tx, args, typeArguments);
1307
+ const res = await provider.devInspectTransactionBlock({
1308
+ transactionBlock: tx,
1309
+ sender: ZERO_ADDRESS,
1310
+ });
1311
+ return res;
1312
+ }
1313
+ }
1314
+ }
1315
+
1316
+ export namespace clob_v2 {
1317
+ export interface DepositAsset<T0> {
1318
+ pool_id: _0x2.object_.ID;
1319
+ quantity: bigint;
1320
+ owner: SuiAddress;
1321
+ }
1322
+
1323
+ export namespace DepositAsset {
1324
+ export const TYPE_QNAME = "0xdee9::clob_v2::DepositAsset";
1325
+
1326
+ const TYPE = new TypeDescriptor<DepositAsset<any>>(DepositAsset.TYPE_QNAME);
1327
+
1328
+ export function type<T0>(
1329
+ arg0: TypeDescriptor<T0> = ANY_TYPE
1330
+ ): TypeDescriptor<DepositAsset<T0>> {
1331
+ return TYPE.apply(arg0);
1332
+ }
1333
+ }
1334
+
1335
+ export interface DepositAssetInstance
1336
+ extends TypedEventInstance<DepositAsset<any>> {
1337
+ data_decoded: DepositAsset<any>;
1338
+ type_arguments: [string];
1339
+ }
1340
+
1341
+ export interface Order {
1342
+ order_id: bigint;
1343
+ client_order_id: bigint;
1344
+ price: bigint;
1345
+ original_quantity: bigint;
1346
+ quantity: bigint;
1347
+ is_bid: Boolean;
1348
+ owner: SuiAddress;
1349
+ expire_timestamp: bigint;
1350
+ self_matching_prevention: number;
1351
+ }
1352
+
1353
+ export namespace Order {
1354
+ export const TYPE_QNAME = "0xdee9::clob_v2::Order";
1355
+
1356
+ const TYPE = new TypeDescriptor<Order>(Order.TYPE_QNAME);
1357
+
1358
+ export function type(): TypeDescriptor<Order> {
1359
+ return TYPE.apply();
1360
+ }
1361
+ }
1362
+
1363
+ export interface OrderCanceled<T0, T1> {
1364
+ pool_id: _0x2.object_.ID;
1365
+ order_id: bigint;
1366
+ client_order_id: bigint;
1367
+ is_bid: Boolean;
1368
+ owner: SuiAddress;
1369
+ original_quantity: bigint;
1370
+ base_asset_quantity_canceled: bigint;
1371
+ price: bigint;
1372
+ }
1373
+
1374
+ export namespace OrderCanceled {
1375
+ export const TYPE_QNAME = "0xdee9::clob_v2::OrderCanceled";
1376
+
1377
+ const TYPE = new TypeDescriptor<OrderCanceled<any, any>>(
1378
+ OrderCanceled.TYPE_QNAME
1379
+ );
1380
+
1381
+ export function type<T0, T1>(
1382
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
1383
+ arg1: TypeDescriptor<T1> = ANY_TYPE
1384
+ ): TypeDescriptor<OrderCanceled<T0, T1>> {
1385
+ return TYPE.apply(arg0, arg1);
1386
+ }
1387
+ }
1388
+
1389
+ export interface OrderCanceledInstance
1390
+ extends TypedEventInstance<OrderCanceled<any, any>> {
1391
+ data_decoded: OrderCanceled<any, any>;
1392
+ type_arguments: [string, string];
1393
+ }
1394
+
1395
+ export interface OrderFilled<T0, T1> {
1396
+ pool_id: _0x2.object_.ID;
1397
+ order_id: bigint;
1398
+ taker_client_order_id: bigint;
1399
+ maker_client_order_id: bigint;
1400
+ is_bid: Boolean;
1401
+ taker_address: SuiAddress;
1402
+ maker_address: SuiAddress;
1403
+ original_quantity: bigint;
1404
+ base_asset_quantity_filled: bigint;
1405
+ base_asset_quantity_remaining: bigint;
1406
+ price: bigint;
1407
+ taker_commission: bigint;
1408
+ maker_rebates: bigint;
1409
+ }
1410
+
1411
+ export namespace OrderFilled {
1412
+ export const TYPE_QNAME = "0xdee9::clob_v2::OrderFilled";
1413
+
1414
+ const TYPE = new TypeDescriptor<OrderFilled<any, any>>(
1415
+ OrderFilled.TYPE_QNAME
1416
+ );
1417
+
1418
+ export function type<T0, T1>(
1419
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
1420
+ arg1: TypeDescriptor<T1> = ANY_TYPE
1421
+ ): TypeDescriptor<OrderFilled<T0, T1>> {
1422
+ return TYPE.apply(arg0, arg1);
1423
+ }
1424
+ }
1425
+
1426
+ export interface OrderFilledInstance
1427
+ extends TypedEventInstance<OrderFilled<any, any>> {
1428
+ data_decoded: OrderFilled<any, any>;
1429
+ type_arguments: [string, string];
1430
+ }
1431
+
1432
+ export interface OrderPlaced<T0, T1> {
1433
+ pool_id: _0x2.object_.ID;
1434
+ order_id: bigint;
1435
+ client_order_id: bigint;
1436
+ is_bid: Boolean;
1437
+ owner: SuiAddress;
1438
+ original_quantity: bigint;
1439
+ base_asset_quantity_placed: bigint;
1440
+ price: bigint;
1441
+ expire_timestamp: bigint;
1442
+ }
1443
+
1444
+ export namespace OrderPlaced {
1445
+ export const TYPE_QNAME = "0xdee9::clob_v2::OrderPlaced";
1446
+
1447
+ const TYPE = new TypeDescriptor<OrderPlaced<any, any>>(
1448
+ OrderPlaced.TYPE_QNAME
1449
+ );
1450
+
1451
+ export function type<T0, T1>(
1452
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
1453
+ arg1: TypeDescriptor<T1> = ANY_TYPE
1454
+ ): TypeDescriptor<OrderPlaced<T0, T1>> {
1455
+ return TYPE.apply(arg0, arg1);
1456
+ }
1457
+ }
1458
+
1459
+ export interface OrderPlacedInstance
1460
+ extends TypedEventInstance<OrderPlaced<any, any>> {
1461
+ data_decoded: OrderPlaced<any, any>;
1462
+ type_arguments: [string, string];
1463
+ }
1464
+
1465
+ export interface Pool<T0, T1> {
1466
+ id: _0x2.object_.UID;
1467
+ bids: critbit.CritbitTree<clob_v2.TickLevel>;
1468
+ asks: critbit.CritbitTree<clob_v2.TickLevel>;
1469
+ next_bid_order_id: bigint;
1470
+ next_ask_order_id: bigint;
1471
+ usr_open_orders: _0x2.table.Table<
1472
+ SuiAddress,
1473
+ _0x2.linked_table.LinkedTable<bigint, bigint>
1474
+ >;
1475
+ taker_fee_rate: bigint;
1476
+ maker_rebate_rate: bigint;
1477
+ tick_size: bigint;
1478
+ lot_size: bigint;
1479
+ base_custodian: custodian_v2.Custodian<T0>;
1480
+ quote_custodian: custodian_v2.Custodian<T1>;
1481
+ creation_fee: _0x2.balance.Balance<_0x2.sui.SUI>;
1482
+ base_asset_trading_fees: _0x2.balance.Balance<T0>;
1483
+ quote_asset_trading_fees: _0x2.balance.Balance<T1>;
1484
+ }
1485
+
1486
+ export namespace Pool {
1487
+ export const TYPE_QNAME = "0xdee9::clob_v2::Pool";
1488
+
1489
+ const TYPE = new TypeDescriptor<Pool<any, any>>(Pool.TYPE_QNAME);
1490
+
1491
+ export function type<T0, T1>(
1492
+ arg0: TypeDescriptor<T0> = ANY_TYPE,
1493
+ arg1: TypeDescriptor<T1> = ANY_TYPE
1494
+ ): TypeDescriptor<Pool<T0, T1>> {
1495
+ return TYPE.apply(arg0, arg1);
1496
+ }
1497
+ }
1498
+
1499
+ export interface PoolCreated {
1500
+ pool_id: _0x2.object_.ID;
1501
+ base_asset: _0x1.type_name.TypeName;
1502
+ quote_asset: _0x1.type_name.TypeName;
1503
+ taker_fee_rate: bigint;
1504
+ maker_rebate_rate: bigint;
1505
+ tick_size: bigint;
1506
+ lot_size: bigint;
1507
+ }
1508
+
1509
+ export namespace PoolCreated {
1510
+ export const TYPE_QNAME = "0xdee9::clob_v2::PoolCreated";
1511
+
1512
+ const TYPE = new TypeDescriptor<PoolCreated>(PoolCreated.TYPE_QNAME);
1513
+
1514
+ export function type(): TypeDescriptor<PoolCreated> {
1515
+ return TYPE.apply();
1516
+ }
1517
+ }
1518
+
1519
+ export interface PoolCreatedInstance extends TypedEventInstance<PoolCreated> {
1520
+ data_decoded: PoolCreated;
1521
+ type_arguments: [];
1522
+ }
1523
+
1524
+ export interface TickLevel {
1525
+ price: bigint;
1526
+ open_orders: _0x2.linked_table.LinkedTable<bigint, clob_v2.Order>;
1527
+ }
1528
+
1529
+ export namespace TickLevel {
1530
+ export const TYPE_QNAME = "0xdee9::clob_v2::TickLevel";
1531
+
1532
+ const TYPE = new TypeDescriptor<TickLevel>(TickLevel.TYPE_QNAME);
1533
+
1534
+ export function type(): TypeDescriptor<TickLevel> {
1535
+ return TYPE.apply();
1536
+ }
1537
+ }
1538
+
1539
+ export interface WithdrawAsset<T0> {
1540
+ pool_id: _0x2.object_.ID;
1541
+ quantity: bigint;
1542
+ owner: SuiAddress;
1543
+ }
1544
+
1545
+ export namespace WithdrawAsset {
1546
+ export const TYPE_QNAME = "0xdee9::clob_v2::WithdrawAsset";
1547
+
1548
+ const TYPE = new TypeDescriptor<WithdrawAsset<any>>(
1549
+ WithdrawAsset.TYPE_QNAME
1550
+ );
1551
+
1552
+ export function type<T0>(
1553
+ arg0: TypeDescriptor<T0> = ANY_TYPE
1554
+ ): TypeDescriptor<WithdrawAsset<T0>> {
1555
+ return TYPE.apply(arg0);
1556
+ }
1557
+ }
1558
+
1559
+ export interface WithdrawAssetInstance
1560
+ extends TypedEventInstance<WithdrawAsset<any>> {
1561
+ data_decoded: WithdrawAsset<any>;
1562
+ type_arguments: [string];
1563
+ }
1564
+
1565
+ export namespace builder {
1566
+ export function accountBalance<T0 = any, T1 = any>(
1567
+ tx: TransactionBlock,
1568
+ args: [
1569
+ ObjectId | ObjectCallArg | TransactionArgument,
1570
+ ObjectId | ObjectCallArg | TransactionArgument
1571
+ ],
1572
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1573
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1574
+ const _args: any[] = [];
1575
+ _args.push(
1576
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1577
+ );
1578
+ _args.push(
1579
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
1580
+ );
1581
+
1582
+ // @ts-ignore
1583
+ return tx.moveCall({
1584
+ target: "0xdee9::clob_v2::account_balance",
1585
+ arguments: _args,
1586
+ typeArguments: [
1587
+ typeof typeArguments[0] === "string"
1588
+ ? typeArguments[0]
1589
+ : typeArguments[0].getSignature(),
1590
+ typeof typeArguments[1] === "string"
1591
+ ? typeArguments[1]
1592
+ : typeArguments[1].getSignature(),
1593
+ ],
1594
+ });
1595
+ }
1596
+ export function batchCancelOrder<T0 = any, T1 = any>(
1597
+ tx: TransactionBlock,
1598
+ args: [
1599
+ ObjectId | ObjectCallArg | TransactionArgument,
1600
+ (ObjectId | ObjectCallArg)[] | TransactionArgument,
1601
+ ObjectId | ObjectCallArg | TransactionArgument
1602
+ ],
1603
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1604
+ ): TransactionArgument &
1605
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1606
+ const _args: any[] = [];
1607
+ _args.push(
1608
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1609
+ );
1610
+ _args.push(
1611
+ TransactionArgument.is(args[1])
1612
+ ? args[1]
1613
+ : tx.makeMoveVec({
1614
+ objects: args[1].map((a: any) => tx.object(a)),
1615
+ // type: TODO
1616
+ })
1617
+ );
1618
+ _args.push(
1619
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
1620
+ );
1621
+
1622
+ // @ts-ignore
1623
+ return tx.moveCall({
1624
+ target: "0xdee9::clob_v2::batch_cancel_order",
1625
+ arguments: _args,
1626
+ typeArguments: [
1627
+ typeof typeArguments[0] === "string"
1628
+ ? typeArguments[0]
1629
+ : typeArguments[0].getSignature(),
1630
+ typeof typeArguments[1] === "string"
1631
+ ? typeArguments[1]
1632
+ : typeArguments[1].getSignature(),
1633
+ ],
1634
+ });
1635
+ }
1636
+ export function cancelAllOrders<T0 = any, T1 = any>(
1637
+ tx: TransactionBlock,
1638
+ args: [
1639
+ ObjectId | ObjectCallArg | TransactionArgument,
1640
+ ObjectId | ObjectCallArg | TransactionArgument
1641
+ ],
1642
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1643
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
1644
+ const _args: any[] = [];
1645
+ _args.push(
1646
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1647
+ );
1648
+ _args.push(
1649
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
1650
+ );
1651
+
1652
+ // @ts-ignore
1653
+ return tx.moveCall({
1654
+ target: "0xdee9::clob_v2::cancel_all_orders",
1655
+ arguments: _args,
1656
+ typeArguments: [
1657
+ typeof typeArguments[0] === "string"
1658
+ ? typeArguments[0]
1659
+ : typeArguments[0].getSignature(),
1660
+ typeof typeArguments[1] === "string"
1661
+ ? typeArguments[1]
1662
+ : typeArguments[1].getSignature(),
1663
+ ],
1664
+ });
1665
+ }
1666
+ export function cancelOrder<T0 = any, T1 = any>(
1667
+ tx: TransactionBlock,
1668
+ args: [
1669
+ ObjectId | ObjectCallArg | TransactionArgument,
1670
+ bigint | TransactionArgument,
1671
+ ObjectId | ObjectCallArg | TransactionArgument
1672
+ ],
1673
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1674
+ ): TransactionArgument &
1675
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1676
+ const _args: any[] = [];
1677
+ _args.push(
1678
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1679
+ );
1680
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1681
+ _args.push(
1682
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
1683
+ );
1684
+
1685
+ // @ts-ignore
1686
+ return tx.moveCall({
1687
+ target: "0xdee9::clob_v2::cancel_order",
1688
+ arguments: _args,
1689
+ typeArguments: [
1690
+ typeof typeArguments[0] === "string"
1691
+ ? typeArguments[0]
1692
+ : typeArguments[0].getSignature(),
1693
+ typeof typeArguments[1] === "string"
1694
+ ? typeArguments[1]
1695
+ : typeArguments[1].getSignature(),
1696
+ ],
1697
+ });
1698
+ }
1699
+ export function cleanUpExpiredOrders<T0 = any, T1 = any>(
1700
+ tx: TransactionBlock,
1701
+ args: [
1702
+ ObjectId | ObjectCallArg | TransactionArgument,
1703
+ ObjectId | ObjectCallArg | TransactionArgument,
1704
+ (ObjectId | ObjectCallArg)[] | TransactionArgument,
1705
+ (ObjectId | ObjectCallArg)[] | TransactionArgument
1706
+ ],
1707
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1708
+ ): TransactionArgument &
1709
+ [
1710
+ TransactionArgument,
1711
+ TransactionArgument,
1712
+ TransactionArgument,
1713
+ TransactionArgument
1714
+ ] {
1715
+ const _args: any[] = [];
1716
+ _args.push(
1717
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1718
+ );
1719
+ _args.push(
1720
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
1721
+ );
1722
+ _args.push(
1723
+ TransactionArgument.is(args[2])
1724
+ ? args[2]
1725
+ : tx.makeMoveVec({
1726
+ objects: args[2].map((a: any) => tx.object(a)),
1727
+ // type: TODO
1728
+ })
1729
+ );
1730
+ _args.push(
1731
+ TransactionArgument.is(args[3])
1732
+ ? args[3]
1733
+ : tx.makeMoveVec({
1734
+ objects: args[3].map((a: any) => tx.object(a)),
1735
+ // type: TODO
1736
+ })
1737
+ );
1738
+
1739
+ // @ts-ignore
1740
+ return tx.moveCall({
1741
+ target: "0xdee9::clob_v2::clean_up_expired_orders",
1742
+ arguments: _args,
1743
+ typeArguments: [
1744
+ typeof typeArguments[0] === "string"
1745
+ ? typeArguments[0]
1746
+ : typeArguments[0].getSignature(),
1747
+ typeof typeArguments[1] === "string"
1748
+ ? typeArguments[1]
1749
+ : typeArguments[1].getSignature(),
1750
+ ],
1751
+ });
1752
+ }
1753
+ export function createAccount(
1754
+ tx: TransactionBlock,
1755
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
1756
+ ): TransactionArgument & [TransactionArgument] {
1757
+ const _args: any[] = [];
1758
+ _args.push(
1759
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1760
+ );
1761
+
1762
+ // @ts-ignore
1763
+ return tx.moveCall({
1764
+ target: "0xdee9::clob_v2::create_account",
1765
+ arguments: _args,
1766
+ });
1767
+ }
1768
+ export function createPool<T0 = any, T1 = any>(
1769
+ tx: TransactionBlock,
1770
+ args: [
1771
+ bigint | TransactionArgument,
1772
+ bigint | TransactionArgument,
1773
+ _0x2.coin.Coin<_0x2.sui.SUI> | TransactionArgument,
1774
+ ObjectId | ObjectCallArg | TransactionArgument
1775
+ ],
1776
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1777
+ ): TransactionArgument &
1778
+ [
1779
+ TransactionArgument,
1780
+ TransactionArgument,
1781
+ TransactionArgument,
1782
+ TransactionArgument
1783
+ ] {
1784
+ const _args: any[] = [];
1785
+ _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
1786
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1787
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1788
+ _args.push(
1789
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
1790
+ );
1791
+
1792
+ // @ts-ignore
1793
+ return tx.moveCall({
1794
+ target: "0xdee9::clob_v2::create_pool",
1795
+ arguments: _args,
1796
+ typeArguments: [
1797
+ typeof typeArguments[0] === "string"
1798
+ ? typeArguments[0]
1799
+ : typeArguments[0].getSignature(),
1800
+ typeof typeArguments[1] === "string"
1801
+ ? typeArguments[1]
1802
+ : typeArguments[1].getSignature(),
1803
+ ],
1804
+ });
1805
+ }
1806
+ export function depositBase<T0 = any, T1 = any>(
1807
+ tx: TransactionBlock,
1808
+ args: [
1809
+ ObjectId | ObjectCallArg | TransactionArgument,
1810
+ _0x2.coin.Coin<T0> | TransactionArgument,
1811
+ ObjectId | ObjectCallArg | TransactionArgument
1812
+ ],
1813
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1814
+ ): TransactionArgument &
1815
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1816
+ const _args: any[] = [];
1817
+ _args.push(
1818
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1819
+ );
1820
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1821
+ _args.push(
1822
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
1823
+ );
1824
+
1825
+ // @ts-ignore
1826
+ return tx.moveCall({
1827
+ target: "0xdee9::clob_v2::deposit_base",
1828
+ arguments: _args,
1829
+ typeArguments: [
1830
+ typeof typeArguments[0] === "string"
1831
+ ? typeArguments[0]
1832
+ : typeArguments[0].getSignature(),
1833
+ typeof typeArguments[1] === "string"
1834
+ ? typeArguments[1]
1835
+ : typeArguments[1].getSignature(),
1836
+ ],
1837
+ });
1838
+ }
1839
+ export function depositQuote<T0 = any, T1 = any>(
1840
+ tx: TransactionBlock,
1841
+ args: [
1842
+ ObjectId | ObjectCallArg | TransactionArgument,
1843
+ _0x2.coin.Coin<T1> | TransactionArgument,
1844
+ ObjectId | ObjectCallArg | TransactionArgument
1845
+ ],
1846
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1847
+ ): TransactionArgument &
1848
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1849
+ const _args: any[] = [];
1850
+ _args.push(
1851
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1852
+ );
1853
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1854
+ _args.push(
1855
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
1856
+ );
1857
+
1858
+ // @ts-ignore
1859
+ return tx.moveCall({
1860
+ target: "0xdee9::clob_v2::deposit_quote",
1861
+ arguments: _args,
1862
+ typeArguments: [
1863
+ typeof typeArguments[0] === "string"
1864
+ ? typeArguments[0]
1865
+ : typeArguments[0].getSignature(),
1866
+ typeof typeArguments[1] === "string"
1867
+ ? typeArguments[1]
1868
+ : typeArguments[1].getSignature(),
1869
+ ],
1870
+ });
1871
+ }
1872
+ export function getLevel2BookStatusAskSide<T0 = any, T1 = any>(
1873
+ tx: TransactionBlock,
1874
+ args: [
1875
+ ObjectId | ObjectCallArg | TransactionArgument,
1876
+ bigint | TransactionArgument,
1877
+ bigint | TransactionArgument,
1878
+ ObjectId | ObjectCallArg | TransactionArgument
1879
+ ],
1880
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1881
+ ): TransactionArgument &
1882
+ [
1883
+ TransactionArgument,
1884
+ TransactionArgument,
1885
+ TransactionArgument,
1886
+ TransactionArgument
1887
+ ] {
1888
+ const _args: any[] = [];
1889
+ _args.push(
1890
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1891
+ );
1892
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1893
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1894
+ _args.push(
1895
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
1896
+ );
1897
+
1898
+ // @ts-ignore
1899
+ return tx.moveCall({
1900
+ target: "0xdee9::clob_v2::get_level2_book_status_ask_side",
1901
+ arguments: _args,
1902
+ typeArguments: [
1903
+ typeof typeArguments[0] === "string"
1904
+ ? typeArguments[0]
1905
+ : typeArguments[0].getSignature(),
1906
+ typeof typeArguments[1] === "string"
1907
+ ? typeArguments[1]
1908
+ : typeArguments[1].getSignature(),
1909
+ ],
1910
+ });
1911
+ }
1912
+ export function getLevel2BookStatusBidSide<T0 = any, T1 = any>(
1913
+ tx: TransactionBlock,
1914
+ args: [
1915
+ ObjectId | ObjectCallArg | TransactionArgument,
1916
+ bigint | TransactionArgument,
1917
+ bigint | TransactionArgument,
1918
+ ObjectId | ObjectCallArg | TransactionArgument
1919
+ ],
1920
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1921
+ ): TransactionArgument &
1922
+ [
1923
+ TransactionArgument,
1924
+ TransactionArgument,
1925
+ TransactionArgument,
1926
+ TransactionArgument
1927
+ ] {
1928
+ const _args: any[] = [];
1929
+ _args.push(
1930
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1931
+ );
1932
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1933
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1934
+ _args.push(
1935
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
1936
+ );
1937
+
1938
+ // @ts-ignore
1939
+ return tx.moveCall({
1940
+ target: "0xdee9::clob_v2::get_level2_book_status_bid_side",
1941
+ arguments: _args,
1942
+ typeArguments: [
1943
+ typeof typeArguments[0] === "string"
1944
+ ? typeArguments[0]
1945
+ : typeArguments[0].getSignature(),
1946
+ typeof typeArguments[1] === "string"
1947
+ ? typeArguments[1]
1948
+ : typeArguments[1].getSignature(),
1949
+ ],
1950
+ });
1951
+ }
1952
+ export function getMarketPrice<T0 = any, T1 = any>(
1953
+ tx: TransactionBlock,
1954
+ args: [ObjectId | ObjectCallArg | TransactionArgument],
1955
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1956
+ ): TransactionArgument & [TransactionArgument] {
1957
+ const _args: any[] = [];
1958
+ _args.push(
1959
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1960
+ );
1961
+
1962
+ // @ts-ignore
1963
+ return tx.moveCall({
1964
+ target: "0xdee9::clob_v2::get_market_price",
1965
+ arguments: _args,
1966
+ typeArguments: [
1967
+ typeof typeArguments[0] === "string"
1968
+ ? typeArguments[0]
1969
+ : typeArguments[0].getSignature(),
1970
+ typeof typeArguments[1] === "string"
1971
+ ? typeArguments[1]
1972
+ : typeArguments[1].getSignature(),
1973
+ ],
1974
+ });
1975
+ }
1976
+ export function getOrderStatus<T0 = any, T1 = any>(
1977
+ tx: TransactionBlock,
1978
+ args: [
1979
+ ObjectId | ObjectCallArg | TransactionArgument,
1980
+ bigint | TransactionArgument,
1981
+ ObjectId | ObjectCallArg | TransactionArgument
1982
+ ],
1983
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
1984
+ ): TransactionArgument &
1985
+ [TransactionArgument, TransactionArgument, TransactionArgument] {
1986
+ const _args: any[] = [];
1987
+ _args.push(
1988
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
1989
+ );
1990
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1991
+ _args.push(
1992
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
1993
+ );
1994
+
1995
+ // @ts-ignore
1996
+ return tx.moveCall({
1997
+ target: "0xdee9::clob_v2::get_order_status",
1998
+ arguments: _args,
1999
+ typeArguments: [
2000
+ typeof typeArguments[0] === "string"
2001
+ ? typeArguments[0]
2002
+ : typeArguments[0].getSignature(),
2003
+ typeof typeArguments[1] === "string"
2004
+ ? typeArguments[1]
2005
+ : typeArguments[1].getSignature(),
2006
+ ],
2007
+ });
2008
+ }
2009
+ export function listOpenOrders<T0 = any, T1 = any>(
2010
+ tx: TransactionBlock,
2011
+ args: [
2012
+ ObjectId | ObjectCallArg | TransactionArgument,
2013
+ ObjectId | ObjectCallArg | TransactionArgument
2014
+ ],
2015
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2016
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2017
+ const _args: any[] = [];
2018
+ _args.push(
2019
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2020
+ );
2021
+ _args.push(
2022
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
2023
+ );
2024
+
2025
+ // @ts-ignore
2026
+ return tx.moveCall({
2027
+ target: "0xdee9::clob_v2::list_open_orders",
2028
+ arguments: _args,
2029
+ typeArguments: [
2030
+ typeof typeArguments[0] === "string"
2031
+ ? typeArguments[0]
2032
+ : typeArguments[0].getSignature(),
2033
+ typeof typeArguments[1] === "string"
2034
+ ? typeArguments[1]
2035
+ : typeArguments[1].getSignature(),
2036
+ ],
2037
+ });
2038
+ }
2039
+ export function placeLimitOrder<T0 = any, T1 = any>(
2040
+ tx: TransactionBlock,
2041
+ args: [
2042
+ ObjectId | ObjectCallArg | TransactionArgument,
2043
+ bigint | TransactionArgument,
2044
+ bigint | TransactionArgument,
2045
+ bigint | TransactionArgument,
2046
+ number | TransactionArgument,
2047
+ Boolean | TransactionArgument,
2048
+ bigint | TransactionArgument,
2049
+ number | TransactionArgument,
2050
+ ObjectId | ObjectCallArg | TransactionArgument,
2051
+ ObjectId | ObjectCallArg | TransactionArgument,
2052
+ ObjectId | ObjectCallArg | TransactionArgument
2053
+ ],
2054
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2055
+ ): TransactionArgument &
2056
+ [
2057
+ TransactionArgument,
2058
+ TransactionArgument,
2059
+ TransactionArgument,
2060
+ TransactionArgument,
2061
+ TransactionArgument,
2062
+ TransactionArgument,
2063
+ TransactionArgument,
2064
+ TransactionArgument,
2065
+ TransactionArgument,
2066
+ TransactionArgument,
2067
+ TransactionArgument
2068
+ ] {
2069
+ const _args: any[] = [];
2070
+ _args.push(
2071
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2072
+ );
2073
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
2074
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
2075
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
2076
+ _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
2077
+ _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
2078
+ _args.push(TransactionArgument.is(args[6]) ? args[6] : tx.pure(args[6]));
2079
+ _args.push(TransactionArgument.is(args[7]) ? args[7] : tx.pure(args[7]));
2080
+ _args.push(
2081
+ TransactionArgument.is(args[8]) ? args[8] : tx.object(args[8])
2082
+ );
2083
+ _args.push(
2084
+ TransactionArgument.is(args[9]) ? args[9] : tx.object(args[9])
2085
+ );
2086
+ _args.push(
2087
+ TransactionArgument.is(args[10]) ? args[10] : tx.object(args[10])
2088
+ );
2089
+
2090
+ // @ts-ignore
2091
+ return tx.moveCall({
2092
+ target: "0xdee9::clob_v2::place_limit_order",
2093
+ arguments: _args,
2094
+ typeArguments: [
2095
+ typeof typeArguments[0] === "string"
2096
+ ? typeArguments[0]
2097
+ : typeArguments[0].getSignature(),
2098
+ typeof typeArguments[1] === "string"
2099
+ ? typeArguments[1]
2100
+ : typeArguments[1].getSignature(),
2101
+ ],
2102
+ });
2103
+ }
2104
+ export function placeMarketOrder<T0 = any, T1 = any>(
2105
+ tx: TransactionBlock,
2106
+ args: [
2107
+ ObjectId | ObjectCallArg | TransactionArgument,
2108
+ ObjectId | ObjectCallArg | TransactionArgument,
2109
+ bigint | TransactionArgument,
2110
+ bigint | TransactionArgument,
2111
+ Boolean | TransactionArgument,
2112
+ _0x2.coin.Coin<T0> | TransactionArgument,
2113
+ _0x2.coin.Coin<T1> | TransactionArgument,
2114
+ ObjectId | ObjectCallArg | TransactionArgument,
2115
+ ObjectId | ObjectCallArg | TransactionArgument
2116
+ ],
2117
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2118
+ ): TransactionArgument &
2119
+ [
2120
+ TransactionArgument,
2121
+ TransactionArgument,
2122
+ TransactionArgument,
2123
+ TransactionArgument,
2124
+ TransactionArgument,
2125
+ TransactionArgument,
2126
+ TransactionArgument,
2127
+ TransactionArgument,
2128
+ TransactionArgument
2129
+ ] {
2130
+ const _args: any[] = [];
2131
+ _args.push(
2132
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2133
+ );
2134
+ _args.push(
2135
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
2136
+ );
2137
+ _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
2138
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
2139
+ _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
2140
+ _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
2141
+ _args.push(TransactionArgument.is(args[6]) ? args[6] : tx.pure(args[6]));
2142
+ _args.push(
2143
+ TransactionArgument.is(args[7]) ? args[7] : tx.object(args[7])
2144
+ );
2145
+ _args.push(
2146
+ TransactionArgument.is(args[8]) ? args[8] : tx.object(args[8])
2147
+ );
2148
+
2149
+ // @ts-ignore
2150
+ return tx.moveCall({
2151
+ target: "0xdee9::clob_v2::place_market_order",
2152
+ arguments: _args,
2153
+ typeArguments: [
2154
+ typeof typeArguments[0] === "string"
2155
+ ? typeArguments[0]
2156
+ : typeArguments[0].getSignature(),
2157
+ typeof typeArguments[1] === "string"
2158
+ ? typeArguments[1]
2159
+ : typeArguments[1].getSignature(),
2160
+ ],
2161
+ });
2162
+ }
2163
+ export function swapExactBaseForQuote<T0 = any, T1 = any>(
2164
+ tx: TransactionBlock,
2165
+ args: [
2166
+ ObjectId | ObjectCallArg | TransactionArgument,
2167
+ bigint | TransactionArgument,
2168
+ ObjectId | ObjectCallArg | TransactionArgument,
2169
+ bigint | TransactionArgument,
2170
+ _0x2.coin.Coin<T0> | TransactionArgument,
2171
+ _0x2.coin.Coin<T1> | TransactionArgument,
2172
+ ObjectId | ObjectCallArg | TransactionArgument,
2173
+ ObjectId | ObjectCallArg | TransactionArgument
2174
+ ],
2175
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2176
+ ): TransactionArgument &
2177
+ [
2178
+ TransactionArgument,
2179
+ TransactionArgument,
2180
+ TransactionArgument,
2181
+ TransactionArgument,
2182
+ TransactionArgument,
2183
+ TransactionArgument,
2184
+ TransactionArgument,
2185
+ TransactionArgument
2186
+ ] {
2187
+ const _args: any[] = [];
2188
+ _args.push(
2189
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2190
+ );
2191
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
2192
+ _args.push(
2193
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
2194
+ );
2195
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
2196
+ _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
2197
+ _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
2198
+ _args.push(
2199
+ TransactionArgument.is(args[6]) ? args[6] : tx.object(args[6])
2200
+ );
2201
+ _args.push(
2202
+ TransactionArgument.is(args[7]) ? args[7] : tx.object(args[7])
2203
+ );
2204
+
2205
+ // @ts-ignore
2206
+ return tx.moveCall({
2207
+ target: "0xdee9::clob_v2::swap_exact_base_for_quote",
2208
+ arguments: _args,
2209
+ typeArguments: [
2210
+ typeof typeArguments[0] === "string"
2211
+ ? typeArguments[0]
2212
+ : typeArguments[0].getSignature(),
2213
+ typeof typeArguments[1] === "string"
2214
+ ? typeArguments[1]
2215
+ : typeArguments[1].getSignature(),
2216
+ ],
2217
+ });
2218
+ }
2219
+ export function swapExactQuoteForBase<T0 = any, T1 = any>(
2220
+ tx: TransactionBlock,
2221
+ args: [
2222
+ ObjectId | ObjectCallArg | TransactionArgument,
2223
+ bigint | TransactionArgument,
2224
+ ObjectId | ObjectCallArg | TransactionArgument,
2225
+ bigint | TransactionArgument,
2226
+ ObjectId | ObjectCallArg | TransactionArgument,
2227
+ _0x2.coin.Coin<T1> | TransactionArgument,
2228
+ ObjectId | ObjectCallArg | TransactionArgument
2229
+ ],
2230
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2231
+ ): TransactionArgument &
2232
+ [
2233
+ TransactionArgument,
2234
+ TransactionArgument,
2235
+ TransactionArgument,
2236
+ TransactionArgument,
2237
+ TransactionArgument,
2238
+ TransactionArgument,
2239
+ TransactionArgument
2240
+ ] {
2241
+ const _args: any[] = [];
2242
+ _args.push(
2243
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2244
+ );
2245
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
2246
+ _args.push(
2247
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
2248
+ );
2249
+ _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
2250
+ _args.push(
2251
+ TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4])
2252
+ );
2253
+ _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
2254
+ _args.push(
2255
+ TransactionArgument.is(args[6]) ? args[6] : tx.object(args[6])
2256
+ );
2257
+
2258
+ // @ts-ignore
2259
+ return tx.moveCall({
2260
+ target: "0xdee9::clob_v2::swap_exact_quote_for_base",
2261
+ arguments: _args,
2262
+ typeArguments: [
2263
+ typeof typeArguments[0] === "string"
2264
+ ? typeArguments[0]
2265
+ : typeArguments[0].getSignature(),
2266
+ typeof typeArguments[1] === "string"
2267
+ ? typeArguments[1]
2268
+ : typeArguments[1].getSignature(),
2269
+ ],
2270
+ });
2271
+ }
2272
+ export function withdrawBase<T0 = any, T1 = any>(
2273
+ tx: TransactionBlock,
2274
+ args: [
2275
+ ObjectId | ObjectCallArg | TransactionArgument,
2276
+ bigint | TransactionArgument,
2277
+ ObjectId | ObjectCallArg | TransactionArgument,
2278
+ ObjectId | ObjectCallArg | TransactionArgument
2279
+ ],
2280
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2281
+ ): TransactionArgument &
2282
+ [
2283
+ TransactionArgument,
2284
+ TransactionArgument,
2285
+ TransactionArgument,
2286
+ TransactionArgument
2287
+ ] {
2288
+ const _args: any[] = [];
2289
+ _args.push(
2290
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2291
+ );
2292
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
2293
+ _args.push(
2294
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
2295
+ );
2296
+ _args.push(
2297
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
2298
+ );
2299
+
2300
+ // @ts-ignore
2301
+ return tx.moveCall({
2302
+ target: "0xdee9::clob_v2::withdraw_base",
2303
+ arguments: _args,
2304
+ typeArguments: [
2305
+ typeof typeArguments[0] === "string"
2306
+ ? typeArguments[0]
2307
+ : typeArguments[0].getSignature(),
2308
+ typeof typeArguments[1] === "string"
2309
+ ? typeArguments[1]
2310
+ : typeArguments[1].getSignature(),
2311
+ ],
2312
+ });
2313
+ }
2314
+ export function withdrawQuote<T0 = any, T1 = any>(
2315
+ tx: TransactionBlock,
2316
+ args: [
2317
+ ObjectId | ObjectCallArg | TransactionArgument,
2318
+ bigint | TransactionArgument,
2319
+ ObjectId | ObjectCallArg | TransactionArgument,
2320
+ ObjectId | ObjectCallArg | TransactionArgument
2321
+ ],
2322
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2323
+ ): TransactionArgument &
2324
+ [
2325
+ TransactionArgument,
2326
+ TransactionArgument,
2327
+ TransactionArgument,
2328
+ TransactionArgument
2329
+ ] {
2330
+ const _args: any[] = [];
2331
+ _args.push(
2332
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2333
+ );
2334
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
2335
+ _args.push(
2336
+ TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2])
2337
+ );
2338
+ _args.push(
2339
+ TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3])
2340
+ );
2341
+
2342
+ // @ts-ignore
2343
+ return tx.moveCall({
2344
+ target: "0xdee9::clob_v2::withdraw_quote",
2345
+ arguments: _args,
2346
+ typeArguments: [
2347
+ typeof typeArguments[0] === "string"
2348
+ ? typeArguments[0]
2349
+ : typeArguments[0].getSignature(),
2350
+ typeof typeArguments[1] === "string"
2351
+ ? typeArguments[1]
2352
+ : typeArguments[1].getSignature(),
2353
+ ],
2354
+ });
2355
+ }
2356
+ }
2357
+ export namespace view {
2358
+ export async function accountBalance<T0 = any, T1 = any>(
2359
+ provider: JsonRpcProvider,
2360
+ args: [
2361
+ ObjectId | ObjectCallArg | TransactionArgument,
2362
+ ObjectId | ObjectCallArg | TransactionArgument
2363
+ ],
2364
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2365
+ ) {
2366
+ const tx = new TransactionBlock();
2367
+ builder.accountBalance(tx, args, typeArguments);
2368
+ const res = await provider.devInspectTransactionBlock({
2369
+ transactionBlock: tx,
2370
+ sender: ZERO_ADDRESS,
2371
+ });
2372
+ return res;
2373
+ }
2374
+ export async function batchCancelOrder<T0 = any, T1 = any>(
2375
+ provider: JsonRpcProvider,
2376
+ args: [
2377
+ ObjectId | ObjectCallArg | TransactionArgument,
2378
+ (ObjectId | ObjectCallArg)[] | TransactionArgument,
2379
+ ObjectId | ObjectCallArg | TransactionArgument
2380
+ ],
2381
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2382
+ ) {
2383
+ const tx = new TransactionBlock();
2384
+ builder.batchCancelOrder(tx, args, typeArguments);
2385
+ const res = await provider.devInspectTransactionBlock({
2386
+ transactionBlock: tx,
2387
+ sender: ZERO_ADDRESS,
2388
+ });
2389
+ return res;
2390
+ }
2391
+ export async function cancelAllOrders<T0 = any, T1 = any>(
2392
+ provider: JsonRpcProvider,
2393
+ args: [
2394
+ ObjectId | ObjectCallArg | TransactionArgument,
2395
+ ObjectId | ObjectCallArg | TransactionArgument
2396
+ ],
2397
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2398
+ ) {
2399
+ const tx = new TransactionBlock();
2400
+ builder.cancelAllOrders(tx, args, typeArguments);
2401
+ const res = await provider.devInspectTransactionBlock({
2402
+ transactionBlock: tx,
2403
+ sender: ZERO_ADDRESS,
2404
+ });
2405
+ return res;
2406
+ }
2407
+ export async function cancelOrder<T0 = any, T1 = any>(
2408
+ provider: JsonRpcProvider,
2409
+ args: [
2410
+ ObjectId | ObjectCallArg | TransactionArgument,
2411
+ bigint | TransactionArgument,
2412
+ ObjectId | ObjectCallArg | TransactionArgument
2413
+ ],
2414
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2415
+ ) {
2416
+ const tx = new TransactionBlock();
2417
+ builder.cancelOrder(tx, args, typeArguments);
2418
+ const res = await provider.devInspectTransactionBlock({
2419
+ transactionBlock: tx,
2420
+ sender: ZERO_ADDRESS,
2421
+ });
2422
+ return res;
2423
+ }
2424
+ export async function cleanUpExpiredOrders<T0 = any, T1 = any>(
2425
+ provider: JsonRpcProvider,
2426
+ args: [
2427
+ ObjectId | ObjectCallArg | TransactionArgument,
2428
+ ObjectId | ObjectCallArg | TransactionArgument,
2429
+ (ObjectId | ObjectCallArg)[] | TransactionArgument,
2430
+ (ObjectId | ObjectCallArg)[] | TransactionArgument
2431
+ ],
2432
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2433
+ ) {
2434
+ const tx = new TransactionBlock();
2435
+ builder.cleanUpExpiredOrders(tx, args, typeArguments);
2436
+ const res = await provider.devInspectTransactionBlock({
2437
+ transactionBlock: tx,
2438
+ sender: ZERO_ADDRESS,
2439
+ });
2440
+ return res;
2441
+ }
2442
+ export async function createAccount(
2443
+ provider: JsonRpcProvider,
2444
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
2445
+ ) {
2446
+ const tx = new TransactionBlock();
2447
+ builder.createAccount(tx, args);
2448
+ const res = await provider.devInspectTransactionBlock({
2449
+ transactionBlock: tx,
2450
+ sender: ZERO_ADDRESS,
2451
+ });
2452
+ return res;
2453
+ }
2454
+ export async function createPool<T0 = any, T1 = any>(
2455
+ provider: JsonRpcProvider,
2456
+ args: [
2457
+ bigint | TransactionArgument,
2458
+ bigint | TransactionArgument,
2459
+ _0x2.coin.Coin<_0x2.sui.SUI> | TransactionArgument,
2460
+ ObjectId | ObjectCallArg | TransactionArgument
2461
+ ],
2462
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2463
+ ) {
2464
+ const tx = new TransactionBlock();
2465
+ builder.createPool(tx, args, typeArguments);
2466
+ const res = await provider.devInspectTransactionBlock({
2467
+ transactionBlock: tx,
2468
+ sender: ZERO_ADDRESS,
2469
+ });
2470
+ return res;
2471
+ }
2472
+ export async function depositBase<T0 = any, T1 = any>(
2473
+ provider: JsonRpcProvider,
2474
+ args: [
2475
+ ObjectId | ObjectCallArg | TransactionArgument,
2476
+ _0x2.coin.Coin<T0> | TransactionArgument,
2477
+ ObjectId | ObjectCallArg | TransactionArgument
2478
+ ],
2479
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2480
+ ) {
2481
+ const tx = new TransactionBlock();
2482
+ builder.depositBase(tx, args, typeArguments);
2483
+ const res = await provider.devInspectTransactionBlock({
2484
+ transactionBlock: tx,
2485
+ sender: ZERO_ADDRESS,
2486
+ });
2487
+ return res;
2488
+ }
2489
+ export async function depositQuote<T0 = any, T1 = any>(
2490
+ provider: JsonRpcProvider,
2491
+ args: [
2492
+ ObjectId | ObjectCallArg | TransactionArgument,
2493
+ _0x2.coin.Coin<T1> | TransactionArgument,
2494
+ ObjectId | ObjectCallArg | TransactionArgument
2495
+ ],
2496
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2497
+ ) {
2498
+ const tx = new TransactionBlock();
2499
+ builder.depositQuote(tx, args, typeArguments);
2500
+ const res = await provider.devInspectTransactionBlock({
2501
+ transactionBlock: tx,
2502
+ sender: ZERO_ADDRESS,
2503
+ });
2504
+ return res;
2505
+ }
2506
+ export async function getLevel2BookStatusAskSide<T0 = any, T1 = any>(
2507
+ provider: JsonRpcProvider,
2508
+ args: [
2509
+ ObjectId | ObjectCallArg | TransactionArgument,
2510
+ bigint | TransactionArgument,
2511
+ bigint | TransactionArgument,
2512
+ ObjectId | ObjectCallArg | TransactionArgument
2513
+ ],
2514
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2515
+ ) {
2516
+ const tx = new TransactionBlock();
2517
+ builder.getLevel2BookStatusAskSide(tx, args, typeArguments);
2518
+ const res = await provider.devInspectTransactionBlock({
2519
+ transactionBlock: tx,
2520
+ sender: ZERO_ADDRESS,
2521
+ });
2522
+ return res;
2523
+ }
2524
+ export async function getLevel2BookStatusBidSide<T0 = any, T1 = any>(
2525
+ provider: JsonRpcProvider,
2526
+ args: [
2527
+ ObjectId | ObjectCallArg | TransactionArgument,
2528
+ bigint | TransactionArgument,
2529
+ bigint | TransactionArgument,
2530
+ ObjectId | ObjectCallArg | TransactionArgument
2531
+ ],
2532
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2533
+ ) {
2534
+ const tx = new TransactionBlock();
2535
+ builder.getLevel2BookStatusBidSide(tx, args, typeArguments);
2536
+ const res = await provider.devInspectTransactionBlock({
2537
+ transactionBlock: tx,
2538
+ sender: ZERO_ADDRESS,
2539
+ });
2540
+ return res;
2541
+ }
2542
+ export async function getMarketPrice<T0 = any, T1 = any>(
2543
+ provider: JsonRpcProvider,
2544
+ args: [ObjectId | ObjectCallArg | TransactionArgument],
2545
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2546
+ ) {
2547
+ const tx = new TransactionBlock();
2548
+ builder.getMarketPrice(tx, args, typeArguments);
2549
+ const res = await provider.devInspectTransactionBlock({
2550
+ transactionBlock: tx,
2551
+ sender: ZERO_ADDRESS,
2552
+ });
2553
+ return res;
2554
+ }
2555
+ export async function getOrderStatus<T0 = any, T1 = any>(
2556
+ provider: JsonRpcProvider,
2557
+ args: [
2558
+ ObjectId | ObjectCallArg | TransactionArgument,
2559
+ bigint | TransactionArgument,
2560
+ ObjectId | ObjectCallArg | TransactionArgument
2561
+ ],
2562
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2563
+ ) {
2564
+ const tx = new TransactionBlock();
2565
+ builder.getOrderStatus(tx, args, typeArguments);
2566
+ const res = await provider.devInspectTransactionBlock({
2567
+ transactionBlock: tx,
2568
+ sender: ZERO_ADDRESS,
2569
+ });
2570
+ return res;
2571
+ }
2572
+ export async function listOpenOrders<T0 = any, T1 = any>(
2573
+ provider: JsonRpcProvider,
2574
+ args: [
2575
+ ObjectId | ObjectCallArg | TransactionArgument,
2576
+ ObjectId | ObjectCallArg | TransactionArgument
2577
+ ],
2578
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2579
+ ) {
2580
+ const tx = new TransactionBlock();
2581
+ builder.listOpenOrders(tx, args, typeArguments);
2582
+ const res = await provider.devInspectTransactionBlock({
2583
+ transactionBlock: tx,
2584
+ sender: ZERO_ADDRESS,
2585
+ });
2586
+ return res;
2587
+ }
2588
+ export async function placeLimitOrder<T0 = any, T1 = any>(
2589
+ provider: JsonRpcProvider,
2590
+ args: [
2591
+ ObjectId | ObjectCallArg | TransactionArgument,
2592
+ bigint | TransactionArgument,
2593
+ bigint | TransactionArgument,
2594
+ bigint | TransactionArgument,
2595
+ number | TransactionArgument,
2596
+ Boolean | TransactionArgument,
2597
+ bigint | TransactionArgument,
2598
+ number | TransactionArgument,
2599
+ ObjectId | ObjectCallArg | TransactionArgument,
2600
+ ObjectId | ObjectCallArg | TransactionArgument,
2601
+ ObjectId | ObjectCallArg | TransactionArgument
2602
+ ],
2603
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2604
+ ) {
2605
+ const tx = new TransactionBlock();
2606
+ builder.placeLimitOrder(tx, args, typeArguments);
2607
+ const res = await provider.devInspectTransactionBlock({
2608
+ transactionBlock: tx,
2609
+ sender: ZERO_ADDRESS,
2610
+ });
2611
+ return res;
2612
+ }
2613
+ export async function placeMarketOrder<T0 = any, T1 = any>(
2614
+ provider: JsonRpcProvider,
2615
+ args: [
2616
+ ObjectId | ObjectCallArg | TransactionArgument,
2617
+ ObjectId | ObjectCallArg | TransactionArgument,
2618
+ bigint | TransactionArgument,
2619
+ bigint | TransactionArgument,
2620
+ Boolean | TransactionArgument,
2621
+ _0x2.coin.Coin<T0> | TransactionArgument,
2622
+ _0x2.coin.Coin<T1> | TransactionArgument,
2623
+ ObjectId | ObjectCallArg | TransactionArgument,
2624
+ ObjectId | ObjectCallArg | TransactionArgument
2625
+ ],
2626
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2627
+ ) {
2628
+ const tx = new TransactionBlock();
2629
+ builder.placeMarketOrder(tx, args, typeArguments);
2630
+ const res = await provider.devInspectTransactionBlock({
2631
+ transactionBlock: tx,
2632
+ sender: ZERO_ADDRESS,
2633
+ });
2634
+ return res;
2635
+ }
2636
+ export async function swapExactBaseForQuote<T0 = any, T1 = any>(
2637
+ provider: JsonRpcProvider,
2638
+ args: [
2639
+ ObjectId | ObjectCallArg | TransactionArgument,
2640
+ bigint | TransactionArgument,
2641
+ ObjectId | ObjectCallArg | TransactionArgument,
2642
+ bigint | TransactionArgument,
2643
+ _0x2.coin.Coin<T0> | TransactionArgument,
2644
+ _0x2.coin.Coin<T1> | TransactionArgument,
2645
+ ObjectId | ObjectCallArg | TransactionArgument,
2646
+ ObjectId | ObjectCallArg | TransactionArgument
2647
+ ],
2648
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2649
+ ) {
2650
+ const tx = new TransactionBlock();
2651
+ builder.swapExactBaseForQuote(tx, args, typeArguments);
2652
+ const res = await provider.devInspectTransactionBlock({
2653
+ transactionBlock: tx,
2654
+ sender: ZERO_ADDRESS,
2655
+ });
2656
+ return res;
2657
+ }
2658
+ export async function swapExactQuoteForBase<T0 = any, T1 = any>(
2659
+ provider: JsonRpcProvider,
2660
+ args: [
2661
+ ObjectId | ObjectCallArg | TransactionArgument,
2662
+ bigint | TransactionArgument,
2663
+ ObjectId | ObjectCallArg | TransactionArgument,
2664
+ bigint | TransactionArgument,
2665
+ ObjectId | ObjectCallArg | TransactionArgument,
2666
+ _0x2.coin.Coin<T1> | TransactionArgument,
2667
+ ObjectId | ObjectCallArg | TransactionArgument
2668
+ ],
2669
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2670
+ ) {
2671
+ const tx = new TransactionBlock();
2672
+ builder.swapExactQuoteForBase(tx, args, typeArguments);
2673
+ const res = await provider.devInspectTransactionBlock({
2674
+ transactionBlock: tx,
2675
+ sender: ZERO_ADDRESS,
2676
+ });
2677
+ return res;
2678
+ }
2679
+ export async function withdrawBase<T0 = any, T1 = any>(
2680
+ provider: JsonRpcProvider,
2681
+ args: [
2682
+ ObjectId | ObjectCallArg | TransactionArgument,
2683
+ bigint | TransactionArgument,
2684
+ ObjectId | ObjectCallArg | TransactionArgument,
2685
+ ObjectId | ObjectCallArg | TransactionArgument
2686
+ ],
2687
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2688
+ ) {
2689
+ const tx = new TransactionBlock();
2690
+ builder.withdrawBase(tx, args, typeArguments);
2691
+ const res = await provider.devInspectTransactionBlock({
2692
+ transactionBlock: tx,
2693
+ sender: ZERO_ADDRESS,
2694
+ });
2695
+ return res;
2696
+ }
2697
+ export async function withdrawQuote<T0 = any, T1 = any>(
2698
+ provider: JsonRpcProvider,
2699
+ args: [
2700
+ ObjectId | ObjectCallArg | TransactionArgument,
2701
+ bigint | TransactionArgument,
2702
+ ObjectId | ObjectCallArg | TransactionArgument,
2703
+ ObjectId | ObjectCallArg | TransactionArgument
2704
+ ],
2705
+ typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
2706
+ ) {
2707
+ const tx = new TransactionBlock();
2708
+ builder.withdrawQuote(tx, args, typeArguments);
2709
+ const res = await provider.devInspectTransactionBlock({
2710
+ transactionBlock: tx,
2711
+ sender: ZERO_ADDRESS,
2712
+ });
2713
+ return res;
2714
+ }
2715
+ }
2716
+ }
2717
+
2718
+ export namespace critbit {
2719
+ export interface CritbitTree<T0> {
2720
+ root: bigint;
2721
+ internal_nodes: _0x2.table.Table<bigint, critbit.InternalNode>;
2722
+ leaves: _0x2.table.Table<bigint, critbit.Leaf<T0>>;
2723
+ min_leaf: bigint;
2724
+ max_leaf: bigint;
2725
+ next_internal_node_index: bigint;
2726
+ next_leaf_index: bigint;
2727
+ }
2728
+
2729
+ export namespace CritbitTree {
2730
+ export const TYPE_QNAME = "0xdee9::critbit::CritbitTree";
2731
+
2732
+ const TYPE = new TypeDescriptor<CritbitTree<any>>(CritbitTree.TYPE_QNAME);
2733
+
2734
+ export function type<T0>(
2735
+ arg0: TypeDescriptor<T0> = ANY_TYPE
2736
+ ): TypeDescriptor<CritbitTree<T0>> {
2737
+ return TYPE.apply(arg0);
2738
+ }
2739
+ }
2740
+
2741
+ export interface InternalNode {
2742
+ mask: bigint;
2743
+ left_child: bigint;
2744
+ right_child: bigint;
2745
+ parent: bigint;
2746
+ }
2747
+
2748
+ export namespace InternalNode {
2749
+ export const TYPE_QNAME = "0xdee9::critbit::InternalNode";
2750
+
2751
+ const TYPE = new TypeDescriptor<InternalNode>(InternalNode.TYPE_QNAME);
2752
+
2753
+ export function type(): TypeDescriptor<InternalNode> {
2754
+ return TYPE.apply();
2755
+ }
2756
+ }
2757
+
2758
+ export interface Leaf<T0> {
2759
+ key: bigint;
2760
+ value: T0;
2761
+ parent: bigint;
2762
+ }
2763
+
2764
+ export namespace Leaf {
2765
+ export const TYPE_QNAME = "0xdee9::critbit::Leaf";
2766
+
2767
+ const TYPE = new TypeDescriptor<Leaf<any>>(Leaf.TYPE_QNAME);
2768
+
2769
+ export function type<T0>(
2770
+ arg0: TypeDescriptor<T0> = ANY_TYPE
2771
+ ): TypeDescriptor<Leaf<T0>> {
2772
+ return TYPE.apply(arg0);
2773
+ }
2774
+ }
2775
+
2776
+ export namespace builder {
2777
+ export function previousLeaf<T0 = any>(
2778
+ tx: TransactionBlock,
2779
+ args: [
2780
+ ObjectId | ObjectCallArg | TransactionArgument,
2781
+ bigint | TransactionArgument
2782
+ ],
2783
+ typeArguments: [TypeDescriptor<T0> | string]
2784
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2785
+ const _args: any[] = [];
2786
+ _args.push(
2787
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2788
+ );
2789
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
2790
+
2791
+ // @ts-ignore
2792
+ return tx.moveCall({
2793
+ target: "0xdee9::critbit::previous_leaf",
2794
+ arguments: _args,
2795
+ typeArguments: [
2796
+ typeof typeArguments[0] === "string"
2797
+ ? typeArguments[0]
2798
+ : typeArguments[0].getSignature(),
2799
+ ],
2800
+ });
2801
+ }
2802
+ }
2803
+ export namespace view {
2804
+ export async function previousLeaf<T0 = any>(
2805
+ provider: JsonRpcProvider,
2806
+ args: [
2807
+ ObjectId | ObjectCallArg | TransactionArgument,
2808
+ bigint | TransactionArgument
2809
+ ],
2810
+ typeArguments: [TypeDescriptor<T0> | string]
2811
+ ) {
2812
+ const tx = new TransactionBlock();
2813
+ builder.previousLeaf(tx, args, typeArguments);
2814
+ const res = await provider.devInspectTransactionBlock({
2815
+ transactionBlock: tx,
2816
+ sender: ZERO_ADDRESS,
2817
+ });
2818
+ return res;
2819
+ }
2820
+ }
2821
+ }
2822
+
2823
+ export namespace custodian {
2824
+ export interface Account<T0> {
2825
+ available_balance: _0x2.balance.Balance<T0>;
2826
+ locked_balance: _0x2.balance.Balance<T0>;
2827
+ }
2828
+
2829
+ export namespace Account {
2830
+ export const TYPE_QNAME = "0xdee9::custodian::Account";
2831
+
2832
+ const TYPE = new TypeDescriptor<Account<any>>(Account.TYPE_QNAME);
2833
+
2834
+ export function type<T0>(
2835
+ arg0: TypeDescriptor<T0> = ANY_TYPE
2836
+ ): TypeDescriptor<Account<T0>> {
2837
+ return TYPE.apply(arg0);
2838
+ }
2839
+ }
2840
+
2841
+ export interface AccountCap {
2842
+ id: _0x2.object_.UID;
2843
+ }
2844
+
2845
+ export namespace AccountCap {
2846
+ export const TYPE_QNAME = "0xdee9::custodian::AccountCap";
2847
+
2848
+ const TYPE = new TypeDescriptor<AccountCap>(AccountCap.TYPE_QNAME);
2849
+
2850
+ export function type(): TypeDescriptor<AccountCap> {
2851
+ return TYPE.apply();
2852
+ }
2853
+ }
2854
+
2855
+ export interface Custodian<T0> {
2856
+ id: _0x2.object_.UID;
2857
+ account_balances: _0x2.table.Table<_0x2.object_.ID, custodian.Account<T0>>;
2858
+ }
2859
+
2860
+ export namespace Custodian {
2861
+ export const TYPE_QNAME = "0xdee9::custodian::Custodian";
2862
+
2863
+ const TYPE = new TypeDescriptor<Custodian<any>>(Custodian.TYPE_QNAME);
2864
+
2865
+ export function type<T0>(
2866
+ arg0: TypeDescriptor<T0> = ANY_TYPE
2867
+ ): TypeDescriptor<Custodian<T0>> {
2868
+ return TYPE.apply(arg0);
2869
+ }
2870
+ }
2871
+
2872
+ export namespace builder {
2873
+ export function mintAccountCap(
2874
+ tx: TransactionBlock,
2875
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
2876
+ ): TransactionArgument & [TransactionArgument] {
2877
+ const _args: any[] = [];
2878
+ _args.push(
2879
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2880
+ );
2881
+
2882
+ // @ts-ignore
2883
+ return tx.moveCall({
2884
+ target: "0xdee9::custodian::mint_account_cap",
2885
+ arguments: _args,
2886
+ });
2887
+ }
2888
+ }
2889
+ export namespace view {
2890
+ export async function mintAccountCap(
2891
+ provider: JsonRpcProvider,
2892
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
2893
+ ) {
2894
+ const tx = new TransactionBlock();
2895
+ builder.mintAccountCap(tx, args);
2896
+ const res = await provider.devInspectTransactionBlock({
2897
+ transactionBlock: tx,
2898
+ sender: ZERO_ADDRESS,
2899
+ });
2900
+ return res;
2901
+ }
2902
+ }
2903
+ }
2904
+
2905
+ export namespace custodian_v2 {
2906
+ export interface Account<T0> {
2907
+ available_balance: _0x2.balance.Balance<T0>;
2908
+ locked_balance: _0x2.balance.Balance<T0>;
2909
+ }
2910
+
2911
+ export namespace Account {
2912
+ export const TYPE_QNAME = "0xdee9::custodian_v2::Account";
2913
+
2914
+ const TYPE = new TypeDescriptor<Account<any>>(Account.TYPE_QNAME);
2915
+
2916
+ export function type<T0>(
2917
+ arg0: TypeDescriptor<T0> = ANY_TYPE
2918
+ ): TypeDescriptor<Account<T0>> {
2919
+ return TYPE.apply(arg0);
2920
+ }
2921
+ }
2922
+
2923
+ export interface AccountCap {
2924
+ id: _0x2.object_.UID;
2925
+ owner: SuiAddress;
2926
+ }
2927
+
2928
+ export namespace AccountCap {
2929
+ export const TYPE_QNAME = "0xdee9::custodian_v2::AccountCap";
2930
+
2931
+ const TYPE = new TypeDescriptor<AccountCap>(AccountCap.TYPE_QNAME);
2932
+
2933
+ export function type(): TypeDescriptor<AccountCap> {
2934
+ return TYPE.apply();
2935
+ }
2936
+ }
2937
+
2938
+ export interface Custodian<T0> {
2939
+ id: _0x2.object_.UID;
2940
+ account_balances: _0x2.table.Table<SuiAddress, custodian_v2.Account<T0>>;
2941
+ }
2942
+
2943
+ export namespace Custodian {
2944
+ export const TYPE_QNAME = "0xdee9::custodian_v2::Custodian";
2945
+
2946
+ const TYPE = new TypeDescriptor<Custodian<any>>(Custodian.TYPE_QNAME);
2947
+
2948
+ export function type<T0>(
2949
+ arg0: TypeDescriptor<T0> = ANY_TYPE
2950
+ ): TypeDescriptor<Custodian<T0>> {
2951
+ return TYPE.apply(arg0);
2952
+ }
2953
+ }
2954
+
2955
+ export namespace builder {
2956
+ export function accountOwner(
2957
+ tx: TransactionBlock,
2958
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
2959
+ ): TransactionArgument & [TransactionArgument] {
2960
+ const _args: any[] = [];
2961
+ _args.push(
2962
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2963
+ );
2964
+
2965
+ // @ts-ignore
2966
+ return tx.moveCall({
2967
+ target: "0xdee9::custodian_v2::account_owner",
2968
+ arguments: _args,
2969
+ });
2970
+ }
2971
+ export function createChildAccountCap(
2972
+ tx: TransactionBlock,
2973
+ args: [
2974
+ ObjectId | ObjectCallArg | TransactionArgument,
2975
+ ObjectId | ObjectCallArg | TransactionArgument
2976
+ ]
2977
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
2978
+ const _args: any[] = [];
2979
+ _args.push(
2980
+ TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0])
2981
+ );
2982
+ _args.push(
2983
+ TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1])
2984
+ );
2985
+
2986
+ // @ts-ignore
2987
+ return tx.moveCall({
2988
+ target: "0xdee9::custodian_v2::create_child_account_cap",
2989
+ arguments: _args,
2990
+ });
2991
+ }
2992
+
2993
+ export function deleteAccountCap(
2994
+ tx: TransactionBlock,
2995
+ args: [custodian_v2.AccountCap | TransactionArgument]
2996
+ ): TransactionArgument & [TransactionArgument] {
2997
+ const _args: any[] = [];
2998
+ _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
2999
+
3000
+ // @ts-ignore
3001
+ return tx.moveCall({
3002
+ target: "0xdee9::custodian_v2::delete_account_cap",
3003
+ arguments: _args,
3004
+ });
3005
+ }
3006
+ }
3007
+ export namespace view {
3008
+ export async function accountOwner(
3009
+ provider: JsonRpcProvider,
3010
+ args: [ObjectId | ObjectCallArg | TransactionArgument]
3011
+ ) {
3012
+ const tx = new TransactionBlock();
3013
+ builder.accountOwner(tx, args);
3014
+ const res = await provider.devInspectTransactionBlock({
3015
+ transactionBlock: tx,
3016
+ sender: ZERO_ADDRESS,
3017
+ });
3018
+ return res;
3019
+ }
3020
+ export async function createChildAccountCap(
3021
+ provider: JsonRpcProvider,
3022
+ args: [
3023
+ ObjectId | ObjectCallArg | TransactionArgument,
3024
+ ObjectId | ObjectCallArg | TransactionArgument
3025
+ ]
3026
+ ) {
3027
+ const tx = new TransactionBlock();
3028
+ builder.createChildAccountCap(tx, args);
3029
+ const res = await provider.devInspectTransactionBlock({
3030
+ transactionBlock: tx,
3031
+ sender: ZERO_ADDRESS,
3032
+ });
3033
+ return res;
3034
+ }
3035
+
3036
+ export async function deleteAccountCap(
3037
+ provider: JsonRpcProvider,
3038
+ args: [custodian_v2.AccountCap | TransactionArgument]
3039
+ ) {
3040
+ const tx = new TransactionBlock();
3041
+ builder.deleteAccountCap(tx, args);
3042
+ const res = await provider.devInspectTransactionBlock({
3043
+ transactionBlock: tx,
3044
+ sender: ZERO_ADDRESS,
3045
+ });
3046
+ return res;
3047
+ }
3048
+ }
3049
+ }
3050
+
3051
+ export namespace math {
3052
+ export namespace builder {
3053
+ export function divRound(
3054
+ tx: TransactionBlock,
3055
+ args: [bigint | TransactionArgument, bigint | TransactionArgument]
3056
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3057
+ const _args: any[] = [];
3058
+ _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
3059
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
3060
+
3061
+ // @ts-ignore
3062
+ return tx.moveCall({
3063
+ target: "0xdee9::math::div_round",
3064
+ arguments: _args,
3065
+ });
3066
+ }
3067
+ export function mul(
3068
+ tx: TransactionBlock,
3069
+ args: [bigint | TransactionArgument, bigint | TransactionArgument]
3070
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3071
+ const _args: any[] = [];
3072
+ _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
3073
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
3074
+
3075
+ // @ts-ignore
3076
+ return tx.moveCall({
3077
+ target: "0xdee9::math::mul",
3078
+ arguments: _args,
3079
+ });
3080
+ }
3081
+ export function mulRound(
3082
+ tx: TransactionBlock,
3083
+ args: [bigint | TransactionArgument, bigint | TransactionArgument]
3084
+ ): TransactionArgument & [TransactionArgument, TransactionArgument] {
3085
+ const _args: any[] = [];
3086
+ _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
3087
+ _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
3088
+
3089
+ // @ts-ignore
3090
+ return tx.moveCall({
3091
+ target: "0xdee9::math::mul_round",
3092
+ arguments: _args,
3093
+ });
3094
+ }
3095
+ }
3096
+ export namespace view {
3097
+ export async function divRound(
3098
+ provider: JsonRpcProvider,
3099
+ args: [bigint | TransactionArgument, bigint | TransactionArgument]
3100
+ ) {
3101
+ const tx = new TransactionBlock();
3102
+ builder.divRound(tx, args);
3103
+ const res = await provider.devInspectTransactionBlock({
3104
+ transactionBlock: tx,
3105
+ sender: ZERO_ADDRESS,
3106
+ });
3107
+ return res;
3108
+ }
3109
+ export async function mul(
3110
+ provider: JsonRpcProvider,
3111
+ args: [bigint | TransactionArgument, bigint | TransactionArgument]
3112
+ ) {
3113
+ const tx = new TransactionBlock();
3114
+ builder.mul(tx, args);
3115
+ const res = await provider.devInspectTransactionBlock({
3116
+ transactionBlock: tx,
3117
+ sender: ZERO_ADDRESS,
3118
+ });
3119
+ return res;
3120
+ }
3121
+ export async function mulRound(
3122
+ provider: JsonRpcProvider,
3123
+ args: [bigint | TransactionArgument, bigint | TransactionArgument]
3124
+ ) {
3125
+ const tx = new TransactionBlock();
3126
+ builder.mulRound(tx, args);
3127
+ const res = await provider.devInspectTransactionBlock({
3128
+ transactionBlock: tx,
3129
+ sender: ZERO_ADDRESS,
3130
+ });
3131
+ return res;
3132
+ }
3133
+ }
3134
+ }
3135
+
3136
+ const MODULES = JSON.parse(
3137
+ '{"clob":{"fileFormatVersion":6,"address":"0xdee9","name":"clob","friends":[],"structs":{"Order":{"abilities":{"abilities":["Drop","Store"]},"typeParameters":[],"fields":[{"name":"order_id","type":"U64"},{"name":"price","type":"U64"},{"name":"quantity","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"expire_timestamp","type":"U64"}]},"OrderCanceled":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"base_asset_quantity_canceled","type":"U64"},{"name":"price","type":"U64"}]},"OrderFilled":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"total_quantity","type":"U64"},{"name":"base_asset_quantity_filled","type":"U64"},{"name":"base_asset_quantity_remaining","type":"U64"},{"name":"price","type":"U64"}]},"OrderFilledV2":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"total_quantity","type":"U64"},{"name":"base_asset_quantity_filled","type":"U64"},{"name":"base_asset_quantity_remaining","type":"U64"},{"name":"price","type":"U64"},{"name":"taker_commission","type":"U64"},{"name":"maker_rebates","type":"U64"}]},"OrderPlaced":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"base_asset_quantity_placed","type":"U64"},{"name":"price","type":"U64"}]},"OrderPlacedV2":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"base_asset_quantity_placed","type":"U64"},{"name":"price","type":"U64"},{"name":"expire_timestamp","type":"U64"}]},"Pool":{"abilities":{"abilities":["Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"bids","type":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"Struct":{"address":"0xdee9","module":"clob","name":"TickLevel","typeArguments":[]}}]}}},{"name":"asks","type":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"Struct":{"address":"0xdee9","module":"clob","name":"TickLevel","typeArguments":[]}}]}}},{"name":"next_bid_order_id","type":"U64"},{"name":"next_ask_order_id","type":"U64"},{"name":"usr_open_orders","type":{"Struct":{"address":"0x2","module":"table","name":"Table","typeArguments":[{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}},{"Struct":{"address":"0x2","module":"linked_table","name":"LinkedTable","typeArguments":["U64","U64"]}}]}}},{"name":"taker_fee_rate","type":"U64"},{"name":"maker_rebate_rate","type":"U64"},{"name":"tick_size","type":"U64"},{"name":"lot_size","type":"U64"},{"name":"base_custodian","type":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"name":"quote_custodian","type":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":1}]}}},{"name":"creation_fee","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"Struct":{"address":"0x2","module":"sui","name":"SUI","typeArguments":[]}}]}}},{"name":"base_asset_trading_fees","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"quote_asset_trading_fees","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":1}]}}}]},"PoolCreated":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"base_asset","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"quote_asset","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"taker_fee_rate","type":"U64"},{"name":"maker_rebate_rate","type":"U64"},{"name":"tick_size","type":"U64"},{"name":"lot_size","type":"U64"}]},"TickLevel":{"abilities":{"abilities":["Store"]},"typeParameters":[],"fields":[{"name":"price","type":"U64"},{"name":"open_orders","type":{"Struct":{"address":"0x2","module":"linked_table","name":"LinkedTable","typeArguments":["U64",{"Struct":{"address":"0xdee9","module":"clob","name":"Order","typeArguments":[]}}]}}}]}},"exposedFunctions":{"account_balance":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":["U64","U64","U64","U64"]},"batch_cancel_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Vector":"U64"},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[]},"cancel_all_orders":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[]},"cancel_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[]},"create_account":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}]},"create_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":["U64","U64",{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x2","module":"sui","name":"SUI","typeArguments":[]}}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"deposit_base":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[]},"deposit_quote":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[]},"get_level2_book_status_ask_side":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","U64",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}}],"return":[{"Vector":"U64"},{"Vector":"U64"}]},"get_level2_book_status_bid_side":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","U64",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}}],"return":[{"Vector":"U64"},{"Vector":"U64"}]},"get_market_price":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64"]},"get_order_status":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Order","typeArguments":[]}}}]},"list_open_orders":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}}],"return":[{"Vector":{"Struct":{"address":"0xdee9","module":"clob","name":"Order","typeArguments":[]}}}]},"place_limit_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","U64","Bool","U64","U8",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":["U64","U64","Bool","U64"]},"place_market_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool",{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_exact_base_for_quote":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},"U64"]},"swap_exact_quote_for_base":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},"U64"]},"withdraw_base":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"withdraw_quote":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]}}},"clob_v2":{"fileFormatVersion":6,"address":"0xdee9","name":"clob_v2","friends":[],"structs":{"DepositAsset":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"quantity","type":"U64"},{"name":"owner","type":"Address"}]},"Order":{"abilities":{"abilities":["Drop","Store"]},"typeParameters":[],"fields":[{"name":"order_id","type":"U64"},{"name":"client_order_id","type":"U64"},{"name":"price","type":"U64"},{"name":"original_quantity","type":"U64"},{"name":"quantity","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":"Address"},{"name":"expire_timestamp","type":"U64"},{"name":"self_matching_prevention","type":"U8"}]},"OrderCanceled":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"client_order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":"Address"},{"name":"original_quantity","type":"U64"},{"name":"base_asset_quantity_canceled","type":"U64"},{"name":"price","type":"U64"}]},"OrderFilled":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"taker_client_order_id","type":"U64"},{"name":"maker_client_order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"taker_address","type":"Address"},{"name":"maker_address","type":"Address"},{"name":"original_quantity","type":"U64"},{"name":"base_asset_quantity_filled","type":"U64"},{"name":"base_asset_quantity_remaining","type":"U64"},{"name":"price","type":"U64"},{"name":"taker_commission","type":"U64"},{"name":"maker_rebates","type":"U64"}]},"OrderPlaced":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"order_id","type":"U64"},{"name":"client_order_id","type":"U64"},{"name":"is_bid","type":"Bool"},{"name":"owner","type":"Address"},{"name":"original_quantity","type":"U64"},{"name":"base_asset_quantity_placed","type":"U64"},{"name":"price","type":"U64"},{"name":"expire_timestamp","type":"U64"}]},"Pool":{"abilities":{"abilities":["Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"bids","type":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"Struct":{"address":"0xdee9","module":"clob_v2","name":"TickLevel","typeArguments":[]}}]}}},{"name":"asks","type":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"Struct":{"address":"0xdee9","module":"clob_v2","name":"TickLevel","typeArguments":[]}}]}}},{"name":"next_bid_order_id","type":"U64"},{"name":"next_ask_order_id","type":"U64"},{"name":"usr_open_orders","type":{"Struct":{"address":"0x2","module":"table","name":"Table","typeArguments":["Address",{"Struct":{"address":"0x2","module":"linked_table","name":"LinkedTable","typeArguments":["U64","U64"]}}]}}},{"name":"taker_fee_rate","type":"U64"},{"name":"maker_rebate_rate","type":"U64"},{"name":"tick_size","type":"U64"},{"name":"lot_size","type":"U64"},{"name":"base_custodian","type":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"name":"quote_custodian","type":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":1}]}}},{"name":"creation_fee","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"Struct":{"address":"0x2","module":"sui","name":"SUI","typeArguments":[]}}]}}},{"name":"base_asset_trading_fees","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"quote_asset_trading_fees","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":1}]}}}]},"PoolCreated":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"base_asset","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"quote_asset","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"taker_fee_rate","type":"U64"},{"name":"maker_rebate_rate","type":"U64"},{"name":"tick_size","type":"U64"},{"name":"lot_size","type":"U64"}]},"TickLevel":{"abilities":{"abilities":["Store"]},"typeParameters":[],"fields":[{"name":"price","type":"U64"},{"name":"open_orders","type":{"Struct":{"address":"0x2","module":"linked_table","name":"LinkedTable","typeArguments":["U64",{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Order","typeArguments":[]}}]}}}]},"WithdrawAsset":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool_id","type":{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}},{"name":"quantity","type":"U64"},{"name":"owner","type":"Address"}]}},"exposedFunctions":{"account_balance":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":["U64","U64","U64","U64"]},"batch_cancel_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Vector":"U64"},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[]},"cancel_all_orders":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[]},"cancel_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[]},"clean_up_expired_orders":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"Vector":"U64"},{"Vector":"Address"}],"return":[]},"create_account":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}]},"create_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":["U64","U64",{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x2","module":"sui","name":"SUI","typeArguments":[]}}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"deposit_base":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[]},"deposit_quote":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[]},"get_level2_book_status_ask_side":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","U64",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}}],"return":[{"Vector":"U64"},{"Vector":"U64"}]},"get_level2_book_status_bid_side":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","U64",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}}],"return":[{"Vector":"U64"},{"Vector":"U64"}]},"get_market_price":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":[{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U64"]}},{"Struct":{"address":"0x1","module":"option","name":"Option","typeArguments":["U64"]}}]},"get_order_status":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Order","typeArguments":[]}}}]},"list_open_orders":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":[{"Vector":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Order","typeArguments":[]}}}]},"place_limit_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","U64","U64","U8","Bool","U64","U8",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":["U64","U64","Bool","U64"]},"place_market_order":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},"U64","U64","Bool",{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_exact_base_for_quote":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},"U64",{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},"U64"]},"swap_exact_quote_for_base":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},"U64",{"Reference":{"Struct":{"address":"0x2","module":"clock","name":"Clock","typeArguments":[]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}},"U64"]},"withdraw_base":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"withdraw_quote":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"clob_v2","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]}}},"critbit":{"fileFormatVersion":6,"address":"0xdee9","name":"critbit","friends":[{"address":"0xdee9","name":"clob"},{"address":"0xdee9","name":"clob_v2"}],"structs":{"CritbitTree":{"abilities":{"abilities":["Store"]},"typeParameters":[{"constraints":{"abilities":["Store"]},"isPhantom":false}],"fields":[{"name":"root","type":"U64"},{"name":"internal_nodes","type":{"Struct":{"address":"0x2","module":"table","name":"Table","typeArguments":["U64",{"Struct":{"address":"0xdee9","module":"critbit","name":"InternalNode","typeArguments":[]}}]}}},{"name":"leaves","type":{"Struct":{"address":"0x2","module":"table","name":"Table","typeArguments":["U64",{"Struct":{"address":"0xdee9","module":"critbit","name":"Leaf","typeArguments":[{"TypeParameter":0}]}}]}}},{"name":"min_leaf","type":"U64"},{"name":"max_leaf","type":"U64"},{"name":"next_internal_node_index","type":"U64"},{"name":"next_leaf_index","type":"U64"}]},"InternalNode":{"abilities":{"abilities":["Drop","Store"]},"typeParameters":[],"fields":[{"name":"mask","type":"U64"},{"name":"left_child","type":"U64"},{"name":"right_child","type":"U64"},{"name":"parent","type":"U64"}]},"Leaf":{"abilities":{"abilities":["Drop","Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":false}],"fields":[{"name":"key","type":"U64"},{"name":"value","type":{"TypeParameter":0}},{"name":"parent","type":"U64"}]}},"exposedFunctions":{"borrow_leaf_by_index":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":[{"Reference":{"TypeParameter":0}}]},"borrow_leaf_by_key":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":[{"Reference":{"TypeParameter":0}}]},"borrow_mut_leaf_by_index":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":[{"MutableReference":{"TypeParameter":0}}]},"destroy_empty":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"drop":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Drop","Store"]}],"parameters":[{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"find_closest_key":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":["U64"]},"find_leaf":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":["Bool","U64"]},"insert_leaf":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64",{"TypeParameter":0}],"return":["U64"]},"is_empty":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}}],"return":["Bool"]},"max_leaf":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}}],"return":["U64","U64"]},"min_leaf":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}}],"return":["U64","U64"]},"new":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}]},"next_leaf":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":["U64","U64"]},"previous_leaf":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":["U64","U64"]},"remove_leaf_by_index":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}},"U64"],"return":[{"TypeParameter":0}]},"size":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":["Store"]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"critbit","name":"CritbitTree","typeArguments":[{"TypeParameter":0}]}}}],"return":["U64"]}}},"custodian":{"fileFormatVersion":6,"address":"0xdee9","name":"custodian","friends":[{"address":"0xdee9","name":"clob"}],"structs":{"Account":{"abilities":{"abilities":["Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"available_balance","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"locked_balance","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}}]},"AccountCap":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}}]},"Custodian":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"account_balances","type":{"Struct":{"address":"0x2","module":"table","name":"Table","typeArguments":[{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}},{"Struct":{"address":"0xdee9","module":"custodian","name":"Account","typeArguments":[{"TypeParameter":0}]}}]}}}]}},"exposedFunctions":{"account_available_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}],"return":["U64"]},"account_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}],"return":["U64","U64"]},"account_locked_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}}],"return":["U64"]},"decrease_user_available_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},"U64"],"return":[{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}]},"decrease_user_locked_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}},"U64"],"return":[{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}]},"increase_user_available_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}},{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"increase_user_locked_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"lock_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},"U64"],"return":[]},"mint_account_cap":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}]},"new":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}]},"unlock_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Struct":{"address":"0x2","module":"object","name":"ID","typeArguments":[]}},"U64"],"return":[]},"withdraw_asset":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]}}},"custodian_v2":{"fileFormatVersion":6,"address":"0xdee9","name":"custodian_v2","friends":[{"address":"0xdee9","name":"clob_v2"}],"structs":{"Account":{"abilities":{"abilities":["Store"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"available_balance","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"locked_balance","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}}]},"AccountCap":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"owner","type":"Address"}]},"Custodian":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"account_balances","type":{"Struct":{"address":"0x2","module":"table","name":"Table","typeArguments":["Address",{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Account","typeArguments":[{"TypeParameter":0}]}}]}}}]}},"exposedFunctions":{"account_available_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"Address"],"return":["U64"]},"account_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"Address"],"return":["U64","U64"]},"account_locked_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"Address"],"return":["U64"]},"account_owner":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}}],"return":["Address"]},"create_child_account_cap":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}]},"decrease_user_available_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},"U64"],"return":[{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}]},"decrease_user_locked_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"Address","U64"],"return":[{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}]},"delete_account_cap":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}],"return":[]},"increase_user_available_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"Address",{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"increase_user_locked_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}],"return":[]},"lock_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},"U64"],"return":[]},"mint_account_cap":{"visibility":"Friend","isEntry":false,"typeParameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}]},"new":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}]},"unlock_balance":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"Address","U64"],"return":[]},"withdraw_asset":{"visibility":"Friend","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"Custodian","typeArguments":[{"TypeParameter":0}]}}},"U64",{"Reference":{"Struct":{"address":"0xdee9","module":"custodian_v2","name":"AccountCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]}}},"math":{"fileFormatVersion":6,"address":"0xdee9","name":"math","friends":[{"address":"0xdee9","name":"clob"},{"address":"0xdee9","name":"clob_v2"},{"address":"0xdee9","name":"critbit"}],"structs":{},"exposedFunctions":{"count_leading_zeros":{"visibility":"Friend","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":["U8"]},"div_round":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["Bool","U64"]},"mul":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"mul_round":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["Bool","U64"]},"unsafe_div":{"visibility":"Friend","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"unsafe_div_round":{"visibility":"Friend","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["Bool","U64"]},"unsafe_mul":{"visibility":"Friend","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"unsafe_mul_round":{"visibility":"Friend","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["Bool","U64"]}}}}'
3138
+ );
3139
+
3140
+ export function loadAllTypes(coder: MoveCoder) {
3141
+ _0x2.loadAllTypes(coder);
3142
+ _0x1.loadAllTypes(coder);
3143
+ for (const m of Object.values(MODULES)) {
3144
+ coder.load(m as any);
3145
+ }
3146
+ }
3147
+
3148
+ loadAllTypes(defaultMoveCoder());