@defisaver/sdk 1.3.8 → 1.3.9-dev.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/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 +1 -1
- package/esm/src/addresses.js +1 -0
- package/esm/src/index.d.ts +4 -4
- 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 +1 -0
- package/src/triggers/AaveV3QuotePriceRangeTrigger.ts +27 -0
- package/src/triggers/index.ts +1 -0
- package/umd/index.js +52 -16
|
@@ -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;
|
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',
|
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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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',
|
|
@@ -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',
|
|
@@ -7031,10 +7032,14 @@ class AaveV3RatioCheckAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action
|
|
|
7031
7032
|
/**
|
|
7032
7033
|
* @param ratioState If it should lower/higher
|
|
7033
7034
|
* @param targetRatio The ratio user want to be at
|
|
7035
|
+
* @param market Address provider for specific market. This param was added later
|
|
7036
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
7034
7037
|
*/
|
|
7035
7038
|
constructor(ratioState, targetRatio) {
|
|
7036
|
-
|
|
7037
|
-
|
|
7039
|
+
var market = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty');
|
|
7040
|
+
var user = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty');
|
|
7041
|
+
super('AaveV3RatioCheck', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), ['uint8', 'uint256', 'address', 'address'], [ratioState, targetRatio, market, user]);
|
|
7042
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2], this.args[3]];
|
|
7038
7043
|
}
|
|
7039
7044
|
}
|
|
7040
7045
|
|
|
@@ -7312,7 +7317,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7312
7317
|
|
|
7313
7318
|
|
|
7314
7319
|
/**
|
|
7315
|
-
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for
|
|
7320
|
+
* AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
|
|
7316
7321
|
*
|
|
7317
7322
|
* @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
|
|
7318
7323
|
*
|
|
@@ -7322,10 +7327,12 @@ class AaveV3OpenRatioCheckAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Ac
|
|
|
7322
7327
|
/**
|
|
7323
7328
|
* @param targetRatio The ratio user want to be at
|
|
7324
7329
|
* @param market Address provider for specific market
|
|
7330
|
+
* @param user Address of the user (EOA/SW). This param was added later
|
|
7325
7331
|
*/
|
|
7326
7332
|
constructor(targetRatio, market) {
|
|
7327
|
-
|
|
7328
|
-
|
|
7333
|
+
var user = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty');
|
|
7334
|
+
super('AaveV3OpenRatioCheck', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), ['uint256', 'address', 'address'], [targetRatio, market, user]);
|
|
7335
|
+
this.mappableArgs = [this.args[0], this.args[1], this.args[2]];
|
|
7329
7336
|
}
|
|
7330
7337
|
}
|
|
7331
7338
|
|
|
@@ -16335,6 +16342,7 @@ class UmbrellaClaimRewardsAction extends _Action__WEBPACK_IMPORTED_MODULE_0__.Ac
|
|
|
16335
16342
|
__webpack_require__.r(__webpack_exports__);
|
|
16336
16343
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16337
16344
|
/* harmony export */ AaveV2RatioTrigger: () => (/* reexport safe */ _AaveV2RatioTrigger__WEBPACK_IMPORTED_MODULE_13__.AaveV2RatioTrigger),
|
|
16345
|
+
/* harmony export */ AaveV3QuotePriceRangeTrigger: () => (/* reexport safe */ _AaveV3QuotePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_30__.AaveV3QuotePriceRangeTrigger),
|
|
16338
16346
|
/* harmony export */ AaveV3QuotePriceTrigger: () => (/* reexport safe */ _AaveV3QuotePriceTrigger__WEBPACK_IMPORTED_MODULE_12__.AaveV3QuotePriceTrigger),
|
|
16339
16347
|
/* harmony export */ AaveV3RatioTrigger: () => (/* reexport safe */ _AaveV3RatioTrigger__WEBPACK_IMPORTED_MODULE_8__.AaveV3RatioTrigger),
|
|
16340
16348
|
/* harmony export */ CBRebondTrigger: () => (/* reexport safe */ _CBRebondTrigger__WEBPACK_IMPORTED_MODULE_11__.CBRebondTrigger),
|
|
@@ -16395,6 +16403,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16395
16403
|
/* harmony import */ var _CompV3PriceTrigger__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(436);
|
|
16396
16404
|
/* harmony import */ var _CompV3PriceRangeTrigger__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(437);
|
|
16397
16405
|
/* harmony import */ var _LiquityV2AdjustRateDebtInFrontTrigger__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(438);
|
|
16406
|
+
/* harmony import */ var _AaveV3QuotePriceRangeTrigger__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(439);
|
|
16407
|
+
|
|
16398
16408
|
|
|
16399
16409
|
|
|
16400
16410
|
|
|
@@ -17120,6 +17130,32 @@ class LiquityV2AdjustRateDebtInFrontTrigger extends _Action__WEBPACK_IMPORTED_MO
|
|
|
17120
17130
|
/* 439 */
|
|
17121
17131
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17122
17132
|
|
|
17133
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17134
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17135
|
+
/* harmony export */ AaveV3QuotePriceRangeTrigger: () => (/* binding */ AaveV3QuotePriceRangeTrigger)
|
|
17136
|
+
/* harmony export */ });
|
|
17137
|
+
/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
|
17138
|
+
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
|
|
17139
|
+
|
|
17140
|
+
|
|
17141
|
+
/**
|
|
17142
|
+
* AaveV3QuotePriceRangeTrigger
|
|
17143
|
+
* @param baseTokenAddr - The address of the base token
|
|
17144
|
+
* @param quoteTokenAddr - The address of the quote token
|
|
17145
|
+
* @param lowerPrice - The lower price of the range
|
|
17146
|
+
* @param upperPrice - The upper price of the range
|
|
17147
|
+
* @category Triggers
|
|
17148
|
+
*/
|
|
17149
|
+
class AaveV3QuotePriceRangeTrigger extends _Action__WEBPACK_IMPORTED_MODULE_0__.Action {
|
|
17150
|
+
constructor(baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice) {
|
|
17151
|
+
super('AaveV3QuotePriceRangeTrigger', (0,_addresses__WEBPACK_IMPORTED_MODULE_1__.getAddr)('Empty'), [['address', 'address', 'uint256', 'uint256']], [[baseTokenAddr, quoteTokenAddr, lowerPrice, upperPrice]]);
|
|
17152
|
+
}
|
|
17153
|
+
}
|
|
17154
|
+
|
|
17155
|
+
/***/ }),
|
|
17156
|
+
/* 440 */
|
|
17157
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17158
|
+
|
|
17123
17159
|
__webpack_require__.r(__webpack_exports__);
|
|
17124
17160
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17125
17161
|
/* harmony export */ basicUtils: () => (/* reexport module object */ _basic_utils__WEBPACK_IMPORTED_MODULE_7__),
|
|
@@ -17131,9 +17167,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17131
17167
|
/* harmony export */ uniswapV3LP: () => (/* reexport module object */ _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__),
|
|
17132
17168
|
/* harmony export */ zeroExExchange: () => (/* reexport module object */ _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__)
|
|
17133
17169
|
/* harmony export */ });
|
|
17134
|
-
/* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
17170
|
+
/* harmony import */ var _zeroExExchange__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(441);
|
|
17135
17171
|
/* harmony import */ var _uniswapLP__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(137);
|
|
17136
|
-
/* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
17172
|
+
/* harmony import */ var _uniswapV3LP__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(443);
|
|
17137
17173
|
/* harmony import */ var _convex_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(243);
|
|
17138
17174
|
/* harmony import */ var _mstableAssetPairs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(223);
|
|
17139
17175
|
/* harmony import */ var _curve_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(209);
|
|
@@ -17150,7 +17186,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17150
17186
|
|
|
17151
17187
|
|
|
17152
17188
|
/***/ }),
|
|
17153
|
-
/*
|
|
17189
|
+
/* 441 */
|
|
17154
17190
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17155
17191
|
|
|
17156
17192
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -17161,7 +17197,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17161
17197
|
/* harmony export */ });
|
|
17162
17198
|
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
17163
17199
|
/* 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__(
|
|
17200
|
+
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(442);
|
|
17165
17201
|
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
|
|
17166
17202
|
/* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
17167
17203
|
/* harmony import */ var _defisaver_tokens__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_defisaver_tokens__WEBPACK_IMPORTED_MODULE_2__);
|
|
@@ -17363,20 +17399,20 @@ var createSellAction = /*#__PURE__*/function () {
|
|
|
17363
17399
|
}();
|
|
17364
17400
|
|
|
17365
17401
|
/***/ }),
|
|
17366
|
-
/*
|
|
17402
|
+
/* 442 */
|
|
17367
17403
|
/***/ ((module) => {
|
|
17368
17404
|
|
|
17369
|
-
module.exports =
|
|
17405
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__442__;
|
|
17370
17406
|
|
|
17371
17407
|
/***/ }),
|
|
17372
|
-
/*
|
|
17408
|
+
/* 443 */
|
|
17373
17409
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17374
17410
|
|
|
17375
17411
|
__webpack_require__.r(__webpack_exports__);
|
|
17376
17412
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17377
17413
|
/* harmony export */ getAssetAddrByTokenId: () => (/* binding */ getAssetAddrByTokenId)
|
|
17378
17414
|
/* harmony export */ });
|
|
17379
|
-
/* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
17415
|
+
/* harmony import */ var _abis_UniV3PositionManager_json__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(444);
|
|
17380
17416
|
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
17417
|
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
17418
|
/**
|
|
@@ -17401,7 +17437,7 @@ var getAssetAddrByTokenId = /*#__PURE__*/function () {
|
|
|
17401
17437
|
}();
|
|
17402
17438
|
|
|
17403
17439
|
/***/ }),
|
|
17404
|
-
/*
|
|
17440
|
+
/* 444 */
|
|
17405
17441
|
/***/ ((module) => {
|
|
17406
17442
|
|
|
17407
17443
|
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 +17542,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
17506
17542
|
/* harmony import */ var _DfsWeb3__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30);
|
|
17507
17543
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
|
|
17508
17544
|
/* harmony import */ var _triggers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(408);
|
|
17509
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
17545
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(440);
|
|
17510
17546
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4);
|
|
17511
17547
|
/* harmony import */ var _addresses__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
|
|
17512
17548
|
/* Export types here */
|