@defisaver/sdk 1.3.8 → 1.3.9-dev-morpho
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/actions/checkers/AaveV3OpenRatioCheckAction.d.ts +3 -2
- package/esm/src/actions/checkers/AaveV3OpenRatioCheckAction.js +5 -7
- package/esm/src/actions/checkers/AaveV3RatioCheckAction.d.ts +4 -2
- package/esm/src/actions/checkers/AaveV3RatioCheckAction.js +6 -2
- package/esm/src/addresses.d.ts +12 -12
- package/esm/src/addresses.js +13 -0
- package/esm/src/index.d.ts +48 -48
- package/esm/src/triggers/AaveV3QuotePriceRangeTrigger.d.ts +13 -0
- package/esm/src/triggers/AaveV3QuotePriceRangeTrigger.js +15 -0
- package/esm/src/triggers/index.d.ts +1 -0
- package/esm/src/triggers/index.js +1 -0
- package/package.json +1 -1
- package/src/actions/checkers/AaveV3OpenRatioCheckAction.ts +10 -8
- package/src/actions/checkers/AaveV3RatioCheckAction.ts +18 -4
- package/src/addresses.ts +14 -0
- package/src/triggers/AaveV3QuotePriceRangeTrigger.ts +27 -0
- package/src/triggers/index.ts +1 -0
- package/umd/index.js +65 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Action } from '../../Action';
|
|
2
2
|
import { EthAddress, uint256 } from '../../types';
|
|
3
3
|
/**
|
|
4
|
-
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for
|
|
4
|
+
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
|
|
5
5
|
*
|
|
6
6
|
* @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
|
|
7
7
|
*
|
|
@@ -11,6 +11,7 @@ export declare class AaveV3OpenRatioCheckAction extends Action {
|
|
|
11
11
|
/**
|
|
12
12
|
* @param targetRatio The ratio user want to be at
|
|
13
13
|
* @param market Address provider for specific market
|
|
14
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
14
15
|
*/
|
|
15
|
-
constructor(targetRatio: uint256, market: EthAddress);
|
|
16
|
+
constructor(targetRatio: uint256, market: EthAddress, user?: EthAddress);
|
|
16
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Action } from '../../Action';
|
|
2
2
|
import { getAddr } from '../../addresses';
|
|
3
3
|
/**
|
|
4
|
-
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for
|
|
4
|
+
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
|
|
5
5
|
*
|
|
6
6
|
* @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
|
|
7
7
|
*
|
|
@@ -11,12 +11,10 @@ export class AaveV3OpenRatioCheckAction extends Action {
|
|
|
11
11
|
/**
|
|
12
12
|
* @param targetRatio The ratio user want to be at
|
|
13
13
|
* @param market Address provider for specific market
|
|
14
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
14
15
|
*/
|
|
15
|
-
constructor(targetRatio, market) {
|
|
16
|
-
super('AaveV3OpenRatioCheck', getAddr('Empty'), ['uint256', 'address'], [targetRatio, market]);
|
|
17
|
-
this.mappableArgs = [
|
|
18
|
-
this.args[0],
|
|
19
|
-
this.args[1],
|
|
20
|
-
];
|
|
16
|
+
constructor(targetRatio, market, user = getAddr('Empty')) {
|
|
17
|
+
super('AaveV3OpenRatioCheck', getAddr('Empty'), ['uint256', 'address', 'address'], [targetRatio, market, user]);
|
|
18
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2]];
|
|
21
19
|
}
|
|
22
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Action } from '../../Action';
|
|
2
|
-
import { uint8, uint256 } from '../../types';
|
|
2
|
+
import { uint8, uint256, EthAddress } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* AaveV3RatioCheckAction - Checks aave V3 ratio for users proxy position and reverts if faulty
|
|
5
5
|
*
|
|
@@ -9,6 +9,8 @@ export declare class AaveV3RatioCheckAction extends Action {
|
|
|
9
9
|
/**
|
|
10
10
|
* @param ratioState If it should lower/higher
|
|
11
11
|
* @param targetRatio The ratio user want to be at
|
|
12
|
+
* @param market Address provider for specific market. This param was added later
|
|
13
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
12
14
|
*/
|
|
13
|
-
constructor(ratioState: uint8, targetRatio: uint256);
|
|
15
|
+
constructor(ratioState: uint8, targetRatio: uint256, market?: EthAddress, user?: EthAddress);
|
|
14
16
|
}
|
|
@@ -9,12 +9,16 @@ export class AaveV3RatioCheckAction extends Action {
|
|
|
9
9
|
/**
|
|
10
10
|
* @param ratioState If it should lower/higher
|
|
11
11
|
* @param targetRatio The ratio user want to be at
|
|
12
|
+
* @param market Address provider for specific market. This param was added later
|
|
13
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
12
14
|
*/
|
|
13
|
-
constructor(ratioState, targetRatio) {
|
|
14
|
-
super('AaveV3RatioCheck', getAddr('
|
|
15
|
+
constructor(ratioState, targetRatio, market = getAddr('Empty'), user = getAddr('Empty')) {
|
|
16
|
+
super('AaveV3RatioCheck', getAddr('Empty'), ['uint8', 'uint256', 'address', 'address'], [ratioState, targetRatio, market, user]);
|
|
15
17
|
this.mappableArgs = [
|
|
16
18
|
this.args[0],
|
|
17
19
|
this.args[1],
|
|
20
|
+
this.args[2],
|
|
21
|
+
this.args[3],
|
|
18
22
|
];
|
|
19
23
|
}
|
|
20
24
|
}
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -293,6 +293,7 @@ export declare const actionAddresses: {
|
|
|
293
293
|
ApproveToken: string;
|
|
294
294
|
SendTokenAndUnwrap: string;
|
|
295
295
|
ToggleSub: string;
|
|
296
|
+
UpdateSub: string;
|
|
296
297
|
CreateSub: string;
|
|
297
298
|
TokenBalance: string;
|
|
298
299
|
TokenizedVaultAdapter: string;
|
|
@@ -332,7 +333,6 @@ export declare const actionAddresses: {
|
|
|
332
333
|
CompV3Withdraw: string;
|
|
333
334
|
SFApproveTokens: string;
|
|
334
335
|
AutomationV2Unsub?: undefined;
|
|
335
|
-
UpdateSub?: undefined;
|
|
336
336
|
TransferNFT?: undefined;
|
|
337
337
|
SDaiWrap?: undefined;
|
|
338
338
|
SDaiUnwrap?: undefined;
|
|
@@ -635,6 +635,17 @@ export declare const actionAddresses: {
|
|
|
635
635
|
FluidDexPayback: string;
|
|
636
636
|
FluidDexWithdraw: string;
|
|
637
637
|
SFApproveTokens: string;
|
|
638
|
+
MorphoBlueSupply: string;
|
|
639
|
+
MorphoBlueSupplyCollateral: string;
|
|
640
|
+
MorphoBlueWithdraw: string;
|
|
641
|
+
MorphoBlueWithdrawCollateral: string;
|
|
642
|
+
MorphoBlueBorrow: string;
|
|
643
|
+
MorphoBluePayback: string;
|
|
644
|
+
MorphoBlueSetAuth: string;
|
|
645
|
+
MorphoBlueSetAuthWithSig: string;
|
|
646
|
+
MorphoBlueView: string;
|
|
647
|
+
MorphoBlueReallocateLiquidity: string;
|
|
648
|
+
MorphoBlueClaim: string;
|
|
638
649
|
AutomationV2Unsub?: undefined;
|
|
639
650
|
SDaiWrap?: undefined;
|
|
640
651
|
SDaiUnwrap?: undefined;
|
|
@@ -810,17 +821,7 @@ export declare const actionAddresses: {
|
|
|
810
821
|
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
811
822
|
CurveUsdLevCreateTransient?: undefined;
|
|
812
823
|
CurveUsdRepayTransient?: undefined;
|
|
813
|
-
MorphoBlueSupply?: undefined;
|
|
814
|
-
MorphoBlueSupplyCollateral?: undefined;
|
|
815
|
-
MorphoBlueWithdraw?: undefined;
|
|
816
|
-
MorphoBlueWithdrawCollateral?: undefined;
|
|
817
|
-
MorphoBlueBorrow?: undefined;
|
|
818
|
-
MorphoBluePayback?: undefined;
|
|
819
|
-
MorphoBlueSetAuth?: undefined;
|
|
820
|
-
MorphoBlueSetAuthWithSig?: undefined;
|
|
821
824
|
MorphoTokenWrap?: undefined;
|
|
822
|
-
MorphoBlueReallocateLiquidity?: undefined;
|
|
823
|
-
MorphoBlueClaim?: undefined;
|
|
824
825
|
EulerV2Supply?: undefined;
|
|
825
826
|
EulerV2Withdraw?: undefined;
|
|
826
827
|
EulerV2Borrow?: undefined;
|
|
@@ -839,7 +840,6 @@ export declare const actionAddresses: {
|
|
|
839
840
|
UmbrellaUnstake?: undefined;
|
|
840
841
|
AaveV3DelegateCredit?: undefined;
|
|
841
842
|
AaveV3RatioTrigger?: undefined;
|
|
842
|
-
MorphoBlueView?: undefined;
|
|
843
843
|
} | {
|
|
844
844
|
DFSSell: string;
|
|
845
845
|
DFSSellNoFee: string;
|
package/esm/src/addresses.js
CHANGED
|
@@ -331,6 +331,7 @@ export const actionAddresses = {
|
|
|
331
331
|
ApproveToken: '0x842a81d2cfe26d401CD63Cc14e9DEf275c197C1a',
|
|
332
332
|
SendTokenAndUnwrap: '0xd4f69250cb4d1f083Dd372FEace391A16ABbfBDc',
|
|
333
333
|
ToggleSub: '0xfc19a12e35bb0b5e6a3d3017be9e9022a6486eee',
|
|
334
|
+
UpdateSub: '0xAe6ea1d13dF2bE60dC7933DB56067Cb89d6A2cDe',
|
|
334
335
|
CreateSub: '0x2daED8030BFC87B3d27c02E2f044B9CF4841Ff3e',
|
|
335
336
|
TokenBalance: '0xC6FF5b01f7c7b35b6e093fF70D2332B361C5Be5A',
|
|
336
337
|
TokenizedVaultAdapter: '0xdf31669FEd440f5BfF658ca0bBF0D22B8abdeb73',
|
|
@@ -458,6 +459,18 @@ export const actionAddresses = {
|
|
|
458
459
|
FluidDexWithdraw: '0x076D5434793798b153298bF70b014f5E6145aB2E',
|
|
459
460
|
// summer.fi
|
|
460
461
|
SFApproveTokens: '0x98101bDBFaA3f8efa4A14a5A6a2f9A20D514a5D5',
|
|
462
|
+
// MorphoBlue
|
|
463
|
+
MorphoBlueSupply: '0xeaF1c037716b447C178f3604BCFd10e650704525',
|
|
464
|
+
MorphoBlueSupplyCollateral: '0x65A5900F2faab9cC495b92389844739DF08A290D',
|
|
465
|
+
MorphoBlueWithdraw: '0xd7132c78677E764b352F83D1ACbCd9564eC08569',
|
|
466
|
+
MorphoBlueWithdrawCollateral: '0x374553273E681C6cfA69006CEd70710d415a02D0',
|
|
467
|
+
MorphoBlueBorrow: '0xAe3073ab93DAde55e8B9390E5f3A3071B1ec99Ec',
|
|
468
|
+
MorphoBluePayback: '0x0e5493737FC3466341E0372219ef72FA0B4DDBbB',
|
|
469
|
+
MorphoBlueSetAuth: '0x7e1deb39317A7542Be231123733d94167FaC73D5',
|
|
470
|
+
MorphoBlueSetAuthWithSig: '0x14da4D942b2b855550b47567c333edB8443cF1A7',
|
|
471
|
+
MorphoBlueView: '0xa3b8b400a2eFF0314fa9605E778692bd4Bd9f880',
|
|
472
|
+
MorphoBlueReallocateLiquidity: '0x79C0E0eFe0Df71B2d301f4e08cfB5Ca8814A8f4c',
|
|
473
|
+
MorphoBlueClaim: '0x3ae0160e27778f7286182eAc774fD7ECd40539a7',
|
|
461
474
|
},
|
|
462
475
|
[NETWORKS.base.chainId]: {
|
|
463
476
|
// Basic
|
package/esm/src/index.d.ts
CHANGED
|
@@ -304,6 +304,7 @@ declare const actionAddressesAllChains: {
|
|
|
304
304
|
ApproveToken: string;
|
|
305
305
|
SendTokenAndUnwrap: string;
|
|
306
306
|
ToggleSub: string;
|
|
307
|
+
UpdateSub: string;
|
|
307
308
|
CreateSub: string;
|
|
308
309
|
TokenBalance: string;
|
|
309
310
|
TokenizedVaultAdapter: string;
|
|
@@ -343,7 +344,6 @@ declare const actionAddressesAllChains: {
|
|
|
343
344
|
CompV3Withdraw: string;
|
|
344
345
|
SFApproveTokens: string;
|
|
345
346
|
AutomationV2Unsub?: undefined;
|
|
346
|
-
UpdateSub?: undefined;
|
|
347
347
|
TransferNFT?: undefined;
|
|
348
348
|
SDaiWrap?: undefined;
|
|
349
349
|
SDaiUnwrap?: undefined;
|
|
@@ -646,6 +646,17 @@ declare const actionAddressesAllChains: {
|
|
|
646
646
|
FluidDexPayback: string;
|
|
647
647
|
FluidDexWithdraw: string;
|
|
648
648
|
SFApproveTokens: string;
|
|
649
|
+
MorphoBlueSupply: string;
|
|
650
|
+
MorphoBlueSupplyCollateral: string;
|
|
651
|
+
MorphoBlueWithdraw: string;
|
|
652
|
+
MorphoBlueWithdrawCollateral: string;
|
|
653
|
+
MorphoBlueBorrow: string;
|
|
654
|
+
MorphoBluePayback: string;
|
|
655
|
+
MorphoBlueSetAuth: string;
|
|
656
|
+
MorphoBlueSetAuthWithSig: string;
|
|
657
|
+
MorphoBlueView: string;
|
|
658
|
+
MorphoBlueReallocateLiquidity: string;
|
|
659
|
+
MorphoBlueClaim: string;
|
|
649
660
|
AutomationV2Unsub?: undefined;
|
|
650
661
|
SDaiWrap?: undefined;
|
|
651
662
|
SDaiUnwrap?: undefined;
|
|
@@ -821,17 +832,7 @@ declare const actionAddressesAllChains: {
|
|
|
821
832
|
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
822
833
|
CurveUsdLevCreateTransient?: undefined;
|
|
823
834
|
CurveUsdRepayTransient?: undefined;
|
|
824
|
-
MorphoBlueSupply?: undefined;
|
|
825
|
-
MorphoBlueSupplyCollateral?: undefined;
|
|
826
|
-
MorphoBlueWithdraw?: undefined;
|
|
827
|
-
MorphoBlueWithdrawCollateral?: undefined;
|
|
828
|
-
MorphoBlueBorrow?: undefined;
|
|
829
|
-
MorphoBluePayback?: undefined;
|
|
830
|
-
MorphoBlueSetAuth?: undefined;
|
|
831
|
-
MorphoBlueSetAuthWithSig?: undefined;
|
|
832
835
|
MorphoTokenWrap?: undefined;
|
|
833
|
-
MorphoBlueReallocateLiquidity?: undefined;
|
|
834
|
-
MorphoBlueClaim?: undefined;
|
|
835
836
|
EulerV2Supply?: undefined;
|
|
836
837
|
EulerV2Withdraw?: undefined;
|
|
837
838
|
EulerV2Borrow?: undefined;
|
|
@@ -850,7 +851,6 @@ declare const actionAddressesAllChains: {
|
|
|
850
851
|
UmbrellaUnstake?: undefined;
|
|
851
852
|
AaveV3DelegateCredit?: undefined;
|
|
852
853
|
AaveV3RatioTrigger?: undefined;
|
|
853
|
-
MorphoBlueView?: undefined;
|
|
854
854
|
} | {
|
|
855
855
|
DFSSell: string;
|
|
856
856
|
DFSSellNoFee: string;
|
|
@@ -1986,6 +1986,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1986
1986
|
ApproveToken: string;
|
|
1987
1987
|
SendTokenAndUnwrap: string;
|
|
1988
1988
|
ToggleSub: string;
|
|
1989
|
+
UpdateSub: string;
|
|
1989
1990
|
CreateSub: string;
|
|
1990
1991
|
TokenBalance: string;
|
|
1991
1992
|
TokenizedVaultAdapter: string;
|
|
@@ -2025,7 +2026,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2025
2026
|
CompV3Withdraw: string;
|
|
2026
2027
|
SFApproveTokens: string;
|
|
2027
2028
|
AutomationV2Unsub?: undefined;
|
|
2028
|
-
UpdateSub?: undefined;
|
|
2029
2029
|
TransferNFT?: undefined;
|
|
2030
2030
|
SDaiWrap?: undefined;
|
|
2031
2031
|
SDaiUnwrap?: undefined;
|
|
@@ -2328,6 +2328,17 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2328
2328
|
FluidDexPayback: string;
|
|
2329
2329
|
FluidDexWithdraw: string;
|
|
2330
2330
|
SFApproveTokens: string;
|
|
2331
|
+
MorphoBlueSupply: string;
|
|
2332
|
+
MorphoBlueSupplyCollateral: string;
|
|
2333
|
+
MorphoBlueWithdraw: string;
|
|
2334
|
+
MorphoBlueWithdrawCollateral: string;
|
|
2335
|
+
MorphoBlueBorrow: string;
|
|
2336
|
+
MorphoBluePayback: string;
|
|
2337
|
+
MorphoBlueSetAuth: string;
|
|
2338
|
+
MorphoBlueSetAuthWithSig: string;
|
|
2339
|
+
MorphoBlueView: string;
|
|
2340
|
+
MorphoBlueReallocateLiquidity: string;
|
|
2341
|
+
MorphoBlueClaim: string;
|
|
2331
2342
|
AutomationV2Unsub?: undefined;
|
|
2332
2343
|
SDaiWrap?: undefined;
|
|
2333
2344
|
SDaiUnwrap?: undefined;
|
|
@@ -2503,17 +2514,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2503
2514
|
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
2504
2515
|
CurveUsdLevCreateTransient?: undefined;
|
|
2505
2516
|
CurveUsdRepayTransient?: undefined;
|
|
2506
|
-
MorphoBlueSupply?: undefined;
|
|
2507
|
-
MorphoBlueSupplyCollateral?: undefined;
|
|
2508
|
-
MorphoBlueWithdraw?: undefined;
|
|
2509
|
-
MorphoBlueWithdrawCollateral?: undefined;
|
|
2510
|
-
MorphoBlueBorrow?: undefined;
|
|
2511
|
-
MorphoBluePayback?: undefined;
|
|
2512
|
-
MorphoBlueSetAuth?: undefined;
|
|
2513
|
-
MorphoBlueSetAuthWithSig?: undefined;
|
|
2514
2517
|
MorphoTokenWrap?: undefined;
|
|
2515
|
-
MorphoBlueReallocateLiquidity?: undefined;
|
|
2516
|
-
MorphoBlueClaim?: undefined;
|
|
2517
2518
|
EulerV2Supply?: undefined;
|
|
2518
2519
|
EulerV2Withdraw?: undefined;
|
|
2519
2520
|
EulerV2Borrow?: undefined;
|
|
@@ -2532,7 +2533,6 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
2532
2533
|
UmbrellaUnstake?: undefined;
|
|
2533
2534
|
AaveV3DelegateCredit?: undefined;
|
|
2534
2535
|
AaveV3RatioTrigger?: undefined;
|
|
2535
|
-
MorphoBlueView?: undefined;
|
|
2536
2536
|
} | {
|
|
2537
2537
|
DFSSell: string;
|
|
2538
2538
|
DFSSellNoFee: string;
|
|
@@ -3895,6 +3895,7 @@ declare const _default: {
|
|
|
3895
3895
|
ApproveToken: string;
|
|
3896
3896
|
SendTokenAndUnwrap: string;
|
|
3897
3897
|
ToggleSub: string;
|
|
3898
|
+
UpdateSub: string;
|
|
3898
3899
|
CreateSub: string;
|
|
3899
3900
|
TokenBalance: string;
|
|
3900
3901
|
TokenizedVaultAdapter: string;
|
|
@@ -3934,7 +3935,6 @@ declare const _default: {
|
|
|
3934
3935
|
CompV3Withdraw: string;
|
|
3935
3936
|
SFApproveTokens: string;
|
|
3936
3937
|
AutomationV2Unsub?: undefined;
|
|
3937
|
-
UpdateSub?: undefined;
|
|
3938
3938
|
TransferNFT?: undefined;
|
|
3939
3939
|
SDaiWrap?: undefined;
|
|
3940
3940
|
SDaiUnwrap?: undefined;
|
|
@@ -4237,6 +4237,17 @@ declare const _default: {
|
|
|
4237
4237
|
FluidDexPayback: string;
|
|
4238
4238
|
FluidDexWithdraw: string;
|
|
4239
4239
|
SFApproveTokens: string;
|
|
4240
|
+
MorphoBlueSupply: string;
|
|
4241
|
+
MorphoBlueSupplyCollateral: string;
|
|
4242
|
+
MorphoBlueWithdraw: string;
|
|
4243
|
+
MorphoBlueWithdrawCollateral: string;
|
|
4244
|
+
MorphoBlueBorrow: string;
|
|
4245
|
+
MorphoBluePayback: string;
|
|
4246
|
+
MorphoBlueSetAuth: string;
|
|
4247
|
+
MorphoBlueSetAuthWithSig: string;
|
|
4248
|
+
MorphoBlueView: string;
|
|
4249
|
+
MorphoBlueReallocateLiquidity: string;
|
|
4250
|
+
MorphoBlueClaim: string;
|
|
4240
4251
|
AutomationV2Unsub?: undefined;
|
|
4241
4252
|
SDaiWrap?: undefined;
|
|
4242
4253
|
SDaiUnwrap?: undefined;
|
|
@@ -4412,17 +4423,7 @@ declare const _default: {
|
|
|
4412
4423
|
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
4413
4424
|
CurveUsdLevCreateTransient?: undefined;
|
|
4414
4425
|
CurveUsdRepayTransient?: undefined;
|
|
4415
|
-
MorphoBlueSupply?: undefined;
|
|
4416
|
-
MorphoBlueSupplyCollateral?: undefined;
|
|
4417
|
-
MorphoBlueWithdraw?: undefined;
|
|
4418
|
-
MorphoBlueWithdrawCollateral?: undefined;
|
|
4419
|
-
MorphoBlueBorrow?: undefined;
|
|
4420
|
-
MorphoBluePayback?: undefined;
|
|
4421
|
-
MorphoBlueSetAuth?: undefined;
|
|
4422
|
-
MorphoBlueSetAuthWithSig?: undefined;
|
|
4423
4426
|
MorphoTokenWrap?: undefined;
|
|
4424
|
-
MorphoBlueReallocateLiquidity?: undefined;
|
|
4425
|
-
MorphoBlueClaim?: undefined;
|
|
4426
4427
|
EulerV2Supply?: undefined;
|
|
4427
4428
|
EulerV2Withdraw?: undefined;
|
|
4428
4429
|
EulerV2Borrow?: undefined;
|
|
@@ -4441,7 +4442,6 @@ declare const _default: {
|
|
|
4441
4442
|
UmbrellaUnstake?: undefined;
|
|
4442
4443
|
AaveV3DelegateCredit?: undefined;
|
|
4443
4444
|
AaveV3RatioTrigger?: undefined;
|
|
4444
|
-
MorphoBlueView?: undefined;
|
|
4445
4445
|
} | {
|
|
4446
4446
|
DFSSell: string;
|
|
4447
4447
|
DFSSellNoFee: string;
|
|
@@ -5577,6 +5577,7 @@ declare const _default: {
|
|
|
5577
5577
|
ApproveToken: string;
|
|
5578
5578
|
SendTokenAndUnwrap: string;
|
|
5579
5579
|
ToggleSub: string;
|
|
5580
|
+
UpdateSub: string;
|
|
5580
5581
|
CreateSub: string;
|
|
5581
5582
|
TokenBalance: string;
|
|
5582
5583
|
TokenizedVaultAdapter: string;
|
|
@@ -5616,7 +5617,6 @@ declare const _default: {
|
|
|
5616
5617
|
CompV3Withdraw: string;
|
|
5617
5618
|
SFApproveTokens: string;
|
|
5618
5619
|
AutomationV2Unsub?: undefined;
|
|
5619
|
-
UpdateSub?: undefined;
|
|
5620
5620
|
TransferNFT?: undefined;
|
|
5621
5621
|
SDaiWrap?: undefined;
|
|
5622
5622
|
SDaiUnwrap?: undefined;
|
|
@@ -5919,6 +5919,17 @@ declare const _default: {
|
|
|
5919
5919
|
FluidDexPayback: string;
|
|
5920
5920
|
FluidDexWithdraw: string;
|
|
5921
5921
|
SFApproveTokens: string;
|
|
5922
|
+
MorphoBlueSupply: string;
|
|
5923
|
+
MorphoBlueSupplyCollateral: string;
|
|
5924
|
+
MorphoBlueWithdraw: string;
|
|
5925
|
+
MorphoBlueWithdrawCollateral: string;
|
|
5926
|
+
MorphoBlueBorrow: string;
|
|
5927
|
+
MorphoBluePayback: string;
|
|
5928
|
+
MorphoBlueSetAuth: string;
|
|
5929
|
+
MorphoBlueSetAuthWithSig: string;
|
|
5930
|
+
MorphoBlueView: string;
|
|
5931
|
+
MorphoBlueReallocateLiquidity: string;
|
|
5932
|
+
MorphoBlueClaim: string;
|
|
5922
5933
|
AutomationV2Unsub?: undefined;
|
|
5923
5934
|
SDaiWrap?: undefined;
|
|
5924
5935
|
SDaiUnwrap?: undefined;
|
|
@@ -6094,17 +6105,7 @@ declare const _default: {
|
|
|
6094
6105
|
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
6095
6106
|
CurveUsdLevCreateTransient?: undefined;
|
|
6096
6107
|
CurveUsdRepayTransient?: undefined;
|
|
6097
|
-
MorphoBlueSupply?: undefined;
|
|
6098
|
-
MorphoBlueSupplyCollateral?: undefined;
|
|
6099
|
-
MorphoBlueWithdraw?: undefined;
|
|
6100
|
-
MorphoBlueWithdrawCollateral?: undefined;
|
|
6101
|
-
MorphoBlueBorrow?: undefined;
|
|
6102
|
-
MorphoBluePayback?: undefined;
|
|
6103
|
-
MorphoBlueSetAuth?: undefined;
|
|
6104
|
-
MorphoBlueSetAuthWithSig?: undefined;
|
|
6105
6108
|
MorphoTokenWrap?: undefined;
|
|
6106
|
-
MorphoBlueReallocateLiquidity?: undefined;
|
|
6107
|
-
MorphoBlueClaim?: undefined;
|
|
6108
6109
|
EulerV2Supply?: undefined;
|
|
6109
6110
|
EulerV2Withdraw?: undefined;
|
|
6110
6111
|
EulerV2Borrow?: undefined;
|
|
@@ -6123,7 +6124,6 @@ declare const _default: {
|
|
|
6123
6124
|
UmbrellaUnstake?: undefined;
|
|
6124
6125
|
AaveV3DelegateCredit?: undefined;
|
|
6125
6126
|
AaveV3RatioTrigger?: undefined;
|
|
6126
|
-
MorphoBlueView?: undefined;
|
|
6127
6127
|
} | {
|
|
6128
6128
|
DFSSell: string;
|
|
6129
6129
|
DFSSellNoFee: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV3QuotePriceRangeTrigger
|
|
5
|
+
* @param baseTokenAddr - The address of the base token
|
|
6
|
+
* @param quoteTokenAddr - The address of the quote token
|
|
7
|
+
* @param lowerPrice - The lower price of the range
|
|
8
|
+
* @param upperPrice - The upper price of the range
|
|
9
|
+
* @category Triggers
|
|
10
|
+
*/
|
|
11
|
+
export declare class AaveV3QuotePriceRangeTrigger extends Action {
|
|
12
|
+
constructor(baseTokenAddr: EthAddress, quoteTokenAddr: EthAddress, lowerPrice: uint256, upperPrice: uint256);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* AaveV3QuotePriceRangeTrigger
|
|
5
|
+
* @param baseTokenAddr - The address of the base token
|
|
6
|
+
* @param quoteTokenAddr - The address of the quote token
|
|
7
|
+
* @param lowerPrice - The lower price of the range
|
|
8
|
+
* @param upperPrice - The upper price of the range
|
|
9
|
+
* @category Triggers
|
|
10
|
+
*/
|
|
11
|
+
export class AaveV3QuotePriceRangeTrigger extends Action {
|
|
12
|
+
constructor(baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice) {
|
|
13
|
+
super('AaveV3QuotePriceRangeTrigger', getAddr('Empty'), [['address', 'address', 'uint256', 'uint256']], [[baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice]]);
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { getAddr } from '../../addresses';
|
|
|
3
3
|
import { EthAddress, uint256 } from '../../types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for
|
|
6
|
+
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
|
|
7
7
|
*
|
|
8
8
|
* @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
|
|
9
9
|
*
|
|
@@ -13,18 +13,20 @@ export class AaveV3OpenRatioCheckAction extends Action {
|
|
|
13
13
|
/**
|
|
14
14
|
* @param targetRatio The ratio user want to be at
|
|
15
15
|
* @param market Address provider for specific market
|
|
16
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
16
17
|
*/
|
|
17
|
-
constructor(
|
|
18
|
+
constructor(
|
|
19
|
+
targetRatio: uint256,
|
|
20
|
+
market: EthAddress,
|
|
21
|
+
user: EthAddress = getAddr('Empty'),
|
|
22
|
+
) {
|
|
18
23
|
super(
|
|
19
24
|
'AaveV3OpenRatioCheck',
|
|
20
25
|
getAddr('Empty'),
|
|
21
|
-
['uint256', 'address'],
|
|
22
|
-
[targetRatio, market],
|
|
26
|
+
['uint256', 'address', 'address'],
|
|
27
|
+
[targetRatio, market, user],
|
|
23
28
|
);
|
|
24
29
|
|
|
25
|
-
this.mappableArgs = [
|
|
26
|
-
this.args[0],
|
|
27
|
-
this.args[1],
|
|
28
|
-
];
|
|
30
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2]];
|
|
29
31
|
}
|
|
30
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action } from '../../Action';
|
|
2
2
|
import { getAddr } from '../../addresses';
|
|
3
|
-
import { uint8, uint256 } from '../../types';
|
|
3
|
+
import { uint8, uint256, EthAddress } from '../../types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* AaveV3RatioCheckAction - Checks aave V3 ratio for users proxy position and reverts if faulty
|
|
@@ -11,13 +11,27 @@ export class AaveV3RatioCheckAction extends Action {
|
|
|
11
11
|
/**
|
|
12
12
|
* @param ratioState If it should lower/higher
|
|
13
13
|
* @param targetRatio The ratio user want to be at
|
|
14
|
+
* @param market Address provider for specific market. This param was added later
|
|
15
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
14
16
|
*/
|
|
15
|
-
constructor(
|
|
16
|
-
|
|
17
|
+
constructor(
|
|
18
|
+
ratioState: uint8,
|
|
19
|
+
targetRatio: uint256,
|
|
20
|
+
market: EthAddress = getAddr('Empty'),
|
|
21
|
+
user: EthAddress = getAddr('Empty'),
|
|
22
|
+
) {
|
|
23
|
+
super(
|
|
24
|
+
'AaveV3RatioCheck',
|
|
25
|
+
getAddr('Empty'),
|
|
26
|
+
['uint8', 'uint256', 'address', 'address'],
|
|
27
|
+
[ratioState, targetRatio, market, user],
|
|
28
|
+
);
|
|
17
29
|
|
|
18
30
|
this.mappableArgs = [
|
|
19
31
|
this.args[0],
|
|
20
32
|
this.args[1],
|
|
33
|
+
this.args[2],
|
|
34
|
+
this.args[3],
|
|
21
35
|
];
|
|
22
36
|
}
|
|
23
|
-
}
|
|
37
|
+
}
|
package/src/addresses.ts
CHANGED
|
@@ -379,6 +379,7 @@ export const actionAddresses = {
|
|
|
379
379
|
ApproveToken: '0x842a81d2cfe26d401CD63Cc14e9DEf275c197C1a',
|
|
380
380
|
SendTokenAndUnwrap: '0xd4f69250cb4d1f083Dd372FEace391A16ABbfBDc',
|
|
381
381
|
ToggleSub: '0xfc19a12e35bb0b5e6a3d3017be9e9022a6486eee',
|
|
382
|
+
UpdateSub: '0xAe6ea1d13dF2bE60dC7933DB56067Cb89d6A2cDe',
|
|
382
383
|
CreateSub: '0x2daED8030BFC87B3d27c02E2f044B9CF4841Ff3e',
|
|
383
384
|
TokenBalance: '0xC6FF5b01f7c7b35b6e093fF70D2332B361C5Be5A',
|
|
384
385
|
TokenizedVaultAdapter: '0xdf31669FEd440f5BfF658ca0bBF0D22B8abdeb73',
|
|
@@ -521,6 +522,19 @@ export const actionAddresses = {
|
|
|
521
522
|
|
|
522
523
|
// summer.fi
|
|
523
524
|
SFApproveTokens: '0x98101bDBFaA3f8efa4A14a5A6a2f9A20D514a5D5',
|
|
525
|
+
|
|
526
|
+
// MorphoBlue
|
|
527
|
+
MorphoBlueSupply: '0xeaF1c037716b447C178f3604BCFd10e650704525',
|
|
528
|
+
MorphoBlueSupplyCollateral: '0x65A5900F2faab9cC495b92389844739DF08A290D',
|
|
529
|
+
MorphoBlueWithdraw: '0xd7132c78677E764b352F83D1ACbCd9564eC08569',
|
|
530
|
+
MorphoBlueWithdrawCollateral: '0x374553273E681C6cfA69006CEd70710d415a02D0',
|
|
531
|
+
MorphoBlueBorrow: '0xAe3073ab93DAde55e8B9390E5f3A3071B1ec99Ec',
|
|
532
|
+
MorphoBluePayback: '0x0e5493737FC3466341E0372219ef72FA0B4DDBbB',
|
|
533
|
+
MorphoBlueSetAuth: '0x7e1deb39317A7542Be231123733d94167FaC73D5',
|
|
534
|
+
MorphoBlueSetAuthWithSig: '0x14da4D942b2b855550b47567c333edB8443cF1A7',
|
|
535
|
+
MorphoBlueView: '0xa3b8b400a2eFF0314fa9605E778692bd4Bd9f880',
|
|
536
|
+
MorphoBlueReallocateLiquidity: '0x79C0E0eFe0Df71B2d301f4e08cfB5Ca8814A8f4c',
|
|
537
|
+
MorphoBlueClaim: '0x3ae0160e27778f7286182eAc774fD7ECd40539a7',
|
|
524
538
|
},
|
|
525
539
|
[NETWORKS.base.chainId]: {
|
|
526
540
|
// Basic
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
import { EthAddress, uint256 } from '../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AaveV3QuotePriceRangeTrigger
|
|
7
|
+
* @param baseTokenAddr - The address of the base token
|
|
8
|
+
* @param quoteTokenAddr - The address of the quote token
|
|
9
|
+
* @param lowerPrice - The lower price of the range
|
|
10
|
+
* @param upperPrice - The upper price of the range
|
|
11
|
+
* @category Triggers
|
|
12
|
+
*/
|
|
13
|
+
export class AaveV3QuotePriceRangeTrigger extends Action {
|
|
14
|
+
constructor(
|
|
15
|
+
baseTokenAddr: EthAddress,
|
|
16
|
+
quoteTokenAddr: EthAddress,
|
|
17
|
+
lowerPrice: uint256,
|
|
18
|
+
upperPrice: uint256,
|
|
19
|
+
) {
|
|
20
|
+
super(
|
|
21
|
+
'AaveV3QuotePriceRangeTrigger',
|
|
22
|
+
getAddr('Empty'),
|
|
23
|
+
[['address', 'address', 'uint256', 'uint256']],
|
|
24
|
+
[[baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice]],
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/triggers/index.ts
CHANGED
package/umd/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
exports["defisaver-sdk"] = factory(require("web3-eth-abi"), require("web3-utils"), require("decimal.js"), require("@defisaver/tokens"), require("@ethersproject/solidity"), require("@ethersproject/address"), require("axios"));
|
|
8
8
|
else
|
|
9
9
|
root["defisaver-sdk"] = factory(root["web3-eth-abi"], root["web3-utils"], root["decimal.js"], root["@defisaver/tokens"], root["@ethersproject/solidity"], root["@ethersproject/address"], root["axios"]);
|
|
10
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__138__, __WEBPACK_EXTERNAL_MODULE__139__,
|
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__138__, __WEBPACK_EXTERNAL_MODULE__139__, __WEBPACK_EXTERNAL_MODULE__442__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ([
|
|
@@ -1644,6 +1644,7 @@ var actionAddresses = {
|
|
|
1644
1644
|
ApproveToken: '0x842a81d2cfe26d401CD63Cc14e9DEf275c197C1a',
|
|
1645
1645
|
SendTokenAndUnwrap: '0xd4f69250cb4d1f083Dd372FEace391A16ABbfBDc',
|
|
1646
1646
|
ToggleSub: '0xfc19a12e35bb0b5e6a3d3017be9e9022a6486eee',
|
|
1647
|
+
UpdateSub: '0xAe6ea1d13dF2bE60dC7933DB56067Cb89d6A2cDe',
|
|
1647
1648
|
CreateSub: '0x2daED8030BFC87B3d27c02E2f044B9CF4841Ff3e',
|
|
1648
1649
|
TokenBalance: '0xC6FF5b01f7c7b35b6e093fF70D2332B361C5Be5A',
|
|
1649
1650
|
TokenizedVaultAdapter: '0xdf31669FEd440f5BfF658ca0bBF0D22B8abdeb73',
|
|
@@ -1771,7 +1772,19 @@ var actionAddresses = {
|
|
|
1771
1772
|
FluidDexPayback: '0xA9B46Da016F22cf9F8841A30881bB88E2Ad5CA94',
|
|
1772
1773
|
FluidDexWithdraw: '0x076D5434793798b153298bF70b014f5E6145aB2E',
|
|
1773
1774
|
// summer.fi
|
|
1774
|
-
SFApproveTokens: '0x98101bDBFaA3f8efa4A14a5A6a2f9A20D514a5D5'
|
|
1775
|
+
SFApproveTokens: '0x98101bDBFaA3f8efa4A14a5A6a2f9A20D514a5D5',
|
|
1776
|
+
// MorphoBlue
|
|
1777
|
+
MorphoBlueSupply: '0xeaF1c037716b447C178f3604BCFd10e650704525',
|
|
1778
|
+
MorphoBlueSupplyCollateral: '0x65A5900F2faab9cC495b92389844739DF08A290D',
|
|
1779
|
+
MorphoBlueWithdraw: '0xd7132c78677E764b352F83D1ACbCd9564eC08569',
|
|
1780
|
+
MorphoBlueWithdrawCollateral: '0x374553273E681C6cfA69006CEd70710d415a02D0',
|
|
1781
|
+
MorphoBlueBorrow: '0xAe3073ab93DAde55e8B9390E5f3A3071B1ec99Ec',
|
|
1782
|
+
MorphoBluePayback: '0x0e5493737FC3466341E0372219ef72FA0B4DDBbB',
|
|
1783
|
+
MorphoBlueSetAuth: '0x7e1deb39317A7542Be231123733d94167FaC73D5',
|
|
1784
|
+
MorphoBlueSetAuthWithSig: '0x14da4D942b2b855550b47567c333edB8443cF1A7',
|
|
1785
|
+
MorphoBlueView: '0xa3b8b400a2eFF0314fa9605E778692bd4Bd9f880',
|
|
1786
|
+
MorphoBlueReallocateLiquidity: '0x79C0E0eFe0Df71B2d301f4e08cfB5Ca8814A8f4c',
|
|
1787
|
+
MorphoBlueClaim: '0x3ae0160e27778f7286182eAc774fD7ECd40539a7'
|
|
1775
1788
|
},
|
|
1776
1789
|
[_config__WEBPACK_IMPORTED_MODULE_0__.NETWORKS.base.chainId]: {
|
|
1777
1790
|
// Basic
|
|
@@ -7031,10 +7044,14 @@ class AaveV3RatioCheckAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
|
|
|
7031
7044
|
/**
|
|
7032
7045
|
* @param ratioState If it should lower/higher
|
|
7033
7046
|
* @param targetRatio The ratio user want to be at
|
|
7047
|
+
* @param market Address provider for specific market. This param was added later
|
|
7048
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
7034
7049
|
*/
|
|
7035
7050
|
constructor(ratioState, targetRatio) {
|
|
7036
|
-
|
|
7037
|
-
|
|
7051
|
+
var market = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty');
|
|
7052
|
+
var user = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty');
|
|
7053
|
+
super('AaveV3RatioCheck', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), ['uint8', 'uint256', 'address', 'address'], [ratioState, targetRatio, market, user]);
|
|
7054
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2], this.args[3]];
|
|
7038
7055
|
}
|
|
7039
7056
|
}
|
|
7040
7057
|
|
|
@@ -7312,7 +7329,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7312
7329
|
|
|
7313
7330
|
|
|
7314
7331
|
/**
|
|
7315
|
-
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for
|
|
7332
|
+
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
|
|
7316
7333
|
*
|
|
7317
7334
|
* @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
|
|
7318
7335
|
*
|
|
@@ -7322,10 +7339,12 @@ class AaveV3OpenRatioCheckAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Ac
|
|
|
7322
7339
|
/**
|
|
7323
7340
|
* @param targetRatio The ratio user want to be at
|
|
7324
7341
|
* @param market Address provider for specific market
|
|
7342
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
7325
7343
|
*/
|
|
7326
7344
|
constructor(targetRatio, market) {
|
|
7327
|
-
|
|
7328
|
-
|
|
7345
|
+
var user = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty');
|
|
7346
|
+
super('AaveV3OpenRatioCheck', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), ['uint256', 'address', 'address'], [targetRatio, market, user]);
|
|
7347
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2]];
|
|
7329
7348
|
}
|
|
7330
7349
|
}
|
|
7331
7350
|
|
|
@@ -16335,6 +16354,7 @@ class UmbrellaClaimRewardsAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Ac
|
|
|
16335
16354
|
__webpack_require__.r(__webpack_exports__);
|
|
16336
16355
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16337
16356
|
/* harmony export */ AaveV2RatioTrigger: () => (/* reexport safe */ _AaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_13__.AaveV2RatioTrigger),
|
|
16357
|
+
/* harmony export */ AaveV3QuotePriceRangeTrigger: () => (/* reexport safe */ _AaveV3QuotePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_30__.AaveV3QuotePriceRangeTrigger),
|
|
16338
16358
|
/* harmony export */ AaveV3QuotePriceTrigger: () => (/* reexport safe */ _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__.AaveV3QuotePriceTrigger),
|
|
16339
16359
|
/* harmony export */ AaveV3RatioTrigger: () => (/* reexport safe */ _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__.AaveV3RatioTrigger),
|
|
16340
16360
|
/* harmony export */ CBRebondTrigger: () => (/* reexport safe */ _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__.CBRebondTrigger),
|
|
@@ -16395,6 +16415,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16395
16415
|
/* harmony import */ var _CompV3PriceTrigger__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(436);
|
|
16396
16416
|
/* harmony import */ var _CompV3PriceRangeTrigger__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(437);
|
|
16397
16417
|
/* harmony import */ var _LiquityV2AdjustRateDebtInFrontTrigger__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(438);
|
|
16418
|
+
/* harmony import */ var _AaveV3QuotePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(439);
|
|
16419
|
+
|
|
16398
16420
|
|
|
16399
16421
|
|
|
16400
16422
|
|
|
@@ -17120,6 +17142,32 @@ class LiquityV2AdjustRateDebtInFrontTrigger extends _Action__WEBPACK_IMPORTED_MO
|
|
|
17120
17142
|
/* 439 */
|
|
17121
17143
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17122
17144
|
|
|
17145
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17146
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17147
|
+
/* harmony export */ AaveV3QuotePriceRangeTrigger: () => (/* binding */ AaveV3QuotePriceRangeTrigger)
|
|
17148
|
+
/* harmony export */ });
|
|
17149
|
+
/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
17150
|
+
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
|
|
17151
|
+
|
|
17152
|
+
|
|
17153
|
+
/**
|
|
17154
|
+
* AaveV3QuotePriceRangeTrigger
|
|
17155
|
+
* @param baseTokenAddr - The address of the base token
|
|
17156
|
+
* @param quoteTokenAddr - The address of the quote token
|
|
17157
|
+
* @param lowerPrice - The lower price of the range
|
|
17158
|
+
* @param upperPrice - The upper price of the range
|
|
17159
|
+
* @category Triggers
|
|
17160
|
+
*/
|
|
17161
|
+
class AaveV3QuotePriceRangeTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
17162
|
+
constructor(baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice) {
|
|
17163
|
+
super('AaveV3QuotePriceRangeTrigger', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), [['address', 'address', 'uint256', 'uint256']], [[baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice]]);
|
|
17164
|
+
}
|
|
17165
|
+
}
|
|
17166
|
+
|
|
17167
|
+
/***/ }),
|
|
17168
|
+
/* 440 */
|
|
17169
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17170
|
+
|
|
17123
17171
|
__webpack_require__.r(__webpack_exports__);
|
|
17124
17172
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17125
17173
|
/* harmony export */ basicUtils: () => (/* reexport module object */ _basic_utils__WEBPACK_IMPORTED_MODULE_7__),
|
|
@@ -17131,9 +17179,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17131
17179
|
/* harmony export */ uniswapV3LP: () => (/* reexport module object */ _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__),
|
|
17132
17180
|
/* harmony export */ zeroExExchange: () => (/* reexport module object */ _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__)
|
|
17133
17181
|
/* harmony export */ });
|
|
17134
|
-
/* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
17182
|
+
/* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(441);
|
|
17135
17183
|
/* harmony import */ var _uniswapLP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(137);
|
|
17136
|
-
/* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
17184
|
+
/* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(443);
|
|
17137
17185
|
/* harmony import */ var _convex_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(243);
|
|
17138
17186
|
/* harmony import */ var _mstableAssetPairs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
|
|
17139
17187
|
/* harmony import */ var _curve_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(209);
|
|
@@ -17150,7 +17198,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17150
17198
|
|
|
17151
17199
|
|
|
17152
17200
|
/***/ }),
|
|
17153
|
-
/*
|
|
17201
|
+
/* 441 */
|
|
17154
17202
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17155
17203
|
|
|
17156
17204
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -17161,7 +17209,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17161
17209
|
/* harmony export */ });
|
|
17162
17210
|
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
17163
17211
|
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(decimal_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
17164
|
-
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
17212
|
+
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(442);
|
|
17165
17213
|
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
|
|
17166
17214
|
/* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
17167
17215
|
/* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__);
|
|
@@ -17363,20 +17411,20 @@ var createSellAction = /*#__PURE__*/function () {
|
|
|
17363
17411
|
}();
|
|
17364
17412
|
|
|
17365
17413
|
/***/ }),
|
|
17366
|
-
/*
|
|
17414
|
+
/* 442 */
|
|
17367
17415
|
/***/ ((module) => {
|
|
17368
17416
|
|
|
17369
|
-
module.exports =
|
|
17417
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__442__;
|
|
17370
17418
|
|
|
17371
17419
|
/***/ }),
|
|
17372
|
-
/*
|
|
17420
|
+
/* 443 */
|
|
17373
17421
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17374
17422
|
|
|
17375
17423
|
__webpack_require__.r(__webpack_exports__);
|
|
17376
17424
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17377
17425
|
/* harmony export */ getAssetAddrByTokenId: () => (/* binding */ getAssetAddrByTokenId)
|
|
17378
17426
|
/* harmony export */ });
|
|
17379
|
-
/* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
17427
|
+
/* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(444);
|
|
17380
17428
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17381
17429
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
17382
17430
|
/**
|
|
@@ -17401,7 +17449,7 @@ var getAssetAddrByTokenId = /*#__PURE__*/function () {
|
|
|
17401
17449
|
}();
|
|
17402
17450
|
|
|
17403
17451
|
/***/ }),
|
|
17404
|
-
/*
|
|
17452
|
+
/* 444 */
|
|
17405
17453
|
/***/ ((module) => {
|
|
17406
17454
|
|
|
17407
17455
|
module.exports = /*#__PURE__*/JSON.parse('[{"constant":false,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"positions","outputs":[{"name":"nonce","type":"uint96"},{"name":"operator","type":"address"},{"name":"token0","type":"address"},{"name":"token1","type":"address"},{"name":"fee","type":"uint24"},{"name":"tickLower","type":"int24"},{"name":"tickUpper","type":"int24"},{"name":"liquidity","type":"uint128"},{"name":"feeGrowthInside0LastX128","type":"uint256"},{"name":"feeGrowthInside1LastX128","type":"uint256"},{"name":"tokensOwed0","type":"uint128"},{"name":"tokensOwed1","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"}]');
|
|
@@ -17506,7 +17554,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17506
17554
|
/* harmony import */ var _DfsWeb3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30);
|
|
17507
17555
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
|
|
17508
17556
|
/* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(408);
|
|
17509
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
17557
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(440);
|
|
17510
17558
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4);
|
|
17511
17559
|
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
|
|
17512
17560
|
/* Export types here */
|