@defisaver/sdk 0.3.9 → 0.3.10
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/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const ActionWithL2 = require("../../ActionWithL2");
|
|
2
2
|
const { getAddr } = require('../../addresses.js');
|
|
3
|
-
const { CONFIG } = require('../../config');
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* AaveV3BorrowAction - Borrow a token from AaveV3
|
|
@@ -22,25 +21,16 @@ class AaveV3BorrowAction extends ActionWithL2 {
|
|
|
22
21
|
[amount, to, rateMode, assetId, useDefaultMarket, useOnBehalf, market, onBehalf]
|
|
23
22
|
);
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
this.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
];
|
|
36
|
-
} else {
|
|
37
|
-
this.mappableArgs = [
|
|
38
|
-
this.args[0],
|
|
39
|
-
this.args[1],
|
|
40
|
-
this.args[6],
|
|
41
|
-
this.args[7],
|
|
42
|
-
];
|
|
43
|
-
}
|
|
24
|
+
this.mappableArgs = [
|
|
25
|
+
this.args[0],
|
|
26
|
+
this.args[1],
|
|
27
|
+
this.args[2],
|
|
28
|
+
this.args[3],
|
|
29
|
+
this.args[4],
|
|
30
|
+
this.args[5],
|
|
31
|
+
this.args[6],
|
|
32
|
+
this.args[7],
|
|
33
|
+
];
|
|
44
34
|
}
|
|
45
35
|
|
|
46
36
|
encodeInputs() {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const ActionWithL2 = require("../../ActionWithL2");
|
|
2
2
|
const { getAssetInfoByAddress } = require("@defisaver/tokens");
|
|
3
3
|
const { getAddr } = require('../../addresses.js');
|
|
4
|
-
const { CONFIG } = require('../../config');
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* AaveV3PaybackAction - Payback debt on Aave using underlying token
|
|
@@ -24,7 +23,6 @@ class AaveV3PaybackAction extends ActionWithL2 {
|
|
|
24
23
|
[amount, from, rateMode, assetId, useOnDefaultMarket, useOnBehalf, market, onBehalf]
|
|
25
24
|
);
|
|
26
25
|
|
|
27
|
-
if (CONFIG.chainId === 10) {
|
|
28
26
|
this.mappableArgs = [
|
|
29
27
|
this.args[0],
|
|
30
28
|
this.args[1],
|
|
@@ -35,14 +33,6 @@ class AaveV3PaybackAction extends ActionWithL2 {
|
|
|
35
33
|
this.args[6],
|
|
36
34
|
this.args[7],
|
|
37
35
|
];
|
|
38
|
-
} else {
|
|
39
|
-
this.mappableArgs = [
|
|
40
|
-
this.args[0],
|
|
41
|
-
this.args[1],
|
|
42
|
-
this.args[6],
|
|
43
|
-
this.args[7],
|
|
44
|
-
];
|
|
45
|
-
}
|
|
46
36
|
this.tokenForApproval = tokenAddr;
|
|
47
37
|
}
|
|
48
38
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const ActionWithL2 = require("../../ActionWithL2");
|
|
2
2
|
const { getAssetInfoByAddress } = require("@defisaver/tokens");
|
|
3
3
|
const { getAddr } = require('../../addresses.js');
|
|
4
|
-
const { CONFIG } = require('../../config');
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* AaveV3SupplyAction - Supply token to an aave position on Aave V3
|
|
@@ -25,8 +24,7 @@ class AaveV3SupplyAction extends ActionWithL2 {
|
|
|
25
24
|
[amount, from, assetId, enableAsColl, useDefaultMarket, useOnBehalf, market, onBehalf]
|
|
26
25
|
);
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
this.mappableArgs = [
|
|
27
|
+
this.mappableArgs = [
|
|
30
28
|
this.args[0],
|
|
31
29
|
this.args[1],
|
|
32
30
|
this.args[2],
|
|
@@ -36,14 +34,6 @@ class AaveV3SupplyAction extends ActionWithL2 {
|
|
|
36
34
|
this.args[6],
|
|
37
35
|
this.args[7],
|
|
38
36
|
];
|
|
39
|
-
} else {
|
|
40
|
-
this.mappableArgs = [
|
|
41
|
-
this.args[0],
|
|
42
|
-
this.args[1],
|
|
43
|
-
this.args[6],
|
|
44
|
-
this.args[7],
|
|
45
|
-
];
|
|
46
|
-
}
|
|
47
37
|
this.tokenForApproval = tokenAddress;
|
|
48
38
|
}
|
|
49
39
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const ActionWithL2 = require("../../ActionWithL2");
|
|
2
2
|
const { getAddr } = require('../../addresses.js');
|
|
3
|
-
const { CONFIG } = require('../../config');
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* AaveV3WithdrawAction - Withdraw a previously supplied token from a position in AaveV3
|
|
@@ -19,21 +18,13 @@ class AaveV3WithdrawAction extends ActionWithL2 {
|
|
|
19
18
|
[assetId, useDefaultMarket, amount, to, market]
|
|
20
19
|
);
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
];
|
|
30
|
-
} else {
|
|
31
|
-
this.mappableArgs = [
|
|
32
|
-
this.args[2],
|
|
33
|
-
this.args[3],
|
|
34
|
-
this.args[4],
|
|
35
|
-
];
|
|
36
|
-
}
|
|
21
|
+
this.mappableArgs = [
|
|
22
|
+
this.args[0],
|
|
23
|
+
this.args[1],
|
|
24
|
+
this.args[2],
|
|
25
|
+
this.args[3],
|
|
26
|
+
this.args[4],
|
|
27
|
+
];
|
|
37
28
|
}
|
|
38
29
|
encodeInputs() {
|
|
39
30
|
// executeActionDirectL2
|
package/src/addresses.js
CHANGED
|
@@ -175,17 +175,17 @@ const actionAddresses = {
|
|
|
175
175
|
|
|
176
176
|
// aave v3
|
|
177
177
|
AaveV3ATokenPayback: '0x261906e5E0D0D38D9cBb5c10dB9c4031aabdf8C1',
|
|
178
|
-
AaveV3Borrow: '
|
|
178
|
+
AaveV3Borrow: '0x5786809DA660dB613994460F096F19fcd19eD4c9',
|
|
179
179
|
AaveV3CollateralSwitch: '0x7AcdD66C13f87b1cBcE7B106a8C34E426475BADd',
|
|
180
|
-
AaveV3Payback: '
|
|
180
|
+
AaveV3Payback: '0xd88D5356e08dAd84E1576F89f4BF43C79a8BF0b2',
|
|
181
181
|
AaveV3SetEMode: '0x99D5068d9520316e8D3B5136c0B6EA33C5E0c27e',
|
|
182
|
-
AaveV3Supply: '
|
|
182
|
+
AaveV3Supply: '0x1fFd0E73EB34013951a3da99e10ba5BC4e786Dd3',
|
|
183
183
|
AaveV3SwapBorrowRateMode: '0x738042389A8d6B0F6D6ab009c42dfF84ebB737C0',
|
|
184
|
-
AaveV3Withdraw: '
|
|
184
|
+
AaveV3Withdraw: '0xbf492F869DdB1A18BB4F41b6c3059D9f882Fe7ff',
|
|
185
185
|
|
|
186
186
|
FLAaveV3: '0x3Cc0d5DAE1B94e294152C3150aA732b97af603E1',
|
|
187
|
-
GasFeeTakerL2: '
|
|
188
|
-
AaveV3RatioCheck: '
|
|
187
|
+
GasFeeTakerL2: '0x2F64f73B222B4978CAfd0295c0fa106cE5f34996',
|
|
188
|
+
AaveV3RatioCheck: '0x4a5c2cbCFB921b596Dec049389899CC8Eb4678ED',
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
191
|
|
|
@@ -218,7 +218,7 @@ const otherAddresses = {
|
|
|
218
218
|
Empty: '0x0000000000000000000000000000000000000000',
|
|
219
219
|
},
|
|
220
220
|
[NETWORKS.arbitrum.chainId]: {
|
|
221
|
-
RecipeExecutor: '
|
|
221
|
+
RecipeExecutor: '0xe775c59e5662597bcE8aB4432C06380709554883',
|
|
222
222
|
DFSRegistry: '0xBF1CaC12DB60819Bfa71A328282ecbc1D40443aA',
|
|
223
223
|
ProxyRegistry: '0x283Cc5C26e53D66ed2Ea252D986F094B37E6e895',
|
|
224
224
|
|