@gearbox-protocol/sdk 14.12.0-next.32 → 14.12.0-next.33

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.
@@ -1,4 +1,8 @@
1
- import { AP_WETH_TOKEN, NO_VERSION } from "../../sdk/index.js";
1
+ import {
2
+ AP_WETH_TOKEN,
3
+ MAX_UINT256,
4
+ NO_VERSION
5
+ } from "../../sdk/index.js";
2
6
  import { classifyCloseOrRepay } from "./detectCloseOrRepay.js";
3
7
  import {
4
8
  replayMulticall
@@ -9,8 +13,13 @@ async function previewCloseOrRepayCreditAccount(input, operation, permanent, opt
9
13
  const market = sdk.marketRegister.findByCreditManager(
10
14
  operation.creditManager
11
15
  );
16
+ const exitTokens = [market.underlying];
17
+ const meta = sdk.tokensMeta.get(market.underlying);
18
+ if (meta && sdk.tokensMeta.isRWAUnderlying(meta)) {
19
+ exitTokens.push(meta.asset);
20
+ }
12
21
  const replay = await replayMulticall(sdk, operation, options);
13
- const kind = classifyCloseOrRepay(operation.multicall, market.underlying);
22
+ const kind = classifyCloseOrRepay(operation.multicall, exitTokens);
14
23
  return kind === "close" ? previewCloseCreditAccount(input, operation, permanent, replay) : previewRepayCreditAccount(input, operation, permanent, replay);
15
24
  }
16
25
  function previewCloseCreditAccount(input, operation, permanent, replay) {
@@ -19,6 +28,13 @@ function previewCloseCreditAccount(input, operation, permanent, replay) {
19
28
  operation.creditManager
20
29
  );
21
30
  const { after, error } = replay;
31
+ let receivedToken = market.underlying;
32
+ for (const m of operation.multicall) {
33
+ if (m.operation === "WithdrawCollateral" && m.amount === MAX_UINT256) {
34
+ receivedToken = m.token;
35
+ break;
36
+ }
37
+ }
22
38
  return {
23
39
  operation: "CloseCreditAccount",
24
40
  permanent,
@@ -26,7 +42,10 @@ function previewCloseCreditAccount(input, operation, permanent, replay) {
26
42
  creditAccount: operation.creditAccount,
27
43
  // On a malformed multicall the withdrawn amount depends on best-effort
28
44
  // replayed balances and may be unreliable
29
- receivedAmount: after.collateralWithdrawn.getOrZero(market.underlying),
45
+ receivedAmount: {
46
+ token: receivedToken,
47
+ balance: after.collateralWithdrawn.getOrZero(receivedToken)
48
+ },
30
49
  error
31
50
  };
32
51
  }
@@ -9,13 +9,13 @@ export declare const midasGatewayAbi: readonly [{
9
9
  readonly type: "address";
10
10
  readonly internalType: "address";
11
11
  }, {
12
- readonly name: "_accessControl";
12
+ readonly name: "_quoteToken";
13
13
  readonly type: "address";
14
14
  readonly internalType: "address";
15
15
  }, {
16
- readonly name: "_transferMaster";
17
- readonly type: "address";
18
- readonly internalType: "address";
16
+ readonly name: "_isAccessControlled";
17
+ readonly type: "bool";
18
+ readonly internalType: "bool";
19
19
  }, {
20
20
  readonly name: "_allowedMarketConfigurator";
21
21
  readonly type: "address";
@@ -32,6 +32,10 @@ export declare const midasGatewayAbi: readonly [{
32
32
  readonly name: "_redemptionLogger";
33
33
  readonly type: "address";
34
34
  readonly internalType: "address";
35
+ }, {
36
+ readonly name: "_withDelayedWithdrawals";
37
+ readonly type: "bool";
38
+ readonly internalType: "bool";
35
39
  }];
36
40
  readonly stateMutability: "nonpayable";
37
41
  }, {
@@ -78,10 +82,6 @@ export declare const midasGatewayAbi: readonly [{
78
82
  readonly type: "function";
79
83
  readonly name: "depositInstant";
80
84
  readonly inputs: readonly [{
81
- readonly name: "tokenIn";
82
- readonly type: "address";
83
- readonly internalType: "address";
84
- }, {
85
85
  readonly name: "amountToken";
86
86
  readonly type: "uint256";
87
87
  readonly internalType: "uint256";
@@ -153,10 +153,6 @@ export declare const midasGatewayAbi: readonly [{
153
153
  readonly name: "account";
154
154
  readonly type: "address";
155
155
  readonly internalType: "address";
156
- }, {
157
- readonly name: "tokenOut";
158
- readonly type: "address";
159
- readonly internalType: "address";
160
156
  }];
161
157
  readonly outputs: readonly [{
162
158
  readonly name: "pendingAmount";
@@ -184,12 +180,28 @@ export declare const midasGatewayAbi: readonly [{
184
180
  readonly stateMutability: "view";
185
181
  }, {
186
182
  readonly type: "function";
187
- readonly name: "redeemInstant";
188
- readonly inputs: readonly [{
189
- readonly name: "tokenOut";
183
+ readonly name: "phantomToken";
184
+ readonly inputs: readonly [];
185
+ readonly outputs: readonly [{
186
+ readonly name: "";
190
187
  readonly type: "address";
191
188
  readonly internalType: "address";
192
- }, {
189
+ }];
190
+ readonly stateMutability: "view";
191
+ }, {
192
+ readonly type: "function";
193
+ readonly name: "quoteToken";
194
+ readonly inputs: readonly [];
195
+ readonly outputs: readonly [{
196
+ readonly name: "";
197
+ readonly type: "address";
198
+ readonly internalType: "address";
199
+ }];
200
+ readonly stateMutability: "view";
201
+ }, {
202
+ readonly type: "function";
203
+ readonly name: "redeemInstant";
204
+ readonly inputs: readonly [{
193
205
  readonly name: "amountMTokenIn";
194
206
  readonly type: "uint256";
195
207
  readonly internalType: "uint256";
@@ -214,10 +226,6 @@ export declare const midasGatewayAbi: readonly [{
214
226
  readonly type: "function";
215
227
  readonly name: "requestRedeem";
216
228
  readonly inputs: readonly [{
217
- readonly name: "tokenOut";
218
- readonly type: "address";
219
- readonly internalType: "address";
220
- }, {
221
229
  readonly name: "amountMTokenIn";
222
230
  readonly type: "uint256";
223
231
  readonly internalType: "uint256";
@@ -266,10 +274,6 @@ export declare const midasGatewayAbi: readonly [{
266
274
  readonly type: "function";
267
275
  readonly name: "withdraw";
268
276
  readonly inputs: readonly [{
269
- readonly name: "tokenOut";
270
- readonly type: "address";
271
- readonly internalType: "address";
272
- }, {
273
277
  readonly name: "amount";
274
278
  readonly type: "uint256";
275
279
  readonly internalType: "uint256";
@@ -283,10 +287,6 @@ export declare const midasGatewayAbi: readonly [{
283
287
  readonly name: "redeemer";
284
288
  readonly type: "address";
285
289
  readonly internalType: "address";
286
- }, {
287
- readonly name: "tokenOut";
288
- readonly type: "address";
289
- readonly internalType: "address";
290
290
  }, {
291
291
  readonly name: "amount";
292
292
  readonly type: "uint256";
@@ -302,6 +302,10 @@ export declare const midasGatewayAbi: readonly [{
302
302
  readonly type: "error";
303
303
  readonly name: "CreditAccountNotEligibleException";
304
304
  readonly inputs: readonly [];
305
+ }, {
306
+ readonly type: "error";
307
+ readonly name: "IncompatibleAccessControlsException";
308
+ readonly inputs: readonly [];
305
309
  }, {
306
310
  readonly type: "error";
307
311
  readonly name: "IncompatibleIssuanceAndRedemptionVaultsException";
@@ -333,6 +337,10 @@ export declare const midasRedeemerAbi: readonly [{
333
337
  readonly name: "_midasRedemptionVault";
334
338
  readonly type: "address";
335
339
  readonly internalType: "address";
340
+ }, {
341
+ readonly name: "_quoteToken";
342
+ readonly type: "address";
343
+ readonly internalType: "address";
336
344
  }];
337
345
  readonly stateMutability: "nonpayable";
338
346
  }, {
@@ -358,11 +366,7 @@ export declare const midasRedeemerAbi: readonly [{
358
366
  }, {
359
367
  readonly type: "function";
360
368
  readonly name: "claimableTokenOutAmount";
361
- readonly inputs: readonly [{
362
- readonly name: "tokenOut";
363
- readonly type: "address";
364
- readonly internalType: "address";
365
- }];
369
+ readonly inputs: readonly [];
366
370
  readonly outputs: readonly [{
367
371
  readonly name: "";
368
372
  readonly type: "uint256";
@@ -432,17 +436,23 @@ export declare const midasRedeemerAbi: readonly [{
432
436
  }, {
433
437
  readonly type: "function";
434
438
  readonly name: "pendingTokenOutAmount";
435
- readonly inputs: readonly [{
436
- readonly name: "tokenOut";
437
- readonly type: "address";
438
- readonly internalType: "address";
439
- }];
439
+ readonly inputs: readonly [];
440
440
  readonly outputs: readonly [{
441
441
  readonly name: "";
442
442
  readonly type: "uint256";
443
443
  readonly internalType: "uint256";
444
444
  }];
445
445
  readonly stateMutability: "view";
446
+ }, {
447
+ readonly type: "function";
448
+ readonly name: "quoteToken";
449
+ readonly inputs: readonly [];
450
+ readonly outputs: readonly [{
451
+ readonly name: "";
452
+ readonly type: "address";
453
+ readonly internalType: "address";
454
+ }];
455
+ readonly stateMutability: "view";
446
456
  }, {
447
457
  readonly type: "function";
448
458
  readonly name: "redemptionStartTimestamp";
@@ -467,10 +477,6 @@ export declare const midasRedeemerAbi: readonly [{
467
477
  readonly type: "function";
468
478
  readonly name: "requestRedeem";
469
479
  readonly inputs: readonly [{
470
- readonly name: "tokenOut";
471
- readonly type: "address";
472
- readonly internalType: "address";
473
- }, {
474
480
  readonly name: "amountMTokenIn";
475
481
  readonly type: "uint256";
476
482
  readonly internalType: "uint256";
@@ -491,10 +497,6 @@ export declare const midasRedeemerAbi: readonly [{
491
497
  readonly type: "function";
492
498
  readonly name: "withdraw";
493
499
  readonly inputs: readonly [{
494
- readonly name: "tokenOut";
495
- readonly type: "address";
496
- readonly internalType: "address";
497
- }, {
498
500
  readonly name: "amount";
499
501
  readonly type: "uint256";
500
502
  readonly internalType: "uint256";
@@ -529,7 +531,11 @@ export declare const midasRedemptionVaultPhantomTokenAbi: readonly [{
529
531
  readonly type: "address";
530
532
  readonly internalType: "address";
531
533
  }, {
532
- readonly name: "_tokenOut";
534
+ readonly name: "_mToken";
535
+ readonly type: "address";
536
+ readonly internalType: "address";
537
+ }, {
538
+ readonly name: "_quoteToken";
533
539
  readonly type: "address";
534
540
  readonly internalType: "address";
535
541
  }];
@@ -658,16 +664,6 @@ export declare const midasRedemptionVaultPhantomTokenAbi: readonly [{
658
664
  readonly internalType: "string";
659
665
  }];
660
666
  readonly stateMutability: "view";
661
- }, {
662
- readonly type: "function";
663
- readonly name: "tokenOut";
664
- readonly inputs: readonly [];
665
- readonly outputs: readonly [{
666
- readonly name: "";
667
- readonly type: "address";
668
- readonly internalType: "address";
669
- }];
670
- readonly stateMutability: "view";
671
667
  }, {
672
668
  readonly type: "function";
673
669
  readonly name: "totalSupply";
@@ -1,34 +1,4 @@
1
1
  export declare const iMidasGatewayAdapterV311Abi: readonly [{
2
- readonly type: "function";
3
- readonly name: "allowedInputTokens";
4
- readonly inputs: readonly [];
5
- readonly outputs: readonly [{
6
- readonly name: "";
7
- readonly type: "address[]";
8
- readonly internalType: "address[]";
9
- }];
10
- readonly stateMutability: "view";
11
- }, {
12
- readonly type: "function";
13
- readonly name: "allowedOutputTokens";
14
- readonly inputs: readonly [];
15
- readonly outputs: readonly [{
16
- readonly name: "";
17
- readonly type: "address[]";
18
- readonly internalType: "address[]";
19
- }];
20
- readonly stateMutability: "view";
21
- }, {
22
- readonly type: "function";
23
- readonly name: "allowedPhantomTokens";
24
- readonly inputs: readonly [];
25
- readonly outputs: readonly [{
26
- readonly name: "";
27
- readonly type: "address[]";
28
- readonly internalType: "address[]";
29
- }];
30
- readonly stateMutability: "view";
31
- }, {
32
2
  readonly type: "function";
33
3
  readonly name: "contractType";
34
4
  readonly inputs: readonly [];
@@ -52,10 +22,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
52
22
  readonly type: "function";
53
23
  readonly name: "depositInstant";
54
24
  readonly inputs: readonly [{
55
- readonly name: "tokenIn";
56
- readonly type: "address";
57
- readonly internalType: "address";
58
- }, {
59
25
  readonly name: "amountToken";
60
26
  readonly type: "uint256";
61
27
  readonly internalType: "uint256";
@@ -78,10 +44,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
78
44
  readonly type: "function";
79
45
  readonly name: "depositInstantDiff";
80
46
  readonly inputs: readonly [{
81
- readonly name: "tokenIn";
82
- readonly type: "address";
83
- readonly internalType: "address";
84
- }, {
85
47
  readonly name: "leftoverAmount";
86
48
  readonly type: "uint256";
87
49
  readonly internalType: "uint256";
@@ -124,34 +86,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
124
86
  readonly internalType: "address";
125
87
  }];
126
88
  readonly stateMutability: "view";
127
- }, {
128
- readonly type: "function";
129
- readonly name: "isInputTokenAllowed";
130
- readonly inputs: readonly [{
131
- readonly name: "token";
132
- readonly type: "address";
133
- readonly internalType: "address";
134
- }];
135
- readonly outputs: readonly [{
136
- readonly name: "";
137
- readonly type: "bool";
138
- readonly internalType: "bool";
139
- }];
140
- readonly stateMutability: "view";
141
- }, {
142
- readonly type: "function";
143
- readonly name: "isOutputTokenAllowed";
144
- readonly inputs: readonly [{
145
- readonly name: "token";
146
- readonly type: "address";
147
- readonly internalType: "address";
148
- }];
149
- readonly outputs: readonly [{
150
- readonly name: "";
151
- readonly type: "bool";
152
- readonly internalType: "bool";
153
- }];
154
- readonly stateMutability: "view";
155
89
  }, {
156
90
  readonly type: "function";
157
91
  readonly name: "mToken";
@@ -164,12 +98,8 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
164
98
  readonly stateMutability: "view";
165
99
  }, {
166
100
  readonly type: "function";
167
- readonly name: "outputTokenToPhantomToken";
168
- readonly inputs: readonly [{
169
- readonly name: "outputToken";
170
- readonly type: "address";
171
- readonly internalType: "address";
172
- }];
101
+ readonly name: "phantomToken";
102
+ readonly inputs: readonly [];
173
103
  readonly outputs: readonly [{
174
104
  readonly name: "";
175
105
  readonly type: "address";
@@ -178,12 +108,8 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
178
108
  readonly stateMutability: "view";
179
109
  }, {
180
110
  readonly type: "function";
181
- readonly name: "phantomTokenToOutputToken";
182
- readonly inputs: readonly [{
183
- readonly name: "phantomToken";
184
- readonly type: "address";
185
- readonly internalType: "address";
186
- }];
111
+ readonly name: "quoteToken";
112
+ readonly inputs: readonly [];
187
113
  readonly outputs: readonly [{
188
114
  readonly name: "";
189
115
  readonly type: "address";
@@ -194,10 +120,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
194
120
  readonly type: "function";
195
121
  readonly name: "redeemInstant";
196
122
  readonly inputs: readonly [{
197
- readonly name: "tokenOut";
198
- readonly type: "address";
199
- readonly internalType: "address";
200
- }, {
201
123
  readonly name: "amountMTokenIn";
202
124
  readonly type: "uint256";
203
125
  readonly internalType: "uint256";
@@ -216,10 +138,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
216
138
  readonly type: "function";
217
139
  readonly name: "redeemInstantDiff";
218
140
  readonly inputs: readonly [{
219
- readonly name: "tokenOut";
220
- readonly type: "address";
221
- readonly internalType: "address";
222
- }, {
223
141
  readonly name: "leftoverAmount";
224
142
  readonly type: "uint256";
225
143
  readonly internalType: "uint256";
@@ -238,17 +156,9 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
238
156
  readonly type: "function";
239
157
  readonly name: "redeemRequest";
240
158
  readonly inputs: readonly [{
241
- readonly name: "tokenOut";
242
- readonly type: "address";
243
- readonly internalType: "address";
244
- }, {
245
159
  readonly name: "amountMTokenIn";
246
160
  readonly type: "uint256";
247
161
  readonly internalType: "uint256";
248
- }, {
249
- readonly name: "extraData";
250
- readonly type: "bytes";
251
- readonly internalType: "bytes";
252
162
  }];
253
163
  readonly outputs: readonly [{
254
164
  readonly name: "";
@@ -260,13 +170,13 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
260
170
  readonly type: "function";
261
171
  readonly name: "redeemRequest";
262
172
  readonly inputs: readonly [{
263
- readonly name: "tokenOut";
264
- readonly type: "address";
265
- readonly internalType: "address";
266
- }, {
267
173
  readonly name: "amountMTokenIn";
268
174
  readonly type: "uint256";
269
175
  readonly internalType: "uint256";
176
+ }, {
177
+ readonly name: "extraData";
178
+ readonly type: "bytes";
179
+ readonly internalType: "bytes";
270
180
  }];
271
181
  readonly outputs: readonly [{
272
182
  readonly name: "";
@@ -278,10 +188,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
278
188
  readonly type: "function";
279
189
  readonly name: "redeemRequestDiff";
280
190
  readonly inputs: readonly [{
281
- readonly name: "tokenOut";
282
- readonly type: "address";
283
- readonly internalType: "address";
284
- }, {
285
191
  readonly name: "leftoverAmount";
286
192
  readonly type: "uint256";
287
193
  readonly internalType: "uint256";
@@ -296,10 +202,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
296
202
  readonly type: "function";
297
203
  readonly name: "redeemRequestDiff";
298
204
  readonly inputs: readonly [{
299
- readonly name: "tokenOut";
300
- readonly type: "address";
301
- readonly internalType: "address";
302
- }, {
303
205
  readonly name: "leftoverAmount";
304
206
  readonly type: "uint256";
305
207
  readonly internalType: "uint256";
@@ -334,43 +236,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
334
236
  readonly internalType: "bytes";
335
237
  }];
336
238
  readonly stateMutability: "view";
337
- }, {
338
- readonly type: "function";
339
- readonly name: "setInputTokenAllowedStatusBatch";
340
- readonly inputs: readonly [{
341
- readonly name: "tokens";
342
- readonly type: "address[]";
343
- readonly internalType: "address[]";
344
- }, {
345
- readonly name: "allowed";
346
- readonly type: "bool[]";
347
- readonly internalType: "bool[]";
348
- }];
349
- readonly outputs: readonly [];
350
- readonly stateMutability: "nonpayable";
351
- }, {
352
- readonly type: "function";
353
- readonly name: "setOutputTokenAllowedStatusBatch";
354
- readonly inputs: readonly [{
355
- readonly name: "configs";
356
- readonly type: "tuple[]";
357
- readonly internalType: "struct IMidasGatewayAdapter.MidasAllowedTokenStatus[]";
358
- readonly components: readonly [{
359
- readonly name: "token";
360
- readonly type: "address";
361
- readonly internalType: "address";
362
- }, {
363
- readonly name: "phantomToken";
364
- readonly type: "address";
365
- readonly internalType: "address";
366
- }, {
367
- readonly name: "allowed";
368
- readonly type: "bool";
369
- readonly internalType: "bool";
370
- }];
371
- }];
372
- readonly outputs: readonly [];
373
- readonly stateMutability: "nonpayable";
374
239
  }, {
375
240
  readonly type: "function";
376
241
  readonly name: "targetContract";
@@ -413,10 +278,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
413
278
  readonly type: "function";
414
279
  readonly name: "withdraw";
415
280
  readonly inputs: readonly [{
416
- readonly name: "tokenOut";
417
- readonly type: "address";
418
- readonly internalType: "address";
419
- }, {
420
281
  readonly name: "amount";
421
282
  readonly type: "uint256";
422
283
  readonly internalType: "uint256";
@@ -434,10 +295,6 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
434
295
  readonly name: "redeemer";
435
296
  readonly type: "address";
436
297
  readonly internalType: "address";
437
- }, {
438
- readonly name: "tokenOut";
439
- readonly type: "address";
440
- readonly internalType: "address";
441
298
  }, {
442
299
  readonly name: "amount";
443
300
  readonly type: "uint256";
@@ -467,56 +324,13 @@ export declare const iMidasGatewayAdapterV311Abi: readonly [{
467
324
  readonly internalType: "bool";
468
325
  }];
469
326
  readonly stateMutability: "nonpayable";
470
- }, {
471
- readonly type: "event";
472
- readonly name: "SetInputTokenAllowedStatus";
473
- readonly inputs: readonly [{
474
- readonly name: "token";
475
- readonly type: "address";
476
- readonly indexed: true;
477
- readonly internalType: "address";
478
- }, {
479
- readonly name: "allowed";
480
- readonly type: "bool";
481
- readonly indexed: false;
482
- readonly internalType: "bool";
483
- }];
484
- readonly anonymous: false;
485
- }, {
486
- readonly type: "event";
487
- readonly name: "SetOutputTokenAllowedStatus";
488
- readonly inputs: readonly [{
489
- readonly name: "token";
490
- readonly type: "address";
491
- readonly indexed: true;
492
- readonly internalType: "address";
493
- }, {
494
- readonly name: "phantomToken";
495
- readonly type: "address";
496
- readonly indexed: true;
497
- readonly internalType: "address";
498
- }, {
499
- readonly name: "allowed";
500
- readonly type: "bool";
501
- readonly indexed: false;
502
- readonly internalType: "bool";
503
- }];
504
- readonly anonymous: false;
505
- }, {
506
- readonly type: "error";
507
- readonly name: "IncorrectArrayLengthException";
508
- readonly inputs: readonly [];
509
327
  }, {
510
328
  readonly type: "error";
511
329
  readonly name: "IncorrectStakedPhantomTokenException";
512
330
  readonly inputs: readonly [];
513
331
  }, {
514
332
  readonly type: "error";
515
- readonly name: "PhantomTokenTokenOutMismatchException";
516
- readonly inputs: readonly [];
517
- }, {
518
- readonly type: "error";
519
- readonly name: "TokenNotAllowedException";
333
+ readonly name: "PhantomTokenNotSetException";
520
334
  readonly inputs: readonly [];
521
335
  }];
522
336
  export declare const iMidasGatewayV311Abi: readonly [{
@@ -543,10 +357,6 @@ export declare const iMidasGatewayV311Abi: readonly [{
543
357
  readonly type: "function";
544
358
  readonly name: "depositInstant";
545
359
  readonly inputs: readonly [{
546
- readonly name: "tokenIn";
547
- readonly type: "address";
548
- readonly internalType: "address";
549
- }, {
550
360
  readonly name: "amountToken";
551
361
  readonly type: "uint256";
552
362
  readonly internalType: "uint256";
@@ -578,10 +388,6 @@ export declare const iMidasGatewayV311Abi: readonly [{
578
388
  readonly name: "account";
579
389
  readonly type: "address";
580
390
  readonly internalType: "address";
581
- }, {
582
- readonly name: "tokenOut";
583
- readonly type: "address";
584
- readonly internalType: "address";
585
391
  }];
586
392
  readonly outputs: readonly [{
587
393
  readonly name: "pendingAmount";
@@ -609,12 +415,28 @@ export declare const iMidasGatewayV311Abi: readonly [{
609
415
  readonly stateMutability: "view";
610
416
  }, {
611
417
  readonly type: "function";
612
- readonly name: "redeemInstant";
613
- readonly inputs: readonly [{
614
- readonly name: "tokenOut";
418
+ readonly name: "phantomToken";
419
+ readonly inputs: readonly [];
420
+ readonly outputs: readonly [{
421
+ readonly name: "";
615
422
  readonly type: "address";
616
423
  readonly internalType: "address";
617
- }, {
424
+ }];
425
+ readonly stateMutability: "view";
426
+ }, {
427
+ readonly type: "function";
428
+ readonly name: "quoteToken";
429
+ readonly inputs: readonly [];
430
+ readonly outputs: readonly [{
431
+ readonly name: "";
432
+ readonly type: "address";
433
+ readonly internalType: "address";
434
+ }];
435
+ readonly stateMutability: "view";
436
+ }, {
437
+ readonly type: "function";
438
+ readonly name: "redeemInstant";
439
+ readonly inputs: readonly [{
618
440
  readonly name: "amountMTokenIn";
619
441
  readonly type: "uint256";
620
442
  readonly internalType: "uint256";
@@ -639,10 +461,6 @@ export declare const iMidasGatewayV311Abi: readonly [{
639
461
  readonly type: "function";
640
462
  readonly name: "requestRedeem";
641
463
  readonly inputs: readonly [{
642
- readonly name: "tokenOut";
643
- readonly type: "address";
644
- readonly internalType: "address";
645
- }, {
646
464
  readonly name: "amountMTokenIn";
647
465
  readonly type: "uint256";
648
466
  readonly internalType: "uint256";
@@ -691,10 +509,6 @@ export declare const iMidasGatewayV311Abi: readonly [{
691
509
  readonly type: "function";
692
510
  readonly name: "withdraw";
693
511
  readonly inputs: readonly [{
694
- readonly name: "tokenOut";
695
- readonly type: "address";
696
- readonly internalType: "address";
697
- }, {
698
512
  readonly name: "amount";
699
513
  readonly type: "uint256";
700
514
  readonly internalType: "uint256";
@@ -708,10 +522,6 @@ export declare const iMidasGatewayV311Abi: readonly [{
708
522
  readonly name: "redeemer";
709
523
  readonly type: "address";
710
524
  readonly internalType: "address";
711
- }, {
712
- readonly name: "tokenOut";
713
- readonly type: "address";
714
- readonly internalType: "address";
715
525
  }, {
716
526
  readonly name: "amount";
717
527
  readonly type: "uint256";
@@ -727,6 +537,10 @@ export declare const iMidasGatewayV311Abi: readonly [{
727
537
  readonly type: "error";
728
538
  readonly name: "CreditAccountNotEligibleException";
729
539
  readonly inputs: readonly [];
540
+ }, {
541
+ readonly type: "error";
542
+ readonly name: "IncompatibleAccessControlsException";
543
+ readonly inputs: readonly [];
730
544
  }, {
731
545
  readonly type: "error";
732
546
  readonly name: "IncompatibleIssuanceAndRedemptionVaultsException";