@xccy/ts-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1753 @@
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 CollateralEngineInterface extends Interface {
155
+ getFunction(
156
+ nameOrSignature:
157
+ | "acceptOwnership"
158
+ | "aprOracle"
159
+ | "calculateAccountObligation((address,uint96,address),bool)"
160
+ | "calculateAccountObligation((address,uint96,address))"
161
+ | "calculateLiquidationAmounts"
162
+ | "checkMarginRequirement"
163
+ | "dustThresholdWad"
164
+ | "eliminateDeficit"
165
+ | "esm"
166
+ | "executeEarlySettlement"
167
+ | "getAccountBalance"
168
+ | "getAccountMarginValues"
169
+ | "getMarginAssetConfig"
170
+ | "getPoolKey"
171
+ | "getPositionInfo"
172
+ | "getTokenDeficit"
173
+ | "initialize"
174
+ | "isAccountOperator"
175
+ | "liquidatePosition"
176
+ | "oracleHub"
177
+ | "owner"
178
+ | "pendingOwner"
179
+ | "previewPositionBalances"
180
+ | "renounceOwnership"
181
+ | "setAccountOperator"
182
+ | "setAprOracle"
183
+ | "setDustThreshold"
184
+ | "setESM"
185
+ | "setMarginAssetConfig"
186
+ | "setOracleHub"
187
+ | "setVAMMManager"
188
+ | "setWorstCaseVariableFactor"
189
+ | "settlePosition"
190
+ | "transferOwnership"
191
+ | "updateAccountMargin"
192
+ | "updatePositionPostVAMMAction"
193
+ | "vammManager"
194
+ ): FunctionFragment;
195
+
196
+ getEvent(
197
+ nameOrSignatureOrTopic:
198
+ | "AccountOperatorUpdate"
199
+ | "AprOracleSetting"
200
+ | "AutoExchange"
201
+ | "DustThresholdUpdate"
202
+ | "Initialized"
203
+ | "MarginAssetConfigUpdate"
204
+ | "MarginUpdate"
205
+ | "OracleHubSetting"
206
+ | "OwnershipTransferStarted"
207
+ | "OwnershipTransferred"
208
+ | "PositionLiquidated"
209
+ | "PositionSettlement"
210
+ | "PositionUpdate"
211
+ | "ProtocolDeficitEliminated"
212
+ | "ProtocolDeficitIncreased"
213
+ | "VAMMSetting"
214
+ | "WorstCaseVariableFactorConfigSet"
215
+ ): EventFragment;
216
+
217
+ encodeFunctionData(
218
+ functionFragment: "acceptOwnership",
219
+ values?: undefined
220
+ ): string;
221
+ encodeFunctionData(functionFragment: "aprOracle", values?: undefined): string;
222
+ encodeFunctionData(
223
+ functionFragment: "calculateAccountObligation((address,uint96,address),bool)",
224
+ values: [Account.AccountIdStruct, boolean]
225
+ ): string;
226
+ encodeFunctionData(
227
+ functionFragment: "calculateAccountObligation((address,uint96,address))",
228
+ values: [Account.AccountIdStruct]
229
+ ): string;
230
+ encodeFunctionData(
231
+ functionFragment: "calculateLiquidationAmounts",
232
+ values: [
233
+ PoolKey.KeyStruct,
234
+ BigNumberish,
235
+ AddressLike,
236
+ BigNumberish,
237
+ BigNumberish
238
+ ]
239
+ ): string;
240
+ encodeFunctionData(
241
+ functionFragment: "checkMarginRequirement",
242
+ values: [Account.AccountIdStruct]
243
+ ): string;
244
+ encodeFunctionData(
245
+ functionFragment: "dustThresholdWad",
246
+ values?: undefined
247
+ ): string;
248
+ encodeFunctionData(
249
+ functionFragment: "eliminateDeficit",
250
+ values: [AddressLike, BigNumberish]
251
+ ): string;
252
+ encodeFunctionData(functionFragment: "esm", values?: undefined): string;
253
+ encodeFunctionData(
254
+ functionFragment: "executeEarlySettlement",
255
+ values: [
256
+ Account.AccountIdStruct,
257
+ BytesLike,
258
+ BigNumberish,
259
+ BigNumberish,
260
+ BigNumberish
261
+ ]
262
+ ): string;
263
+ encodeFunctionData(
264
+ functionFragment: "getAccountBalance",
265
+ values: [Account.AccountIdStruct, AddressLike]
266
+ ): string;
267
+ encodeFunctionData(
268
+ functionFragment: "getAccountMarginValues",
269
+ values: [Account.AccountIdStruct]
270
+ ): string;
271
+ encodeFunctionData(
272
+ functionFragment: "getMarginAssetConfig",
273
+ values: [AddressLike]
274
+ ): string;
275
+ encodeFunctionData(
276
+ functionFragment: "getPoolKey",
277
+ values: [BytesLike]
278
+ ): string;
279
+ encodeFunctionData(
280
+ functionFragment: "getPositionInfo",
281
+ values: [Account.AccountIdStruct, BytesLike, BigNumberish, BigNumberish]
282
+ ): string;
283
+ encodeFunctionData(
284
+ functionFragment: "getTokenDeficit",
285
+ values: [AddressLike]
286
+ ): string;
287
+ encodeFunctionData(
288
+ functionFragment: "initialize",
289
+ values: [AddressLike, AddressLike]
290
+ ): string;
291
+ encodeFunctionData(
292
+ functionFragment: "isAccountOperator",
293
+ values: [AddressLike, AddressLike]
294
+ ): string;
295
+ encodeFunctionData(
296
+ functionFragment: "liquidatePosition",
297
+ values: [
298
+ Account.AccountIdStruct,
299
+ BytesLike,
300
+ BigNumberish,
301
+ BigNumberish,
302
+ AddressLike,
303
+ BigNumberish
304
+ ]
305
+ ): string;
306
+ encodeFunctionData(functionFragment: "oracleHub", values?: undefined): string;
307
+ encodeFunctionData(functionFragment: "owner", values?: undefined): string;
308
+ encodeFunctionData(
309
+ functionFragment: "pendingOwner",
310
+ values?: undefined
311
+ ): string;
312
+ encodeFunctionData(
313
+ functionFragment: "previewPositionBalances",
314
+ values: [Account.AccountIdStruct, BytesLike, BigNumberish, BigNumberish]
315
+ ): string;
316
+ encodeFunctionData(
317
+ functionFragment: "renounceOwnership",
318
+ values?: undefined
319
+ ): string;
320
+ encodeFunctionData(
321
+ functionFragment: "setAccountOperator",
322
+ values: [AddressLike, AddressLike, boolean]
323
+ ): string;
324
+ encodeFunctionData(
325
+ functionFragment: "setAprOracle",
326
+ values: [AddressLike]
327
+ ): string;
328
+ encodeFunctionData(
329
+ functionFragment: "setDustThreshold",
330
+ values: [BigNumberish]
331
+ ): string;
332
+ encodeFunctionData(functionFragment: "setESM", values: [AddressLike]): string;
333
+ encodeFunctionData(
334
+ functionFragment: "setMarginAssetConfig",
335
+ values: [AddressLike, BigNumberish, BigNumberish, BigNumberish]
336
+ ): string;
337
+ encodeFunctionData(
338
+ functionFragment: "setOracleHub",
339
+ values: [AddressLike]
340
+ ): string;
341
+ encodeFunctionData(
342
+ functionFragment: "setVAMMManager",
343
+ values: [AddressLike]
344
+ ): string;
345
+ encodeFunctionData(
346
+ functionFragment: "setWorstCaseVariableFactor",
347
+ values: [BytesLike, BigNumberish, BigNumberish]
348
+ ): string;
349
+ encodeFunctionData(
350
+ functionFragment: "settlePosition",
351
+ values: [Account.AccountIdStruct, PoolKey.KeyStruct, AddressLike[]]
352
+ ): string;
353
+ encodeFunctionData(
354
+ functionFragment: "transferOwnership",
355
+ values: [AddressLike]
356
+ ): string;
357
+ encodeFunctionData(
358
+ functionFragment: "updateAccountMargin",
359
+ values: [Account.AccountIdStruct, AddressLike, BigNumberish]
360
+ ): string;
361
+ encodeFunctionData(
362
+ functionFragment: "updatePositionPostVAMMAction",
363
+ values: [ICollateralEngine.UpdatePositionParamsStruct, boolean]
364
+ ): string;
365
+ encodeFunctionData(
366
+ functionFragment: "vammManager",
367
+ values?: undefined
368
+ ): string;
369
+
370
+ decodeFunctionResult(
371
+ functionFragment: "acceptOwnership",
372
+ data: BytesLike
373
+ ): Result;
374
+ decodeFunctionResult(functionFragment: "aprOracle", data: BytesLike): Result;
375
+ decodeFunctionResult(
376
+ functionFragment: "calculateAccountObligation((address,uint96,address),bool)",
377
+ data: BytesLike
378
+ ): Result;
379
+ decodeFunctionResult(
380
+ functionFragment: "calculateAccountObligation((address,uint96,address))",
381
+ data: BytesLike
382
+ ): Result;
383
+ decodeFunctionResult(
384
+ functionFragment: "calculateLiquidationAmounts",
385
+ data: BytesLike
386
+ ): Result;
387
+ decodeFunctionResult(
388
+ functionFragment: "checkMarginRequirement",
389
+ data: BytesLike
390
+ ): Result;
391
+ decodeFunctionResult(
392
+ functionFragment: "dustThresholdWad",
393
+ data: BytesLike
394
+ ): Result;
395
+ decodeFunctionResult(
396
+ functionFragment: "eliminateDeficit",
397
+ data: BytesLike
398
+ ): Result;
399
+ decodeFunctionResult(functionFragment: "esm", data: BytesLike): Result;
400
+ decodeFunctionResult(
401
+ functionFragment: "executeEarlySettlement",
402
+ data: BytesLike
403
+ ): Result;
404
+ decodeFunctionResult(
405
+ functionFragment: "getAccountBalance",
406
+ data: BytesLike
407
+ ): Result;
408
+ decodeFunctionResult(
409
+ functionFragment: "getAccountMarginValues",
410
+ data: BytesLike
411
+ ): Result;
412
+ decodeFunctionResult(
413
+ functionFragment: "getMarginAssetConfig",
414
+ data: BytesLike
415
+ ): Result;
416
+ decodeFunctionResult(functionFragment: "getPoolKey", data: BytesLike): Result;
417
+ decodeFunctionResult(
418
+ functionFragment: "getPositionInfo",
419
+ data: BytesLike
420
+ ): Result;
421
+ decodeFunctionResult(
422
+ functionFragment: "getTokenDeficit",
423
+ data: BytesLike
424
+ ): Result;
425
+ decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
426
+ decodeFunctionResult(
427
+ functionFragment: "isAccountOperator",
428
+ data: BytesLike
429
+ ): Result;
430
+ decodeFunctionResult(
431
+ functionFragment: "liquidatePosition",
432
+ data: BytesLike
433
+ ): Result;
434
+ decodeFunctionResult(functionFragment: "oracleHub", data: BytesLike): Result;
435
+ decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
436
+ decodeFunctionResult(
437
+ functionFragment: "pendingOwner",
438
+ data: BytesLike
439
+ ): Result;
440
+ decodeFunctionResult(
441
+ functionFragment: "previewPositionBalances",
442
+ data: BytesLike
443
+ ): Result;
444
+ decodeFunctionResult(
445
+ functionFragment: "renounceOwnership",
446
+ data: BytesLike
447
+ ): Result;
448
+ decodeFunctionResult(
449
+ functionFragment: "setAccountOperator",
450
+ data: BytesLike
451
+ ): Result;
452
+ decodeFunctionResult(
453
+ functionFragment: "setAprOracle",
454
+ data: BytesLike
455
+ ): Result;
456
+ decodeFunctionResult(
457
+ functionFragment: "setDustThreshold",
458
+ data: BytesLike
459
+ ): Result;
460
+ decodeFunctionResult(functionFragment: "setESM", data: BytesLike): Result;
461
+ decodeFunctionResult(
462
+ functionFragment: "setMarginAssetConfig",
463
+ data: BytesLike
464
+ ): Result;
465
+ decodeFunctionResult(
466
+ functionFragment: "setOracleHub",
467
+ data: BytesLike
468
+ ): Result;
469
+ decodeFunctionResult(
470
+ functionFragment: "setVAMMManager",
471
+ data: BytesLike
472
+ ): Result;
473
+ decodeFunctionResult(
474
+ functionFragment: "setWorstCaseVariableFactor",
475
+ data: BytesLike
476
+ ): Result;
477
+ decodeFunctionResult(
478
+ functionFragment: "settlePosition",
479
+ data: BytesLike
480
+ ): Result;
481
+ decodeFunctionResult(
482
+ functionFragment: "transferOwnership",
483
+ data: BytesLike
484
+ ): Result;
485
+ decodeFunctionResult(
486
+ functionFragment: "updateAccountMargin",
487
+ data: BytesLike
488
+ ): Result;
489
+ decodeFunctionResult(
490
+ functionFragment: "updatePositionPostVAMMAction",
491
+ data: BytesLike
492
+ ): Result;
493
+ decodeFunctionResult(
494
+ functionFragment: "vammManager",
495
+ data: BytesLike
496
+ ): Result;
497
+ }
498
+
499
+ export namespace AccountOperatorUpdateEvent {
500
+ export type InputTuple = [
501
+ owner: AddressLike,
502
+ operator: AddressLike,
503
+ approved: boolean
504
+ ];
505
+ export type OutputTuple = [
506
+ owner: string,
507
+ operator: string,
508
+ approved: boolean
509
+ ];
510
+ export interface OutputObject {
511
+ owner: string;
512
+ operator: string;
513
+ approved: boolean;
514
+ }
515
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
516
+ export type Filter = TypedDeferredTopicFilter<Event>;
517
+ export type Log = TypedEventLog<Event>;
518
+ export type LogDescription = TypedLogDescription<Event>;
519
+ }
520
+
521
+ export namespace AprOracleSettingEvent {
522
+ export type InputTuple = [aprOracle: AddressLike];
523
+ export type OutputTuple = [aprOracle: string];
524
+ export interface OutputObject {
525
+ aprOracle: string;
526
+ }
527
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
528
+ export type Filter = TypedDeferredTopicFilter<Event>;
529
+ export type Log = TypedEventLog<Event>;
530
+ export type LogDescription = TypedLogDescription<Event>;
531
+ }
532
+
533
+ export namespace AutoExchangeEvent {
534
+ export type InputTuple = [
535
+ owner: AddressLike,
536
+ accountId: BigNumberish,
537
+ isolatedMarginToken: AddressLike,
538
+ poolId: BytesLike,
539
+ underlyingAsset: AddressLike,
540
+ underlyingAmount: BigNumberish
541
+ ];
542
+ export type OutputTuple = [
543
+ owner: string,
544
+ accountId: bigint,
545
+ isolatedMarginToken: string,
546
+ poolId: string,
547
+ underlyingAsset: string,
548
+ underlyingAmount: bigint
549
+ ];
550
+ export interface OutputObject {
551
+ owner: string;
552
+ accountId: bigint;
553
+ isolatedMarginToken: string;
554
+ poolId: string;
555
+ underlyingAsset: string;
556
+ underlyingAmount: bigint;
557
+ }
558
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
559
+ export type Filter = TypedDeferredTopicFilter<Event>;
560
+ export type Log = TypedEventLog<Event>;
561
+ export type LogDescription = TypedLogDescription<Event>;
562
+ }
563
+
564
+ export namespace DustThresholdUpdateEvent {
565
+ export type InputTuple = [dustThresholdWad: BigNumberish];
566
+ export type OutputTuple = [dustThresholdWad: bigint];
567
+ export interface OutputObject {
568
+ dustThresholdWad: bigint;
569
+ }
570
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
571
+ export type Filter = TypedDeferredTopicFilter<Event>;
572
+ export type Log = TypedEventLog<Event>;
573
+ export type LogDescription = TypedLogDescription<Event>;
574
+ }
575
+
576
+ export namespace InitializedEvent {
577
+ export type InputTuple = [version: BigNumberish];
578
+ export type OutputTuple = [version: bigint];
579
+ export interface OutputObject {
580
+ version: bigint;
581
+ }
582
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
583
+ export type Filter = TypedDeferredTopicFilter<Event>;
584
+ export type Log = TypedEventLog<Event>;
585
+ export type LogDescription = TypedLogDescription<Event>;
586
+ }
587
+
588
+ export namespace MarginAssetConfigUpdateEvent {
589
+ export type InputTuple = [
590
+ token: AddressLike,
591
+ ltvWad: BigNumberish,
592
+ liquidationThresholdWad: BigNumberish,
593
+ autoExchangeBonusWad: BigNumberish
594
+ ];
595
+ export type OutputTuple = [
596
+ token: string,
597
+ ltvWad: bigint,
598
+ liquidationThresholdWad: bigint,
599
+ autoExchangeBonusWad: bigint
600
+ ];
601
+ export interface OutputObject {
602
+ token: string;
603
+ ltvWad: bigint;
604
+ liquidationThresholdWad: bigint;
605
+ autoExchangeBonusWad: bigint;
606
+ }
607
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
608
+ export type Filter = TypedDeferredTopicFilter<Event>;
609
+ export type Log = TypedEventLog<Event>;
610
+ export type LogDescription = TypedLogDescription<Event>;
611
+ }
612
+
613
+ export namespace MarginUpdateEvent {
614
+ export type InputTuple = [
615
+ owner: AddressLike,
616
+ accountId: BigNumberish,
617
+ isolatedMarginToken: AddressLike,
618
+ token: AddressLike,
619
+ marginDelta: BigNumberish
620
+ ];
621
+ export type OutputTuple = [
622
+ owner: string,
623
+ accountId: bigint,
624
+ isolatedMarginToken: string,
625
+ token: string,
626
+ marginDelta: bigint
627
+ ];
628
+ export interface OutputObject {
629
+ owner: string;
630
+ accountId: bigint;
631
+ isolatedMarginToken: string;
632
+ token: string;
633
+ marginDelta: bigint;
634
+ }
635
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
636
+ export type Filter = TypedDeferredTopicFilter<Event>;
637
+ export type Log = TypedEventLog<Event>;
638
+ export type LogDescription = TypedLogDescription<Event>;
639
+ }
640
+
641
+ export namespace OracleHubSettingEvent {
642
+ export type InputTuple = [oracleHub: AddressLike];
643
+ export type OutputTuple = [oracleHub: string];
644
+ export interface OutputObject {
645
+ oracleHub: string;
646
+ }
647
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
648
+ export type Filter = TypedDeferredTopicFilter<Event>;
649
+ export type Log = TypedEventLog<Event>;
650
+ export type LogDescription = TypedLogDescription<Event>;
651
+ }
652
+
653
+ export namespace OwnershipTransferStartedEvent {
654
+ export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
655
+ export type OutputTuple = [previousOwner: string, newOwner: string];
656
+ export interface OutputObject {
657
+ previousOwner: string;
658
+ newOwner: string;
659
+ }
660
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
661
+ export type Filter = TypedDeferredTopicFilter<Event>;
662
+ export type Log = TypedEventLog<Event>;
663
+ export type LogDescription = TypedLogDescription<Event>;
664
+ }
665
+
666
+ export namespace OwnershipTransferredEvent {
667
+ export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
668
+ export type OutputTuple = [previousOwner: string, newOwner: string];
669
+ export interface OutputObject {
670
+ previousOwner: string;
671
+ newOwner: string;
672
+ }
673
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
674
+ export type Filter = TypedDeferredTopicFilter<Event>;
675
+ export type Log = TypedEventLog<Event>;
676
+ export type LogDescription = TypedLogDescription<Event>;
677
+ }
678
+
679
+ export namespace PositionLiquidatedEvent {
680
+ export type InputTuple = [
681
+ accountOwner: AddressLike,
682
+ accountId: BigNumberish,
683
+ accountIsolatedMarginToken: AddressLike,
684
+ poolId: BytesLike,
685
+ tickLower: BigNumberish,
686
+ tickUpper: BigNumberish,
687
+ collateralAssetTaken: AddressLike,
688
+ liquidator: AddressLike,
689
+ collateralSeized: BigNumberish,
690
+ effectiveDebtCovered: BigNumberish,
691
+ fixedCovered: BigNumberish
692
+ ];
693
+ export type OutputTuple = [
694
+ accountOwner: string,
695
+ accountId: bigint,
696
+ accountIsolatedMarginToken: string,
697
+ poolId: string,
698
+ tickLower: bigint,
699
+ tickUpper: bigint,
700
+ collateralAssetTaken: string,
701
+ liquidator: string,
702
+ collateralSeized: bigint,
703
+ effectiveDebtCovered: bigint,
704
+ fixedCovered: bigint
705
+ ];
706
+ export interface OutputObject {
707
+ accountOwner: string;
708
+ accountId: bigint;
709
+ accountIsolatedMarginToken: string;
710
+ poolId: string;
711
+ tickLower: bigint;
712
+ tickUpper: bigint;
713
+ collateralAssetTaken: string;
714
+ liquidator: string;
715
+ collateralSeized: bigint;
716
+ effectiveDebtCovered: bigint;
717
+ fixedCovered: bigint;
718
+ }
719
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
720
+ export type Filter = TypedDeferredTopicFilter<Event>;
721
+ export type Log = TypedEventLog<Event>;
722
+ export type LogDescription = TypedLogDescription<Event>;
723
+ }
724
+
725
+ export namespace PositionSettlementEvent {
726
+ export type InputTuple = [
727
+ owner: AddressLike,
728
+ accountId: BigNumberish,
729
+ isolatedMarginToken: AddressLike,
730
+ poolId: BytesLike,
731
+ settlementCashflow: BigNumberish
732
+ ];
733
+ export type OutputTuple = [
734
+ owner: string,
735
+ accountId: bigint,
736
+ isolatedMarginToken: string,
737
+ poolId: string,
738
+ settlementCashflow: bigint
739
+ ];
740
+ export interface OutputObject {
741
+ owner: string;
742
+ accountId: bigint;
743
+ isolatedMarginToken: string;
744
+ poolId: string;
745
+ settlementCashflow: bigint;
746
+ }
747
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
748
+ export type Filter = TypedDeferredTopicFilter<Event>;
749
+ export type Log = TypedEventLog<Event>;
750
+ export type LogDescription = TypedLogDescription<Event>;
751
+ }
752
+
753
+ export namespace PositionUpdateEvent {
754
+ export type InputTuple = [
755
+ owner: AddressLike,
756
+ accountId: BigNumberish,
757
+ isolatedMarginToken: AddressLike,
758
+ poolId: BytesLike,
759
+ tickLower: BigNumberish,
760
+ tickUpper: BigNumberish,
761
+ _liquidity: BigNumberish,
762
+ fixedTokenBalance: BigNumberish,
763
+ variableTokenBalance: BigNumberish,
764
+ accumulatedFees: BigNumberish
765
+ ];
766
+ export type OutputTuple = [
767
+ owner: string,
768
+ accountId: bigint,
769
+ isolatedMarginToken: string,
770
+ poolId: string,
771
+ tickLower: bigint,
772
+ tickUpper: bigint,
773
+ _liquidity: bigint,
774
+ fixedTokenBalance: bigint,
775
+ variableTokenBalance: bigint,
776
+ accumulatedFees: bigint
777
+ ];
778
+ export interface OutputObject {
779
+ owner: string;
780
+ accountId: bigint;
781
+ isolatedMarginToken: string;
782
+ poolId: string;
783
+ tickLower: bigint;
784
+ tickUpper: bigint;
785
+ _liquidity: bigint;
786
+ fixedTokenBalance: bigint;
787
+ variableTokenBalance: bigint;
788
+ accumulatedFees: bigint;
789
+ }
790
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
791
+ export type Filter = TypedDeferredTopicFilter<Event>;
792
+ export type Log = TypedEventLog<Event>;
793
+ export type LogDescription = TypedLogDescription<Event>;
794
+ }
795
+
796
+ export namespace ProtocolDeficitEliminatedEvent {
797
+ export type InputTuple = [
798
+ token: AddressLike,
799
+ amount: BigNumberish,
800
+ remainingDeficit: BigNumberish
801
+ ];
802
+ export type OutputTuple = [
803
+ token: string,
804
+ amount: bigint,
805
+ remainingDeficit: bigint
806
+ ];
807
+ export interface OutputObject {
808
+ token: string;
809
+ amount: bigint;
810
+ remainingDeficit: bigint;
811
+ }
812
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
813
+ export type Filter = TypedDeferredTopicFilter<Event>;
814
+ export type Log = TypedEventLog<Event>;
815
+ export type LogDescription = TypedLogDescription<Event>;
816
+ }
817
+
818
+ export namespace ProtocolDeficitIncreasedEvent {
819
+ export type InputTuple = [
820
+ token: AddressLike,
821
+ amount: BigNumberish,
822
+ totalDeficit: BigNumberish
823
+ ];
824
+ export type OutputTuple = [
825
+ token: string,
826
+ amount: bigint,
827
+ totalDeficit: bigint
828
+ ];
829
+ export interface OutputObject {
830
+ token: string;
831
+ amount: bigint;
832
+ totalDeficit: bigint;
833
+ }
834
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
835
+ export type Filter = TypedDeferredTopicFilter<Event>;
836
+ export type Log = TypedEventLog<Event>;
837
+ export type LogDescription = TypedLogDescription<Event>;
838
+ }
839
+
840
+ export namespace VAMMSettingEvent {
841
+ export type InputTuple = [vamm: AddressLike];
842
+ export type OutputTuple = [vamm: string];
843
+ export interface OutputObject {
844
+ vamm: string;
845
+ }
846
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
847
+ export type Filter = TypedDeferredTopicFilter<Event>;
848
+ export type Log = TypedEventLog<Event>;
849
+ export type LogDescription = TypedLogDescription<Event>;
850
+ }
851
+
852
+ export namespace WorstCaseVariableFactorConfigSetEvent {
853
+ export type InputTuple = [
854
+ poolId: BytesLike,
855
+ worstCaseVariableFactorPositiveWad: BigNumberish,
856
+ worstCaseVariableFactorNegativeWad: BigNumberish,
857
+ worstCaseVariableFactorPositiveTick: BigNumberish,
858
+ worstCaseVariableFactorNegativeTick: BigNumberish
859
+ ];
860
+ export type OutputTuple = [
861
+ poolId: string,
862
+ worstCaseVariableFactorPositiveWad: bigint,
863
+ worstCaseVariableFactorNegativeWad: bigint,
864
+ worstCaseVariableFactorPositiveTick: bigint,
865
+ worstCaseVariableFactorNegativeTick: bigint
866
+ ];
867
+ export interface OutputObject {
868
+ poolId: string;
869
+ worstCaseVariableFactorPositiveWad: bigint;
870
+ worstCaseVariableFactorNegativeWad: bigint;
871
+ worstCaseVariableFactorPositiveTick: bigint;
872
+ worstCaseVariableFactorNegativeTick: bigint;
873
+ }
874
+ export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
875
+ export type Filter = TypedDeferredTopicFilter<Event>;
876
+ export type Log = TypedEventLog<Event>;
877
+ export type LogDescription = TypedLogDescription<Event>;
878
+ }
879
+
880
+ export interface CollateralEngine extends BaseContract {
881
+ connect(runner?: ContractRunner | null): CollateralEngine;
882
+ waitForDeployment(): Promise<this>;
883
+
884
+ interface: CollateralEngineInterface;
885
+
886
+ queryFilter<TCEvent extends TypedContractEvent>(
887
+ event: TCEvent,
888
+ fromBlockOrBlockhash?: string | number | undefined,
889
+ toBlock?: string | number | undefined
890
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
891
+ queryFilter<TCEvent extends TypedContractEvent>(
892
+ filter: TypedDeferredTopicFilter<TCEvent>,
893
+ fromBlockOrBlockhash?: string | number | undefined,
894
+ toBlock?: string | number | undefined
895
+ ): Promise<Array<TypedEventLog<TCEvent>>>;
896
+
897
+ on<TCEvent extends TypedContractEvent>(
898
+ event: TCEvent,
899
+ listener: TypedListener<TCEvent>
900
+ ): Promise<this>;
901
+ on<TCEvent extends TypedContractEvent>(
902
+ filter: TypedDeferredTopicFilter<TCEvent>,
903
+ listener: TypedListener<TCEvent>
904
+ ): Promise<this>;
905
+
906
+ once<TCEvent extends TypedContractEvent>(
907
+ event: TCEvent,
908
+ listener: TypedListener<TCEvent>
909
+ ): Promise<this>;
910
+ once<TCEvent extends TypedContractEvent>(
911
+ filter: TypedDeferredTopicFilter<TCEvent>,
912
+ listener: TypedListener<TCEvent>
913
+ ): Promise<this>;
914
+
915
+ listeners<TCEvent extends TypedContractEvent>(
916
+ event: TCEvent
917
+ ): Promise<Array<TypedListener<TCEvent>>>;
918
+ listeners(eventName?: string): Promise<Array<Listener>>;
919
+ removeAllListeners<TCEvent extends TypedContractEvent>(
920
+ event?: TCEvent
921
+ ): Promise<this>;
922
+
923
+ acceptOwnership: TypedContractMethod<[], [void], "nonpayable">;
924
+
925
+ aprOracle: TypedContractMethod<[], [string], "view">;
926
+
927
+ "calculateAccountObligation((address,uint96,address),bool)": TypedContractMethod<
928
+ [account: Account.AccountIdStruct, includePositionsGrowth: boolean],
929
+ [bigint],
930
+ "view"
931
+ >;
932
+
933
+ "calculateAccountObligation((address,uint96,address))": TypedContractMethod<
934
+ [account: Account.AccountIdStruct],
935
+ [bigint],
936
+ "view"
937
+ >;
938
+
939
+ calculateLiquidationAmounts: TypedContractMethod<
940
+ [
941
+ poolKey: PoolKey.KeyStruct,
942
+ fixedBalance: BigNumberish,
943
+ collateralAssetToTake: AddressLike,
944
+ debtToCover: BigNumberish,
945
+ collateralUserBalance: BigNumberish
946
+ ],
947
+ [
948
+ [bigint, bigint, bigint] & {
949
+ collateralToSeize: bigint;
950
+ effectiveDebt: bigint;
951
+ fixedCovered: bigint;
952
+ }
953
+ ],
954
+ "view"
955
+ >;
956
+
957
+ checkMarginRequirement: TypedContractMethod<
958
+ [account: Account.AccountIdStruct],
959
+ [bigint],
960
+ "nonpayable"
961
+ >;
962
+
963
+ dustThresholdWad: TypedContractMethod<[], [bigint], "view">;
964
+
965
+ eliminateDeficit: TypedContractMethod<
966
+ [token: AddressLike, amount: BigNumberish],
967
+ [void],
968
+ "nonpayable"
969
+ >;
970
+
971
+ esm: TypedContractMethod<[], [string], "view">;
972
+
973
+ executeEarlySettlement: TypedContractMethod<
974
+ [
975
+ account: Account.AccountIdStruct,
976
+ poolId: BytesLike,
977
+ tickLower: BigNumberish,
978
+ tickUpper: BigNumberish,
979
+ amountDelta: BigNumberish
980
+ ],
981
+ [void],
982
+ "nonpayable"
983
+ >;
984
+
985
+ getAccountBalance: TypedContractMethod<
986
+ [account: Account.AccountIdStruct, token: AddressLike],
987
+ [bigint],
988
+ "view"
989
+ >;
990
+
991
+ getAccountMarginValues: TypedContractMethod<
992
+ [account: Account.AccountIdStruct],
993
+ [
994
+ [bigint, bigint, bigint] & {
995
+ avgLtv: bigint;
996
+ avgLiquidationThreshold: bigint;
997
+ totalRawValueWad: bigint;
998
+ }
999
+ ],
1000
+ "view"
1001
+ >;
1002
+
1003
+ getMarginAssetConfig: TypedContractMethod<
1004
+ [token: AddressLike],
1005
+ [CollateralEngineStorage.AssetConfigStructOutput],
1006
+ "view"
1007
+ >;
1008
+
1009
+ getPoolKey: TypedContractMethod<
1010
+ [poolId: BytesLike],
1011
+ [PoolKey.KeyStructOutput],
1012
+ "view"
1013
+ >;
1014
+
1015
+ getPositionInfo: TypedContractMethod<
1016
+ [
1017
+ account: Account.AccountIdStruct,
1018
+ poolId: BytesLike,
1019
+ tickLower: BigNumberish,
1020
+ tickUpper: BigNumberish
1021
+ ],
1022
+ [Position.InfoStructOutput],
1023
+ "view"
1024
+ >;
1025
+
1026
+ getTokenDeficit: TypedContractMethod<[token: AddressLike], [bigint], "view">;
1027
+
1028
+ initialize: TypedContractMethod<
1029
+ [__oracleHub: AddressLike, __aprOracle: AddressLike],
1030
+ [void],
1031
+ "nonpayable"
1032
+ >;
1033
+
1034
+ isAccountOperator: TypedContractMethod<
1035
+ [accountOwner: AddressLike, operator: AddressLike],
1036
+ [boolean],
1037
+ "view"
1038
+ >;
1039
+
1040
+ liquidatePosition: TypedContractMethod<
1041
+ [
1042
+ account: Account.AccountIdStruct,
1043
+ poolId: BytesLike,
1044
+ tickLower: BigNumberish,
1045
+ tickUpper: BigNumberish,
1046
+ collateralAssetToTake: AddressLike,
1047
+ debtToCover: BigNumberish
1048
+ ],
1049
+ [
1050
+ [bigint, bigint, bigint] & {
1051
+ collateralSeized: bigint;
1052
+ effectiveDebtCovered: bigint;
1053
+ fixedCovered: bigint;
1054
+ }
1055
+ ],
1056
+ "nonpayable"
1057
+ >;
1058
+
1059
+ oracleHub: TypedContractMethod<[], [string], "view">;
1060
+
1061
+ owner: TypedContractMethod<[], [string], "view">;
1062
+
1063
+ pendingOwner: TypedContractMethod<[], [string], "view">;
1064
+
1065
+ previewPositionBalances: TypedContractMethod<
1066
+ [
1067
+ account: Account.AccountIdStruct,
1068
+ poolId: BytesLike,
1069
+ tickLower: BigNumberish,
1070
+ tickUpper: BigNumberish
1071
+ ],
1072
+ [
1073
+ [bigint, bigint] & {
1074
+ fixedTokenBalance: bigint;
1075
+ variableTokenBalance: bigint;
1076
+ }
1077
+ ],
1078
+ "view"
1079
+ >;
1080
+
1081
+ renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
1082
+
1083
+ setAccountOperator: TypedContractMethod<
1084
+ [owner: AddressLike, operator: AddressLike, approved: boolean],
1085
+ [void],
1086
+ "nonpayable"
1087
+ >;
1088
+
1089
+ setAprOracle: TypedContractMethod<
1090
+ [__aprOracle: AddressLike],
1091
+ [void],
1092
+ "nonpayable"
1093
+ >;
1094
+
1095
+ setDustThreshold: TypedContractMethod<
1096
+ [_dustThresholdWad: BigNumberish],
1097
+ [void],
1098
+ "nonpayable"
1099
+ >;
1100
+
1101
+ setESM: TypedContractMethod<[_esm: AddressLike], [void], "nonpayable">;
1102
+
1103
+ setMarginAssetConfig: TypedContractMethod<
1104
+ [
1105
+ token: AddressLike,
1106
+ ltvWad: BigNumberish,
1107
+ liquidationThresholdWad: BigNumberish,
1108
+ autoExchangeBonusWad: BigNumberish
1109
+ ],
1110
+ [void],
1111
+ "nonpayable"
1112
+ >;
1113
+
1114
+ setOracleHub: TypedContractMethod<
1115
+ [__oracleHub: AddressLike],
1116
+ [void],
1117
+ "nonpayable"
1118
+ >;
1119
+
1120
+ setVAMMManager: TypedContractMethod<
1121
+ [_vammManager: AddressLike],
1122
+ [void],
1123
+ "nonpayable"
1124
+ >;
1125
+
1126
+ setWorstCaseVariableFactor: TypedContractMethod<
1127
+ [
1128
+ poolId: BytesLike,
1129
+ worstCaseVariableFactorPositiveWad: BigNumberish,
1130
+ worstCaseVariableFactorNegativeWad: BigNumberish
1131
+ ],
1132
+ [void],
1133
+ "nonpayable"
1134
+ >;
1135
+
1136
+ settlePosition: TypedContractMethod<
1137
+ [
1138
+ account: Account.AccountIdStruct,
1139
+ poolKey: PoolKey.KeyStruct,
1140
+ settlerAssetOrder: AddressLike[]
1141
+ ],
1142
+ [void],
1143
+ "nonpayable"
1144
+ >;
1145
+
1146
+ transferOwnership: TypedContractMethod<
1147
+ [newOwner: AddressLike],
1148
+ [void],
1149
+ "nonpayable"
1150
+ >;
1151
+
1152
+ updateAccountMargin: TypedContractMethod<
1153
+ [
1154
+ account: Account.AccountIdStruct,
1155
+ token: AddressLike,
1156
+ marginDelta: BigNumberish
1157
+ ],
1158
+ [void],
1159
+ "nonpayable"
1160
+ >;
1161
+
1162
+ updatePositionPostVAMMAction: TypedContractMethod<
1163
+ [
1164
+ params: ICollateralEngine.UpdatePositionParamsStruct,
1165
+ isLiquidation: boolean
1166
+ ],
1167
+ [bigint],
1168
+ "nonpayable"
1169
+ >;
1170
+
1171
+ vammManager: TypedContractMethod<[], [string], "view">;
1172
+
1173
+ getFunction<T extends ContractMethod = ContractMethod>(
1174
+ key: string | FunctionFragment
1175
+ ): T;
1176
+
1177
+ getFunction(
1178
+ nameOrSignature: "acceptOwnership"
1179
+ ): TypedContractMethod<[], [void], "nonpayable">;
1180
+ getFunction(
1181
+ nameOrSignature: "aprOracle"
1182
+ ): TypedContractMethod<[], [string], "view">;
1183
+ getFunction(
1184
+ nameOrSignature: "calculateAccountObligation((address,uint96,address),bool)"
1185
+ ): TypedContractMethod<
1186
+ [account: Account.AccountIdStruct, includePositionsGrowth: boolean],
1187
+ [bigint],
1188
+ "view"
1189
+ >;
1190
+ getFunction(
1191
+ nameOrSignature: "calculateAccountObligation((address,uint96,address))"
1192
+ ): TypedContractMethod<[account: Account.AccountIdStruct], [bigint], "view">;
1193
+ getFunction(
1194
+ nameOrSignature: "calculateLiquidationAmounts"
1195
+ ): TypedContractMethod<
1196
+ [
1197
+ poolKey: PoolKey.KeyStruct,
1198
+ fixedBalance: BigNumberish,
1199
+ collateralAssetToTake: AddressLike,
1200
+ debtToCover: BigNumberish,
1201
+ collateralUserBalance: BigNumberish
1202
+ ],
1203
+ [
1204
+ [bigint, bigint, bigint] & {
1205
+ collateralToSeize: bigint;
1206
+ effectiveDebt: bigint;
1207
+ fixedCovered: bigint;
1208
+ }
1209
+ ],
1210
+ "view"
1211
+ >;
1212
+ getFunction(
1213
+ nameOrSignature: "checkMarginRequirement"
1214
+ ): TypedContractMethod<
1215
+ [account: Account.AccountIdStruct],
1216
+ [bigint],
1217
+ "nonpayable"
1218
+ >;
1219
+ getFunction(
1220
+ nameOrSignature: "dustThresholdWad"
1221
+ ): TypedContractMethod<[], [bigint], "view">;
1222
+ getFunction(
1223
+ nameOrSignature: "eliminateDeficit"
1224
+ ): TypedContractMethod<
1225
+ [token: AddressLike, amount: BigNumberish],
1226
+ [void],
1227
+ "nonpayable"
1228
+ >;
1229
+ getFunction(
1230
+ nameOrSignature: "esm"
1231
+ ): TypedContractMethod<[], [string], "view">;
1232
+ getFunction(
1233
+ nameOrSignature: "executeEarlySettlement"
1234
+ ): TypedContractMethod<
1235
+ [
1236
+ account: Account.AccountIdStruct,
1237
+ poolId: BytesLike,
1238
+ tickLower: BigNumberish,
1239
+ tickUpper: BigNumberish,
1240
+ amountDelta: BigNumberish
1241
+ ],
1242
+ [void],
1243
+ "nonpayable"
1244
+ >;
1245
+ getFunction(
1246
+ nameOrSignature: "getAccountBalance"
1247
+ ): TypedContractMethod<
1248
+ [account: Account.AccountIdStruct, token: AddressLike],
1249
+ [bigint],
1250
+ "view"
1251
+ >;
1252
+ getFunction(
1253
+ nameOrSignature: "getAccountMarginValues"
1254
+ ): TypedContractMethod<
1255
+ [account: Account.AccountIdStruct],
1256
+ [
1257
+ [bigint, bigint, bigint] & {
1258
+ avgLtv: bigint;
1259
+ avgLiquidationThreshold: bigint;
1260
+ totalRawValueWad: bigint;
1261
+ }
1262
+ ],
1263
+ "view"
1264
+ >;
1265
+ getFunction(
1266
+ nameOrSignature: "getMarginAssetConfig"
1267
+ ): TypedContractMethod<
1268
+ [token: AddressLike],
1269
+ [CollateralEngineStorage.AssetConfigStructOutput],
1270
+ "view"
1271
+ >;
1272
+ getFunction(
1273
+ nameOrSignature: "getPoolKey"
1274
+ ): TypedContractMethod<
1275
+ [poolId: BytesLike],
1276
+ [PoolKey.KeyStructOutput],
1277
+ "view"
1278
+ >;
1279
+ getFunction(
1280
+ nameOrSignature: "getPositionInfo"
1281
+ ): TypedContractMethod<
1282
+ [
1283
+ account: Account.AccountIdStruct,
1284
+ poolId: BytesLike,
1285
+ tickLower: BigNumberish,
1286
+ tickUpper: BigNumberish
1287
+ ],
1288
+ [Position.InfoStructOutput],
1289
+ "view"
1290
+ >;
1291
+ getFunction(
1292
+ nameOrSignature: "getTokenDeficit"
1293
+ ): TypedContractMethod<[token: AddressLike], [bigint], "view">;
1294
+ getFunction(
1295
+ nameOrSignature: "initialize"
1296
+ ): TypedContractMethod<
1297
+ [__oracleHub: AddressLike, __aprOracle: AddressLike],
1298
+ [void],
1299
+ "nonpayable"
1300
+ >;
1301
+ getFunction(
1302
+ nameOrSignature: "isAccountOperator"
1303
+ ): TypedContractMethod<
1304
+ [accountOwner: AddressLike, operator: AddressLike],
1305
+ [boolean],
1306
+ "view"
1307
+ >;
1308
+ getFunction(
1309
+ nameOrSignature: "liquidatePosition"
1310
+ ): TypedContractMethod<
1311
+ [
1312
+ account: Account.AccountIdStruct,
1313
+ poolId: BytesLike,
1314
+ tickLower: BigNumberish,
1315
+ tickUpper: BigNumberish,
1316
+ collateralAssetToTake: AddressLike,
1317
+ debtToCover: BigNumberish
1318
+ ],
1319
+ [
1320
+ [bigint, bigint, bigint] & {
1321
+ collateralSeized: bigint;
1322
+ effectiveDebtCovered: bigint;
1323
+ fixedCovered: bigint;
1324
+ }
1325
+ ],
1326
+ "nonpayable"
1327
+ >;
1328
+ getFunction(
1329
+ nameOrSignature: "oracleHub"
1330
+ ): TypedContractMethod<[], [string], "view">;
1331
+ getFunction(
1332
+ nameOrSignature: "owner"
1333
+ ): TypedContractMethod<[], [string], "view">;
1334
+ getFunction(
1335
+ nameOrSignature: "pendingOwner"
1336
+ ): TypedContractMethod<[], [string], "view">;
1337
+ getFunction(
1338
+ nameOrSignature: "previewPositionBalances"
1339
+ ): TypedContractMethod<
1340
+ [
1341
+ account: Account.AccountIdStruct,
1342
+ poolId: BytesLike,
1343
+ tickLower: BigNumberish,
1344
+ tickUpper: BigNumberish
1345
+ ],
1346
+ [
1347
+ [bigint, bigint] & {
1348
+ fixedTokenBalance: bigint;
1349
+ variableTokenBalance: bigint;
1350
+ }
1351
+ ],
1352
+ "view"
1353
+ >;
1354
+ getFunction(
1355
+ nameOrSignature: "renounceOwnership"
1356
+ ): TypedContractMethod<[], [void], "nonpayable">;
1357
+ getFunction(
1358
+ nameOrSignature: "setAccountOperator"
1359
+ ): TypedContractMethod<
1360
+ [owner: AddressLike, operator: AddressLike, approved: boolean],
1361
+ [void],
1362
+ "nonpayable"
1363
+ >;
1364
+ getFunction(
1365
+ nameOrSignature: "setAprOracle"
1366
+ ): TypedContractMethod<[__aprOracle: AddressLike], [void], "nonpayable">;
1367
+ getFunction(
1368
+ nameOrSignature: "setDustThreshold"
1369
+ ): TypedContractMethod<
1370
+ [_dustThresholdWad: BigNumberish],
1371
+ [void],
1372
+ "nonpayable"
1373
+ >;
1374
+ getFunction(
1375
+ nameOrSignature: "setESM"
1376
+ ): TypedContractMethod<[_esm: AddressLike], [void], "nonpayable">;
1377
+ getFunction(
1378
+ nameOrSignature: "setMarginAssetConfig"
1379
+ ): TypedContractMethod<
1380
+ [
1381
+ token: AddressLike,
1382
+ ltvWad: BigNumberish,
1383
+ liquidationThresholdWad: BigNumberish,
1384
+ autoExchangeBonusWad: BigNumberish
1385
+ ],
1386
+ [void],
1387
+ "nonpayable"
1388
+ >;
1389
+ getFunction(
1390
+ nameOrSignature: "setOracleHub"
1391
+ ): TypedContractMethod<[__oracleHub: AddressLike], [void], "nonpayable">;
1392
+ getFunction(
1393
+ nameOrSignature: "setVAMMManager"
1394
+ ): TypedContractMethod<[_vammManager: AddressLike], [void], "nonpayable">;
1395
+ getFunction(
1396
+ nameOrSignature: "setWorstCaseVariableFactor"
1397
+ ): TypedContractMethod<
1398
+ [
1399
+ poolId: BytesLike,
1400
+ worstCaseVariableFactorPositiveWad: BigNumberish,
1401
+ worstCaseVariableFactorNegativeWad: BigNumberish
1402
+ ],
1403
+ [void],
1404
+ "nonpayable"
1405
+ >;
1406
+ getFunction(
1407
+ nameOrSignature: "settlePosition"
1408
+ ): TypedContractMethod<
1409
+ [
1410
+ account: Account.AccountIdStruct,
1411
+ poolKey: PoolKey.KeyStruct,
1412
+ settlerAssetOrder: AddressLike[]
1413
+ ],
1414
+ [void],
1415
+ "nonpayable"
1416
+ >;
1417
+ getFunction(
1418
+ nameOrSignature: "transferOwnership"
1419
+ ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
1420
+ getFunction(
1421
+ nameOrSignature: "updateAccountMargin"
1422
+ ): TypedContractMethod<
1423
+ [
1424
+ account: Account.AccountIdStruct,
1425
+ token: AddressLike,
1426
+ marginDelta: BigNumberish
1427
+ ],
1428
+ [void],
1429
+ "nonpayable"
1430
+ >;
1431
+ getFunction(
1432
+ nameOrSignature: "updatePositionPostVAMMAction"
1433
+ ): TypedContractMethod<
1434
+ [
1435
+ params: ICollateralEngine.UpdatePositionParamsStruct,
1436
+ isLiquidation: boolean
1437
+ ],
1438
+ [bigint],
1439
+ "nonpayable"
1440
+ >;
1441
+ getFunction(
1442
+ nameOrSignature: "vammManager"
1443
+ ): TypedContractMethod<[], [string], "view">;
1444
+
1445
+ getEvent(
1446
+ key: "AccountOperatorUpdate"
1447
+ ): TypedContractEvent<
1448
+ AccountOperatorUpdateEvent.InputTuple,
1449
+ AccountOperatorUpdateEvent.OutputTuple,
1450
+ AccountOperatorUpdateEvent.OutputObject
1451
+ >;
1452
+ getEvent(
1453
+ key: "AprOracleSetting"
1454
+ ): TypedContractEvent<
1455
+ AprOracleSettingEvent.InputTuple,
1456
+ AprOracleSettingEvent.OutputTuple,
1457
+ AprOracleSettingEvent.OutputObject
1458
+ >;
1459
+ getEvent(
1460
+ key: "AutoExchange"
1461
+ ): TypedContractEvent<
1462
+ AutoExchangeEvent.InputTuple,
1463
+ AutoExchangeEvent.OutputTuple,
1464
+ AutoExchangeEvent.OutputObject
1465
+ >;
1466
+ getEvent(
1467
+ key: "DustThresholdUpdate"
1468
+ ): TypedContractEvent<
1469
+ DustThresholdUpdateEvent.InputTuple,
1470
+ DustThresholdUpdateEvent.OutputTuple,
1471
+ DustThresholdUpdateEvent.OutputObject
1472
+ >;
1473
+ getEvent(
1474
+ key: "Initialized"
1475
+ ): TypedContractEvent<
1476
+ InitializedEvent.InputTuple,
1477
+ InitializedEvent.OutputTuple,
1478
+ InitializedEvent.OutputObject
1479
+ >;
1480
+ getEvent(
1481
+ key: "MarginAssetConfigUpdate"
1482
+ ): TypedContractEvent<
1483
+ MarginAssetConfigUpdateEvent.InputTuple,
1484
+ MarginAssetConfigUpdateEvent.OutputTuple,
1485
+ MarginAssetConfigUpdateEvent.OutputObject
1486
+ >;
1487
+ getEvent(
1488
+ key: "MarginUpdate"
1489
+ ): TypedContractEvent<
1490
+ MarginUpdateEvent.InputTuple,
1491
+ MarginUpdateEvent.OutputTuple,
1492
+ MarginUpdateEvent.OutputObject
1493
+ >;
1494
+ getEvent(
1495
+ key: "OracleHubSetting"
1496
+ ): TypedContractEvent<
1497
+ OracleHubSettingEvent.InputTuple,
1498
+ OracleHubSettingEvent.OutputTuple,
1499
+ OracleHubSettingEvent.OutputObject
1500
+ >;
1501
+ getEvent(
1502
+ key: "OwnershipTransferStarted"
1503
+ ): TypedContractEvent<
1504
+ OwnershipTransferStartedEvent.InputTuple,
1505
+ OwnershipTransferStartedEvent.OutputTuple,
1506
+ OwnershipTransferStartedEvent.OutputObject
1507
+ >;
1508
+ getEvent(
1509
+ key: "OwnershipTransferred"
1510
+ ): TypedContractEvent<
1511
+ OwnershipTransferredEvent.InputTuple,
1512
+ OwnershipTransferredEvent.OutputTuple,
1513
+ OwnershipTransferredEvent.OutputObject
1514
+ >;
1515
+ getEvent(
1516
+ key: "PositionLiquidated"
1517
+ ): TypedContractEvent<
1518
+ PositionLiquidatedEvent.InputTuple,
1519
+ PositionLiquidatedEvent.OutputTuple,
1520
+ PositionLiquidatedEvent.OutputObject
1521
+ >;
1522
+ getEvent(
1523
+ key: "PositionSettlement"
1524
+ ): TypedContractEvent<
1525
+ PositionSettlementEvent.InputTuple,
1526
+ PositionSettlementEvent.OutputTuple,
1527
+ PositionSettlementEvent.OutputObject
1528
+ >;
1529
+ getEvent(
1530
+ key: "PositionUpdate"
1531
+ ): TypedContractEvent<
1532
+ PositionUpdateEvent.InputTuple,
1533
+ PositionUpdateEvent.OutputTuple,
1534
+ PositionUpdateEvent.OutputObject
1535
+ >;
1536
+ getEvent(
1537
+ key: "ProtocolDeficitEliminated"
1538
+ ): TypedContractEvent<
1539
+ ProtocolDeficitEliminatedEvent.InputTuple,
1540
+ ProtocolDeficitEliminatedEvent.OutputTuple,
1541
+ ProtocolDeficitEliminatedEvent.OutputObject
1542
+ >;
1543
+ getEvent(
1544
+ key: "ProtocolDeficitIncreased"
1545
+ ): TypedContractEvent<
1546
+ ProtocolDeficitIncreasedEvent.InputTuple,
1547
+ ProtocolDeficitIncreasedEvent.OutputTuple,
1548
+ ProtocolDeficitIncreasedEvent.OutputObject
1549
+ >;
1550
+ getEvent(
1551
+ key: "VAMMSetting"
1552
+ ): TypedContractEvent<
1553
+ VAMMSettingEvent.InputTuple,
1554
+ VAMMSettingEvent.OutputTuple,
1555
+ VAMMSettingEvent.OutputObject
1556
+ >;
1557
+ getEvent(
1558
+ key: "WorstCaseVariableFactorConfigSet"
1559
+ ): TypedContractEvent<
1560
+ WorstCaseVariableFactorConfigSetEvent.InputTuple,
1561
+ WorstCaseVariableFactorConfigSetEvent.OutputTuple,
1562
+ WorstCaseVariableFactorConfigSetEvent.OutputObject
1563
+ >;
1564
+
1565
+ filters: {
1566
+ "AccountOperatorUpdate(address,address,bool)": TypedContractEvent<
1567
+ AccountOperatorUpdateEvent.InputTuple,
1568
+ AccountOperatorUpdateEvent.OutputTuple,
1569
+ AccountOperatorUpdateEvent.OutputObject
1570
+ >;
1571
+ AccountOperatorUpdate: TypedContractEvent<
1572
+ AccountOperatorUpdateEvent.InputTuple,
1573
+ AccountOperatorUpdateEvent.OutputTuple,
1574
+ AccountOperatorUpdateEvent.OutputObject
1575
+ >;
1576
+
1577
+ "AprOracleSetting(address)": TypedContractEvent<
1578
+ AprOracleSettingEvent.InputTuple,
1579
+ AprOracleSettingEvent.OutputTuple,
1580
+ AprOracleSettingEvent.OutputObject
1581
+ >;
1582
+ AprOracleSetting: TypedContractEvent<
1583
+ AprOracleSettingEvent.InputTuple,
1584
+ AprOracleSettingEvent.OutputTuple,
1585
+ AprOracleSettingEvent.OutputObject
1586
+ >;
1587
+
1588
+ "AutoExchange(address,uint96,address,bytes32,address,uint256)": TypedContractEvent<
1589
+ AutoExchangeEvent.InputTuple,
1590
+ AutoExchangeEvent.OutputTuple,
1591
+ AutoExchangeEvent.OutputObject
1592
+ >;
1593
+ AutoExchange: TypedContractEvent<
1594
+ AutoExchangeEvent.InputTuple,
1595
+ AutoExchangeEvent.OutputTuple,
1596
+ AutoExchangeEvent.OutputObject
1597
+ >;
1598
+
1599
+ "DustThresholdUpdate(uint256)": TypedContractEvent<
1600
+ DustThresholdUpdateEvent.InputTuple,
1601
+ DustThresholdUpdateEvent.OutputTuple,
1602
+ DustThresholdUpdateEvent.OutputObject
1603
+ >;
1604
+ DustThresholdUpdate: TypedContractEvent<
1605
+ DustThresholdUpdateEvent.InputTuple,
1606
+ DustThresholdUpdateEvent.OutputTuple,
1607
+ DustThresholdUpdateEvent.OutputObject
1608
+ >;
1609
+
1610
+ "Initialized(uint64)": TypedContractEvent<
1611
+ InitializedEvent.InputTuple,
1612
+ InitializedEvent.OutputTuple,
1613
+ InitializedEvent.OutputObject
1614
+ >;
1615
+ Initialized: TypedContractEvent<
1616
+ InitializedEvent.InputTuple,
1617
+ InitializedEvent.OutputTuple,
1618
+ InitializedEvent.OutputObject
1619
+ >;
1620
+
1621
+ "MarginAssetConfigUpdate(address,uint256,uint256,uint256)": TypedContractEvent<
1622
+ MarginAssetConfigUpdateEvent.InputTuple,
1623
+ MarginAssetConfigUpdateEvent.OutputTuple,
1624
+ MarginAssetConfigUpdateEvent.OutputObject
1625
+ >;
1626
+ MarginAssetConfigUpdate: TypedContractEvent<
1627
+ MarginAssetConfigUpdateEvent.InputTuple,
1628
+ MarginAssetConfigUpdateEvent.OutputTuple,
1629
+ MarginAssetConfigUpdateEvent.OutputObject
1630
+ >;
1631
+
1632
+ "MarginUpdate(address,uint96,address,address,int256)": TypedContractEvent<
1633
+ MarginUpdateEvent.InputTuple,
1634
+ MarginUpdateEvent.OutputTuple,
1635
+ MarginUpdateEvent.OutputObject
1636
+ >;
1637
+ MarginUpdate: TypedContractEvent<
1638
+ MarginUpdateEvent.InputTuple,
1639
+ MarginUpdateEvent.OutputTuple,
1640
+ MarginUpdateEvent.OutputObject
1641
+ >;
1642
+
1643
+ "OracleHubSetting(address)": TypedContractEvent<
1644
+ OracleHubSettingEvent.InputTuple,
1645
+ OracleHubSettingEvent.OutputTuple,
1646
+ OracleHubSettingEvent.OutputObject
1647
+ >;
1648
+ OracleHubSetting: TypedContractEvent<
1649
+ OracleHubSettingEvent.InputTuple,
1650
+ OracleHubSettingEvent.OutputTuple,
1651
+ OracleHubSettingEvent.OutputObject
1652
+ >;
1653
+
1654
+ "OwnershipTransferStarted(address,address)": TypedContractEvent<
1655
+ OwnershipTransferStartedEvent.InputTuple,
1656
+ OwnershipTransferStartedEvent.OutputTuple,
1657
+ OwnershipTransferStartedEvent.OutputObject
1658
+ >;
1659
+ OwnershipTransferStarted: TypedContractEvent<
1660
+ OwnershipTransferStartedEvent.InputTuple,
1661
+ OwnershipTransferStartedEvent.OutputTuple,
1662
+ OwnershipTransferStartedEvent.OutputObject
1663
+ >;
1664
+
1665
+ "OwnershipTransferred(address,address)": TypedContractEvent<
1666
+ OwnershipTransferredEvent.InputTuple,
1667
+ OwnershipTransferredEvent.OutputTuple,
1668
+ OwnershipTransferredEvent.OutputObject
1669
+ >;
1670
+ OwnershipTransferred: TypedContractEvent<
1671
+ OwnershipTransferredEvent.InputTuple,
1672
+ OwnershipTransferredEvent.OutputTuple,
1673
+ OwnershipTransferredEvent.OutputObject
1674
+ >;
1675
+
1676
+ "PositionLiquidated(address,uint96,address,bytes32,int24,int24,address,address,uint256,uint256,uint256)": TypedContractEvent<
1677
+ PositionLiquidatedEvent.InputTuple,
1678
+ PositionLiquidatedEvent.OutputTuple,
1679
+ PositionLiquidatedEvent.OutputObject
1680
+ >;
1681
+ PositionLiquidated: TypedContractEvent<
1682
+ PositionLiquidatedEvent.InputTuple,
1683
+ PositionLiquidatedEvent.OutputTuple,
1684
+ PositionLiquidatedEvent.OutputObject
1685
+ >;
1686
+
1687
+ "PositionSettlement(address,uint96,address,bytes32,int256)": TypedContractEvent<
1688
+ PositionSettlementEvent.InputTuple,
1689
+ PositionSettlementEvent.OutputTuple,
1690
+ PositionSettlementEvent.OutputObject
1691
+ >;
1692
+ PositionSettlement: TypedContractEvent<
1693
+ PositionSettlementEvent.InputTuple,
1694
+ PositionSettlementEvent.OutputTuple,
1695
+ PositionSettlementEvent.OutputObject
1696
+ >;
1697
+
1698
+ "PositionUpdate(address,uint96,address,bytes32,int24,int24,uint128,int256,int256,uint256)": TypedContractEvent<
1699
+ PositionUpdateEvent.InputTuple,
1700
+ PositionUpdateEvent.OutputTuple,
1701
+ PositionUpdateEvent.OutputObject
1702
+ >;
1703
+ PositionUpdate: TypedContractEvent<
1704
+ PositionUpdateEvent.InputTuple,
1705
+ PositionUpdateEvent.OutputTuple,
1706
+ PositionUpdateEvent.OutputObject
1707
+ >;
1708
+
1709
+ "ProtocolDeficitEliminated(address,uint256,uint256)": TypedContractEvent<
1710
+ ProtocolDeficitEliminatedEvent.InputTuple,
1711
+ ProtocolDeficitEliminatedEvent.OutputTuple,
1712
+ ProtocolDeficitEliminatedEvent.OutputObject
1713
+ >;
1714
+ ProtocolDeficitEliminated: TypedContractEvent<
1715
+ ProtocolDeficitEliminatedEvent.InputTuple,
1716
+ ProtocolDeficitEliminatedEvent.OutputTuple,
1717
+ ProtocolDeficitEliminatedEvent.OutputObject
1718
+ >;
1719
+
1720
+ "ProtocolDeficitIncreased(address,uint256,uint256)": TypedContractEvent<
1721
+ ProtocolDeficitIncreasedEvent.InputTuple,
1722
+ ProtocolDeficitIncreasedEvent.OutputTuple,
1723
+ ProtocolDeficitIncreasedEvent.OutputObject
1724
+ >;
1725
+ ProtocolDeficitIncreased: TypedContractEvent<
1726
+ ProtocolDeficitIncreasedEvent.InputTuple,
1727
+ ProtocolDeficitIncreasedEvent.OutputTuple,
1728
+ ProtocolDeficitIncreasedEvent.OutputObject
1729
+ >;
1730
+
1731
+ "VAMMSetting(address)": TypedContractEvent<
1732
+ VAMMSettingEvent.InputTuple,
1733
+ VAMMSettingEvent.OutputTuple,
1734
+ VAMMSettingEvent.OutputObject
1735
+ >;
1736
+ VAMMSetting: TypedContractEvent<
1737
+ VAMMSettingEvent.InputTuple,
1738
+ VAMMSettingEvent.OutputTuple,
1739
+ VAMMSettingEvent.OutputObject
1740
+ >;
1741
+
1742
+ "WorstCaseVariableFactorConfigSet(bytes32,uint256,uint256,int24,int24)": TypedContractEvent<
1743
+ WorstCaseVariableFactorConfigSetEvent.InputTuple,
1744
+ WorstCaseVariableFactorConfigSetEvent.OutputTuple,
1745
+ WorstCaseVariableFactorConfigSetEvent.OutputObject
1746
+ >;
1747
+ WorstCaseVariableFactorConfigSet: TypedContractEvent<
1748
+ WorstCaseVariableFactorConfigSetEvent.InputTuple,
1749
+ WorstCaseVariableFactorConfigSetEvent.OutputTuple,
1750
+ WorstCaseVariableFactorConfigSetEvent.OutputObject
1751
+ >;
1752
+ };
1753
+ }