@defisaver/sdk 1.0.42 → 1.0.44

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.
@@ -0,0 +1,14 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * AaveClaimAAVEAction - Claims AAVE from stkAave
5
+ *
6
+ * @category Aave
7
+ */
8
+ export declare class AaveClaimAAVEAction extends Action {
9
+ /**
10
+ * @param amount - Amount to claim
11
+ * @param to - Address where claimed tokens will end up
12
+ */
13
+ constructor(amount: uint256, to: EthAddress);
14
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ /**
5
+ * AaveClaimAAVEAction - Claims AAVE from stkAave
6
+ *
7
+ * @category Aave
8
+ */
9
+ export class AaveClaimAAVEAction extends Action {
10
+ /**
11
+ * @param amount - Amount to claim
12
+ * @param to - Address where claimed tokens will end up
13
+ */
14
+ constructor(amount, to) {
15
+ requireAddress(to);
16
+ super('AaveClaimAAVE', getAddr('AaveClaimAAVE'), ['uint256', 'address'], [amount, to]);
17
+ this.mappableArgs = [
18
+ this.args[1],
19
+ this.args[2],
20
+ ];
21
+ }
22
+ }
@@ -6,3 +6,4 @@ export * from './AaveClaimStkAaveAction';
6
6
  export * from './AaveCollateralSwitchAction';
7
7
  export * from './AaveFinalizeUnstakeAction';
8
8
  export * from './AaveStartUnstakeAction';
9
+ export * from './AaveClaimAAVEAction';
@@ -6,3 +6,4 @@ export * from './AaveClaimStkAaveAction';
6
6
  export * from './AaveCollateralSwitchAction';
7
7
  export * from './AaveFinalizeUnstakeAction';
8
8
  export * from './AaveStartUnstakeAction';
9
+ export * from './AaveClaimAAVEAction';
@@ -43,6 +43,7 @@ export declare const actionAddresses: {
43
43
  AaveWithdraw: string;
44
44
  AaveCollateralSwitch: string;
45
45
  AaveUnstake: string;
46
+ AaveClaimAAVE: string;
46
47
  AaveV3Withdraw: string;
47
48
  AaveV3SwapBorrowRateMode: string;
48
49
  AaveV3Supply: string;
@@ -234,6 +235,7 @@ export declare const actionAddresses: {
234
235
  AaveWithdraw?: undefined;
235
236
  AaveCollateralSwitch?: undefined;
236
237
  AaveUnstake?: undefined;
238
+ AaveClaimAAVE?: undefined;
237
239
  AaveV3View?: undefined;
238
240
  MorphoAaveV2Borrow?: undefined;
239
241
  MorphoAaveV2Payback?: undefined;
@@ -402,6 +404,7 @@ export declare const actionAddresses: {
402
404
  AaveWithdraw?: undefined;
403
405
  AaveCollateralSwitch?: undefined;
404
406
  AaveUnstake?: undefined;
407
+ AaveClaimAAVE?: undefined;
405
408
  AaveV3ClaimRewards?: undefined;
406
409
  AaveV3View?: undefined;
407
410
  MorphoAaveV2Borrow?: undefined;
@@ -49,6 +49,7 @@ export const actionAddresses = {
49
49
  AaveWithdraw: '0x754C58fA92246414a448c1ed44ea3D1AD446d482',
50
50
  AaveCollateralSwitch: '0xFf5dfF1B90bd5Aa6E12768AB497dB90cc9DE6F5d',
51
51
  AaveUnstake: '0x2FE4024e350cD2c64D2fd0Db5d16F5cE54Ca0E09',
52
+ AaveClaimAAVE: '0xd52855bD011F3D87565f9040DdE2A59fB1b27b15',
52
53
  // aave v3
53
54
  AaveV3Withdraw: '0x9D4e4b26A5E2e6Dad30C5d95F5cE78A8310F04C2',
54
55
  AaveV3SwapBorrowRateMode: '0x630F530Ac523C935cf2528E62D0A06F8900C5b1B',
@@ -54,6 +54,7 @@ declare const actionAddressesAllChains: {
54
54
  AaveWithdraw: string;
55
55
  AaveCollateralSwitch: string;
56
56
  AaveUnstake: string;
57
+ AaveClaimAAVE: string;
57
58
  AaveV3Withdraw: string;
58
59
  AaveV3SwapBorrowRateMode: string;
59
60
  AaveV3Supply: string;
@@ -245,6 +246,7 @@ declare const actionAddressesAllChains: {
245
246
  AaveWithdraw?: undefined;
246
247
  AaveCollateralSwitch?: undefined;
247
248
  AaveUnstake?: undefined;
249
+ AaveClaimAAVE?: undefined;
248
250
  AaveV3View?: undefined;
249
251
  MorphoAaveV2Borrow?: undefined;
250
252
  MorphoAaveV2Payback?: undefined;
@@ -413,6 +415,7 @@ declare const actionAddressesAllChains: {
413
415
  AaveWithdraw?: undefined;
414
416
  AaveCollateralSwitch?: undefined;
415
417
  AaveUnstake?: undefined;
418
+ AaveClaimAAVE?: undefined;
416
419
  AaveV3ClaimRewards?: undefined;
417
420
  AaveV3View?: undefined;
418
421
  MorphoAaveV2Borrow?: undefined;
@@ -566,6 +569,7 @@ declare const actionAddresses: (chainId?: null) => {
566
569
  AaveWithdraw: string;
567
570
  AaveCollateralSwitch: string;
568
571
  AaveUnstake: string;
572
+ AaveClaimAAVE: string;
569
573
  AaveV3Withdraw: string;
570
574
  AaveV3SwapBorrowRateMode: string;
571
575
  AaveV3Supply: string;
@@ -757,6 +761,7 @@ declare const actionAddresses: (chainId?: null) => {
757
761
  AaveWithdraw?: undefined;
758
762
  AaveCollateralSwitch?: undefined;
759
763
  AaveUnstake?: undefined;
764
+ AaveClaimAAVE?: undefined;
760
765
  AaveV3View?: undefined;
761
766
  MorphoAaveV2Borrow?: undefined;
762
767
  MorphoAaveV2Payback?: undefined;
@@ -925,6 +930,7 @@ declare const actionAddresses: (chainId?: null) => {
925
930
  AaveWithdraw?: undefined;
926
931
  AaveCollateralSwitch?: undefined;
927
932
  AaveUnstake?: undefined;
933
+ AaveClaimAAVE?: undefined;
928
934
  AaveV3ClaimRewards?: undefined;
929
935
  AaveV3View?: undefined;
930
936
  MorphoAaveV2Borrow?: undefined;
@@ -1179,6 +1185,7 @@ declare const _default: {
1179
1185
  AaveWithdraw: string;
1180
1186
  AaveCollateralSwitch: string;
1181
1187
  AaveUnstake: string;
1188
+ AaveClaimAAVE: string;
1182
1189
  AaveV3Withdraw: string;
1183
1190
  AaveV3SwapBorrowRateMode: string;
1184
1191
  AaveV3Supply: string;
@@ -1370,6 +1377,7 @@ declare const _default: {
1370
1377
  AaveWithdraw?: undefined;
1371
1378
  AaveCollateralSwitch?: undefined;
1372
1379
  AaveUnstake?: undefined;
1380
+ AaveClaimAAVE?: undefined;
1373
1381
  AaveV3View?: undefined;
1374
1382
  MorphoAaveV2Borrow?: undefined;
1375
1383
  MorphoAaveV2Payback?: undefined;
@@ -1538,6 +1546,7 @@ declare const _default: {
1538
1546
  AaveWithdraw?: undefined;
1539
1547
  AaveCollateralSwitch?: undefined;
1540
1548
  AaveUnstake?: undefined;
1549
+ AaveClaimAAVE?: undefined;
1541
1550
  AaveV3ClaimRewards?: undefined;
1542
1551
  AaveV3View?: undefined;
1543
1552
  MorphoAaveV2Borrow?: undefined;
@@ -1691,6 +1700,7 @@ declare const _default: {
1691
1700
  AaveWithdraw: string;
1692
1701
  AaveCollateralSwitch: string;
1693
1702
  AaveUnstake: string;
1703
+ AaveClaimAAVE: string;
1694
1704
  AaveV3Withdraw: string;
1695
1705
  AaveV3SwapBorrowRateMode: string;
1696
1706
  AaveV3Supply: string;
@@ -1882,6 +1892,7 @@ declare const _default: {
1882
1892
  AaveWithdraw?: undefined;
1883
1893
  AaveCollateralSwitch?: undefined;
1884
1894
  AaveUnstake?: undefined;
1895
+ AaveClaimAAVE?: undefined;
1885
1896
  AaveV3View?: undefined;
1886
1897
  MorphoAaveV2Borrow?: undefined;
1887
1898
  MorphoAaveV2Payback?: undefined;
@@ -2050,6 +2061,7 @@ declare const _default: {
2050
2061
  AaveWithdraw?: undefined;
2051
2062
  AaveCollateralSwitch?: undefined;
2052
2063
  AaveUnstake?: undefined;
2064
+ AaveClaimAAVE?: undefined;
2053
2065
  AaveV3ClaimRewards?: undefined;
2054
2066
  AaveV3View?: undefined;
2055
2067
  MorphoAaveV2Borrow?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -20,13 +20,13 @@
20
20
  "license": "ISC",
21
21
  "dependencies": {
22
22
  "@defisaver/eslint-config": "^1.0.0",
23
- "@defisaver/tokens": "^1.4.53",
23
+ "@defisaver/tokens": "^1.4.55",
24
24
  "@ethersproject/address": "^5.0.10",
25
25
  "@ethersproject/solidity": "^5.0.9",
26
26
  "@types/web3-eth-abi": "^1.2.2",
27
27
  "axios": "^0.21.1",
28
28
  "decimal.js": "^10.2.1",
29
- "web3": "^1.8.0",
29
+ "web3": "^1.10.1",
30
30
  "web3-eth-abi": "^1.8.0",
31
31
  "web3-utils": "^1.8.0"
32
32
  },
@@ -0,0 +1,29 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ import { EthAddress, uint256 } from '../../types';
5
+
6
+ /**
7
+ * AaveClaimAAVEAction - Claims AAVE from stkAave
8
+ *
9
+ * @category Aave
10
+ */
11
+ export class AaveClaimAAVEAction extends Action {
12
+ /**
13
+ * @param amount - Amount to claim
14
+ * @param to - Address where claimed tokens will end up
15
+ */
16
+ constructor(amount: uint256, to: EthAddress) {
17
+ requireAddress(to);
18
+ super(
19
+ 'AaveClaimAAVE',
20
+ getAddr('AaveClaimAAVE'),
21
+ ['uint256', 'address'],
22
+ [amount, to],
23
+ );
24
+ this.mappableArgs = [
25
+ this.args[1],
26
+ this.args[2],
27
+ ];
28
+ }
29
+ }
@@ -5,4 +5,5 @@ export * from './AaveWithdrawAction';
5
5
  export * from './AaveClaimStkAaveAction';
6
6
  export * from './AaveCollateralSwitchAction';
7
7
  export * from './AaveFinalizeUnstakeAction';
8
- export * from './AaveStartUnstakeAction';
8
+ export * from './AaveStartUnstakeAction';
9
+ export * from './AaveClaimAAVEAction';
package/src/addresses.ts CHANGED
@@ -56,7 +56,7 @@ export const actionAddresses = {
56
56
  AaveWithdraw: '0x754C58fA92246414a448c1ed44ea3D1AD446d482',
57
57
  AaveCollateralSwitch: '0xFf5dfF1B90bd5Aa6E12768AB497dB90cc9DE6F5d',
58
58
  AaveUnstake: '0x2FE4024e350cD2c64D2fd0Db5d16F5cE54Ca0E09',
59
-
59
+ AaveClaimAAVE: '0xd52855bD011F3D87565f9040DdE2A59fB1b27b15',
60
60
  // aave v3
61
61
  AaveV3Withdraw: '0x9D4e4b26A5E2e6Dad30C5d95F5cE78A8310F04C2',
62
62
  AaveV3SwapBorrowRateMode: '0x630F530Ac523C935cf2528E62D0A06F8900C5b1B',