@dhedge/trading-widget 3.11.2 → 3.12.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.
package/README.md CHANGED
@@ -127,7 +127,6 @@ UI configuration provider. Manages params to configure custom styling, component
127
127
  > | `standalone` | `boolean` | `true` | Handles token selection in SPA mode |
128
128
  > | `isAllAssetsWithdrawOptionDefault` | `boolean` | `false` | Sets "All Assets" withdraw option by default |
129
129
  > | `chainConfig` | `Partial<Record<ChainId, { name: string; iconPath: string }>>` | `{}` | Sets map of chain `name` and `iconPath` |
130
- > | `aaveOffchainWithdrawChainIds` | `ChainId[]` | `[]` | Offchain swap data will be used for Aave withdrawals for selected chains |
131
130
  > | `aaveOffchainWithdrawMinValue` | `number` | `50` | Value in USD when off-chain Aave withdrawal is enabled |
132
131
  > | `getFallbackIconPath` | `(tokenName: string) => string` | `buildIconLink` | Fallback token icon path getter |
133
132
 
@@ -119,27 +119,17 @@ export declare const EasySwapperV2Abi: readonly [{
119
119
  }, {
120
120
  readonly anonymous: false;
121
121
  readonly inputs: readonly [{
122
- readonly indexed: true;
122
+ readonly indexed: false;
123
123
  readonly internalType: "address";
124
- readonly name: "previousOwner";
124
+ readonly name: "limitOrderVault";
125
125
  readonly type: "address";
126
126
  }, {
127
127
  readonly indexed: true;
128
128
  readonly internalType: "address";
129
- readonly name: "newOwner";
130
- readonly type: "address";
131
- }];
132
- readonly name: "OwnershipTransferred";
133
- readonly type: "event";
134
- }, {
135
- readonly anonymous: false;
136
- readonly inputs: readonly [{
137
- readonly indexed: false;
138
- readonly internalType: "address";
139
- readonly name: "proxy";
129
+ readonly name: "depositor";
140
130
  readonly type: "address";
141
131
  }];
142
- readonly name: "ProxyCreated";
132
+ readonly name: "LimitOrderVaultCreated";
143
133
  readonly type: "event";
144
134
  }, {
145
135
  readonly anonymous: false;
@@ -181,21 +171,6 @@ export declare const EasySwapperV2Abi: readonly [{
181
171
  }];
182
172
  readonly name: "WithdrawalInitiated";
183
173
  readonly type: "event";
184
- }, {
185
- readonly anonymous: false;
186
- readonly inputs: readonly [{
187
- readonly indexed: false;
188
- readonly internalType: "address";
189
- readonly name: "withdrawalVault";
190
- readonly type: "address";
191
- }, {
192
- readonly indexed: true;
193
- readonly internalType: "address";
194
- readonly name: "depositor";
195
- readonly type: "address";
196
- }];
197
- readonly name: "WithdrawalVaultCreated";
198
- readonly type: "event";
199
174
  }, {
200
175
  readonly anonymous: false;
201
176
  readonly inputs: readonly [{
@@ -231,15 +206,141 @@ export declare const EasySwapperV2Abi: readonly [{
231
206
  }];
232
207
  readonly name: "ZapDepositCompleted";
233
208
  readonly type: "event";
209
+ }, {
210
+ readonly inputs: readonly [{
211
+ readonly components: readonly [{
212
+ readonly components: readonly [{
213
+ readonly internalType: "contract IERC20";
214
+ readonly name: "token";
215
+ readonly type: "address";
216
+ }, {
217
+ readonly internalType: "uint256";
218
+ readonly name: "amount";
219
+ readonly type: "uint256";
220
+ }, {
221
+ readonly components: readonly [{
222
+ readonly internalType: "bytes32";
223
+ readonly name: "routerKey";
224
+ readonly type: "bytes32";
225
+ }, {
226
+ readonly internalType: "bytes";
227
+ readonly name: "swapData";
228
+ readonly type: "bytes";
229
+ }];
230
+ readonly internalType: "struct ISwapper.AggregatorData";
231
+ readonly name: "aggregatorData";
232
+ readonly type: "tuple";
233
+ }];
234
+ readonly internalType: "struct ISwapper.SrcTokenSwapDetails[]";
235
+ readonly name: "srcData";
236
+ readonly type: "tuple[]";
237
+ }, {
238
+ readonly components: readonly [{
239
+ readonly internalType: "contract IERC20";
240
+ readonly name: "destToken";
241
+ readonly type: "address";
242
+ }, {
243
+ readonly internalType: "uint256";
244
+ readonly name: "minDestAmount";
245
+ readonly type: "uint256";
246
+ }];
247
+ readonly internalType: "struct ISwapper.DestData";
248
+ readonly name: "destData";
249
+ readonly type: "tuple";
250
+ }];
251
+ readonly internalType: "struct IWithdrawalVault.MultiInSingleOutData";
252
+ readonly name: "_swapData";
253
+ readonly type: "tuple";
254
+ }, {
255
+ readonly internalType: "uint256";
256
+ readonly name: "_expectedDestTokenAmount";
257
+ readonly type: "uint256";
258
+ }];
259
+ readonly name: "completeLimitOrderWithdrawal";
260
+ readonly outputs: readonly [{
261
+ readonly internalType: "uint256";
262
+ readonly name: "destTokenAmount";
263
+ readonly type: "uint256";
264
+ }];
265
+ readonly stateMutability: "nonpayable";
266
+ readonly type: "function";
234
267
  }, {
235
268
  readonly inputs: readonly [];
236
- readonly name: "DEFAULT_COOLDOWN";
269
+ readonly name: "completeLimitOrderWithdrawal";
270
+ readonly outputs: readonly [];
271
+ readonly stateMutability: "nonpayable";
272
+ readonly type: "function";
273
+ }, {
274
+ readonly inputs: readonly [{
275
+ readonly internalType: "address";
276
+ readonly name: "_user";
277
+ readonly type: "address";
278
+ }, {
279
+ readonly components: readonly [{
280
+ readonly components: readonly [{
281
+ readonly internalType: "contract IERC20";
282
+ readonly name: "token";
283
+ readonly type: "address";
284
+ }, {
285
+ readonly internalType: "uint256";
286
+ readonly name: "amount";
287
+ readonly type: "uint256";
288
+ }, {
289
+ readonly components: readonly [{
290
+ readonly internalType: "bytes32";
291
+ readonly name: "routerKey";
292
+ readonly type: "bytes32";
293
+ }, {
294
+ readonly internalType: "bytes";
295
+ readonly name: "swapData";
296
+ readonly type: "bytes";
297
+ }];
298
+ readonly internalType: "struct ISwapper.AggregatorData";
299
+ readonly name: "aggregatorData";
300
+ readonly type: "tuple";
301
+ }];
302
+ readonly internalType: "struct ISwapper.SrcTokenSwapDetails[]";
303
+ readonly name: "srcData";
304
+ readonly type: "tuple[]";
305
+ }, {
306
+ readonly components: readonly [{
307
+ readonly internalType: "contract IERC20";
308
+ readonly name: "destToken";
309
+ readonly type: "address";
310
+ }, {
311
+ readonly internalType: "uint256";
312
+ readonly name: "minDestAmount";
313
+ readonly type: "uint256";
314
+ }];
315
+ readonly internalType: "struct ISwapper.DestData";
316
+ readonly name: "destData";
317
+ readonly type: "tuple";
318
+ }];
319
+ readonly internalType: "struct IWithdrawalVault.MultiInSingleOutData";
320
+ readonly name: "_swapData";
321
+ readonly type: "tuple";
322
+ }, {
323
+ readonly internalType: "uint256";
324
+ readonly name: "_expectedDestTokenAmount";
325
+ readonly type: "uint256";
326
+ }];
327
+ readonly name: "completeLimitOrderWithdrawalFor";
237
328
  readonly outputs: readonly [{
238
329
  readonly internalType: "uint256";
239
- readonly name: "";
330
+ readonly name: "destTokenAmount";
240
331
  readonly type: "uint256";
241
332
  }];
242
- readonly stateMutability: "view";
333
+ readonly stateMutability: "nonpayable";
334
+ readonly type: "function";
335
+ }, {
336
+ readonly inputs: readonly [{
337
+ readonly internalType: "address";
338
+ readonly name: "_user";
339
+ readonly type: "address";
340
+ }];
341
+ readonly name: "completeLimitOrderWithdrawalFor";
342
+ readonly outputs: readonly [];
343
+ readonly stateMutability: "nonpayable";
243
344
  readonly type: "function";
244
345
  }, {
245
346
  readonly inputs: readonly [{
@@ -292,7 +393,11 @@ export declare const EasySwapperV2Abi: readonly [{
292
393
  readonly type: "uint256";
293
394
  }];
294
395
  readonly name: "completeWithdrawal";
295
- readonly outputs: readonly [];
396
+ readonly outputs: readonly [{
397
+ readonly internalType: "uint256";
398
+ readonly name: "destTokenAmount";
399
+ readonly type: "uint256";
400
+ }];
296
401
  readonly stateMutability: "nonpayable";
297
402
  readonly type: "function";
298
403
  }, {
@@ -440,6 +545,33 @@ export declare const EasySwapperV2Abi: readonly [{
440
545
  readonly type: "function";
441
546
  }, {
442
547
  readonly inputs: readonly [{
548
+ readonly internalType: "address";
549
+ readonly name: "_depositor";
550
+ readonly type: "address";
551
+ }];
552
+ readonly name: "getTrackedAssetsFromLimitOrders";
553
+ readonly outputs: readonly [{
554
+ readonly components: readonly [{
555
+ readonly internalType: "address";
556
+ readonly name: "token";
557
+ readonly type: "address";
558
+ }, {
559
+ readonly internalType: "uint256";
560
+ readonly name: "balance";
561
+ readonly type: "uint256";
562
+ }];
563
+ readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
564
+ readonly name: "trackedAssets";
565
+ readonly type: "tuple[]";
566
+ }];
567
+ readonly stateMutability: "view";
568
+ readonly type: "function";
569
+ }, {
570
+ readonly inputs: readonly [{
571
+ readonly internalType: "address";
572
+ readonly name: "_user";
573
+ readonly type: "address";
574
+ }, {
443
575
  readonly internalType: "address";
444
576
  readonly name: "_dHedgeVault";
445
577
  readonly type: "address";
@@ -465,7 +597,7 @@ export declare const EasySwapperV2Abi: readonly [{
465
597
  readonly name: "_complexAssetsData";
466
598
  readonly type: "tuple[]";
467
599
  }];
468
- readonly name: "initWithdrawal";
600
+ readonly name: "initLimitOrderWithdrawalFor";
469
601
  readonly outputs: readonly [{
470
602
  readonly components: readonly [{
471
603
  readonly internalType: "address";
@@ -496,9 +628,22 @@ export declare const EasySwapperV2Abi: readonly [{
496
628
  readonly name: "_amountIn";
497
629
  readonly type: "uint256";
498
630
  }, {
499
- readonly internalType: "uint256";
500
- readonly name: "_slippageTolerance";
501
- readonly type: "uint256";
631
+ readonly components: readonly [{
632
+ readonly internalType: "address";
633
+ readonly name: "supportedAsset";
634
+ readonly type: "address";
635
+ }, {
636
+ readonly internalType: "bytes";
637
+ readonly name: "withdrawData";
638
+ readonly type: "bytes";
639
+ }, {
640
+ readonly internalType: "uint256";
641
+ readonly name: "slippageTolerance";
642
+ readonly type: "uint256";
643
+ }];
644
+ readonly internalType: "struct IPoolLogic.ComplexAsset[]";
645
+ readonly name: "_complexAssetsData";
646
+ readonly type: "tuple[]";
502
647
  }];
503
648
  readonly name: "initWithdrawal";
504
649
  readonly outputs: readonly [{
@@ -524,28 +669,16 @@ export declare const EasySwapperV2Abi: readonly [{
524
669
  }, {
525
670
  readonly inputs: readonly [{
526
671
  readonly internalType: "address";
527
- readonly name: "_vaultLogic";
528
- readonly type: "address";
529
- }, {
530
- readonly internalType: "address";
531
- readonly name: "_weth";
532
- readonly type: "address";
533
- }, {
534
- readonly internalType: "contract IWETH";
535
- readonly name: "_wrappedNativeToken";
536
- readonly type: "address";
537
- }, {
538
- readonly internalType: "contract ISwapper";
539
- readonly name: "_swapper";
672
+ readonly name: "";
540
673
  readonly type: "address";
541
- }, {
542
- readonly internalType: "uint256";
543
- readonly name: "_customCooldown";
544
- readonly type: "uint256";
545
674
  }];
546
- readonly name: "initialize";
547
- readonly outputs: readonly [];
548
- readonly stateMutability: "nonpayable";
675
+ readonly name: "isAuthorizedWithdrawer";
676
+ readonly outputs: readonly [{
677
+ readonly internalType: "bool";
678
+ readonly name: "";
679
+ readonly type: "bool";
680
+ }];
681
+ readonly stateMutability: "view";
549
682
  readonly type: "function";
550
683
  }, {
551
684
  readonly inputs: readonly [{
@@ -561,6 +694,20 @@ export declare const EasySwapperV2Abi: readonly [{
561
694
  }];
562
695
  readonly stateMutability: "view";
563
696
  readonly type: "function";
697
+ }, {
698
+ readonly inputs: readonly [{
699
+ readonly internalType: "address";
700
+ readonly name: "";
701
+ readonly type: "address";
702
+ }];
703
+ readonly name: "limitOrderContracts";
704
+ readonly outputs: readonly [{
705
+ readonly internalType: "address";
706
+ readonly name: "";
707
+ readonly type: "address";
708
+ }];
709
+ readonly stateMutability: "view";
710
+ readonly type: "function";
564
711
  }, {
565
712
  readonly inputs: readonly [{
566
713
  readonly internalType: "address";
@@ -619,6 +766,25 @@ export declare const EasySwapperV2Abi: readonly [{
619
766
  readonly outputs: readonly [];
620
767
  readonly stateMutability: "nonpayable";
621
768
  readonly type: "function";
769
+ }, {
770
+ readonly inputs: readonly [{
771
+ readonly components: readonly [{
772
+ readonly internalType: "address";
773
+ readonly name: "toWhitelist";
774
+ readonly type: "address";
775
+ }, {
776
+ readonly internalType: "bool";
777
+ readonly name: "whitelisted";
778
+ readonly type: "bool";
779
+ }];
780
+ readonly internalType: "struct EasySwapperV2.WhitelistSetting[]";
781
+ readonly name: "_whitelistSettings";
782
+ readonly type: "tuple[]";
783
+ }];
784
+ readonly name: "setAuthorizedWithdrawers";
785
+ readonly outputs: readonly [];
786
+ readonly stateMutability: "nonpayable";
787
+ readonly type: "function";
622
788
  }, {
623
789
  readonly inputs: readonly [{
624
790
  readonly internalType: "uint256";
@@ -633,14 +799,14 @@ export declare const EasySwapperV2Abi: readonly [{
633
799
  readonly inputs: readonly [{
634
800
  readonly components: readonly [{
635
801
  readonly internalType: "address";
636
- readonly name: "dHedgeVault";
802
+ readonly name: "toWhitelist";
637
803
  readonly type: "address";
638
804
  }, {
639
805
  readonly internalType: "bool";
640
806
  readonly name: "whitelisted";
641
807
  readonly type: "bool";
642
808
  }];
643
- readonly internalType: "struct EasySwapperV2.CustomCooldownSetting[]";
809
+ readonly internalType: "struct EasySwapperV2.WhitelistSetting[]";
644
810
  readonly name: "_whitelistSettings";
645
811
  readonly type: "tuple[]";
646
812
  }];
@@ -698,37 +864,6 @@ export declare const EasySwapperV2Abi: readonly [{
698
864
  readonly outputs: readonly [];
699
865
  readonly stateMutability: "nonpayable";
700
866
  readonly type: "function";
701
- }, {
702
- readonly inputs: readonly [{
703
- readonly internalType: "address";
704
- readonly name: "_dHedgeVault";
705
- readonly type: "address";
706
- }, {
707
- readonly internalType: "uint256";
708
- readonly name: "_amountIn";
709
- readonly type: "uint256";
710
- }, {
711
- readonly internalType: "uint256";
712
- readonly name: "_slippageTolerance";
713
- readonly type: "uint256";
714
- }];
715
- readonly name: "unrollAndClaim";
716
- readonly outputs: readonly [{
717
- readonly components: readonly [{
718
- readonly internalType: "address";
719
- readonly name: "token";
720
- readonly type: "address";
721
- }, {
722
- readonly internalType: "uint256";
723
- readonly name: "balance";
724
- readonly type: "uint256";
725
- }];
726
- readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
727
- readonly name: "";
728
- readonly type: "tuple[]";
729
- }];
730
- readonly stateMutability: "nonpayable";
731
- readonly type: "function";
732
867
  }, {
733
868
  readonly inputs: readonly [{
734
869
  readonly internalType: "address";