@defisaver/sdk 1.2.12 → 1.2.13-dev1
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/curveusd/CurveUsdLevCreateTransientAction.d.ts +9 -0
- package/esm/src/actions/curveusd/CurveUsdLevCreateTransientAction.js +33 -0
- package/esm/src/actions/curveusd/CurveUsdRepayTransientAction.d.ts +9 -0
- package/esm/src/actions/curveusd/CurveUsdRepayTransientAction.js +25 -0
- package/esm/src/actions/curveusd/CurveUsdSelfLiquidateWithCollTransientAction.d.ts +9 -0
- package/esm/src/actions/curveusd/CurveUsdSelfLiquidateWithCollTransientAction.js +35 -0
- package/esm/src/actions/curveusd/index.d.ts +3 -0
- package/esm/src/actions/curveusd/index.js +3 -0
- 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/flashloan/CurveUsdFlashLoanAction.d.ts +17 -0
- package/esm/src/actions/flashloan/CurveUsdFlashLoanAction.js +18 -0
- package/esm/src/actions/flashloan/index.d.ts +1 -0
- package/esm/src/actions/flashloan/index.js +1 -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 +36 -0
- package/esm/src/addresses.js +13 -3
- package/esm/src/index.d.ts +144 -0
- package/package.json +1 -1
- package/src/actions/curveusd/CurveUsdLevCreateTransientAction.ts +52 -0
- package/src/actions/curveusd/CurveUsdRepayTransientAction.ts +36 -0
- package/src/actions/curveusd/CurveUsdSelfLiquidateWithCollTransientAction.ts +55 -0
- package/src/actions/curveusd/index.ts +4 -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/flashloan/CurveUsdFlashLoanAction.ts +27 -0
- package/src/actions/flashloan/index.ts +1 -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 +15 -3
- 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 +848 -494
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category CurveUsd
|
|
6
|
+
*/
|
|
7
|
+
export declare class CurveUsdLevCreateTransientAction extends Action {
|
|
8
|
+
constructor(controllerAddress: EthAddress, from: EthAddress, collateralAmount: uint256, nBands: uint256, exchangeOrder: Array<any>, gasUsed: uint32);
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @category CurveUsd
|
|
7
|
+
*/
|
|
8
|
+
export class CurveUsdLevCreateTransientAction extends Action {
|
|
9
|
+
constructor(controllerAddress, from, collateralAmount, nBands, exchangeOrder, gasUsed) {
|
|
10
|
+
requireAddress(from);
|
|
11
|
+
super('CurveUsdLevCreateTransient', getAddr('CurveUsdLevCreateTransient'), [
|
|
12
|
+
'address',
|
|
13
|
+
'address',
|
|
14
|
+
'uint256',
|
|
15
|
+
'uint256',
|
|
16
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
17
|
+
'uint32',
|
|
18
|
+
], [
|
|
19
|
+
controllerAddress,
|
|
20
|
+
from,
|
|
21
|
+
collateralAmount,
|
|
22
|
+
nBands,
|
|
23
|
+
exchangeOrder,
|
|
24
|
+
gasUsed,
|
|
25
|
+
]);
|
|
26
|
+
this.mappableArgs = [
|
|
27
|
+
this.args[0],
|
|
28
|
+
this.args[1],
|
|
29
|
+
this.args[2],
|
|
30
|
+
this.args[3],
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category CurveUsd
|
|
6
|
+
*/
|
|
7
|
+
export declare class CurveUsdRepayTransientAction extends Action {
|
|
8
|
+
constructor(controllerAddress: EthAddress, to: EthAddress, exchangeOrder: Array<any>, gasUsed: uint32);
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category CurveUsd
|
|
6
|
+
*/
|
|
7
|
+
export class CurveUsdRepayTransientAction extends Action {
|
|
8
|
+
constructor(controllerAddress, to, exchangeOrder, gasUsed) {
|
|
9
|
+
super('CurveUsdRepayTransient', getAddr('CurveUsdRepayTransient'), [
|
|
10
|
+
'address',
|
|
11
|
+
'address',
|
|
12
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
13
|
+
'uint32',
|
|
14
|
+
], [
|
|
15
|
+
controllerAddress,
|
|
16
|
+
to,
|
|
17
|
+
exchangeOrder,
|
|
18
|
+
gasUsed,
|
|
19
|
+
]);
|
|
20
|
+
this.mappableArgs = [
|
|
21
|
+
this.args[0],
|
|
22
|
+
this.args[1],
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint32 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category CurveUsd
|
|
6
|
+
*/
|
|
7
|
+
export declare class CurveUsdSelfLiquidateWithCollTransientAction extends Action {
|
|
8
|
+
constructor(controllerAddress: EthAddress, percentage: uint256, minCrvUsdExpected: uint256, to: EthAddress, exchangeOrder: Array<any>, sellAllCollateral: boolean, gasUsed: uint32);
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @category CurveUsd
|
|
7
|
+
*/
|
|
8
|
+
export class CurveUsdSelfLiquidateWithCollTransientAction extends Action {
|
|
9
|
+
constructor(controllerAddress, percentage, minCrvUsdExpected, to, exchangeOrder, sellAllCollateral, gasUsed) {
|
|
10
|
+
requireAddress(to);
|
|
11
|
+
super('CurveUsdSelfLiquidateWithCollTransient', getAddr('CurveUsdSelfLiquidateWithCollTransient'), [
|
|
12
|
+
'address',
|
|
13
|
+
'uint256',
|
|
14
|
+
'uint256',
|
|
15
|
+
'address',
|
|
16
|
+
['address', 'address', 'uint256', 'uint256', 'uint256', 'uint256', 'address', 'address', 'bytes', ['address', 'address', 'address', 'uint256', 'uint256', 'bytes']],
|
|
17
|
+
'bool',
|
|
18
|
+
'uint32',
|
|
19
|
+
], [
|
|
20
|
+
controllerAddress,
|
|
21
|
+
percentage,
|
|
22
|
+
minCrvUsdExpected,
|
|
23
|
+
to,
|
|
24
|
+
exchangeOrder,
|
|
25
|
+
sellAllCollateral,
|
|
26
|
+
gasUsed,
|
|
27
|
+
]);
|
|
28
|
+
this.mappableArgs = [
|
|
29
|
+
this.args[0],
|
|
30
|
+
this.args[1],
|
|
31
|
+
this.args[2],
|
|
32
|
+
this.args[3],
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -9,3 +9,6 @@ export * from './CurveUsdLevCreateAction';
|
|
|
9
9
|
export * from './CurveUsdSelfLiquidateWithCollAction';
|
|
10
10
|
export * from './CurveUsdAdjustAction';
|
|
11
11
|
export * from './CurveUsdGetDebtAction';
|
|
12
|
+
export * from './CurveUsdLevCreateTransientAction';
|
|
13
|
+
export * from './CurveUsdRepayTransientAction';
|
|
14
|
+
export * from './CurveUsdSelfLiquidateWithCollTransientAction';
|
|
@@ -9,3 +9,6 @@ export * from './CurveUsdLevCreateAction';
|
|
|
9
9
|
export * from './CurveUsdSelfLiquidateWithCollAction';
|
|
10
10
|
export * from './CurveUsdAdjustAction';
|
|
11
11
|
export * from './CurveUsdGetDebtAction';
|
|
12
|
+
export * from './CurveUsdLevCreateTransientAction';
|
|
13
|
+
export * from './CurveUsdRepayTransientAction';
|
|
14
|
+
export * from './CurveUsdSelfLiquidateWithCollTransientAction';
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, bytes } from '../../types';
|
|
3
|
+
import { FlashLoanId } from './FlashLoanId';
|
|
4
|
+
/**
|
|
5
|
+
* Gets a crvUSD flashloan from CurveUsd Flash Minter
|
|
6
|
+
*
|
|
7
|
+
* @category Flashloans
|
|
8
|
+
*/
|
|
9
|
+
export declare class CurveUsdFlashLoanAction extends Action implements FlashLoanId {
|
|
10
|
+
flashLoanId: number;
|
|
11
|
+
/**
|
|
12
|
+
* @param amount
|
|
13
|
+
* @param flParamGetterAddr
|
|
14
|
+
* @param flParamGetterData
|
|
15
|
+
*/
|
|
16
|
+
constructor(amount: uint256, flParamGetterAddr?: EthAddress, flParamGetterData?: bytes);
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a crvUSD flashloan from CurveUsd Flash Minter
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export class CurveUsdFlashLoanAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param amount
|
|
11
|
+
* @param flParamGetterAddr
|
|
12
|
+
* @param flParamGetterData
|
|
13
|
+
*/
|
|
14
|
+
constructor(amount, flParamGetterAddr = getAddr('Empty'), flParamGetterData = []) {
|
|
15
|
+
super('FLAction', getAddr('FLAction'), ['address[]', 'uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'], [[], [amount], [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]);
|
|
16
|
+
this.flashLoanId = 9;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -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
|
@@ -22,6 +22,7 @@ export declare const actionAddresses: {
|
|
|
22
22
|
PermitToken: string;
|
|
23
23
|
StarknetClaim: string;
|
|
24
24
|
HandleAuth: string;
|
|
25
|
+
SendTokens: string;
|
|
25
26
|
DFSSell: string;
|
|
26
27
|
SkyStake: string;
|
|
27
28
|
SkyUnstake: string;
|
|
@@ -190,11 +191,15 @@ export declare const actionAddresses: {
|
|
|
190
191
|
CurveUsdLevCreate: string;
|
|
191
192
|
CurveUsdRepay: string;
|
|
192
193
|
CurveUsdSwapper: string;
|
|
194
|
+
CurveUsdSwapperTransient: string;
|
|
193
195
|
CurveUsdSelfLiquidate: string;
|
|
194
196
|
CurveUsdSelfLiquidateWithColl: string;
|
|
195
197
|
CurveUsdGetDebt: string;
|
|
196
198
|
CurveUsdCollRatioTrigger: string;
|
|
197
199
|
CurveUsdCollRatioCheck: string;
|
|
200
|
+
CurveUsdSelfLiquidateWithCollTransient: string;
|
|
201
|
+
CurveUsdLevCreateTransient: string;
|
|
202
|
+
CurveUsdRepayTransient: string;
|
|
198
203
|
MorphoBlueSupply: string;
|
|
199
204
|
MorphoBlueSupplyCollateral: string;
|
|
200
205
|
MorphoBlueWithdraw: string;
|
|
@@ -222,6 +227,10 @@ export declare const actionAddresses: {
|
|
|
222
227
|
EulerV2CollateralSwitch: string;
|
|
223
228
|
EulerV2View: string;
|
|
224
229
|
MerklClaim: string;
|
|
230
|
+
RenzoStake: string;
|
|
231
|
+
EtherFiStake: string;
|
|
232
|
+
EtherFiWrap: string;
|
|
233
|
+
EtherFiUnwrap: string;
|
|
225
234
|
AaveV3DelegateCredit?: undefined;
|
|
226
235
|
AaveV3RatioTrigger?: undefined;
|
|
227
236
|
GasFeeTakerL2?: undefined;
|
|
@@ -280,6 +289,7 @@ export declare const actionAddresses: {
|
|
|
280
289
|
SDaiWrap?: undefined;
|
|
281
290
|
SDaiUnwrap?: undefined;
|
|
282
291
|
StarknetClaim?: undefined;
|
|
292
|
+
SendTokens?: undefined;
|
|
283
293
|
SkyStake?: undefined;
|
|
284
294
|
SkyUnstake?: undefined;
|
|
285
295
|
SkyClaimRewards?: undefined;
|
|
@@ -421,11 +431,15 @@ export declare const actionAddresses: {
|
|
|
421
431
|
CurveUsdLevCreate?: undefined;
|
|
422
432
|
CurveUsdRepay?: undefined;
|
|
423
433
|
CurveUsdSwapper?: undefined;
|
|
434
|
+
CurveUsdSwapperTransient?: undefined;
|
|
424
435
|
CurveUsdSelfLiquidate?: undefined;
|
|
425
436
|
CurveUsdSelfLiquidateWithColl?: undefined;
|
|
426
437
|
CurveUsdGetDebt?: undefined;
|
|
427
438
|
CurveUsdCollRatioTrigger?: undefined;
|
|
428
439
|
CurveUsdCollRatioCheck?: undefined;
|
|
440
|
+
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
441
|
+
CurveUsdLevCreateTransient?: undefined;
|
|
442
|
+
CurveUsdRepayTransient?: undefined;
|
|
429
443
|
MorphoBlueSupply?: undefined;
|
|
430
444
|
MorphoBlueSupplyCollateral?: undefined;
|
|
431
445
|
MorphoBlueWithdraw?: undefined;
|
|
@@ -453,6 +467,10 @@ export declare const actionAddresses: {
|
|
|
453
467
|
EulerV2CollateralSwitch?: undefined;
|
|
454
468
|
EulerV2View?: undefined;
|
|
455
469
|
MerklClaim?: undefined;
|
|
470
|
+
RenzoStake?: undefined;
|
|
471
|
+
EtherFiStake?: undefined;
|
|
472
|
+
EtherFiWrap?: undefined;
|
|
473
|
+
EtherFiUnwrap?: undefined;
|
|
456
474
|
MorphoBlueView?: undefined;
|
|
457
475
|
} | {
|
|
458
476
|
DFSSell: string;
|
|
@@ -517,6 +535,7 @@ export declare const actionAddresses: {
|
|
|
517
535
|
SDaiWrap?: undefined;
|
|
518
536
|
SDaiUnwrap?: undefined;
|
|
519
537
|
StarknetClaim?: undefined;
|
|
538
|
+
SendTokens?: undefined;
|
|
520
539
|
SkyStake?: undefined;
|
|
521
540
|
SkyUnstake?: undefined;
|
|
522
541
|
SkyClaimRewards?: undefined;
|
|
@@ -657,11 +676,15 @@ export declare const actionAddresses: {
|
|
|
657
676
|
CurveUsdLevCreate?: undefined;
|
|
658
677
|
CurveUsdRepay?: undefined;
|
|
659
678
|
CurveUsdSwapper?: undefined;
|
|
679
|
+
CurveUsdSwapperTransient?: undefined;
|
|
660
680
|
CurveUsdSelfLiquidate?: undefined;
|
|
661
681
|
CurveUsdSelfLiquidateWithColl?: undefined;
|
|
662
682
|
CurveUsdGetDebt?: undefined;
|
|
663
683
|
CurveUsdCollRatioTrigger?: undefined;
|
|
664
684
|
CurveUsdCollRatioCheck?: undefined;
|
|
685
|
+
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
686
|
+
CurveUsdLevCreateTransient?: undefined;
|
|
687
|
+
CurveUsdRepayTransient?: undefined;
|
|
665
688
|
MorphoBlueSupply?: undefined;
|
|
666
689
|
MorphoBlueSupplyCollateral?: undefined;
|
|
667
690
|
MorphoBlueWithdraw?: undefined;
|
|
@@ -678,6 +701,10 @@ export declare const actionAddresses: {
|
|
|
678
701
|
EulerV2CollateralSwitch?: undefined;
|
|
679
702
|
EulerV2View?: undefined;
|
|
680
703
|
MerklClaim?: undefined;
|
|
704
|
+
RenzoStake?: undefined;
|
|
705
|
+
EtherFiStake?: undefined;
|
|
706
|
+
EtherFiWrap?: undefined;
|
|
707
|
+
EtherFiUnwrap?: undefined;
|
|
681
708
|
AaveV3DelegateCredit?: undefined;
|
|
682
709
|
AaveV3RatioTrigger?: undefined;
|
|
683
710
|
MorphoBlueView?: undefined;
|
|
@@ -736,6 +763,7 @@ export declare const actionAddresses: {
|
|
|
736
763
|
SDaiUnwrap?: undefined;
|
|
737
764
|
TokenizedVaultAdapter?: undefined;
|
|
738
765
|
StarknetClaim?: undefined;
|
|
766
|
+
SendTokens?: undefined;
|
|
739
767
|
SkyStake?: undefined;
|
|
740
768
|
SkyUnstake?: undefined;
|
|
741
769
|
SkyClaimRewards?: undefined;
|
|
@@ -880,11 +908,15 @@ export declare const actionAddresses: {
|
|
|
880
908
|
CurveUsdLevCreate?: undefined;
|
|
881
909
|
CurveUsdRepay?: undefined;
|
|
882
910
|
CurveUsdSwapper?: undefined;
|
|
911
|
+
CurveUsdSwapperTransient?: undefined;
|
|
883
912
|
CurveUsdSelfLiquidate?: undefined;
|
|
884
913
|
CurveUsdSelfLiquidateWithColl?: undefined;
|
|
885
914
|
CurveUsdGetDebt?: undefined;
|
|
886
915
|
CurveUsdCollRatioTrigger?: undefined;
|
|
887
916
|
CurveUsdCollRatioCheck?: undefined;
|
|
917
|
+
CurveUsdSelfLiquidateWithCollTransient?: undefined;
|
|
918
|
+
CurveUsdLevCreateTransient?: undefined;
|
|
919
|
+
CurveUsdRepayTransient?: undefined;
|
|
888
920
|
MorphoTokenWrap?: undefined;
|
|
889
921
|
LlamaLendCreate?: undefined;
|
|
890
922
|
LlamaLendSupply?: undefined;
|
|
@@ -904,6 +936,10 @@ export declare const actionAddresses: {
|
|
|
904
936
|
EulerV2CollateralSwitch?: undefined;
|
|
905
937
|
EulerV2View?: undefined;
|
|
906
938
|
MerklClaim?: undefined;
|
|
939
|
+
RenzoStake?: undefined;
|
|
940
|
+
EtherFiStake?: undefined;
|
|
941
|
+
EtherFiWrap?: undefined;
|
|
942
|
+
EtherFiUnwrap?: undefined;
|
|
907
943
|
AaveV3DelegateCredit?: undefined;
|
|
908
944
|
AaveV3RatioTrigger?: undefined;
|
|
909
945
|
GasFeeTakerL2?: undefined;
|