@xccy/ts-sdk 0.1.2 → 0.1.3

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.
@@ -0,0 +1,1560 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import type {
5
+ BaseContract,
6
+ BigNumberish,
7
+ BytesLike,
8
+ FunctionFragment,
9
+ Result,
10
+ Interface,
11
+ EventFragment,
12
+ AddressLike,
13
+ ContractRunner,
14
+ ContractMethod,
15
+ Listener,
16
+ } from "ethers";
17
+ import type {
18
+ TypedContractEvent,
19
+ TypedDeferredTopicFilter,
20
+ TypedEventLog,
21
+ TypedLogDescription,
22
+ TypedListener,
23
+ TypedContractMethod,
24
+ } from "./common";
25
+
26
+ export declare namespace Account {
27
+ export type AccountIdStruct = {
28
+ owner: AddressLike;
29
+ id: BigNumberish;
30
+ isolatedMarginToken: AddressLike;
31
+ };
32
+
33
+ export type AccountIdStructOutput = [
34
+ owner: string,
35
+ id: bigint,
36
+ isolatedMarginToken: string
37
+ ] & { owner: string; id: bigint; isolatedMarginToken: string };
38
+ }
39
+
40
+ export declare namespace PoolKey {
41
+ export type KeyStruct = {
42
+ underlyingAsset: AddressLike;
43
+ compoundToken: AddressLike;
44
+ termStartTimestampWad: BigNumberish;
45
+ termEndTimestampWad: BigNumberish;
46
+ feeWad: BigNumberish;
47
+ tickSpacing: BigNumberish;
48
+ };
49
+
50
+ export type KeyStructOutput = [
51
+ underlyingAsset: string,
52
+ compoundToken: string,
53
+ termStartTimestampWad: bigint,
54
+ termEndTimestampWad: bigint,
55
+ feeWad: bigint,
56
+ tickSpacing: bigint
57
+ ] & {
58
+ underlyingAsset: string;
59
+ compoundToken: string;
60
+ termStartTimestampWad: bigint;
61
+ termEndTimestampWad: bigint;
62
+ feeWad: bigint;
63
+ tickSpacing: bigint;
64
+ };
65
+ }
66
+
67
+ export declare namespace CollateralEngineStorage {
68
+ export type AssetConfigStruct = {
69
+ ltvWad: BigNumberish;
70
+ liquidationThresholdWad: BigNumberish;
71
+ autoExchangeBonusWad: BigNumberish;
72
+ };
73
+
74
+ export type AssetConfigStructOutput = [
75
+ ltvWad: bigint,
76
+ liquidationThresholdWad: bigint,
77
+ autoExchangeBonusWad: bigint
78
+ ] & {
79
+ ltvWad: bigint;
80
+ liquidationThresholdWad: bigint;
81
+ autoExchangeBonusWad: bigint;
82
+ };
83
+ }
84
+
85
+ export declare namespace Position {
86
+ export type InfoStruct = {
87
+ _liquidity: BigNumberish;
88
+ fixedTokenGrowthInsideLastX128: BigNumberish;
89
+ variableTokenGrowthInsideLastX128: BigNumberish;
90
+ fixedTokenBalance: BigNumberish;
91
+ variableTokenBalance: BigNumberish;
92
+ tradedNotional: BigNumberish;
93
+ lpLockedUnwindFee: BigNumberish;
94
+ accumulatedFees: BigNumberish;
95
+ };
96
+
97
+ export type InfoStructOutput = [
98
+ _liquidity: bigint,
99
+ fixedTokenGrowthInsideLastX128: bigint,
100
+ variableTokenGrowthInsideLastX128: bigint,
101
+ fixedTokenBalance: bigint,
102
+ variableTokenBalance: bigint,
103
+ tradedNotional: bigint,
104
+ lpLockedUnwindFee: bigint,
105
+ accumulatedFees: bigint
106
+ ] & {
107
+ _liquidity: bigint;
108
+ fixedTokenGrowthInsideLastX128: bigint;
109
+ variableTokenGrowthInsideLastX128: bigint;
110
+ fixedTokenBalance: bigint;
111
+ variableTokenBalance: bigint;
112
+ tradedNotional: bigint;
113
+ lpLockedUnwindFee: bigint;
114
+ accumulatedFees: bigint;
115
+ };
116
+ }
117
+
118
+ export declare namespace ICollateralEngine {
119
+ export type UpdatePositionParamsStruct = {
120
+ poolKey: PoolKey.KeyStruct;
121
+ account: Account.AccountIdStruct;
122
+ tickLower: BigNumberish;
123
+ tickUpper: BigNumberish;
124
+ liquidityDelta: BigNumberish;
125
+ fixedTokenDelta: BigNumberish;
126
+ variableTokenDelta: BigNumberish;
127
+ fixedTokenGrowthInsideX128: BigNumberish;
128
+ variableTokenGrowthInsideX128: BigNumberish;
129
+ };
130
+
131
+ export type UpdatePositionParamsStructOutput = [
132
+ poolKey: PoolKey.KeyStructOutput,
133
+ account: Account.AccountIdStructOutput,
134
+ tickLower: bigint,
135
+ tickUpper: bigint,
136
+ liquidityDelta: bigint,
137
+ fixedTokenDelta: bigint,
138
+ variableTokenDelta: bigint,
139
+ fixedTokenGrowthInsideX128: bigint,
140
+ variableTokenGrowthInsideX128: bigint
141
+ ] & {
142
+ poolKey: PoolKey.KeyStructOutput;
143
+ account: Account.AccountIdStructOutput;
144
+ tickLower: bigint;
145
+ tickUpper: bigint;
146
+ liquidityDelta: bigint;
147
+ fixedTokenDelta: bigint;
148
+ variableTokenDelta: bigint;
149
+ fixedTokenGrowthInsideX128: bigint;
150
+ variableTokenGrowthInsideX128: bigint;
151
+ };
152
+ }
153
+
154
+ export interface ICollateralEngineInterface extends Interface {
155
+ getFunction(
156
+ nameOrSignature:
157
+ | "aprOracle"
158
+ | "calculateAccountObligation((address,uint96,address),bool)"
159
+ | "calculateAccountObligation((address,uint96,address))"
160
+ | "calculateLiquidationAmounts"
161
+ | "checkMarginRequirement"
162
+ | "dustThresholdWad"
163
+ | "eliminateDeficit"
164
+ | "esm"
165
+ | "executeEarlySettlement"
166
+ | "getAccountBalance"
167
+ | "getAccountMarginValues"
168
+ | "getMarginAssetConfig"
169
+ | "getPoolKey"
170
+ | "getPositionInfo"
171
+ | "getTokenDeficit"
172
+ | "initialize"
173
+ | "isAccountOperator"
174
+ | "liquidatePosition"
175
+ | "oracleHub"
176
+ | "previewPositionBalances"
177
+ | "setAccountOperator"
178
+ | "setAprOracle"
179
+ | "setDustThreshold"
180
+ | "setESM"
181
+ | "setMarginAssetConfig"
182
+ | "setOracleHub"
183
+ | "setVAMMManager"
184
+ | "settlePosition"
185
+ | "updateAccountMargin"
186
+ | "updatePositionPostVAMMAction"
187
+ | "vammManager"
188
+ ): FunctionFragment;
189
+
190
+ getEvent(
191
+ nameOrSignatureOrTopic:
192
+ | "AccountOperatorUpdate"
193
+ | "AprOracleSetting"
194
+ | "AutoExchange"
195
+ | "DustThresholdUpdate"
196
+ | "MarginAssetConfigUpdate"
197
+ | "MarginUpdate"
198
+ | "OracleHubSetting"
199
+ | "PositionLiquidated"
200
+ | "PositionSettlement"
201
+ | "PositionUpdate"
202
+ | "ProtocolDeficitEliminated"
203
+ | "ProtocolDeficitIncreased"
204
+ | "VAMMSetting"
205
+ | "WorstCaseVariableFactorConfigSet"
206
+ ): EventFragment;
207
+
208
+ encodeFunctionData(functionFragment: "aprOracle", values?: undefined): string;
209
+ encodeFunctionData(
210
+ functionFragment: "calculateAccountObligation((address,uint96,address),bool)",
211
+ values: [Account.AccountIdStruct, boolean]
212
+ ): string;
213
+ encodeFunctionData(
214
+ functionFragment: "calculateAccountObligation((address,uint96,address))",
215
+ values: [Account.AccountIdStruct]
216
+ ): string;
217
+ encodeFunctionData(
218
+ functionFragment: "calculateLiquidationAmounts",
219
+ values: [
220
+ PoolKey.KeyStruct,
221
+ BigNumberish,
222
+ AddressLike,
223
+ BigNumberish,
224
+ BigNumberish
225
+ ]
226
+ ): string;
227
+ encodeFunctionData(
228
+ functionFragment: "checkMarginRequirement",
229
+ values: [Account.AccountIdStruct]
230
+ ): string;
231
+ encodeFunctionData(
232
+ functionFragment: "dustThresholdWad",
233
+ values?: undefined
234
+ ): string;
235
+ encodeFunctionData(
236
+ functionFragment: "eliminateDeficit",
237
+ values: [AddressLike, BigNumberish]
238
+ ): string;
239
+ encodeFunctionData(functionFragment: "esm", values?: undefined): string;
240
+ encodeFunctionData(
241
+ functionFragment: "executeEarlySettlement",
242
+ values: [
243
+ Account.AccountIdStruct,
244
+ BytesLike,
245
+ BigNumberish,
246
+ BigNumberish,
247
+ BigNumberish
248
+ ]
249
+ ): string;
250
+ encodeFunctionData(
251
+ functionFragment: "getAccountBalance",
252
+ values: [Account.AccountIdStruct, AddressLike]
253
+ ): string;
254
+ encodeFunctionData(
255
+ functionFragment: "getAccountMarginValues",
256
+ values: [Account.AccountIdStruct]
257
+ ): string;
258
+ encodeFunctionData(
259
+ functionFragment: "getMarginAssetConfig",
260
+ values: [AddressLike]
261
+ ): string;
262
+ encodeFunctionData(
263
+ functionFragment: "getPoolKey",
264
+ values: [BytesLike]
265
+ ): string;
266
+ encodeFunctionData(
267
+ functionFragment: "getPositionInfo",
268
+ values: [Account.AccountIdStruct, BytesLike, BigNumberish, BigNumberish]
269
+ ): string;
270
+ encodeFunctionData(
271
+ functionFragment: "getTokenDeficit",
272
+ values: [AddressLike]
273
+ ): string;
274
+ encodeFunctionData(
275
+ functionFragment: "initialize",
276
+ values: [AddressLike, AddressLike]
277
+ ): string;
278
+ encodeFunctionData(
279
+ functionFragment: "isAccountOperator",
280
+ values: [AddressLike, AddressLike]
281
+ ): string;
282
+ encodeFunctionData(
283
+ functionFragment: "liquidatePosition",
284
+ values: [
285
+ Account.AccountIdStruct,
286
+ BytesLike,
287
+ BigNumberish,
288
+ BigNumberish,
289
+ AddressLike,
290
+ BigNumberish
291
+ ]
292
+ ): string;
293
+ encodeFunctionData(functionFragment: "oracleHub", values?: undefined): string;
294
+ encodeFunctionData(
295
+ functionFragment: "previewPositionBalances",
296
+ values: [Account.AccountIdStruct, BytesLike, BigNumberish, BigNumberish]
297
+ ): string;
298
+ encodeFunctionData(
299
+ functionFragment: "setAccountOperator",
300
+ values: [AddressLike, AddressLike, boolean]
301
+ ): string;
302
+ encodeFunctionData(
303
+ functionFragment: "setAprOracle",
304
+ values: [AddressLike]
305
+ ): string;
306
+ encodeFunctionData(
307
+ functionFragment: "setDustThreshold",
308
+ values: [BigNumberish]
309
+ ): string;
310
+ encodeFunctionData(functionFragment: "setESM", values: [AddressLike]): string;
311
+ encodeFunctionData(
312
+ functionFragment: "setMarginAssetConfig",
313
+ values: [AddressLike, BigNumberish, BigNumberish, BigNumberish]
314
+ ): string;
315
+ encodeFunctionData(
316
+ functionFragment: "setOracleHub",
317
+ values: [AddressLike]
318
+ ): string;
319
+ encodeFunctionData(
320
+ functionFragment: "setVAMMManager",
321
+ values: [AddressLike]
322
+ ): string;
323
+ encodeFunctionData(
324
+ functionFragment: "settlePosition",
325
+ values: [Account.AccountIdStruct, PoolKey.KeyStruct, AddressLike[]]
326
+ ): string;
327
+ encodeFunctionData(
328
+ functionFragment: "updateAccountMargin",
329
+ values: [Account.AccountIdStruct, AddressLike, BigNumberish]
330
+ ): string;
331
+ encodeFunctionData(
332
+ functionFragment: "updatePositionPostVAMMAction",
333
+ values: [ICollateralEngine.UpdatePositionParamsStruct, boolean]
334
+ ): string;
335
+ encodeFunctionData(
336
+ functionFragment: "vammManager",
337
+ values?: undefined
338
+ ): string;
339
+
340
+ decodeFunctionResult(functionFragment: "aprOracle", data: BytesLike): Result;
341
+ decodeFunctionResult(
342
+ functionFragment: "calculateAccountObligation((address,uint96,address),bool)",
343
+ data: BytesLike
344
+ ): Result;
345
+ decodeFunctionResult(
346
+ functionFragment: "calculateAccountObligation((address,uint96,address))",
347
+ data: BytesLike
348
+ ): Result;
349
+ decodeFunctionResult(
350
+ functionFragment: "calculateLiquidationAmounts",
351
+ data: BytesLike
352
+ ): Result;
353
+ decodeFunctionResult(
354
+ functionFragment: "checkMarginRequirement",
355
+ data: BytesLike
356
+ ): Result;
357
+ decodeFunctionResult(
358
+ functionFragment: "dustThresholdWad",
359
+ data: BytesLike
360
+ ): Result;
361
+ decodeFunctionResult(
362
+ functionFragment: "eliminateDeficit",
363
+ data: BytesLike
364
+ ): Result;
365
+ decodeFunctionResult(functionFragment: "esm", data: BytesLike): Result;
366
+ decodeFunctionResult(
367
+ functionFragment: "executeEarlySettlement",
368
+ data: BytesLike
369
+ ): Result;
370
+ decodeFunctionResult(
371
+ functionFragment: "getAccountBalance",
372
+ data: BytesLike
373
+ ): Result;
374
+ decodeFunctionResult(
375
+ functionFragment: "getAccountMarginValues",
376
+ data: BytesLike
377
+ ): Result;
378
+ decodeFunctionResult(
379
+ functionFragment: "getMarginAssetConfig",
380
+ data: BytesLike
381
+ ): Result;
382
+ decodeFunctionResult(functionFragment: "getPoolKey", data: BytesLike): Result;
383
+ decodeFunctionResult(
384
+ functionFragment: "getPositionInfo",
385
+ data: BytesLike
386
+ ): Result;
387
+ decodeFunctionResult(
388
+ functionFragment: "getTokenDeficit",
389
+ data: BytesLike
390
+ ): Result;
391
+ decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
392
+ decodeFunctionResult(
393
+ functionFragment: "isAccountOperator",
394
+ data: BytesLike
395
+ ): Result;
396
+ decodeFunctionResult(
397
+ functionFragment: "liquidatePosition",
398
+ data: BytesLike
399
+ ): Result;
400
+ decodeFunctionResult(functionFragment: "oracleHub", data: BytesLike): Result;
401
+ decodeFunctionResult(
402
+ functionFragment: "previewPositionBalances",
403
+ data: BytesLike
404
+ ): Result;
405
+ decodeFunctionResult(
406
+ functionFragment: "setAccountOperator",
407
+ data: BytesLike
408
+ ): Result;
409
+ decodeFunctionResult(
410
+ functionFragment: "setAprOracle",
411
+ data: BytesLike
412
+ ): Result;
413
+ decodeFunctionResult(
414
+ functionFragment: "setDustThreshold",
415
+ data: BytesLike
416
+ ): Result;
417
+ decodeFunctionResult(functionFragment: "setESM", data: BytesLike): Result;
418
+ decodeFunctionResult(
419
+ functionFragment: "setMarginAssetConfig",
420
+ data: BytesLike
421
+ ): Result;
422
+ decodeFunctionResult(
423
+ functionFragment: "setOracleHub",
424
+ data: BytesLike
425
+ ): Result;
426
+ decodeFunctionResult(
427
+ functionFragment: "setVAMMManager",
428
+ data: BytesLike
429
+ ): Result;
430
+ decodeFunctionResult(
431
+ functionFragment: "settlePosition",
432
+ data: BytesLike
433
+ ): Result;
434
+ decodeFunctionResult(
435
+ functionFragment: "updateAccountMargin",
436
+ data: BytesLike
437
+ ): Result;
438
+ decodeFunctionResult(
439
+ functionFragment: "updatePositionPostVAMMAction",
440
+ data: BytesLike
441
+ ): Result;
442
+ decodeFunctionResult(
443
+ functionFragment: "vammManager",
444
+ data: BytesLike
445
+ ): Result;
446
+ }
447
+
448
+ export namespace AccountOperatorUpdateEvent {
449
+ export type InputTuple = [
450
+ owner: AddressLike,
451
+ operator: AddressLike,
452
+ approved: boolean
453
+ ];
454
+ export type OutputTuple = [
455
+ owner: string,
456
+ operator: string,
457
+ approved: boolean
458
+ ];
459
+ export interface OutputObject {
460
+ owner: string;
461
+ operator: string;
462
+ approved: boolean;
463
+ }
464
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
465
+ export type Filter = TypedDeferredTopicFilter<Event>;
466
+ export type Log = TypedEventLog<Event>;
467
+ export type LogDescription = TypedLogDescription<Event>;
468
+ }
469
+
470
+ export namespace AprOracleSettingEvent {
471
+ export type InputTuple = [aprOracle: AddressLike];
472
+ export type OutputTuple = [aprOracle: string];
473
+ export interface OutputObject {
474
+ aprOracle: string;
475
+ }
476
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
477
+ export type Filter = TypedDeferredTopicFilter<Event>;
478
+ export type Log = TypedEventLog<Event>;
479
+ export type LogDescription = TypedLogDescription<Event>;
480
+ }
481
+
482
+ export namespace AutoExchangeEvent {
483
+ export type InputTuple = [
484
+ owner: AddressLike,
485
+ accountId: BigNumberish,
486
+ isolatedMarginToken: AddressLike,
487
+ poolId: BytesLike,
488
+ underlyingAsset: AddressLike,
489
+ underlyingAmount: BigNumberish
490
+ ];
491
+ export type OutputTuple = [
492
+ owner: string,
493
+ accountId: bigint,
494
+ isolatedMarginToken: string,
495
+ poolId: string,
496
+ underlyingAsset: string,
497
+ underlyingAmount: bigint
498
+ ];
499
+ export interface OutputObject {
500
+ owner: string;
501
+ accountId: bigint;
502
+ isolatedMarginToken: string;
503
+ poolId: string;
504
+ underlyingAsset: string;
505
+ underlyingAmount: bigint;
506
+ }
507
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
508
+ export type Filter = TypedDeferredTopicFilter<Event>;
509
+ export type Log = TypedEventLog<Event>;
510
+ export type LogDescription = TypedLogDescription<Event>;
511
+ }
512
+
513
+ export namespace DustThresholdUpdateEvent {
514
+ export type InputTuple = [dustThresholdWad: BigNumberish];
515
+ export type OutputTuple = [dustThresholdWad: bigint];
516
+ export interface OutputObject {
517
+ dustThresholdWad: bigint;
518
+ }
519
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
520
+ export type Filter = TypedDeferredTopicFilter<Event>;
521
+ export type Log = TypedEventLog<Event>;
522
+ export type LogDescription = TypedLogDescription<Event>;
523
+ }
524
+
525
+ export namespace MarginAssetConfigUpdateEvent {
526
+ export type InputTuple = [
527
+ token: AddressLike,
528
+ ltvWad: BigNumberish,
529
+ liquidationThresholdWad: BigNumberish,
530
+ autoExchangeBonusWad: BigNumberish
531
+ ];
532
+ export type OutputTuple = [
533
+ token: string,
534
+ ltvWad: bigint,
535
+ liquidationThresholdWad: bigint,
536
+ autoExchangeBonusWad: bigint
537
+ ];
538
+ export interface OutputObject {
539
+ token: string;
540
+ ltvWad: bigint;
541
+ liquidationThresholdWad: bigint;
542
+ autoExchangeBonusWad: bigint;
543
+ }
544
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
545
+ export type Filter = TypedDeferredTopicFilter<Event>;
546
+ export type Log = TypedEventLog<Event>;
547
+ export type LogDescription = TypedLogDescription<Event>;
548
+ }
549
+
550
+ export namespace MarginUpdateEvent {
551
+ export type InputTuple = [
552
+ owner: AddressLike,
553
+ accountId: BigNumberish,
554
+ isolatedMarginToken: AddressLike,
555
+ token: AddressLike,
556
+ marginDelta: BigNumberish
557
+ ];
558
+ export type OutputTuple = [
559
+ owner: string,
560
+ accountId: bigint,
561
+ isolatedMarginToken: string,
562
+ token: string,
563
+ marginDelta: bigint
564
+ ];
565
+ export interface OutputObject {
566
+ owner: string;
567
+ accountId: bigint;
568
+ isolatedMarginToken: string;
569
+ token: string;
570
+ marginDelta: bigint;
571
+ }
572
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
573
+ export type Filter = TypedDeferredTopicFilter<Event>;
574
+ export type Log = TypedEventLog<Event>;
575
+ export type LogDescription = TypedLogDescription<Event>;
576
+ }
577
+
578
+ export namespace OracleHubSettingEvent {
579
+ export type InputTuple = [oracleHub: AddressLike];
580
+ export type OutputTuple = [oracleHub: string];
581
+ export interface OutputObject {
582
+ oracleHub: string;
583
+ }
584
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
585
+ export type Filter = TypedDeferredTopicFilter<Event>;
586
+ export type Log = TypedEventLog<Event>;
587
+ export type LogDescription = TypedLogDescription<Event>;
588
+ }
589
+
590
+ export namespace PositionLiquidatedEvent {
591
+ export type InputTuple = [
592
+ accountOwner: AddressLike,
593
+ accountId: BigNumberish,
594
+ accountIsolatedMarginToken: AddressLike,
595
+ poolId: BytesLike,
596
+ tickLower: BigNumberish,
597
+ tickUpper: BigNumberish,
598
+ collateralAssetTaken: AddressLike,
599
+ liquidator: AddressLike,
600
+ collateralSeized: BigNumberish,
601
+ effectiveDebtCovered: BigNumberish,
602
+ fixedCovered: BigNumberish
603
+ ];
604
+ export type OutputTuple = [
605
+ accountOwner: string,
606
+ accountId: bigint,
607
+ accountIsolatedMarginToken: string,
608
+ poolId: string,
609
+ tickLower: bigint,
610
+ tickUpper: bigint,
611
+ collateralAssetTaken: string,
612
+ liquidator: string,
613
+ collateralSeized: bigint,
614
+ effectiveDebtCovered: bigint,
615
+ fixedCovered: bigint
616
+ ];
617
+ export interface OutputObject {
618
+ accountOwner: string;
619
+ accountId: bigint;
620
+ accountIsolatedMarginToken: string;
621
+ poolId: string;
622
+ tickLower: bigint;
623
+ tickUpper: bigint;
624
+ collateralAssetTaken: string;
625
+ liquidator: string;
626
+ collateralSeized: bigint;
627
+ effectiveDebtCovered: bigint;
628
+ fixedCovered: bigint;
629
+ }
630
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
631
+ export type Filter = TypedDeferredTopicFilter<Event>;
632
+ export type Log = TypedEventLog<Event>;
633
+ export type LogDescription = TypedLogDescription<Event>;
634
+ }
635
+
636
+ export namespace PositionSettlementEvent {
637
+ export type InputTuple = [
638
+ owner: AddressLike,
639
+ accountId: BigNumberish,
640
+ isolatedMarginToken: AddressLike,
641
+ poolId: BytesLike,
642
+ settlementCashflow: BigNumberish
643
+ ];
644
+ export type OutputTuple = [
645
+ owner: string,
646
+ accountId: bigint,
647
+ isolatedMarginToken: string,
648
+ poolId: string,
649
+ settlementCashflow: bigint
650
+ ];
651
+ export interface OutputObject {
652
+ owner: string;
653
+ accountId: bigint;
654
+ isolatedMarginToken: string;
655
+ poolId: string;
656
+ settlementCashflow: bigint;
657
+ }
658
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
659
+ export type Filter = TypedDeferredTopicFilter<Event>;
660
+ export type Log = TypedEventLog<Event>;
661
+ export type LogDescription = TypedLogDescription<Event>;
662
+ }
663
+
664
+ export namespace PositionUpdateEvent {
665
+ export type InputTuple = [
666
+ owner: AddressLike,
667
+ accountId: BigNumberish,
668
+ isolatedMarginToken: AddressLike,
669
+ poolId: BytesLike,
670
+ tickLower: BigNumberish,
671
+ tickUpper: BigNumberish,
672
+ _liquidity: BigNumberish,
673
+ fixedTokenBalance: BigNumberish,
674
+ variableTokenBalance: BigNumberish,
675
+ accumulatedFees: BigNumberish
676
+ ];
677
+ export type OutputTuple = [
678
+ owner: string,
679
+ accountId: bigint,
680
+ isolatedMarginToken: string,
681
+ poolId: string,
682
+ tickLower: bigint,
683
+ tickUpper: bigint,
684
+ _liquidity: bigint,
685
+ fixedTokenBalance: bigint,
686
+ variableTokenBalance: bigint,
687
+ accumulatedFees: bigint
688
+ ];
689
+ export interface OutputObject {
690
+ owner: string;
691
+ accountId: bigint;
692
+ isolatedMarginToken: string;
693
+ poolId: string;
694
+ tickLower: bigint;
695
+ tickUpper: bigint;
696
+ _liquidity: bigint;
697
+ fixedTokenBalance: bigint;
698
+ variableTokenBalance: bigint;
699
+ accumulatedFees: bigint;
700
+ }
701
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
702
+ export type Filter = TypedDeferredTopicFilter<Event>;
703
+ export type Log = TypedEventLog<Event>;
704
+ export type LogDescription = TypedLogDescription<Event>;
705
+ }
706
+
707
+ export namespace ProtocolDeficitEliminatedEvent {
708
+ export type InputTuple = [
709
+ token: AddressLike,
710
+ amount: BigNumberish,
711
+ remainingDeficit: BigNumberish
712
+ ];
713
+ export type OutputTuple = [
714
+ token: string,
715
+ amount: bigint,
716
+ remainingDeficit: bigint
717
+ ];
718
+ export interface OutputObject {
719
+ token: string;
720
+ amount: bigint;
721
+ remainingDeficit: bigint;
722
+ }
723
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
724
+ export type Filter = TypedDeferredTopicFilter<Event>;
725
+ export type Log = TypedEventLog<Event>;
726
+ export type LogDescription = TypedLogDescription<Event>;
727
+ }
728
+
729
+ export namespace ProtocolDeficitIncreasedEvent {
730
+ export type InputTuple = [
731
+ token: AddressLike,
732
+ amount: BigNumberish,
733
+ totalDeficit: BigNumberish
734
+ ];
735
+ export type OutputTuple = [
736
+ token: string,
737
+ amount: bigint,
738
+ totalDeficit: bigint
739
+ ];
740
+ export interface OutputObject {
741
+ token: string;
742
+ amount: bigint;
743
+ totalDeficit: bigint;
744
+ }
745
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
746
+ export type Filter = TypedDeferredTopicFilter<Event>;
747
+ export type Log = TypedEventLog<Event>;
748
+ export type LogDescription = TypedLogDescription<Event>;
749
+ }
750
+
751
+ export namespace VAMMSettingEvent {
752
+ export type InputTuple = [vamm: AddressLike];
753
+ export type OutputTuple = [vamm: string];
754
+ export interface OutputObject {
755
+ vamm: string;
756
+ }
757
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
758
+ export type Filter = TypedDeferredTopicFilter<Event>;
759
+ export type Log = TypedEventLog<Event>;
760
+ export type LogDescription = TypedLogDescription<Event>;
761
+ }
762
+
763
+ export namespace WorstCaseVariableFactorConfigSetEvent {
764
+ export type InputTuple = [
765
+ poolId: BytesLike,
766
+ worstCaseVariableFactorPositiveWad: BigNumberish,
767
+ worstCaseVariableFactorNegativeWad: BigNumberish,
768
+ worstCaseVariableFactorPositiveTick: BigNumberish,
769
+ worstCaseVariableFactorNegativeTick: BigNumberish
770
+ ];
771
+ export type OutputTuple = [
772
+ poolId: string,
773
+ worstCaseVariableFactorPositiveWad: bigint,
774
+ worstCaseVariableFactorNegativeWad: bigint,
775
+ worstCaseVariableFactorPositiveTick: bigint,
776
+ worstCaseVariableFactorNegativeTick: bigint
777
+ ];
778
+ export interface OutputObject {
779
+ poolId: string;
780
+ worstCaseVariableFactorPositiveWad: bigint;
781
+ worstCaseVariableFactorNegativeWad: bigint;
782
+ worstCaseVariableFactorPositiveTick: bigint;
783
+ worstCaseVariableFactorNegativeTick: bigint;
784
+ }
785
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
786
+ export type Filter = TypedDeferredTopicFilter<Event>;
787
+ export type Log = TypedEventLog<Event>;
788
+ export type LogDescription = TypedLogDescription<Event>;
789
+ }
790
+
791
+ export interface ICollateralEngine extends BaseContract {
792
+ connect(runner?: ContractRunner | null): ICollateralEngine;
793
+ waitForDeployment(): Promise<this>;
794
+
795
+ interface: ICollateralEngineInterface;
796
+
797
+ queryFilter<TCEvent extends TypedContractEvent>(
798
+ event: TCEvent,
799
+ fromBlockOrBlockhash?: string | number | undefined,
800
+ toBlock?: string | number | undefined
801
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
802
+ queryFilter<TCEvent extends TypedContractEvent>(
803
+ filter: TypedDeferredTopicFilter<TCEvent>,
804
+ fromBlockOrBlockhash?: string | number | undefined,
805
+ toBlock?: string | number | undefined
806
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
807
+
808
+ on<TCEvent extends TypedContractEvent>(
809
+ event: TCEvent,
810
+ listener: TypedListener<TCEvent>
811
+ ): Promise<this>;
812
+ on<TCEvent extends TypedContractEvent>(
813
+ filter: TypedDeferredTopicFilter<TCEvent>,
814
+ listener: TypedListener<TCEvent>
815
+ ): Promise<this>;
816
+
817
+ once<TCEvent extends TypedContractEvent>(
818
+ event: TCEvent,
819
+ listener: TypedListener<TCEvent>
820
+ ): Promise<this>;
821
+ once<TCEvent extends TypedContractEvent>(
822
+ filter: TypedDeferredTopicFilter<TCEvent>,
823
+ listener: TypedListener<TCEvent>
824
+ ): Promise<this>;
825
+
826
+ listeners<TCEvent extends TypedContractEvent>(
827
+ event: TCEvent
828
+ ): Promise<Array<TypedListener<TCEvent>>>;
829
+ listeners(eventName?: string): Promise<Array<Listener>>;
830
+ removeAllListeners<TCEvent extends TypedContractEvent>(
831
+ event?: TCEvent
832
+ ): Promise<this>;
833
+
834
+ aprOracle: TypedContractMethod<[], [string], "view">;
835
+
836
+ "calculateAccountObligation((address,uint96,address),bool)": TypedContractMethod<
837
+ [account: Account.AccountIdStruct, includePositionsGrowth: boolean],
838
+ [bigint],
839
+ "view"
840
+ >;
841
+
842
+ "calculateAccountObligation((address,uint96,address))": TypedContractMethod<
843
+ [account: Account.AccountIdStruct],
844
+ [bigint],
845
+ "view"
846
+ >;
847
+
848
+ calculateLiquidationAmounts: TypedContractMethod<
849
+ [
850
+ poolKey: PoolKey.KeyStruct,
851
+ fixedBalance: BigNumberish,
852
+ collateralAssetToTake: AddressLike,
853
+ debtToCover: BigNumberish,
854
+ collateralUserBalance: BigNumberish
855
+ ],
856
+ [
857
+ [bigint, bigint, bigint] & {
858
+ collateralToSeize: bigint;
859
+ effectiveDebt: bigint;
860
+ fixedCovered: bigint;
861
+ }
862
+ ],
863
+ "view"
864
+ >;
865
+
866
+ checkMarginRequirement: TypedContractMethod<
867
+ [account: Account.AccountIdStruct],
868
+ [bigint],
869
+ "nonpayable"
870
+ >;
871
+
872
+ dustThresholdWad: TypedContractMethod<[], [bigint], "view">;
873
+
874
+ eliminateDeficit: TypedContractMethod<
875
+ [token: AddressLike, amount: BigNumberish],
876
+ [void],
877
+ "nonpayable"
878
+ >;
879
+
880
+ esm: TypedContractMethod<[], [string], "view">;
881
+
882
+ executeEarlySettlement: TypedContractMethod<
883
+ [
884
+ account: Account.AccountIdStruct,
885
+ poolId: BytesLike,
886
+ tickLower: BigNumberish,
887
+ tickUpper: BigNumberish,
888
+ amountDelta: BigNumberish
889
+ ],
890
+ [void],
891
+ "nonpayable"
892
+ >;
893
+
894
+ getAccountBalance: TypedContractMethod<
895
+ [account: Account.AccountIdStruct, token: AddressLike],
896
+ [bigint],
897
+ "view"
898
+ >;
899
+
900
+ getAccountMarginValues: TypedContractMethod<
901
+ [account: Account.AccountIdStruct],
902
+ [
903
+ [bigint, bigint, bigint] & {
904
+ avgLtv: bigint;
905
+ avgLiquidationThreshold: bigint;
906
+ totalRawValueWad: bigint;
907
+ }
908
+ ],
909
+ "view"
910
+ >;
911
+
912
+ getMarginAssetConfig: TypedContractMethod<
913
+ [token: AddressLike],
914
+ [CollateralEngineStorage.AssetConfigStructOutput],
915
+ "view"
916
+ >;
917
+
918
+ getPoolKey: TypedContractMethod<
919
+ [poolId: BytesLike],
920
+ [PoolKey.KeyStructOutput],
921
+ "view"
922
+ >;
923
+
924
+ getPositionInfo: TypedContractMethod<
925
+ [
926
+ account: Account.AccountIdStruct,
927
+ poolId: BytesLike,
928
+ tickLower: BigNumberish,
929
+ tickUpper: BigNumberish
930
+ ],
931
+ [Position.InfoStructOutput],
932
+ "view"
933
+ >;
934
+
935
+ getTokenDeficit: TypedContractMethod<[token: AddressLike], [bigint], "view">;
936
+
937
+ initialize: TypedContractMethod<
938
+ [__oracleHub: AddressLike, __aprOracle: AddressLike],
939
+ [void],
940
+ "nonpayable"
941
+ >;
942
+
943
+ isAccountOperator: TypedContractMethod<
944
+ [accountOwner: AddressLike, operator: AddressLike],
945
+ [boolean],
946
+ "view"
947
+ >;
948
+
949
+ liquidatePosition: TypedContractMethod<
950
+ [
951
+ account: Account.AccountIdStruct,
952
+ poolId: BytesLike,
953
+ tickLower: BigNumberish,
954
+ tickUpper: BigNumberish,
955
+ collateralAssetToTake: AddressLike,
956
+ debtToCover: BigNumberish
957
+ ],
958
+ [
959
+ [bigint, bigint, bigint] & {
960
+ collateralSeized: bigint;
961
+ effectiveDebtCovered: bigint;
962
+ fixedCovered: bigint;
963
+ }
964
+ ],
965
+ "nonpayable"
966
+ >;
967
+
968
+ oracleHub: TypedContractMethod<[], [string], "view">;
969
+
970
+ previewPositionBalances: TypedContractMethod<
971
+ [
972
+ account: Account.AccountIdStruct,
973
+ poolId: BytesLike,
974
+ tickLower: BigNumberish,
975
+ tickUpper: BigNumberish
976
+ ],
977
+ [
978
+ [bigint, bigint] & {
979
+ fixedTokenBalance: bigint;
980
+ variableTokenBalance: bigint;
981
+ }
982
+ ],
983
+ "view"
984
+ >;
985
+
986
+ setAccountOperator: TypedContractMethod<
987
+ [owner: AddressLike, operator: AddressLike, approved: boolean],
988
+ [void],
989
+ "nonpayable"
990
+ >;
991
+
992
+ setAprOracle: TypedContractMethod<
993
+ [__aprOracle: AddressLike],
994
+ [void],
995
+ "nonpayable"
996
+ >;
997
+
998
+ setDustThreshold: TypedContractMethod<
999
+ [_dustThresholdWad: BigNumberish],
1000
+ [void],
1001
+ "nonpayable"
1002
+ >;
1003
+
1004
+ setESM: TypedContractMethod<[_esm: AddressLike], [void], "nonpayable">;
1005
+
1006
+ setMarginAssetConfig: TypedContractMethod<
1007
+ [
1008
+ token: AddressLike,
1009
+ ltvWad: BigNumberish,
1010
+ liquidationThresholdWad: BigNumberish,
1011
+ autoExchangeBonusWad: BigNumberish
1012
+ ],
1013
+ [void],
1014
+ "nonpayable"
1015
+ >;
1016
+
1017
+ setOracleHub: TypedContractMethod<
1018
+ [__oracleHub: AddressLike],
1019
+ [void],
1020
+ "nonpayable"
1021
+ >;
1022
+
1023
+ setVAMMManager: TypedContractMethod<
1024
+ [_vammManager: AddressLike],
1025
+ [void],
1026
+ "nonpayable"
1027
+ >;
1028
+
1029
+ settlePosition: TypedContractMethod<
1030
+ [
1031
+ account: Account.AccountIdStruct,
1032
+ poolKey: PoolKey.KeyStruct,
1033
+ settlerAssetOrder: AddressLike[]
1034
+ ],
1035
+ [void],
1036
+ "nonpayable"
1037
+ >;
1038
+
1039
+ updateAccountMargin: TypedContractMethod<
1040
+ [
1041
+ account: Account.AccountIdStruct,
1042
+ token: AddressLike,
1043
+ marginDelta: BigNumberish
1044
+ ],
1045
+ [void],
1046
+ "nonpayable"
1047
+ >;
1048
+
1049
+ updatePositionPostVAMMAction: TypedContractMethod<
1050
+ [
1051
+ params: ICollateralEngine.UpdatePositionParamsStruct,
1052
+ isLiquidation: boolean
1053
+ ],
1054
+ [bigint],
1055
+ "nonpayable"
1056
+ >;
1057
+
1058
+ vammManager: TypedContractMethod<[], [string], "view">;
1059
+
1060
+ getFunction<T extends ContractMethod = ContractMethod>(
1061
+ key: string | FunctionFragment
1062
+ ): T;
1063
+
1064
+ getFunction(
1065
+ nameOrSignature: "aprOracle"
1066
+ ): TypedContractMethod<[], [string], "view">;
1067
+ getFunction(
1068
+ nameOrSignature: "calculateAccountObligation((address,uint96,address),bool)"
1069
+ ): TypedContractMethod<
1070
+ [account: Account.AccountIdStruct, includePositionsGrowth: boolean],
1071
+ [bigint],
1072
+ "view"
1073
+ >;
1074
+ getFunction(
1075
+ nameOrSignature: "calculateAccountObligation((address,uint96,address))"
1076
+ ): TypedContractMethod<[account: Account.AccountIdStruct], [bigint], "view">;
1077
+ getFunction(
1078
+ nameOrSignature: "calculateLiquidationAmounts"
1079
+ ): TypedContractMethod<
1080
+ [
1081
+ poolKey: PoolKey.KeyStruct,
1082
+ fixedBalance: BigNumberish,
1083
+ collateralAssetToTake: AddressLike,
1084
+ debtToCover: BigNumberish,
1085
+ collateralUserBalance: BigNumberish
1086
+ ],
1087
+ [
1088
+ [bigint, bigint, bigint] & {
1089
+ collateralToSeize: bigint;
1090
+ effectiveDebt: bigint;
1091
+ fixedCovered: bigint;
1092
+ }
1093
+ ],
1094
+ "view"
1095
+ >;
1096
+ getFunction(
1097
+ nameOrSignature: "checkMarginRequirement"
1098
+ ): TypedContractMethod<
1099
+ [account: Account.AccountIdStruct],
1100
+ [bigint],
1101
+ "nonpayable"
1102
+ >;
1103
+ getFunction(
1104
+ nameOrSignature: "dustThresholdWad"
1105
+ ): TypedContractMethod<[], [bigint], "view">;
1106
+ getFunction(
1107
+ nameOrSignature: "eliminateDeficit"
1108
+ ): TypedContractMethod<
1109
+ [token: AddressLike, amount: BigNumberish],
1110
+ [void],
1111
+ "nonpayable"
1112
+ >;
1113
+ getFunction(
1114
+ nameOrSignature: "esm"
1115
+ ): TypedContractMethod<[], [string], "view">;
1116
+ getFunction(
1117
+ nameOrSignature: "executeEarlySettlement"
1118
+ ): TypedContractMethod<
1119
+ [
1120
+ account: Account.AccountIdStruct,
1121
+ poolId: BytesLike,
1122
+ tickLower: BigNumberish,
1123
+ tickUpper: BigNumberish,
1124
+ amountDelta: BigNumberish
1125
+ ],
1126
+ [void],
1127
+ "nonpayable"
1128
+ >;
1129
+ getFunction(
1130
+ nameOrSignature: "getAccountBalance"
1131
+ ): TypedContractMethod<
1132
+ [account: Account.AccountIdStruct, token: AddressLike],
1133
+ [bigint],
1134
+ "view"
1135
+ >;
1136
+ getFunction(
1137
+ nameOrSignature: "getAccountMarginValues"
1138
+ ): TypedContractMethod<
1139
+ [account: Account.AccountIdStruct],
1140
+ [
1141
+ [bigint, bigint, bigint] & {
1142
+ avgLtv: bigint;
1143
+ avgLiquidationThreshold: bigint;
1144
+ totalRawValueWad: bigint;
1145
+ }
1146
+ ],
1147
+ "view"
1148
+ >;
1149
+ getFunction(
1150
+ nameOrSignature: "getMarginAssetConfig"
1151
+ ): TypedContractMethod<
1152
+ [token: AddressLike],
1153
+ [CollateralEngineStorage.AssetConfigStructOutput],
1154
+ "view"
1155
+ >;
1156
+ getFunction(
1157
+ nameOrSignature: "getPoolKey"
1158
+ ): TypedContractMethod<
1159
+ [poolId: BytesLike],
1160
+ [PoolKey.KeyStructOutput],
1161
+ "view"
1162
+ >;
1163
+ getFunction(
1164
+ nameOrSignature: "getPositionInfo"
1165
+ ): TypedContractMethod<
1166
+ [
1167
+ account: Account.AccountIdStruct,
1168
+ poolId: BytesLike,
1169
+ tickLower: BigNumberish,
1170
+ tickUpper: BigNumberish
1171
+ ],
1172
+ [Position.InfoStructOutput],
1173
+ "view"
1174
+ >;
1175
+ getFunction(
1176
+ nameOrSignature: "getTokenDeficit"
1177
+ ): TypedContractMethod<[token: AddressLike], [bigint], "view">;
1178
+ getFunction(
1179
+ nameOrSignature: "initialize"
1180
+ ): TypedContractMethod<
1181
+ [__oracleHub: AddressLike, __aprOracle: AddressLike],
1182
+ [void],
1183
+ "nonpayable"
1184
+ >;
1185
+ getFunction(
1186
+ nameOrSignature: "isAccountOperator"
1187
+ ): TypedContractMethod<
1188
+ [accountOwner: AddressLike, operator: AddressLike],
1189
+ [boolean],
1190
+ "view"
1191
+ >;
1192
+ getFunction(
1193
+ nameOrSignature: "liquidatePosition"
1194
+ ): TypedContractMethod<
1195
+ [
1196
+ account: Account.AccountIdStruct,
1197
+ poolId: BytesLike,
1198
+ tickLower: BigNumberish,
1199
+ tickUpper: BigNumberish,
1200
+ collateralAssetToTake: AddressLike,
1201
+ debtToCover: BigNumberish
1202
+ ],
1203
+ [
1204
+ [bigint, bigint, bigint] & {
1205
+ collateralSeized: bigint;
1206
+ effectiveDebtCovered: bigint;
1207
+ fixedCovered: bigint;
1208
+ }
1209
+ ],
1210
+ "nonpayable"
1211
+ >;
1212
+ getFunction(
1213
+ nameOrSignature: "oracleHub"
1214
+ ): TypedContractMethod<[], [string], "view">;
1215
+ getFunction(
1216
+ nameOrSignature: "previewPositionBalances"
1217
+ ): TypedContractMethod<
1218
+ [
1219
+ account: Account.AccountIdStruct,
1220
+ poolId: BytesLike,
1221
+ tickLower: BigNumberish,
1222
+ tickUpper: BigNumberish
1223
+ ],
1224
+ [
1225
+ [bigint, bigint] & {
1226
+ fixedTokenBalance: bigint;
1227
+ variableTokenBalance: bigint;
1228
+ }
1229
+ ],
1230
+ "view"
1231
+ >;
1232
+ getFunction(
1233
+ nameOrSignature: "setAccountOperator"
1234
+ ): TypedContractMethod<
1235
+ [owner: AddressLike, operator: AddressLike, approved: boolean],
1236
+ [void],
1237
+ "nonpayable"
1238
+ >;
1239
+ getFunction(
1240
+ nameOrSignature: "setAprOracle"
1241
+ ): TypedContractMethod<[__aprOracle: AddressLike], [void], "nonpayable">;
1242
+ getFunction(
1243
+ nameOrSignature: "setDustThreshold"
1244
+ ): TypedContractMethod<
1245
+ [_dustThresholdWad: BigNumberish],
1246
+ [void],
1247
+ "nonpayable"
1248
+ >;
1249
+ getFunction(
1250
+ nameOrSignature: "setESM"
1251
+ ): TypedContractMethod<[_esm: AddressLike], [void], "nonpayable">;
1252
+ getFunction(
1253
+ nameOrSignature: "setMarginAssetConfig"
1254
+ ): TypedContractMethod<
1255
+ [
1256
+ token: AddressLike,
1257
+ ltvWad: BigNumberish,
1258
+ liquidationThresholdWad: BigNumberish,
1259
+ autoExchangeBonusWad: BigNumberish
1260
+ ],
1261
+ [void],
1262
+ "nonpayable"
1263
+ >;
1264
+ getFunction(
1265
+ nameOrSignature: "setOracleHub"
1266
+ ): TypedContractMethod<[__oracleHub: AddressLike], [void], "nonpayable">;
1267
+ getFunction(
1268
+ nameOrSignature: "setVAMMManager"
1269
+ ): TypedContractMethod<[_vammManager: AddressLike], [void], "nonpayable">;
1270
+ getFunction(
1271
+ nameOrSignature: "settlePosition"
1272
+ ): TypedContractMethod<
1273
+ [
1274
+ account: Account.AccountIdStruct,
1275
+ poolKey: PoolKey.KeyStruct,
1276
+ settlerAssetOrder: AddressLike[]
1277
+ ],
1278
+ [void],
1279
+ "nonpayable"
1280
+ >;
1281
+ getFunction(
1282
+ nameOrSignature: "updateAccountMargin"
1283
+ ): TypedContractMethod<
1284
+ [
1285
+ account: Account.AccountIdStruct,
1286
+ token: AddressLike,
1287
+ marginDelta: BigNumberish
1288
+ ],
1289
+ [void],
1290
+ "nonpayable"
1291
+ >;
1292
+ getFunction(
1293
+ nameOrSignature: "updatePositionPostVAMMAction"
1294
+ ): TypedContractMethod<
1295
+ [
1296
+ params: ICollateralEngine.UpdatePositionParamsStruct,
1297
+ isLiquidation: boolean
1298
+ ],
1299
+ [bigint],
1300
+ "nonpayable"
1301
+ >;
1302
+ getFunction(
1303
+ nameOrSignature: "vammManager"
1304
+ ): TypedContractMethod<[], [string], "view">;
1305
+
1306
+ getEvent(
1307
+ key: "AccountOperatorUpdate"
1308
+ ): TypedContractEvent<
1309
+ AccountOperatorUpdateEvent.InputTuple,
1310
+ AccountOperatorUpdateEvent.OutputTuple,
1311
+ AccountOperatorUpdateEvent.OutputObject
1312
+ >;
1313
+ getEvent(
1314
+ key: "AprOracleSetting"
1315
+ ): TypedContractEvent<
1316
+ AprOracleSettingEvent.InputTuple,
1317
+ AprOracleSettingEvent.OutputTuple,
1318
+ AprOracleSettingEvent.OutputObject
1319
+ >;
1320
+ getEvent(
1321
+ key: "AutoExchange"
1322
+ ): TypedContractEvent<
1323
+ AutoExchangeEvent.InputTuple,
1324
+ AutoExchangeEvent.OutputTuple,
1325
+ AutoExchangeEvent.OutputObject
1326
+ >;
1327
+ getEvent(
1328
+ key: "DustThresholdUpdate"
1329
+ ): TypedContractEvent<
1330
+ DustThresholdUpdateEvent.InputTuple,
1331
+ DustThresholdUpdateEvent.OutputTuple,
1332
+ DustThresholdUpdateEvent.OutputObject
1333
+ >;
1334
+ getEvent(
1335
+ key: "MarginAssetConfigUpdate"
1336
+ ): TypedContractEvent<
1337
+ MarginAssetConfigUpdateEvent.InputTuple,
1338
+ MarginAssetConfigUpdateEvent.OutputTuple,
1339
+ MarginAssetConfigUpdateEvent.OutputObject
1340
+ >;
1341
+ getEvent(
1342
+ key: "MarginUpdate"
1343
+ ): TypedContractEvent<
1344
+ MarginUpdateEvent.InputTuple,
1345
+ MarginUpdateEvent.OutputTuple,
1346
+ MarginUpdateEvent.OutputObject
1347
+ >;
1348
+ getEvent(
1349
+ key: "OracleHubSetting"
1350
+ ): TypedContractEvent<
1351
+ OracleHubSettingEvent.InputTuple,
1352
+ OracleHubSettingEvent.OutputTuple,
1353
+ OracleHubSettingEvent.OutputObject
1354
+ >;
1355
+ getEvent(
1356
+ key: "PositionLiquidated"
1357
+ ): TypedContractEvent<
1358
+ PositionLiquidatedEvent.InputTuple,
1359
+ PositionLiquidatedEvent.OutputTuple,
1360
+ PositionLiquidatedEvent.OutputObject
1361
+ >;
1362
+ getEvent(
1363
+ key: "PositionSettlement"
1364
+ ): TypedContractEvent<
1365
+ PositionSettlementEvent.InputTuple,
1366
+ PositionSettlementEvent.OutputTuple,
1367
+ PositionSettlementEvent.OutputObject
1368
+ >;
1369
+ getEvent(
1370
+ key: "PositionUpdate"
1371
+ ): TypedContractEvent<
1372
+ PositionUpdateEvent.InputTuple,
1373
+ PositionUpdateEvent.OutputTuple,
1374
+ PositionUpdateEvent.OutputObject
1375
+ >;
1376
+ getEvent(
1377
+ key: "ProtocolDeficitEliminated"
1378
+ ): TypedContractEvent<
1379
+ ProtocolDeficitEliminatedEvent.InputTuple,
1380
+ ProtocolDeficitEliminatedEvent.OutputTuple,
1381
+ ProtocolDeficitEliminatedEvent.OutputObject
1382
+ >;
1383
+ getEvent(
1384
+ key: "ProtocolDeficitIncreased"
1385
+ ): TypedContractEvent<
1386
+ ProtocolDeficitIncreasedEvent.InputTuple,
1387
+ ProtocolDeficitIncreasedEvent.OutputTuple,
1388
+ ProtocolDeficitIncreasedEvent.OutputObject
1389
+ >;
1390
+ getEvent(
1391
+ key: "VAMMSetting"
1392
+ ): TypedContractEvent<
1393
+ VAMMSettingEvent.InputTuple,
1394
+ VAMMSettingEvent.OutputTuple,
1395
+ VAMMSettingEvent.OutputObject
1396
+ >;
1397
+ getEvent(
1398
+ key: "WorstCaseVariableFactorConfigSet"
1399
+ ): TypedContractEvent<
1400
+ WorstCaseVariableFactorConfigSetEvent.InputTuple,
1401
+ WorstCaseVariableFactorConfigSetEvent.OutputTuple,
1402
+ WorstCaseVariableFactorConfigSetEvent.OutputObject
1403
+ >;
1404
+
1405
+ filters: {
1406
+ "AccountOperatorUpdate(address,address,bool)": TypedContractEvent<
1407
+ AccountOperatorUpdateEvent.InputTuple,
1408
+ AccountOperatorUpdateEvent.OutputTuple,
1409
+ AccountOperatorUpdateEvent.OutputObject
1410
+ >;
1411
+ AccountOperatorUpdate: TypedContractEvent<
1412
+ AccountOperatorUpdateEvent.InputTuple,
1413
+ AccountOperatorUpdateEvent.OutputTuple,
1414
+ AccountOperatorUpdateEvent.OutputObject
1415
+ >;
1416
+
1417
+ "AprOracleSetting(address)": TypedContractEvent<
1418
+ AprOracleSettingEvent.InputTuple,
1419
+ AprOracleSettingEvent.OutputTuple,
1420
+ AprOracleSettingEvent.OutputObject
1421
+ >;
1422
+ AprOracleSetting: TypedContractEvent<
1423
+ AprOracleSettingEvent.InputTuple,
1424
+ AprOracleSettingEvent.OutputTuple,
1425
+ AprOracleSettingEvent.OutputObject
1426
+ >;
1427
+
1428
+ "AutoExchange(address,uint96,address,bytes32,address,uint256)": TypedContractEvent<
1429
+ AutoExchangeEvent.InputTuple,
1430
+ AutoExchangeEvent.OutputTuple,
1431
+ AutoExchangeEvent.OutputObject
1432
+ >;
1433
+ AutoExchange: TypedContractEvent<
1434
+ AutoExchangeEvent.InputTuple,
1435
+ AutoExchangeEvent.OutputTuple,
1436
+ AutoExchangeEvent.OutputObject
1437
+ >;
1438
+
1439
+ "DustThresholdUpdate(uint256)": TypedContractEvent<
1440
+ DustThresholdUpdateEvent.InputTuple,
1441
+ DustThresholdUpdateEvent.OutputTuple,
1442
+ DustThresholdUpdateEvent.OutputObject
1443
+ >;
1444
+ DustThresholdUpdate: TypedContractEvent<
1445
+ DustThresholdUpdateEvent.InputTuple,
1446
+ DustThresholdUpdateEvent.OutputTuple,
1447
+ DustThresholdUpdateEvent.OutputObject
1448
+ >;
1449
+
1450
+ "MarginAssetConfigUpdate(address,uint256,uint256,uint256)": TypedContractEvent<
1451
+ MarginAssetConfigUpdateEvent.InputTuple,
1452
+ MarginAssetConfigUpdateEvent.OutputTuple,
1453
+ MarginAssetConfigUpdateEvent.OutputObject
1454
+ >;
1455
+ MarginAssetConfigUpdate: TypedContractEvent<
1456
+ MarginAssetConfigUpdateEvent.InputTuple,
1457
+ MarginAssetConfigUpdateEvent.OutputTuple,
1458
+ MarginAssetConfigUpdateEvent.OutputObject
1459
+ >;
1460
+
1461
+ "MarginUpdate(address,uint96,address,address,int256)": TypedContractEvent<
1462
+ MarginUpdateEvent.InputTuple,
1463
+ MarginUpdateEvent.OutputTuple,
1464
+ MarginUpdateEvent.OutputObject
1465
+ >;
1466
+ MarginUpdate: TypedContractEvent<
1467
+ MarginUpdateEvent.InputTuple,
1468
+ MarginUpdateEvent.OutputTuple,
1469
+ MarginUpdateEvent.OutputObject
1470
+ >;
1471
+
1472
+ "OracleHubSetting(address)": TypedContractEvent<
1473
+ OracleHubSettingEvent.InputTuple,
1474
+ OracleHubSettingEvent.OutputTuple,
1475
+ OracleHubSettingEvent.OutputObject
1476
+ >;
1477
+ OracleHubSetting: TypedContractEvent<
1478
+ OracleHubSettingEvent.InputTuple,
1479
+ OracleHubSettingEvent.OutputTuple,
1480
+ OracleHubSettingEvent.OutputObject
1481
+ >;
1482
+
1483
+ "PositionLiquidated(address,uint96,address,bytes32,int24,int24,address,address,uint256,uint256,uint256)": TypedContractEvent<
1484
+ PositionLiquidatedEvent.InputTuple,
1485
+ PositionLiquidatedEvent.OutputTuple,
1486
+ PositionLiquidatedEvent.OutputObject
1487
+ >;
1488
+ PositionLiquidated: TypedContractEvent<
1489
+ PositionLiquidatedEvent.InputTuple,
1490
+ PositionLiquidatedEvent.OutputTuple,
1491
+ PositionLiquidatedEvent.OutputObject
1492
+ >;
1493
+
1494
+ "PositionSettlement(address,uint96,address,bytes32,int256)": TypedContractEvent<
1495
+ PositionSettlementEvent.InputTuple,
1496
+ PositionSettlementEvent.OutputTuple,
1497
+ PositionSettlementEvent.OutputObject
1498
+ >;
1499
+ PositionSettlement: TypedContractEvent<
1500
+ PositionSettlementEvent.InputTuple,
1501
+ PositionSettlementEvent.OutputTuple,
1502
+ PositionSettlementEvent.OutputObject
1503
+ >;
1504
+
1505
+ "PositionUpdate(address,uint96,address,bytes32,int24,int24,uint128,int256,int256,uint256)": TypedContractEvent<
1506
+ PositionUpdateEvent.InputTuple,
1507
+ PositionUpdateEvent.OutputTuple,
1508
+ PositionUpdateEvent.OutputObject
1509
+ >;
1510
+ PositionUpdate: TypedContractEvent<
1511
+ PositionUpdateEvent.InputTuple,
1512
+ PositionUpdateEvent.OutputTuple,
1513
+ PositionUpdateEvent.OutputObject
1514
+ >;
1515
+
1516
+ "ProtocolDeficitEliminated(address,uint256,uint256)": TypedContractEvent<
1517
+ ProtocolDeficitEliminatedEvent.InputTuple,
1518
+ ProtocolDeficitEliminatedEvent.OutputTuple,
1519
+ ProtocolDeficitEliminatedEvent.OutputObject
1520
+ >;
1521
+ ProtocolDeficitEliminated: TypedContractEvent<
1522
+ ProtocolDeficitEliminatedEvent.InputTuple,
1523
+ ProtocolDeficitEliminatedEvent.OutputTuple,
1524
+ ProtocolDeficitEliminatedEvent.OutputObject
1525
+ >;
1526
+
1527
+ "ProtocolDeficitIncreased(address,uint256,uint256)": TypedContractEvent<
1528
+ ProtocolDeficitIncreasedEvent.InputTuple,
1529
+ ProtocolDeficitIncreasedEvent.OutputTuple,
1530
+ ProtocolDeficitIncreasedEvent.OutputObject
1531
+ >;
1532
+ ProtocolDeficitIncreased: TypedContractEvent<
1533
+ ProtocolDeficitIncreasedEvent.InputTuple,
1534
+ ProtocolDeficitIncreasedEvent.OutputTuple,
1535
+ ProtocolDeficitIncreasedEvent.OutputObject
1536
+ >;
1537
+
1538
+ "VAMMSetting(address)": TypedContractEvent<
1539
+ VAMMSettingEvent.InputTuple,
1540
+ VAMMSettingEvent.OutputTuple,
1541
+ VAMMSettingEvent.OutputObject
1542
+ >;
1543
+ VAMMSetting: TypedContractEvent<
1544
+ VAMMSettingEvent.InputTuple,
1545
+ VAMMSettingEvent.OutputTuple,
1546
+ VAMMSettingEvent.OutputObject
1547
+ >;
1548
+
1549
+ "WorstCaseVariableFactorConfigSet(bytes32,uint256,uint256,int24,int24)": TypedContractEvent<
1550
+ WorstCaseVariableFactorConfigSetEvent.InputTuple,
1551
+ WorstCaseVariableFactorConfigSetEvent.OutputTuple,
1552
+ WorstCaseVariableFactorConfigSetEvent.OutputObject
1553
+ >;
1554
+ WorstCaseVariableFactorConfigSet: TypedContractEvent<
1555
+ WorstCaseVariableFactorConfigSetEvent.InputTuple,
1556
+ WorstCaseVariableFactorConfigSetEvent.OutputTuple,
1557
+ WorstCaseVariableFactorConfigSetEvent.OutputObject
1558
+ >;
1559
+ };
1560
+ }