@defisaver/sdk 1.3.26-uniswap-dev-dev → 1.3.27-midnight-dev
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/esm/src/Action.js +23 -5
- package/esm/src/actions/index.d.ts +2 -1
- package/esm/src/actions/index.js +2 -1
- package/esm/src/actions/midnight/MidnightBorrowFromOrdersAction.d.ts +18 -0
- package/esm/src/actions/midnight/MidnightBorrowFromOrdersAction.js +28 -0
- package/esm/src/actions/midnight/MidnightPaybackDirectAction.d.ts +16 -0
- package/esm/src/actions/midnight/MidnightPaybackDirectAction.js +24 -0
- package/esm/src/actions/midnight/MidnightPaybackFromOrdersAction.d.ts +18 -0
- package/esm/src/actions/midnight/MidnightPaybackFromOrdersAction.js +28 -0
- package/esm/src/actions/midnight/MidnightSupplyCollateralAction.d.ts +17 -0
- package/esm/src/actions/midnight/MidnightSupplyCollateralAction.js +26 -0
- package/esm/src/actions/midnight/MidnightWithdrawCollateralAction.d.ts +17 -0
- package/esm/src/actions/midnight/MidnightWithdrawCollateralAction.js +26 -0
- package/esm/src/actions/midnight/index.d.ts +5 -0
- package/esm/src/actions/midnight/index.js +5 -0
- package/esm/src/actions/uniswap/index.d.ts +0 -1
- package/esm/src/actions/uniswap/index.js +0 -1
- package/esm/src/addresses.d.ts +36 -6
- package/esm/src/addresses.js +6 -1
- package/esm/src/index.d.ts +144 -24
- package/package.json +1 -1
- package/src/Action.ts +21 -5
- package/src/actions/index.ts +2 -0
- package/src/actions/midnight/MidnightBorrowFromOrdersAction.ts +44 -0
- package/src/actions/midnight/MidnightPaybackDirectAction.ts +36 -0
- package/src/actions/midnight/MidnightPaybackFromOrdersAction.ts +44 -0
- package/src/actions/midnight/MidnightSupplyCollateralAction.ts +39 -0
- package/src/actions/midnight/MidnightWithdrawCollateralAction.ts +39 -0
- package/src/actions/midnight/index.ts +5 -0
- package/src/actions/uniswap/index.ts +1 -2
- package/src/addresses.ts +7 -1
- package/umd/index.js +877 -704
- package/esm/src/actions/uniswap/UniswapClaimAction.d.ts +0 -16
- package/esm/src/actions/uniswap/UniswapClaimAction.js +0 -23
- package/src/actions/uniswap/UniswapClaimAction.ts +0 -31
- package/test/actions/uniswap/UniswapClaimAction.js +0 -31
package/esm/src/index.d.ts
CHANGED
|
@@ -134,7 +134,6 @@ declare const actionAddressesAllChains: {
|
|
|
134
134
|
FLMorphoBlue: string;
|
|
135
135
|
UniSupply: string;
|
|
136
136
|
UniWithdraw: string;
|
|
137
|
-
UniswapClaim: string;
|
|
138
137
|
UniCollectV3: string;
|
|
139
138
|
UniMintV3: string;
|
|
140
139
|
UniSupplyV3: string;
|
|
@@ -304,6 +303,12 @@ declare const actionAddressesAllChains: {
|
|
|
304
303
|
GasFeeTakerL2?: undefined;
|
|
305
304
|
AaveV3RatioCheck?: undefined;
|
|
306
305
|
MorphoBlueView?: undefined;
|
|
306
|
+
MidnightPaybackDirect?: undefined;
|
|
307
|
+
MidnightBorrowFromOrders?: undefined;
|
|
308
|
+
MidnightPaybackFromOrders?: undefined;
|
|
309
|
+
MidnightSupplyCollateral?: undefined;
|
|
310
|
+
MidnightWithdrawCollateral?: undefined;
|
|
311
|
+
MidnightView?: undefined;
|
|
307
312
|
} | {
|
|
308
313
|
DFSSell: string;
|
|
309
314
|
DFSSellNoFee: string;
|
|
@@ -447,7 +452,6 @@ declare const actionAddressesAllChains: {
|
|
|
447
452
|
FLMorphoBlue?: undefined;
|
|
448
453
|
UniSupply?: undefined;
|
|
449
454
|
UniWithdraw?: undefined;
|
|
450
|
-
UniswapClaim?: undefined;
|
|
451
455
|
DyDxWithdraw?: undefined;
|
|
452
456
|
YearnSupply?: undefined;
|
|
453
457
|
YearnWithdraw?: undefined;
|
|
@@ -597,6 +601,12 @@ declare const actionAddressesAllChains: {
|
|
|
597
601
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
598
602
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
599
603
|
MorphoBlueView?: undefined;
|
|
604
|
+
MidnightPaybackDirect?: undefined;
|
|
605
|
+
MidnightBorrowFromOrders?: undefined;
|
|
606
|
+
MidnightPaybackFromOrders?: undefined;
|
|
607
|
+
MidnightSupplyCollateral?: undefined;
|
|
608
|
+
MidnightWithdrawCollateral?: undefined;
|
|
609
|
+
MidnightView?: undefined;
|
|
600
610
|
} | {
|
|
601
611
|
DFSSell: string;
|
|
602
612
|
DFSSellNoFee: string;
|
|
@@ -772,7 +782,6 @@ declare const actionAddressesAllChains: {
|
|
|
772
782
|
FLGho?: undefined;
|
|
773
783
|
UniSupply?: undefined;
|
|
774
784
|
UniWithdraw?: undefined;
|
|
775
|
-
UniswapClaim?: undefined;
|
|
776
785
|
DyDxWithdraw?: undefined;
|
|
777
786
|
YearnSupply?: undefined;
|
|
778
787
|
YearnWithdraw?: undefined;
|
|
@@ -890,6 +899,12 @@ declare const actionAddressesAllChains: {
|
|
|
890
899
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
891
900
|
AaveV3DelegateCredit?: undefined;
|
|
892
901
|
AaveV3RatioTrigger?: undefined;
|
|
902
|
+
MidnightPaybackDirect?: undefined;
|
|
903
|
+
MidnightBorrowFromOrders?: undefined;
|
|
904
|
+
MidnightPaybackFromOrders?: undefined;
|
|
905
|
+
MidnightSupplyCollateral?: undefined;
|
|
906
|
+
MidnightWithdrawCollateral?: undefined;
|
|
907
|
+
MidnightView?: undefined;
|
|
893
908
|
} | {
|
|
894
909
|
DFSSell: string;
|
|
895
910
|
DFSSellNoFee: string;
|
|
@@ -961,6 +976,12 @@ declare const actionAddressesAllChains: {
|
|
|
961
976
|
SFApproveTokens: string;
|
|
962
977
|
SummerfiUnsub: string;
|
|
963
978
|
SummerfiUnsubV2: string;
|
|
979
|
+
MidnightPaybackDirect: string;
|
|
980
|
+
MidnightBorrowFromOrders: string;
|
|
981
|
+
MidnightPaybackFromOrders: string;
|
|
982
|
+
MidnightSupplyCollateral: string;
|
|
983
|
+
MidnightWithdrawCollateral: string;
|
|
984
|
+
MidnightView: string;
|
|
964
985
|
AutomationV2Unsub?: undefined;
|
|
965
986
|
SendTokenAndUnwrap?: undefined;
|
|
966
987
|
SDaiWrap?: undefined;
|
|
@@ -1048,7 +1069,6 @@ declare const actionAddressesAllChains: {
|
|
|
1048
1069
|
FLGho?: undefined;
|
|
1049
1070
|
UniSupply?: undefined;
|
|
1050
1071
|
UniWithdraw?: undefined;
|
|
1051
|
-
UniswapClaim?: undefined;
|
|
1052
1072
|
UniCollectV3?: undefined;
|
|
1053
1073
|
UniMintV3?: undefined;
|
|
1054
1074
|
UniSupplyV3?: undefined;
|
|
@@ -1308,7 +1328,6 @@ declare const actionAddressesAllChains: {
|
|
|
1308
1328
|
FLMorphoBlue?: undefined;
|
|
1309
1329
|
UniSupply?: undefined;
|
|
1310
1330
|
UniWithdraw?: undefined;
|
|
1311
|
-
UniswapClaim?: undefined;
|
|
1312
1331
|
UniCollectV3?: undefined;
|
|
1313
1332
|
UniMintV3?: undefined;
|
|
1314
1333
|
UniSupplyV3?: undefined;
|
|
@@ -1476,6 +1495,12 @@ declare const actionAddressesAllChains: {
|
|
|
1476
1495
|
GasFeeTakerL2?: undefined;
|
|
1477
1496
|
AaveV3RatioCheck?: undefined;
|
|
1478
1497
|
MorphoBlueView?: undefined;
|
|
1498
|
+
MidnightPaybackDirect?: undefined;
|
|
1499
|
+
MidnightBorrowFromOrders?: undefined;
|
|
1500
|
+
MidnightPaybackFromOrders?: undefined;
|
|
1501
|
+
MidnightSupplyCollateral?: undefined;
|
|
1502
|
+
MidnightWithdrawCollateral?: undefined;
|
|
1503
|
+
MidnightView?: undefined;
|
|
1479
1504
|
} | {
|
|
1480
1505
|
DFSSell: string;
|
|
1481
1506
|
DFSSellNoFee: string;
|
|
@@ -1614,7 +1639,6 @@ declare const actionAddressesAllChains: {
|
|
|
1614
1639
|
FLMorphoBlue?: undefined;
|
|
1615
1640
|
UniSupply?: undefined;
|
|
1616
1641
|
UniWithdraw?: undefined;
|
|
1617
|
-
UniswapClaim?: undefined;
|
|
1618
1642
|
UniCollectV3?: undefined;
|
|
1619
1643
|
UniMintV3?: undefined;
|
|
1620
1644
|
UniSupplyV3?: undefined;
|
|
@@ -1769,6 +1793,12 @@ declare const actionAddressesAllChains: {
|
|
|
1769
1793
|
GasFeeTakerL2?: undefined;
|
|
1770
1794
|
AaveV3RatioCheck?: undefined;
|
|
1771
1795
|
MorphoBlueView?: undefined;
|
|
1796
|
+
MidnightPaybackDirect?: undefined;
|
|
1797
|
+
MidnightBorrowFromOrders?: undefined;
|
|
1798
|
+
MidnightPaybackFromOrders?: undefined;
|
|
1799
|
+
MidnightSupplyCollateral?: undefined;
|
|
1800
|
+
MidnightWithdrawCollateral?: undefined;
|
|
1801
|
+
MidnightView?: undefined;
|
|
1772
1802
|
};
|
|
1773
1803
|
};
|
|
1774
1804
|
declare const actionAddresses: (chainId?: null) => {
|
|
@@ -1894,7 +1924,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1894
1924
|
FLMorphoBlue: string;
|
|
1895
1925
|
UniSupply: string;
|
|
1896
1926
|
UniWithdraw: string;
|
|
1897
|
-
UniswapClaim: string;
|
|
1898
1927
|
UniCollectV3: string;
|
|
1899
1928
|
UniMintV3: string;
|
|
1900
1929
|
UniSupplyV3: string;
|
|
@@ -2064,6 +2093,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2064
2093
|
GasFeeTakerL2?: undefined;
|
|
2065
2094
|
AaveV3RatioCheck?: undefined;
|
|
2066
2095
|
MorphoBlueView?: undefined;
|
|
2096
|
+
MidnightPaybackDirect?: undefined;
|
|
2097
|
+
MidnightBorrowFromOrders?: undefined;
|
|
2098
|
+
MidnightPaybackFromOrders?: undefined;
|
|
2099
|
+
MidnightSupplyCollateral?: undefined;
|
|
2100
|
+
MidnightWithdrawCollateral?: undefined;
|
|
2101
|
+
MidnightView?: undefined;
|
|
2067
2102
|
} | {
|
|
2068
2103
|
DFSSell: string;
|
|
2069
2104
|
DFSSellNoFee: string;
|
|
@@ -2207,7 +2242,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2207
2242
|
FLMorphoBlue?: undefined;
|
|
2208
2243
|
UniSupply?: undefined;
|
|
2209
2244
|
UniWithdraw?: undefined;
|
|
2210
|
-
UniswapClaim?: undefined;
|
|
2211
2245
|
DyDxWithdraw?: undefined;
|
|
2212
2246
|
YearnSupply?: undefined;
|
|
2213
2247
|
YearnWithdraw?: undefined;
|
|
@@ -2357,6 +2391,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2357
2391
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
2358
2392
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
2359
2393
|
MorphoBlueView?: undefined;
|
|
2394
|
+
MidnightPaybackDirect?: undefined;
|
|
2395
|
+
MidnightBorrowFromOrders?: undefined;
|
|
2396
|
+
MidnightPaybackFromOrders?: undefined;
|
|
2397
|
+
MidnightSupplyCollateral?: undefined;
|
|
2398
|
+
MidnightWithdrawCollateral?: undefined;
|
|
2399
|
+
MidnightView?: undefined;
|
|
2360
2400
|
} | {
|
|
2361
2401
|
DFSSell: string;
|
|
2362
2402
|
DFSSellNoFee: string;
|
|
@@ -2532,7 +2572,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2532
2572
|
FLGho?: undefined;
|
|
2533
2573
|
UniSupply?: undefined;
|
|
2534
2574
|
UniWithdraw?: undefined;
|
|
2535
|
-
UniswapClaim?: undefined;
|
|
2536
2575
|
DyDxWithdraw?: undefined;
|
|
2537
2576
|
YearnSupply?: undefined;
|
|
2538
2577
|
YearnWithdraw?: undefined;
|
|
@@ -2650,6 +2689,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2650
2689
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
2651
2690
|
AaveV3DelegateCredit?: undefined;
|
|
2652
2691
|
AaveV3RatioTrigger?: undefined;
|
|
2692
|
+
MidnightPaybackDirect?: undefined;
|
|
2693
|
+
MidnightBorrowFromOrders?: undefined;
|
|
2694
|
+
MidnightPaybackFromOrders?: undefined;
|
|
2695
|
+
MidnightSupplyCollateral?: undefined;
|
|
2696
|
+
MidnightWithdrawCollateral?: undefined;
|
|
2697
|
+
MidnightView?: undefined;
|
|
2653
2698
|
} | {
|
|
2654
2699
|
DFSSell: string;
|
|
2655
2700
|
DFSSellNoFee: string;
|
|
@@ -2721,6 +2766,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2721
2766
|
SFApproveTokens: string;
|
|
2722
2767
|
SummerfiUnsub: string;
|
|
2723
2768
|
SummerfiUnsubV2: string;
|
|
2769
|
+
MidnightPaybackDirect: string;
|
|
2770
|
+
MidnightBorrowFromOrders: string;
|
|
2771
|
+
MidnightPaybackFromOrders: string;
|
|
2772
|
+
MidnightSupplyCollateral: string;
|
|
2773
|
+
MidnightWithdrawCollateral: string;
|
|
2774
|
+
MidnightView: string;
|
|
2724
2775
|
AutomationV2Unsub?: undefined;
|
|
2725
2776
|
SendTokenAndUnwrap?: undefined;
|
|
2726
2777
|
SDaiWrap?: undefined;
|
|
@@ -2808,7 +2859,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2808
2859
|
FLGho?: undefined;
|
|
2809
2860
|
UniSupply?: undefined;
|
|
2810
2861
|
UniWithdraw?: undefined;
|
|
2811
|
-
UniswapClaim?: undefined;
|
|
2812
2862
|
UniCollectV3?: undefined;
|
|
2813
2863
|
UniMintV3?: undefined;
|
|
2814
2864
|
UniSupplyV3?: undefined;
|
|
@@ -3068,7 +3118,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3068
3118
|
FLMorphoBlue?: undefined;
|
|
3069
3119
|
UniSupply?: undefined;
|
|
3070
3120
|
UniWithdraw?: undefined;
|
|
3071
|
-
UniswapClaim?: undefined;
|
|
3072
3121
|
UniCollectV3?: undefined;
|
|
3073
3122
|
UniMintV3?: undefined;
|
|
3074
3123
|
UniSupplyV3?: undefined;
|
|
@@ -3236,6 +3285,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3236
3285
|
GasFeeTakerL2?: undefined;
|
|
3237
3286
|
AaveV3RatioCheck?: undefined;
|
|
3238
3287
|
MorphoBlueView?: undefined;
|
|
3288
|
+
MidnightPaybackDirect?: undefined;
|
|
3289
|
+
MidnightBorrowFromOrders?: undefined;
|
|
3290
|
+
MidnightPaybackFromOrders?: undefined;
|
|
3291
|
+
MidnightSupplyCollateral?: undefined;
|
|
3292
|
+
MidnightWithdrawCollateral?: undefined;
|
|
3293
|
+
MidnightView?: undefined;
|
|
3239
3294
|
} | {
|
|
3240
3295
|
DFSSell: string;
|
|
3241
3296
|
DFSSellNoFee: string;
|
|
@@ -3374,7 +3429,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3374
3429
|
FLMorphoBlue?: undefined;
|
|
3375
3430
|
UniSupply?: undefined;
|
|
3376
3431
|
UniWithdraw?: undefined;
|
|
3377
|
-
UniswapClaim?: undefined;
|
|
3378
3432
|
UniCollectV3?: undefined;
|
|
3379
3433
|
UniMintV3?: undefined;
|
|
3380
3434
|
UniSupplyV3?: undefined;
|
|
@@ -3529,6 +3583,12 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
3529
3583
|
GasFeeTakerL2?: undefined;
|
|
3530
3584
|
AaveV3RatioCheck?: undefined;
|
|
3531
3585
|
MorphoBlueView?: undefined;
|
|
3586
|
+
MidnightPaybackDirect?: undefined;
|
|
3587
|
+
MidnightBorrowFromOrders?: undefined;
|
|
3588
|
+
MidnightPaybackFromOrders?: undefined;
|
|
3589
|
+
MidnightSupplyCollateral?: undefined;
|
|
3590
|
+
MidnightWithdrawCollateral?: undefined;
|
|
3591
|
+
MidnightView?: undefined;
|
|
3532
3592
|
};
|
|
3533
3593
|
declare const otherAddressesAllChains: {
|
|
3534
3594
|
[x: number]: {
|
|
@@ -3891,7 +3951,6 @@ declare const _default: {
|
|
|
3891
3951
|
FLMorphoBlue: string;
|
|
3892
3952
|
UniSupply: string;
|
|
3893
3953
|
UniWithdraw: string;
|
|
3894
|
-
UniswapClaim: string;
|
|
3895
3954
|
UniCollectV3: string;
|
|
3896
3955
|
UniMintV3: string;
|
|
3897
3956
|
UniSupplyV3: string;
|
|
@@ -4061,6 +4120,12 @@ declare const _default: {
|
|
|
4061
4120
|
GasFeeTakerL2?: undefined;
|
|
4062
4121
|
AaveV3RatioCheck?: undefined;
|
|
4063
4122
|
MorphoBlueView?: undefined;
|
|
4123
|
+
MidnightPaybackDirect?: undefined;
|
|
4124
|
+
MidnightBorrowFromOrders?: undefined;
|
|
4125
|
+
MidnightPaybackFromOrders?: undefined;
|
|
4126
|
+
MidnightSupplyCollateral?: undefined;
|
|
4127
|
+
MidnightWithdrawCollateral?: undefined;
|
|
4128
|
+
MidnightView?: undefined;
|
|
4064
4129
|
} | {
|
|
4065
4130
|
DFSSell: string;
|
|
4066
4131
|
DFSSellNoFee: string;
|
|
@@ -4204,7 +4269,6 @@ declare const _default: {
|
|
|
4204
4269
|
FLMorphoBlue?: undefined;
|
|
4205
4270
|
UniSupply?: undefined;
|
|
4206
4271
|
UniWithdraw?: undefined;
|
|
4207
|
-
UniswapClaim?: undefined;
|
|
4208
4272
|
DyDxWithdraw?: undefined;
|
|
4209
4273
|
YearnSupply?: undefined;
|
|
4210
4274
|
YearnWithdraw?: undefined;
|
|
@@ -4354,6 +4418,12 @@ declare const _default: {
|
|
|
4354
4418
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
4355
4419
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
4356
4420
|
MorphoBlueView?: undefined;
|
|
4421
|
+
MidnightPaybackDirect?: undefined;
|
|
4422
|
+
MidnightBorrowFromOrders?: undefined;
|
|
4423
|
+
MidnightPaybackFromOrders?: undefined;
|
|
4424
|
+
MidnightSupplyCollateral?: undefined;
|
|
4425
|
+
MidnightWithdrawCollateral?: undefined;
|
|
4426
|
+
MidnightView?: undefined;
|
|
4357
4427
|
} | {
|
|
4358
4428
|
DFSSell: string;
|
|
4359
4429
|
DFSSellNoFee: string;
|
|
@@ -4529,7 +4599,6 @@ declare const _default: {
|
|
|
4529
4599
|
FLGho?: undefined;
|
|
4530
4600
|
UniSupply?: undefined;
|
|
4531
4601
|
UniWithdraw?: undefined;
|
|
4532
|
-
UniswapClaim?: undefined;
|
|
4533
4602
|
DyDxWithdraw?: undefined;
|
|
4534
4603
|
YearnSupply?: undefined;
|
|
4535
4604
|
YearnWithdraw?: undefined;
|
|
@@ -4647,6 +4716,12 @@ declare const _default: {
|
|
|
4647
4716
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
4648
4717
|
AaveV3DelegateCredit?: undefined;
|
|
4649
4718
|
AaveV3RatioTrigger?: undefined;
|
|
4719
|
+
MidnightPaybackDirect?: undefined;
|
|
4720
|
+
MidnightBorrowFromOrders?: undefined;
|
|
4721
|
+
MidnightPaybackFromOrders?: undefined;
|
|
4722
|
+
MidnightSupplyCollateral?: undefined;
|
|
4723
|
+
MidnightWithdrawCollateral?: undefined;
|
|
4724
|
+
MidnightView?: undefined;
|
|
4650
4725
|
} | {
|
|
4651
4726
|
DFSSell: string;
|
|
4652
4727
|
DFSSellNoFee: string;
|
|
@@ -4718,6 +4793,12 @@ declare const _default: {
|
|
|
4718
4793
|
SFApproveTokens: string;
|
|
4719
4794
|
SummerfiUnsub: string;
|
|
4720
4795
|
SummerfiUnsubV2: string;
|
|
4796
|
+
MidnightPaybackDirect: string;
|
|
4797
|
+
MidnightBorrowFromOrders: string;
|
|
4798
|
+
MidnightPaybackFromOrders: string;
|
|
4799
|
+
MidnightSupplyCollateral: string;
|
|
4800
|
+
MidnightWithdrawCollateral: string;
|
|
4801
|
+
MidnightView: string;
|
|
4721
4802
|
AutomationV2Unsub?: undefined;
|
|
4722
4803
|
SendTokenAndUnwrap?: undefined;
|
|
4723
4804
|
SDaiWrap?: undefined;
|
|
@@ -4805,7 +4886,6 @@ declare const _default: {
|
|
|
4805
4886
|
FLGho?: undefined;
|
|
4806
4887
|
UniSupply?: undefined;
|
|
4807
4888
|
UniWithdraw?: undefined;
|
|
4808
|
-
UniswapClaim?: undefined;
|
|
4809
4889
|
UniCollectV3?: undefined;
|
|
4810
4890
|
UniMintV3?: undefined;
|
|
4811
4891
|
UniSupplyV3?: undefined;
|
|
@@ -5065,7 +5145,6 @@ declare const _default: {
|
|
|
5065
5145
|
FLMorphoBlue?: undefined;
|
|
5066
5146
|
UniSupply?: undefined;
|
|
5067
5147
|
UniWithdraw?: undefined;
|
|
5068
|
-
UniswapClaim?: undefined;
|
|
5069
5148
|
UniCollectV3?: undefined;
|
|
5070
5149
|
UniMintV3?: undefined;
|
|
5071
5150
|
UniSupplyV3?: undefined;
|
|
@@ -5233,6 +5312,12 @@ declare const _default: {
|
|
|
5233
5312
|
GasFeeTakerL2?: undefined;
|
|
5234
5313
|
AaveV3RatioCheck?: undefined;
|
|
5235
5314
|
MorphoBlueView?: undefined;
|
|
5315
|
+
MidnightPaybackDirect?: undefined;
|
|
5316
|
+
MidnightBorrowFromOrders?: undefined;
|
|
5317
|
+
MidnightPaybackFromOrders?: undefined;
|
|
5318
|
+
MidnightSupplyCollateral?: undefined;
|
|
5319
|
+
MidnightWithdrawCollateral?: undefined;
|
|
5320
|
+
MidnightView?: undefined;
|
|
5236
5321
|
} | {
|
|
5237
5322
|
DFSSell: string;
|
|
5238
5323
|
DFSSellNoFee: string;
|
|
@@ -5371,7 +5456,6 @@ declare const _default: {
|
|
|
5371
5456
|
FLMorphoBlue?: undefined;
|
|
5372
5457
|
UniSupply?: undefined;
|
|
5373
5458
|
UniWithdraw?: undefined;
|
|
5374
|
-
UniswapClaim?: undefined;
|
|
5375
5459
|
UniCollectV3?: undefined;
|
|
5376
5460
|
UniMintV3?: undefined;
|
|
5377
5461
|
UniSupplyV3?: undefined;
|
|
@@ -5526,6 +5610,12 @@ declare const _default: {
|
|
|
5526
5610
|
GasFeeTakerL2?: undefined;
|
|
5527
5611
|
AaveV3RatioCheck?: undefined;
|
|
5528
5612
|
MorphoBlueView?: undefined;
|
|
5613
|
+
MidnightPaybackDirect?: undefined;
|
|
5614
|
+
MidnightBorrowFromOrders?: undefined;
|
|
5615
|
+
MidnightPaybackFromOrders?: undefined;
|
|
5616
|
+
MidnightSupplyCollateral?: undefined;
|
|
5617
|
+
MidnightWithdrawCollateral?: undefined;
|
|
5618
|
+
MidnightView?: undefined;
|
|
5529
5619
|
};
|
|
5530
5620
|
actionAddressesAllChains: {
|
|
5531
5621
|
[x: number]: {
|
|
@@ -5651,7 +5741,6 @@ declare const _default: {
|
|
|
5651
5741
|
FLMorphoBlue: string;
|
|
5652
5742
|
UniSupply: string;
|
|
5653
5743
|
UniWithdraw: string;
|
|
5654
|
-
UniswapClaim: string;
|
|
5655
5744
|
UniCollectV3: string;
|
|
5656
5745
|
UniMintV3: string;
|
|
5657
5746
|
UniSupplyV3: string;
|
|
@@ -5821,6 +5910,12 @@ declare const _default: {
|
|
|
5821
5910
|
GasFeeTakerL2?: undefined;
|
|
5822
5911
|
AaveV3RatioCheck?: undefined;
|
|
5823
5912
|
MorphoBlueView?: undefined;
|
|
5913
|
+
MidnightPaybackDirect?: undefined;
|
|
5914
|
+
MidnightBorrowFromOrders?: undefined;
|
|
5915
|
+
MidnightPaybackFromOrders?: undefined;
|
|
5916
|
+
MidnightSupplyCollateral?: undefined;
|
|
5917
|
+
MidnightWithdrawCollateral?: undefined;
|
|
5918
|
+
MidnightView?: undefined;
|
|
5824
5919
|
} | {
|
|
5825
5920
|
DFSSell: string;
|
|
5826
5921
|
DFSSellNoFee: string;
|
|
@@ -5964,7 +6059,6 @@ declare const _default: {
|
|
|
5964
6059
|
FLMorphoBlue?: undefined;
|
|
5965
6060
|
UniSupply?: undefined;
|
|
5966
6061
|
UniWithdraw?: undefined;
|
|
5967
|
-
UniswapClaim?: undefined;
|
|
5968
6062
|
DyDxWithdraw?: undefined;
|
|
5969
6063
|
YearnSupply?: undefined;
|
|
5970
6064
|
YearnWithdraw?: undefined;
|
|
@@ -6114,6 +6208,12 @@ declare const _default: {
|
|
|
6114
6208
|
AaveV4DelegateBorrowWithSig?: undefined;
|
|
6115
6209
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
6116
6210
|
MorphoBlueView?: undefined;
|
|
6211
|
+
MidnightPaybackDirect?: undefined;
|
|
6212
|
+
MidnightBorrowFromOrders?: undefined;
|
|
6213
|
+
MidnightPaybackFromOrders?: undefined;
|
|
6214
|
+
MidnightSupplyCollateral?: undefined;
|
|
6215
|
+
MidnightWithdrawCollateral?: undefined;
|
|
6216
|
+
MidnightView?: undefined;
|
|
6117
6217
|
} | {
|
|
6118
6218
|
DFSSell: string;
|
|
6119
6219
|
DFSSellNoFee: string;
|
|
@@ -6289,7 +6389,6 @@ declare const _default: {
|
|
|
6289
6389
|
FLGho?: undefined;
|
|
6290
6390
|
UniSupply?: undefined;
|
|
6291
6391
|
UniWithdraw?: undefined;
|
|
6292
|
-
UniswapClaim?: undefined;
|
|
6293
6392
|
DyDxWithdraw?: undefined;
|
|
6294
6393
|
YearnSupply?: undefined;
|
|
6295
6394
|
YearnWithdraw?: undefined;
|
|
@@ -6407,6 +6506,12 @@ declare const _default: {
|
|
|
6407
6506
|
AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
|
|
6408
6507
|
AaveV3DelegateCredit?: undefined;
|
|
6409
6508
|
AaveV3RatioTrigger?: undefined;
|
|
6509
|
+
MidnightPaybackDirect?: undefined;
|
|
6510
|
+
MidnightBorrowFromOrders?: undefined;
|
|
6511
|
+
MidnightPaybackFromOrders?: undefined;
|
|
6512
|
+
MidnightSupplyCollateral?: undefined;
|
|
6513
|
+
MidnightWithdrawCollateral?: undefined;
|
|
6514
|
+
MidnightView?: undefined;
|
|
6410
6515
|
} | {
|
|
6411
6516
|
DFSSell: string;
|
|
6412
6517
|
DFSSellNoFee: string;
|
|
@@ -6478,6 +6583,12 @@ declare const _default: {
|
|
|
6478
6583
|
SFApproveTokens: string;
|
|
6479
6584
|
SummerfiUnsub: string;
|
|
6480
6585
|
SummerfiUnsubV2: string;
|
|
6586
|
+
MidnightPaybackDirect: string;
|
|
6587
|
+
MidnightBorrowFromOrders: string;
|
|
6588
|
+
MidnightPaybackFromOrders: string;
|
|
6589
|
+
MidnightSupplyCollateral: string;
|
|
6590
|
+
MidnightWithdrawCollateral: string;
|
|
6591
|
+
MidnightView: string;
|
|
6481
6592
|
AutomationV2Unsub?: undefined;
|
|
6482
6593
|
SendTokenAndUnwrap?: undefined;
|
|
6483
6594
|
SDaiWrap?: undefined;
|
|
@@ -6565,7 +6676,6 @@ declare const _default: {
|
|
|
6565
6676
|
FLGho?: undefined;
|
|
6566
6677
|
UniSupply?: undefined;
|
|
6567
6678
|
UniWithdraw?: undefined;
|
|
6568
|
-
UniswapClaim?: undefined;
|
|
6569
6679
|
UniCollectV3?: undefined;
|
|
6570
6680
|
UniMintV3?: undefined;
|
|
6571
6681
|
UniSupplyV3?: undefined;
|
|
@@ -6825,7 +6935,6 @@ declare const _default: {
|
|
|
6825
6935
|
FLMorphoBlue?: undefined;
|
|
6826
6936
|
UniSupply?: undefined;
|
|
6827
6937
|
UniWithdraw?: undefined;
|
|
6828
|
-
UniswapClaim?: undefined;
|
|
6829
6938
|
UniCollectV3?: undefined;
|
|
6830
6939
|
UniMintV3?: undefined;
|
|
6831
6940
|
UniSupplyV3?: undefined;
|
|
@@ -6993,6 +7102,12 @@ declare const _default: {
|
|
|
6993
7102
|
GasFeeTakerL2?: undefined;
|
|
6994
7103
|
AaveV3RatioCheck?: undefined;
|
|
6995
7104
|
MorphoBlueView?: undefined;
|
|
7105
|
+
MidnightPaybackDirect?: undefined;
|
|
7106
|
+
MidnightBorrowFromOrders?: undefined;
|
|
7107
|
+
MidnightPaybackFromOrders?: undefined;
|
|
7108
|
+
MidnightSupplyCollateral?: undefined;
|
|
7109
|
+
MidnightWithdrawCollateral?: undefined;
|
|
7110
|
+
MidnightView?: undefined;
|
|
6996
7111
|
} | {
|
|
6997
7112
|
DFSSell: string;
|
|
6998
7113
|
DFSSellNoFee: string;
|
|
@@ -7131,7 +7246,6 @@ declare const _default: {
|
|
|
7131
7246
|
FLMorphoBlue?: undefined;
|
|
7132
7247
|
UniSupply?: undefined;
|
|
7133
7248
|
UniWithdraw?: undefined;
|
|
7134
|
-
UniswapClaim?: undefined;
|
|
7135
7249
|
UniCollectV3?: undefined;
|
|
7136
7250
|
UniMintV3?: undefined;
|
|
7137
7251
|
UniSupplyV3?: undefined;
|
|
@@ -7286,6 +7400,12 @@ declare const _default: {
|
|
|
7286
7400
|
GasFeeTakerL2?: undefined;
|
|
7287
7401
|
AaveV3RatioCheck?: undefined;
|
|
7288
7402
|
MorphoBlueView?: undefined;
|
|
7403
|
+
MidnightPaybackDirect?: undefined;
|
|
7404
|
+
MidnightBorrowFromOrders?: undefined;
|
|
7405
|
+
MidnightPaybackFromOrders?: undefined;
|
|
7406
|
+
MidnightSupplyCollateral?: undefined;
|
|
7407
|
+
MidnightWithdrawCollateral?: undefined;
|
|
7408
|
+
MidnightView?: undefined;
|
|
7289
7409
|
};
|
|
7290
7410
|
};
|
|
7291
7411
|
otherAddresses: (chainId?: null) => {
|
package/package.json
CHANGED
package/src/Action.ts
CHANGED
|
@@ -101,14 +101,30 @@ export class Action {
|
|
|
101
101
|
|
|
102
102
|
_parseParamType(paramType:string | ParamTypes, arg:Args) {
|
|
103
103
|
if (typeof (paramType) === 'string') {
|
|
104
|
-
if (paramType.startsWith('(')) {
|
|
105
|
-
let _paramType = paramType.replace('(', '');
|
|
106
|
-
_paramType = _paramType.replace(')', '');
|
|
107
|
-
return _paramType.split(',');
|
|
108
|
-
}
|
|
109
104
|
if (paramType.endsWith('[]')) {
|
|
110
105
|
return Array.from(Array(arg.length).fill(paramType.replace('[]', '')));
|
|
111
106
|
}
|
|
107
|
+
if (paramType.startsWith('(') || paramType.startsWith('tuple(')) {
|
|
108
|
+
const tupleStart = paramType.indexOf('(');
|
|
109
|
+
const tupleEnd = paramType.lastIndexOf(')');
|
|
110
|
+
const tupleContents = paramType.slice(tupleStart + 1, tupleEnd);
|
|
111
|
+
const tupleTypes = [];
|
|
112
|
+
let currentType = '';
|
|
113
|
+
let nestingDepth = 0;
|
|
114
|
+
|
|
115
|
+
for (const character of tupleContents) {
|
|
116
|
+
if (character === ',' && nestingDepth === 0) {
|
|
117
|
+
tupleTypes.push(currentType);
|
|
118
|
+
currentType = '';
|
|
119
|
+
} else {
|
|
120
|
+
currentType += character;
|
|
121
|
+
if (character === '(') nestingDepth += 1;
|
|
122
|
+
if (character === ')') nestingDepth -= 1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
tupleTypes.push(currentType);
|
|
126
|
+
return tupleTypes;
|
|
127
|
+
}
|
|
112
128
|
}
|
|
113
129
|
return paramType;
|
|
114
130
|
}
|
package/src/actions/index.ts
CHANGED
|
@@ -40,6 +40,7 @@ import * as fluid from './fluid';
|
|
|
40
40
|
import * as pendle from './pendle';
|
|
41
41
|
import * as umbrella from './umbrella';
|
|
42
42
|
import * as aaveV4 from './aavev4';
|
|
43
|
+
import * as midnight from './midnight';
|
|
43
44
|
|
|
44
45
|
export {
|
|
45
46
|
aave,
|
|
@@ -84,4 +85,5 @@ export {
|
|
|
84
85
|
pendle,
|
|
85
86
|
umbrella,
|
|
86
87
|
aaveV4,
|
|
88
|
+
midnight,
|
|
87
89
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, bytes32, uint256 } from '../../types';
|
|
4
|
+
|
|
5
|
+
const offerFillsParamType = 'tuple(tuple(tuple(uint256,address,address,tuple(address,uint256,uint256,address)[],uint256,uint256,address,address),bool,address,uint256,uint256,uint256,bytes32,address,bytes,address,address,bool,uint128,uint128,uint256),bytes,uint256)[]';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* MidnightBorrowFromOrdersAction - Borrow from one or more Midnight offers.
|
|
9
|
+
*
|
|
10
|
+
* @category MidnightBorrowFromOrders
|
|
11
|
+
*/
|
|
12
|
+
export class MidnightBorrowFromOrdersAction extends Action {
|
|
13
|
+
/**
|
|
14
|
+
* @param marketId Market id.
|
|
15
|
+
* @param onBehalf Address to borrow tokens on behalf of. Defaults to the user's wallet if not provided.
|
|
16
|
+
* @param to Address to send the borrowed tokens to.
|
|
17
|
+
* @param amount Amount of tokens to borrow.
|
|
18
|
+
* @param maxUnits Maximum number of units to take from the orders (slippage protection).
|
|
19
|
+
* @param offerFills Array of offer fills to borrow from.
|
|
20
|
+
*/
|
|
21
|
+
constructor(
|
|
22
|
+
marketId: bytes32,
|
|
23
|
+
onBehalf: EthAddress,
|
|
24
|
+
to: EthAddress,
|
|
25
|
+
amount: uint256,
|
|
26
|
+
maxUnits: uint256,
|
|
27
|
+
offerFills: Array<any>,
|
|
28
|
+
) {
|
|
29
|
+
super(
|
|
30
|
+
'MidnightBorrowFromOrders',
|
|
31
|
+
getAddr('MidnightBorrowFromOrders'),
|
|
32
|
+
['bytes32', 'address', 'address', 'uint256', 'uint256', offerFillsParamType],
|
|
33
|
+
[marketId, onBehalf, to, amount, maxUnits, offerFills],
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
this.mappableArgs = [
|
|
37
|
+
this.args[0],
|
|
38
|
+
this.args[1],
|
|
39
|
+
this.args[2],
|
|
40
|
+
this.args[3],
|
|
41
|
+
this.args[4],
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, bytes32, uint256 } from '../../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* MidnightPaybackDirectAction - Payback a debt directly to the Midnight protocol.
|
|
7
|
+
*
|
|
8
|
+
* @category MidnightPaybackDirect
|
|
9
|
+
*/
|
|
10
|
+
export class MidnightPaybackDirectAction extends Action {
|
|
11
|
+
/**
|
|
12
|
+
* @param marketId Market id.
|
|
13
|
+
* @param onBehalf Address to payback tokens on behalf of.
|
|
14
|
+
* @param from Address from which to pull the payback tokens.
|
|
15
|
+
* @param amount Amount of tokens to payback. Send type(uint).max to payback whole amount.
|
|
16
|
+
*/
|
|
17
|
+
constructor(
|
|
18
|
+
marketId: bytes32,
|
|
19
|
+
onBehalf: EthAddress,
|
|
20
|
+
from: EthAddress,
|
|
21
|
+
amount: uint256,
|
|
22
|
+
) {
|
|
23
|
+
super(
|
|
24
|
+
'MidnightPaybackDirect',
|
|
25
|
+
getAddr('MidnightPaybackDirect'),
|
|
26
|
+
['bytes32', 'address', 'address', 'uint256'],
|
|
27
|
+
[marketId, onBehalf, from, amount],
|
|
28
|
+
);
|
|
29
|
+
this.mappableArgs = [
|
|
30
|
+
this.args[0],
|
|
31
|
+
this.args[1],
|
|
32
|
+
this.args[2],
|
|
33
|
+
this.args[3],
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { EthAddress, bytes32, uint256 } from '../../types';
|
|
4
|
+
|
|
5
|
+
const offerFillsParamType = 'tuple(tuple(tuple(uint256,address,address,tuple(address,uint256,uint256,address)[],uint256,uint256,address,address),bool,address,uint256,uint256,uint256,bytes32,address,bytes,address,address,bool,uint128,uint128,uint256),bytes,uint256)[]';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* MidnightPaybackFromOrdersAction - Pay back debt through one or more Midnight offers.
|
|
9
|
+
*
|
|
10
|
+
* @category MidnightPaybackFromOrders
|
|
11
|
+
*/
|
|
12
|
+
export class MidnightPaybackFromOrdersAction extends Action {
|
|
13
|
+
/**
|
|
14
|
+
* @param marketId Market id.
|
|
15
|
+
* @param onBehalf Address whose debt is repaid. Defaults to the user's wallet if not provided.
|
|
16
|
+
* @param from Address from which to pull the payback tokens.
|
|
17
|
+
* @param amount Amount of tokens to spend. Send type(uint).max to pay back the whole debt.
|
|
18
|
+
* @param minUnits Minimum number of debt units to repay (slippage protection).
|
|
19
|
+
* @param offerFills Array of offer fills to pay back from.
|
|
20
|
+
*/
|
|
21
|
+
constructor(
|
|
22
|
+
marketId: bytes32,
|
|
23
|
+
onBehalf: EthAddress,
|
|
24
|
+
from: EthAddress,
|
|
25
|
+
amount: uint256,
|
|
26
|
+
minUnits: uint256,
|
|
27
|
+
offerFills: Array<any>,
|
|
28
|
+
) {
|
|
29
|
+
super(
|
|
30
|
+
'MidnightPaybackFromOrders',
|
|
31
|
+
getAddr('MidnightPaybackFromOrders'),
|
|
32
|
+
['bytes32', 'address', 'address', 'uint256', 'uint256', offerFillsParamType],
|
|
33
|
+
[marketId, onBehalf, from, amount, minUnits, offerFills],
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
this.mappableArgs = [
|
|
37
|
+
this.args[0],
|
|
38
|
+
this.args[1],
|
|
39
|
+
this.args[2],
|
|
40
|
+
this.args[3],
|
|
41
|
+
this.args[4],
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
}
|