@defisaver/sdk 1.2.10 → 1.2.12-dev-ezeth-weeth
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/etherfi/EtherFiStakeAction.d.ts +20 -0
- package/esm/src/actions/etherfi/EtherFiStakeAction.js +41 -0
- package/esm/src/actions/etherfi/EtherFiUnwrapAction.d.ts +19 -0
- package/esm/src/actions/etherfi/EtherFiUnwrapAction.js +39 -0
- package/esm/src/actions/etherfi/EtherFiWrapAction.d.ts +19 -0
- package/esm/src/actions/etherfi/EtherFiWrapAction.js +39 -0
- package/esm/src/actions/etherfi/index.d.ts +3 -0
- package/esm/src/actions/etherfi/index.js +3 -0
- package/esm/src/actions/index.d.ts +3 -1
- package/esm/src/actions/index.js +3 -1
- package/esm/src/actions/renzo/RenzoStakeAction.d.ts +19 -0
- package/esm/src/actions/renzo/RenzoStakeAction.js +39 -0
- package/esm/src/actions/renzo/index.d.ts +1 -0
- package/esm/src/actions/renzo/index.js +1 -0
- package/esm/src/addresses.d.ts +18 -2
- package/esm/src/addresses.js +9 -2
- package/esm/src/index.d.ts +72 -8
- package/package.json +1 -1
- package/src/actions/etherfi/EtherFiStakeAction.ts +38 -0
- package/src/actions/etherfi/EtherFiUnwrapAction.ts +31 -0
- package/src/actions/etherfi/EtherFiWrapAction.ts +36 -0
- package/src/actions/etherfi/index.ts +3 -0
- package/src/actions/index.ts +4 -0
- package/src/actions/renzo/RenzoStakeAction.ts +33 -0
- package/src/actions/renzo/index.ts +1 -0
- package/src/addresses.ts +11 -2
- package/test/actions/etherFi/EtherFiStakeAction.js +66 -0
- package/test/actions/etherFi/EtherFiUnwrapAction.js +35 -0
- package/test/actions/etherFi/EtherFiWrapAction.js +35 -0
- package/test/actions/renzo/RenzoStakeAction.js +60 -0
- package/umd/index.js +290 -60
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* EtherFiStakeAction - Receives WETH, transforms it to ETH then sends it to EtherFi staking contract receiving eETH in return or weETH if wrapping is enabled
|
|
5
|
+
*
|
|
6
|
+
* @category EtherFi
|
|
7
|
+
*/
|
|
8
|
+
export declare class EtherFiStakeAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount - amount of WETH to pull
|
|
11
|
+
* @param from - address from which to pull WETH from
|
|
12
|
+
* @param to - address where received eETH will be sent to
|
|
13
|
+
* @param shouldWrap - true if received eETH should be wrapped to weETH
|
|
14
|
+
*/
|
|
15
|
+
constructor(amount: uint256, from: EthAddress, to: EthAddress, shouldWrap: boolean);
|
|
16
|
+
getAssetsToApprove(): Promise<{
|
|
17
|
+
asset: string;
|
|
18
|
+
owner: any;
|
|
19
|
+
}[]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import { requireAddress } from '../../utils/general';
|
|
14
|
+
/**
|
|
15
|
+
* EtherFiStakeAction - Receives WETH, transforms it to ETH then sends it to EtherFi staking contract receiving eETH in return or weETH if wrapping is enabled
|
|
16
|
+
*
|
|
17
|
+
* @category EtherFi
|
|
18
|
+
*/
|
|
19
|
+
export class EtherFiStakeAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param amount - amount of WETH to pull
|
|
22
|
+
* @param from - address from which to pull WETH from
|
|
23
|
+
* @param to - address where received eETH will be sent to
|
|
24
|
+
* @param shouldWrap - true if received eETH should be wrapped to weETH
|
|
25
|
+
*/
|
|
26
|
+
constructor(amount, from, to, shouldWrap) {
|
|
27
|
+
requireAddress(to);
|
|
28
|
+
super('EtherFiStake', getAddr('EtherFiStake'), ['uint256', 'address', 'address', 'bool'], [amount, from, to, shouldWrap]);
|
|
29
|
+
this.mappableArgs = [
|
|
30
|
+
this.args[0],
|
|
31
|
+
this.args[1],
|
|
32
|
+
this.args[2],
|
|
33
|
+
this.args[3],
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
getAssetsToApprove() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[1] }];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* EtherFiUnwrapAction - Unwrap weETH and receive eETH
|
|
5
|
+
*
|
|
6
|
+
* @category EtherFi
|
|
7
|
+
*/
|
|
8
|
+
export declare class EtherFiUnwrapAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount - amount of weETH to pull
|
|
11
|
+
* @param from - address from which to pull weETH from
|
|
12
|
+
* @param to - address where received eETH will be sent to
|
|
13
|
+
*/
|
|
14
|
+
constructor(amount: uint256, from: EthAddress, to: EthAddress);
|
|
15
|
+
getAssetsToApprove(): Promise<{
|
|
16
|
+
asset: string;
|
|
17
|
+
owner: any;
|
|
18
|
+
}[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import { requireAddress } from '../../utils/general';
|
|
14
|
+
/**
|
|
15
|
+
* EtherFiUnwrapAction - Unwrap weETH and receive eETH
|
|
16
|
+
*
|
|
17
|
+
* @category EtherFi
|
|
18
|
+
*/
|
|
19
|
+
export class EtherFiUnwrapAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param amount - amount of weETH to pull
|
|
22
|
+
* @param from - address from which to pull weETH from
|
|
23
|
+
* @param to - address where received eETH will be sent to
|
|
24
|
+
*/
|
|
25
|
+
constructor(amount, from, to) {
|
|
26
|
+
requireAddress(to);
|
|
27
|
+
super('EtherFiUnwrap', getAddr('EtherFiUnwrap'), ['uint256', 'address', 'address'], [amount, from, to]);
|
|
28
|
+
this.mappableArgs = [
|
|
29
|
+
this.args[0],
|
|
30
|
+
this.args[1],
|
|
31
|
+
this.args[2],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
getAssetsToApprove() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return [{ asset: getAssetInfo('weETH').address, owner: this.args[1] }];
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* EtherFiWrapAction - Wraps eETH into Wrapped eETH (weETH)
|
|
5
|
+
*
|
|
6
|
+
* @category EtherFi
|
|
7
|
+
*/
|
|
8
|
+
export declare class EtherFiWrapAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount - amount of eETH to pull
|
|
11
|
+
* @param from - address from which to pull eETH from
|
|
12
|
+
* @param to - address where received weETH will be sent to
|
|
13
|
+
*/
|
|
14
|
+
constructor(amount: uint256, from: EthAddress, to: EthAddress);
|
|
15
|
+
getAssetsToApprove(): Promise<{
|
|
16
|
+
asset: string;
|
|
17
|
+
owner: any;
|
|
18
|
+
}[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import { requireAddress } from '../../utils/general';
|
|
14
|
+
/**
|
|
15
|
+
* EtherFiWrapAction - Wraps eETH into Wrapped eETH (weETH)
|
|
16
|
+
*
|
|
17
|
+
* @category EtherFi
|
|
18
|
+
*/
|
|
19
|
+
export class EtherFiWrapAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param amount - amount of eETH to pull
|
|
22
|
+
* @param from - address from which to pull eETH from
|
|
23
|
+
* @param to - address where received weETH will be sent to
|
|
24
|
+
*/
|
|
25
|
+
constructor(amount, from, to) {
|
|
26
|
+
requireAddress(to);
|
|
27
|
+
super('EtherFiWrap', getAddr('EtherFiWrap'), ['uint256', 'address', 'address'], [amount, from, to]);
|
|
28
|
+
this.mappableArgs = [
|
|
29
|
+
this.args[0],
|
|
30
|
+
this.args[1],
|
|
31
|
+
this.args[2],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
getAssetsToApprove() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return [{ asset: getAssetInfo('eETH').address, owner: this.args[1] }];
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -32,4 +32,6 @@ import * as merkl from './merkl';
|
|
|
32
32
|
import * as eulerV2 from './eulerV2';
|
|
33
33
|
import * as sky from './sky';
|
|
34
34
|
import * as stkgho from './stkgho';
|
|
35
|
-
|
|
35
|
+
import * as renzo from './renzo';
|
|
36
|
+
import * as etherfi from './etherfi';
|
|
37
|
+
export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, stkgho, renzo, etherfi, };
|
package/esm/src/actions/index.js
CHANGED
|
@@ -32,4 +32,6 @@ import * as merkl from './merkl';
|
|
|
32
32
|
import * as eulerV2 from './eulerV2';
|
|
33
33
|
import * as sky from './sky';
|
|
34
34
|
import * as stkgho from './stkgho';
|
|
35
|
-
|
|
35
|
+
import * as renzo from './renzo';
|
|
36
|
+
import * as etherfi from './etherfi';
|
|
37
|
+
export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, stkgho, renzo, etherfi, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* RenzoStakeAction - Supplies ETH (action receives WETH) to Renzo for ETH2 Staking. Receives ezETH in return
|
|
5
|
+
*
|
|
6
|
+
* @category Renzo
|
|
7
|
+
*/
|
|
8
|
+
export declare class RenzoStakeAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount - amount of WETH to pull
|
|
11
|
+
* @param from - address from which to pull WETH from
|
|
12
|
+
* @param to - address where received ezETH will be sent to
|
|
13
|
+
*/
|
|
14
|
+
constructor(amount: uint256, from: EthAddress, to: EthAddress);
|
|
15
|
+
getAssetsToApprove(): Promise<{
|
|
16
|
+
asset: string;
|
|
17
|
+
owner: any;
|
|
18
|
+
}[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import { requireAddress } from '../../utils/general';
|
|
14
|
+
/**
|
|
15
|
+
* RenzoStakeAction - Supplies ETH (action receives WETH) to Renzo for ETH2 Staking. Receives ezETH in return
|
|
16
|
+
*
|
|
17
|
+
* @category Renzo
|
|
18
|
+
*/
|
|
19
|
+
export class RenzoStakeAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param amount - amount of WETH to pull
|
|
22
|
+
* @param from - address from which to pull WETH from
|
|
23
|
+
* @param to - address where received ezETH will be sent to
|
|
24
|
+
*/
|
|
25
|
+
constructor(amount, from, to) {
|
|
26
|
+
requireAddress(to);
|
|
27
|
+
super('RenzoStake', getAddr('RenzoStake'), ['uint256', 'address', 'address'], [amount, from, to]);
|
|
28
|
+
this.mappableArgs = [
|
|
29
|
+
this.args[0],
|
|
30
|
+
this.args[1],
|
|
31
|
+
this.args[2],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
getAssetsToApprove() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[1] }];
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RenzoStakeAction';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RenzoStakeAction';
|
package/esm/src/addresses.d.ts
CHANGED
|
@@ -222,6 +222,10 @@ export declare const actionAddresses: {
|
|
|
222
222
|
EulerV2CollateralSwitch: string;
|
|
223
223
|
EulerV2View: string;
|
|
224
224
|
MerklClaim: string;
|
|
225
|
+
RenzoStake: string;
|
|
226
|
+
EtherFiStake: string;
|
|
227
|
+
EtherFiWrap: string;
|
|
228
|
+
EtherFiUnwrap: string;
|
|
225
229
|
AaveV3DelegateCredit?: undefined;
|
|
226
230
|
AaveV3RatioTrigger?: undefined;
|
|
227
231
|
GasFeeTakerL2?: undefined;
|
|
@@ -453,6 +457,10 @@ export declare const actionAddresses: {
|
|
|
453
457
|
EulerV2CollateralSwitch?: undefined;
|
|
454
458
|
EulerV2View?: undefined;
|
|
455
459
|
MerklClaim?: undefined;
|
|
460
|
+
RenzoStake?: undefined;
|
|
461
|
+
EtherFiStake?: undefined;
|
|
462
|
+
EtherFiWrap?: undefined;
|
|
463
|
+
EtherFiUnwrap?: undefined;
|
|
456
464
|
MorphoBlueView?: undefined;
|
|
457
465
|
} | {
|
|
458
466
|
DFSSell: string;
|
|
@@ -678,6 +686,10 @@ export declare const actionAddresses: {
|
|
|
678
686
|
EulerV2CollateralSwitch?: undefined;
|
|
679
687
|
EulerV2View?: undefined;
|
|
680
688
|
MerklClaim?: undefined;
|
|
689
|
+
RenzoStake?: undefined;
|
|
690
|
+
EtherFiStake?: undefined;
|
|
691
|
+
EtherFiWrap?: undefined;
|
|
692
|
+
EtherFiUnwrap?: undefined;
|
|
681
693
|
AaveV3DelegateCredit?: undefined;
|
|
682
694
|
AaveV3RatioTrigger?: undefined;
|
|
683
695
|
MorphoBlueView?: undefined;
|
|
@@ -695,6 +707,8 @@ export declare const actionAddresses: {
|
|
|
695
707
|
PermitToken: string;
|
|
696
708
|
HandleAuth: string;
|
|
697
709
|
ToggleSub: string;
|
|
710
|
+
CreateSub: string;
|
|
711
|
+
UpdateSub: string;
|
|
698
712
|
FLAaveV3: string;
|
|
699
713
|
FLBalancer: string;
|
|
700
714
|
FLUniV3: string;
|
|
@@ -729,9 +743,7 @@ export declare const actionAddresses: {
|
|
|
729
743
|
MorphoBlueView: string;
|
|
730
744
|
AutomationV2Unsub?: undefined;
|
|
731
745
|
SendTokenAndUnwrap?: undefined;
|
|
732
|
-
UpdateSub?: undefined;
|
|
733
746
|
TransferNFT?: undefined;
|
|
734
|
-
CreateSub?: undefined;
|
|
735
747
|
SDaiWrap?: undefined;
|
|
736
748
|
SDaiUnwrap?: undefined;
|
|
737
749
|
TokenizedVaultAdapter?: undefined;
|
|
@@ -904,6 +916,10 @@ export declare const actionAddresses: {
|
|
|
904
916
|
EulerV2CollateralSwitch?: undefined;
|
|
905
917
|
EulerV2View?: undefined;
|
|
906
918
|
MerklClaim?: undefined;
|
|
919
|
+
RenzoStake?: undefined;
|
|
920
|
+
EtherFiStake?: undefined;
|
|
921
|
+
EtherFiWrap?: undefined;
|
|
922
|
+
EtherFiUnwrap?: undefined;
|
|
907
923
|
AaveV3DelegateCredit?: undefined;
|
|
908
924
|
AaveV3RatioTrigger?: undefined;
|
|
909
925
|
GasFeeTakerL2?: undefined;
|
package/esm/src/addresses.js
CHANGED
|
@@ -80,7 +80,7 @@ export const actionAddresses = {
|
|
|
80
80
|
LSVBorrow: '0x7dFB434527Fdb39854156cDBa9bF4799E36E7e82',
|
|
81
81
|
LSVSupply: '0x984c00DC098c98bed1CDfe2Ed786Fe1443da6671',
|
|
82
82
|
LSVPayback: '0x10749CE97583dBcEb54a083386CC8438C4e0FE65',
|
|
83
|
-
LSVSell: '
|
|
83
|
+
LSVSell: '0x10B748Dc504C2515Bb6A9e23CB2F686090b6c584',
|
|
84
84
|
// morpho aave v2
|
|
85
85
|
MorphoAaveV2Borrow: '0xa85C3E41Bf9F75a381927e1Aa9b00f77C4631109',
|
|
86
86
|
MorphoAaveV2Payback: '0x5dd0E0835acbb08aa4A4599d70fB2d93969fa7b7',
|
|
@@ -122,7 +122,7 @@ export const actionAddresses = {
|
|
|
122
122
|
FLMaker: '0x0f8C3368cADF78167F5355D746Ed7b2A826A6e3b',
|
|
123
123
|
FLBalancer: '0x93d333930c7f7260a1E6061B0a8C0CbdEC95F367',
|
|
124
124
|
FLSpark: '0xe9Fe5a0f5e4B370Ae60d837da58744666D5C06F7',
|
|
125
|
-
FLAction: '
|
|
125
|
+
FLAction: '0x5f1dC84Ba060Ea3f7429c6A7bBEdd9243CF1209b',
|
|
126
126
|
FLUniV3: '0x9CAdAC8Be718572F82B672b950c53F0b58483A35',
|
|
127
127
|
FLGho: '0xbb67b81dD080a406227A38965d0393f396ddECBc',
|
|
128
128
|
FLMorphoBlue: '0x6206C96EAc5EAC546861438A9f953B6BEa50EBAB',
|
|
@@ -255,6 +255,11 @@ export const actionAddresses = {
|
|
|
255
255
|
EulerV2CollateralSwitch: '0x38950b50Fb38aC19D06e8CE5AAE632D6dF1EEb1a',
|
|
256
256
|
EulerV2View: '0x8932E46Ecf96b5Fe033F5e27Ab6dC755Cb668967',
|
|
257
257
|
MerklClaim: '0xE88036F3F0D7e216D63726356cA2bC334e305fe5',
|
|
258
|
+
RenzoStake: '0x1E68038608F181432F666bbD2FB5C5a2E1Bf8fd4',
|
|
259
|
+
// etherFi
|
|
260
|
+
EtherFiStake: '0x8D9cDA62DC7Bf75f687c6C8729ABB51ac82E20d5',
|
|
261
|
+
EtherFiWrap: '0x2b10B000292745099Deb15304A247c0816bd8b73',
|
|
262
|
+
EtherFiUnwrap: '0xDd5F7bf1009Edc3EE55AfcD70D417968bf4647C6',
|
|
258
263
|
},
|
|
259
264
|
[NETWORKS.optimism.chainId]: {
|
|
260
265
|
DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
|
|
@@ -386,6 +391,8 @@ export const actionAddresses = {
|
|
|
386
391
|
PermitToken: '0x57c8ae94a5A11dA33e0518054102488b604628D0',
|
|
387
392
|
HandleAuth: '0x18a90e6db79199ace00140631ef931e0bd97837c',
|
|
388
393
|
ToggleSub: '0x5F16C0a08d52b67fc73706c494F7535Dd3382b58',
|
|
394
|
+
CreateSub: '0xeE739937085A716477BCB5b01b0f74e1BE046645',
|
|
395
|
+
UpdateSub: '0x1601c6ABCDE6e6d8Ad96628AFe20d47908127Aea',
|
|
389
396
|
// Flashloan
|
|
390
397
|
FLAaveV3: '0x79Eb9cEe432Cd3e7b09A9eFdB21A733A6d7b4c3A',
|
|
391
398
|
FLBalancer: '0x862E533198C9656B75bB6A5dDF0953F7ED5E8507',
|
package/esm/src/index.d.ts
CHANGED
|
@@ -233,6 +233,10 @@ declare const actionAddressesAllChains: {
|
|
|
233
233
|
EulerV2CollateralSwitch: string;
|
|
234
234
|
EulerV2View: string;
|
|
235
235
|
MerklClaim: string;
|
|
236
|
+
RenzoStake: string;
|
|
237
|
+
EtherFiStake: string;
|
|
238
|
+
EtherFiWrap: string;
|
|
239
|
+
EtherFiUnwrap: string;
|
|
236
240
|
AaveV3DelegateCredit?: undefined;
|
|
237
241
|
AaveV3RatioTrigger?: undefined;
|
|
238
242
|
GasFeeTakerL2?: undefined;
|
|
@@ -464,6 +468,10 @@ declare const actionAddressesAllChains: {
|
|
|
464
468
|
EulerV2CollateralSwitch?: undefined;
|
|
465
469
|
EulerV2View?: undefined;
|
|
466
470
|
MerklClaim?: undefined;
|
|
471
|
+
RenzoStake?: undefined;
|
|
472
|
+
EtherFiStake?: undefined;
|
|
473
|
+
EtherFiWrap?: undefined;
|
|
474
|
+
EtherFiUnwrap?: undefined;
|
|
467
475
|
MorphoBlueView?: undefined;
|
|
468
476
|
} | {
|
|
469
477
|
DFSSell: string;
|
|
@@ -689,6 +697,10 @@ declare const actionAddressesAllChains: {
|
|
|
689
697
|
EulerV2CollateralSwitch?: undefined;
|
|
690
698
|
EulerV2View?: undefined;
|
|
691
699
|
MerklClaim?: undefined;
|
|
700
|
+
RenzoStake?: undefined;
|
|
701
|
+
EtherFiStake?: undefined;
|
|
702
|
+
EtherFiWrap?: undefined;
|
|
703
|
+
EtherFiUnwrap?: undefined;
|
|
692
704
|
AaveV3DelegateCredit?: undefined;
|
|
693
705
|
AaveV3RatioTrigger?: undefined;
|
|
694
706
|
MorphoBlueView?: undefined;
|
|
@@ -706,6 +718,8 @@ declare const actionAddressesAllChains: {
|
|
|
706
718
|
PermitToken: string;
|
|
707
719
|
HandleAuth: string;
|
|
708
720
|
ToggleSub: string;
|
|
721
|
+
CreateSub: string;
|
|
722
|
+
UpdateSub: string;
|
|
709
723
|
FLAaveV3: string;
|
|
710
724
|
FLBalancer: string;
|
|
711
725
|
FLUniV3: string;
|
|
@@ -740,9 +754,7 @@ declare const actionAddressesAllChains: {
|
|
|
740
754
|
MorphoBlueView: string;
|
|
741
755
|
AutomationV2Unsub?: undefined;
|
|
742
756
|
SendTokenAndUnwrap?: undefined;
|
|
743
|
-
UpdateSub?: undefined;
|
|
744
757
|
TransferNFT?: undefined;
|
|
745
|
-
CreateSub?: undefined;
|
|
746
758
|
SDaiWrap?: undefined;
|
|
747
759
|
SDaiUnwrap?: undefined;
|
|
748
760
|
TokenizedVaultAdapter?: undefined;
|
|
@@ -915,6 +927,10 @@ declare const actionAddressesAllChains: {
|
|
|
915
927
|
EulerV2CollateralSwitch?: undefined;
|
|
916
928
|
EulerV2View?: undefined;
|
|
917
929
|
MerklClaim?: undefined;
|
|
930
|
+
RenzoStake?: undefined;
|
|
931
|
+
EtherFiStake?: undefined;
|
|
932
|
+
EtherFiWrap?: undefined;
|
|
933
|
+
EtherFiUnwrap?: undefined;
|
|
918
934
|
AaveV3DelegateCredit?: undefined;
|
|
919
935
|
AaveV3RatioTrigger?: undefined;
|
|
920
936
|
GasFeeTakerL2?: undefined;
|
|
@@ -1143,6 +1159,10 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1143
1159
|
EulerV2CollateralSwitch: string;
|
|
1144
1160
|
EulerV2View: string;
|
|
1145
1161
|
MerklClaim: string;
|
|
1162
|
+
RenzoStake: string;
|
|
1163
|
+
EtherFiStake: string;
|
|
1164
|
+
EtherFiWrap: string;
|
|
1165
|
+
EtherFiUnwrap: string;
|
|
1146
1166
|
AaveV3DelegateCredit?: undefined;
|
|
1147
1167
|
AaveV3RatioTrigger?: undefined;
|
|
1148
1168
|
GasFeeTakerL2?: undefined;
|
|
@@ -1374,6 +1394,10 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1374
1394
|
EulerV2CollateralSwitch?: undefined;
|
|
1375
1395
|
EulerV2View?: undefined;
|
|
1376
1396
|
MerklClaim?: undefined;
|
|
1397
|
+
RenzoStake?: undefined;
|
|
1398
|
+
EtherFiStake?: undefined;
|
|
1399
|
+
EtherFiWrap?: undefined;
|
|
1400
|
+
EtherFiUnwrap?: undefined;
|
|
1377
1401
|
MorphoBlueView?: undefined;
|
|
1378
1402
|
} | {
|
|
1379
1403
|
DFSSell: string;
|
|
@@ -1599,6 +1623,10 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1599
1623
|
EulerV2CollateralSwitch?: undefined;
|
|
1600
1624
|
EulerV2View?: undefined;
|
|
1601
1625
|
MerklClaim?: undefined;
|
|
1626
|
+
RenzoStake?: undefined;
|
|
1627
|
+
EtherFiStake?: undefined;
|
|
1628
|
+
EtherFiWrap?: undefined;
|
|
1629
|
+
EtherFiUnwrap?: undefined;
|
|
1602
1630
|
AaveV3DelegateCredit?: undefined;
|
|
1603
1631
|
AaveV3RatioTrigger?: undefined;
|
|
1604
1632
|
MorphoBlueView?: undefined;
|
|
@@ -1616,6 +1644,8 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1616
1644
|
PermitToken: string;
|
|
1617
1645
|
HandleAuth: string;
|
|
1618
1646
|
ToggleSub: string;
|
|
1647
|
+
CreateSub: string;
|
|
1648
|
+
UpdateSub: string;
|
|
1619
1649
|
FLAaveV3: string;
|
|
1620
1650
|
FLBalancer: string;
|
|
1621
1651
|
FLUniV3: string;
|
|
@@ -1650,9 +1680,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1650
1680
|
MorphoBlueView: string;
|
|
1651
1681
|
AutomationV2Unsub?: undefined;
|
|
1652
1682
|
SendTokenAndUnwrap?: undefined;
|
|
1653
|
-
UpdateSub?: undefined;
|
|
1654
1683
|
TransferNFT?: undefined;
|
|
1655
|
-
CreateSub?: undefined;
|
|
1656
1684
|
SDaiWrap?: undefined;
|
|
1657
1685
|
SDaiUnwrap?: undefined;
|
|
1658
1686
|
TokenizedVaultAdapter?: undefined;
|
|
@@ -1825,6 +1853,10 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
1825
1853
|
EulerV2CollateralSwitch?: undefined;
|
|
1826
1854
|
EulerV2View?: undefined;
|
|
1827
1855
|
MerklClaim?: undefined;
|
|
1856
|
+
RenzoStake?: undefined;
|
|
1857
|
+
EtherFiStake?: undefined;
|
|
1858
|
+
EtherFiWrap?: undefined;
|
|
1859
|
+
EtherFiUnwrap?: undefined;
|
|
1828
1860
|
AaveV3DelegateCredit?: undefined;
|
|
1829
1861
|
AaveV3RatioTrigger?: undefined;
|
|
1830
1862
|
GasFeeTakerL2?: undefined;
|
|
@@ -2196,6 +2228,10 @@ declare const _default: {
|
|
|
2196
2228
|
EulerV2CollateralSwitch: string;
|
|
2197
2229
|
EulerV2View: string;
|
|
2198
2230
|
MerklClaim: string;
|
|
2231
|
+
RenzoStake: string;
|
|
2232
|
+
EtherFiStake: string;
|
|
2233
|
+
EtherFiWrap: string;
|
|
2234
|
+
EtherFiUnwrap: string;
|
|
2199
2235
|
AaveV3DelegateCredit?: undefined;
|
|
2200
2236
|
AaveV3RatioTrigger?: undefined;
|
|
2201
2237
|
GasFeeTakerL2?: undefined;
|
|
@@ -2427,6 +2463,10 @@ declare const _default: {
|
|
|
2427
2463
|
EulerV2CollateralSwitch?: undefined;
|
|
2428
2464
|
EulerV2View?: undefined;
|
|
2429
2465
|
MerklClaim?: undefined;
|
|
2466
|
+
RenzoStake?: undefined;
|
|
2467
|
+
EtherFiStake?: undefined;
|
|
2468
|
+
EtherFiWrap?: undefined;
|
|
2469
|
+
EtherFiUnwrap?: undefined;
|
|
2430
2470
|
MorphoBlueView?: undefined;
|
|
2431
2471
|
} | {
|
|
2432
2472
|
DFSSell: string;
|
|
@@ -2652,6 +2692,10 @@ declare const _default: {
|
|
|
2652
2692
|
EulerV2CollateralSwitch?: undefined;
|
|
2653
2693
|
EulerV2View?: undefined;
|
|
2654
2694
|
MerklClaim?: undefined;
|
|
2695
|
+
RenzoStake?: undefined;
|
|
2696
|
+
EtherFiStake?: undefined;
|
|
2697
|
+
EtherFiWrap?: undefined;
|
|
2698
|
+
EtherFiUnwrap?: undefined;
|
|
2655
2699
|
AaveV3DelegateCredit?: undefined;
|
|
2656
2700
|
AaveV3RatioTrigger?: undefined;
|
|
2657
2701
|
MorphoBlueView?: undefined;
|
|
@@ -2669,6 +2713,8 @@ declare const _default: {
|
|
|
2669
2713
|
PermitToken: string;
|
|
2670
2714
|
HandleAuth: string;
|
|
2671
2715
|
ToggleSub: string;
|
|
2716
|
+
CreateSub: string;
|
|
2717
|
+
UpdateSub: string;
|
|
2672
2718
|
FLAaveV3: string;
|
|
2673
2719
|
FLBalancer: string;
|
|
2674
2720
|
FLUniV3: string;
|
|
@@ -2703,9 +2749,7 @@ declare const _default: {
|
|
|
2703
2749
|
MorphoBlueView: string;
|
|
2704
2750
|
AutomationV2Unsub?: undefined;
|
|
2705
2751
|
SendTokenAndUnwrap?: undefined;
|
|
2706
|
-
UpdateSub?: undefined;
|
|
2707
2752
|
TransferNFT?: undefined;
|
|
2708
|
-
CreateSub?: undefined;
|
|
2709
2753
|
SDaiWrap?: undefined;
|
|
2710
2754
|
SDaiUnwrap?: undefined;
|
|
2711
2755
|
TokenizedVaultAdapter?: undefined;
|
|
@@ -2878,6 +2922,10 @@ declare const _default: {
|
|
|
2878
2922
|
EulerV2CollateralSwitch?: undefined;
|
|
2879
2923
|
EulerV2View?: undefined;
|
|
2880
2924
|
MerklClaim?: undefined;
|
|
2925
|
+
RenzoStake?: undefined;
|
|
2926
|
+
EtherFiStake?: undefined;
|
|
2927
|
+
EtherFiWrap?: undefined;
|
|
2928
|
+
EtherFiUnwrap?: undefined;
|
|
2881
2929
|
AaveV3DelegateCredit?: undefined;
|
|
2882
2930
|
AaveV3RatioTrigger?: undefined;
|
|
2883
2931
|
GasFeeTakerL2?: undefined;
|
|
@@ -3106,6 +3154,10 @@ declare const _default: {
|
|
|
3106
3154
|
EulerV2CollateralSwitch: string;
|
|
3107
3155
|
EulerV2View: string;
|
|
3108
3156
|
MerklClaim: string;
|
|
3157
|
+
RenzoStake: string;
|
|
3158
|
+
EtherFiStake: string;
|
|
3159
|
+
EtherFiWrap: string;
|
|
3160
|
+
EtherFiUnwrap: string;
|
|
3109
3161
|
AaveV3DelegateCredit?: undefined;
|
|
3110
3162
|
AaveV3RatioTrigger?: undefined;
|
|
3111
3163
|
GasFeeTakerL2?: undefined;
|
|
@@ -3337,6 +3389,10 @@ declare const _default: {
|
|
|
3337
3389
|
EulerV2CollateralSwitch?: undefined;
|
|
3338
3390
|
EulerV2View?: undefined;
|
|
3339
3391
|
MerklClaim?: undefined;
|
|
3392
|
+
RenzoStake?: undefined;
|
|
3393
|
+
EtherFiStake?: undefined;
|
|
3394
|
+
EtherFiWrap?: undefined;
|
|
3395
|
+
EtherFiUnwrap?: undefined;
|
|
3340
3396
|
MorphoBlueView?: undefined;
|
|
3341
3397
|
} | {
|
|
3342
3398
|
DFSSell: string;
|
|
@@ -3562,6 +3618,10 @@ declare const _default: {
|
|
|
3562
3618
|
EulerV2CollateralSwitch?: undefined;
|
|
3563
3619
|
EulerV2View?: undefined;
|
|
3564
3620
|
MerklClaim?: undefined;
|
|
3621
|
+
RenzoStake?: undefined;
|
|
3622
|
+
EtherFiStake?: undefined;
|
|
3623
|
+
EtherFiWrap?: undefined;
|
|
3624
|
+
EtherFiUnwrap?: undefined;
|
|
3565
3625
|
AaveV3DelegateCredit?: undefined;
|
|
3566
3626
|
AaveV3RatioTrigger?: undefined;
|
|
3567
3627
|
MorphoBlueView?: undefined;
|
|
@@ -3579,6 +3639,8 @@ declare const _default: {
|
|
|
3579
3639
|
PermitToken: string;
|
|
3580
3640
|
HandleAuth: string;
|
|
3581
3641
|
ToggleSub: string;
|
|
3642
|
+
CreateSub: string;
|
|
3643
|
+
UpdateSub: string;
|
|
3582
3644
|
FLAaveV3: string;
|
|
3583
3645
|
FLBalancer: string;
|
|
3584
3646
|
FLUniV3: string;
|
|
@@ -3613,9 +3675,7 @@ declare const _default: {
|
|
|
3613
3675
|
MorphoBlueView: string;
|
|
3614
3676
|
AutomationV2Unsub?: undefined;
|
|
3615
3677
|
SendTokenAndUnwrap?: undefined;
|
|
3616
|
-
UpdateSub?: undefined;
|
|
3617
3678
|
TransferNFT?: undefined;
|
|
3618
|
-
CreateSub?: undefined;
|
|
3619
3679
|
SDaiWrap?: undefined;
|
|
3620
3680
|
SDaiUnwrap?: undefined;
|
|
3621
3681
|
TokenizedVaultAdapter?: undefined;
|
|
@@ -3788,6 +3848,10 @@ declare const _default: {
|
|
|
3788
3848
|
EulerV2CollateralSwitch?: undefined;
|
|
3789
3849
|
EulerV2View?: undefined;
|
|
3790
3850
|
MerklClaim?: undefined;
|
|
3851
|
+
RenzoStake?: undefined;
|
|
3852
|
+
EtherFiStake?: undefined;
|
|
3853
|
+
EtherFiWrap?: undefined;
|
|
3854
|
+
EtherFiUnwrap?: undefined;
|
|
3791
3855
|
AaveV3DelegateCredit?: undefined;
|
|
3792
3856
|
AaveV3RatioTrigger?: undefined;
|
|
3793
3857
|
GasFeeTakerL2?: undefined;
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
2
|
+
import { Action } from '../../Action';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
import { EthAddress, uint256 } from '../../types';
|
|
5
|
+
import { requireAddress } from '../../utils/general';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* EtherFiStakeAction - Receives WETH, transforms it to ETH then sends it to EtherFi staking contract receiving eETH in return or weETH if wrapping is enabled
|
|
9
|
+
*
|
|
10
|
+
* @category EtherFi
|
|
11
|
+
*/
|
|
12
|
+
export class EtherFiStakeAction extends Action {
|
|
13
|
+
/**
|
|
14
|
+
* @param amount - amount of WETH to pull
|
|
15
|
+
* @param from - address from which to pull WETH from
|
|
16
|
+
* @param to - address where received eETH will be sent to
|
|
17
|
+
* @param shouldWrap - true if received eETH should be wrapped to weETH
|
|
18
|
+
*/
|
|
19
|
+
constructor(amount:uint256, from:EthAddress, to:EthAddress, shouldWrap:boolean) {
|
|
20
|
+
requireAddress(to);
|
|
21
|
+
super(
|
|
22
|
+
'EtherFiStake',
|
|
23
|
+
getAddr('EtherFiStake'),
|
|
24
|
+
['uint256', 'address', 'address', 'bool'],
|
|
25
|
+
[amount, from, to, shouldWrap],
|
|
26
|
+
);
|
|
27
|
+
this.mappableArgs = [
|
|
28
|
+
this.args[0],
|
|
29
|
+
this.args[1],
|
|
30
|
+
this.args[2],
|
|
31
|
+
this.args[3],
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async getAssetsToApprove() {
|
|
36
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[1] }];
|
|
37
|
+
}
|
|
38
|
+
}
|