@defisaver/sdk 1.0.61 → 1.0.63-dev-1
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/Action.d.ts +2 -2
- package/esm/src/actions/aave/AaveBorrowAction.js +8 -0
- package/esm/src/actions/basic/ApproveTokenAction.js +5 -0
- package/esm/src/actions/basic/ExecuteSafeTxAction.d.ts +23 -0
- package/esm/src/actions/basic/ExecuteSafeTxAction.js +60 -0
- package/esm/src/actions/basic/LSVSellAction.d.ts +23 -0
- package/esm/src/actions/basic/LSVSellAction.js +61 -0
- package/esm/src/actions/basic/LimitSellAction.d.ts +24 -0
- package/esm/src/actions/basic/LimitSellAction.js +63 -0
- package/esm/src/actions/basic/RemoveTokenApprovalAction.d.ts +15 -0
- package/esm/src/actions/basic/RemoveTokenApprovalAction.js +42 -0
- package/esm/src/actions/basic/index.d.ts +5 -1
- package/esm/src/actions/basic/index.js +5 -1
- package/esm/src/actions/checkers/AaveV2RatioCheckAction.d.ts +14 -0
- package/esm/src/actions/checkers/AaveV2RatioCheckAction.js +20 -0
- package/esm/src/actions/checkers/CompoundV2RatioCheckAction.d.ts +14 -0
- package/esm/src/actions/checkers/CompoundV2RatioCheckAction.js +20 -0
- package/esm/src/actions/checkers/CurveUsdCollRatioCheck.d.ts +15 -0
- package/esm/src/actions/checkers/CurveUsdCollRatioCheck.js +22 -0
- package/esm/src/actions/checkers/index.d.ts +4 -1
- package/esm/src/actions/checkers/index.js +4 -1
- package/esm/src/actions/curveusd/CurveUsdGetDebtAction.d.ts +8 -0
- package/esm/src/actions/curveusd/CurveUsdGetDebtAction.js +13 -0
- package/esm/src/actions/curveusd/index.d.ts +1 -0
- package/esm/src/actions/curveusd/index.js +1 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.d.ts +18 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.js +28 -0
- package/esm/src/actions/flashloan/FLAction.js +3 -0
- package/esm/src/actions/flashloan/MorphoBlueFlashLoanAction.d.ts +16 -0
- package/esm/src/actions/flashloan/MorphoBlueFlashLoanAction.js +18 -0
- package/esm/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.d.ts +14 -0
- package/esm/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.js +16 -0
- package/esm/src/actions/flashloan/index.d.ts +3 -0
- package/esm/src/actions/flashloan/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/lsv/LSVBorrowAction.d.ts +14 -0
- package/esm/src/actions/lsv/LSVBorrowAction.js +19 -0
- package/esm/src/actions/lsv/LSVPaybackAction.d.ts +13 -0
- package/esm/src/actions/lsv/LSVPaybackAction.js +18 -0
- package/esm/src/actions/lsv/LSVSupplyAction.d.ts +15 -0
- package/esm/src/actions/lsv/LSVSupplyAction.js +21 -0
- package/esm/src/actions/lsv/LSVWithdrawAction.d.ts +15 -0
- package/esm/src/actions/lsv/LSVWithdrawAction.js +21 -0
- package/esm/src/actions/lsv/index.d.ts +4 -0
- package/esm/src/actions/lsv/index.js +4 -0
- package/esm/src/actions/maker/MakerGiveAction.d.ts +1 -2
- package/esm/src/actions/maker/MakerGiveAction.js +2 -3
- package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.d.ts +14 -0
- package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.js +24 -0
- package/esm/src/actions/morpho/index.d.ts +1 -0
- package/esm/src/actions/morpho/index.js +1 -0
- package/esm/src/actions/morpho-blue/MorphoBlueBorrowAction.d.ts +21 -0
- package/esm/src/actions/morpho-blue/MorphoBlueBorrowAction.js +46 -0
- package/esm/src/actions/morpho-blue/MorphoBluePaybackAction.d.ts +24 -0
- package/esm/src/actions/morpho-blue/MorphoBluePaybackAction.js +46 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSetAuthAction.d.ts +12 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSetAuthAction.js +18 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.d.ts +12 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.js +21 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSupplyAction.d.ts +24 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSupplyAction.js +46 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.d.ts +24 -0
- package/esm/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.js +46 -0
- package/esm/src/actions/morpho-blue/MorphoBlueWithdrawAction.d.ts +21 -0
- package/esm/src/actions/morpho-blue/MorphoBlueWithdrawAction.js +46 -0
- package/esm/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.d.ts +21 -0
- package/esm/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.js +46 -0
- package/esm/src/actions/morpho-blue/index.d.ts +8 -0
- package/esm/src/actions/morpho-blue/index.js +8 -0
- package/esm/src/addresses.d.ts +79 -3
- package/esm/src/addresses.js +24 -3
- package/esm/src/index.d.ts +316 -12
- package/esm/src/triggers/AaveV2RatioTrigger.d.ts +10 -0
- package/esm/src/triggers/AaveV2RatioTrigger.js +12 -0
- package/esm/src/triggers/CurveUsdCollRatioTrigger.d.ts +10 -0
- package/esm/src/triggers/CurveUsdCollRatioTrigger.js +12 -0
- package/esm/src/triggers/OffchainPriceTrigger.d.ts +10 -0
- package/esm/src/triggers/OffchainPriceTrigger.js +12 -0
- package/esm/src/triggers/index.d.ts +3 -0
- package/esm/src/triggers/index.js +3 -0
- package/esm/src/types.d.ts +20 -20
- package/esm/src/utils/curveusd-utils.d.ts +10 -0
- package/esm/src/utils/curveusd-utils.js +7 -3
- package/package.json +1 -1
- package/src/actions/aave/AaveBorrowAction.ts +9 -0
- package/src/actions/basic/ApproveTokenAction.ts +5 -0
- package/src/actions/basic/ExecuteSafeTxAction.ts +85 -0
- package/src/actions/basic/LSVSellAction.ts +61 -0
- package/src/actions/basic/LimitSellAction.ts +63 -0
- package/src/actions/basic/RemoveTokenApprovalAction.ts +39 -0
- package/src/actions/basic/index.ts +5 -1
- package/src/actions/checkers/AaveV2RatioCheckAction.ts +23 -0
- package/src/actions/checkers/CompoundV2RatioCheckAction.ts +23 -0
- package/src/actions/checkers/CurveUsdCollRatioCheck.ts +25 -0
- package/src/actions/checkers/index.ts +4 -1
- package/src/actions/curveusd/CurveUsdGetDebtAction.ts +21 -0
- package/src/actions/curveusd/index.ts +2 -1
- package/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.ts +35 -0
- package/src/actions/flashloan/FLAction.ts +3 -0
- package/src/actions/flashloan/MorphoBlueFlashLoanAction.ts +25 -0
- package/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.ts +18 -0
- package/src/actions/flashloan/index.ts +4 -1
- package/src/actions/index.ts +4 -0
- package/src/actions/lsv/LSVBorrowAction.ts +21 -0
- package/src/actions/lsv/LSVPaybackAction.ts +20 -0
- package/src/actions/lsv/LSVSupplyAction.ts +23 -0
- package/src/actions/lsv/LSVWithdrawAction.ts +23 -0
- package/src/actions/lsv/index.ts +4 -0
- package/src/actions/maker/MakerGiveAction.ts +2 -3
- package/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.ts +32 -0
- package/src/actions/morpho/index.ts +1 -0
- package/src/actions/morpho-blue/MorphoBlueBorrowAction.ts +54 -0
- package/src/actions/morpho-blue/MorphoBluePaybackAction.ts +54 -0
- package/src/actions/morpho-blue/MorphoBlueSetAuthAction.ts +25 -0
- package/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.ts +39 -0
- package/src/actions/morpho-blue/MorphoBlueSupplyAction.ts +54 -0
- package/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.ts +54 -0
- package/src/actions/morpho-blue/MorphoBlueWithdrawAction.ts +54 -0
- package/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.ts +54 -0
- package/src/actions/morpho-blue/index.ts +8 -0
- package/src/addresses.ts +26 -3
- package/src/triggers/AaveV2RatioTrigger.ts +14 -0
- package/src/triggers/CurveUsdCollRatioTrigger.ts +14 -0
- package/src/triggers/OffchainPriceTrigger.ts +14 -0
- package/src/triggers/index.ts +4 -0
- package/src/utils/basic-utils.ts +1 -1
- package/src/utils/curveusd-utils.ts +7 -3
- package/umd/index.js +1627 -584
- package/yarn-error.log +0 -3976
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a flashloan from MorphoBlue
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export class MorphoBlueFlashLoanAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param token
|
|
11
|
+
* @param amount
|
|
12
|
+
* @param flParamGetterAddr
|
|
13
|
+
* @param flParamGetterData
|
|
14
|
+
*/
|
|
15
|
+
constructor(token, amount, flParamGetterAddr = getAddr('Empty'), flParamGetterData = []) {
|
|
16
|
+
super('FLMorphoBlue', getAddr('FLMorphoBlue'), ['address[]', 'uint256[]', 'uint256[]', 'address', 'address', 'bytes', 'bytes'], [[token], [amount], [], getAddr('Empty'), flParamGetterAddr, flParamGetterData, []]);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SendTokenAction } from '../basic';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Pays back a flashloan from MorphoBlue
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export declare class MorphoBlueFlashLoanPaybackAction extends SendTokenAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanAmount
|
|
11
|
+
* @param tokenAddr
|
|
12
|
+
*/
|
|
13
|
+
constructor(loanAmount: uint256, tokenAddr: EthAddress);
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SendTokenAction } from '../basic';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* Pays back a flashloan from MorphoBlue
|
|
5
|
+
*
|
|
6
|
+
* @category Flashloans
|
|
7
|
+
*/
|
|
8
|
+
export class MorphoBlueFlashLoanPaybackAction extends SendTokenAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanAmount
|
|
11
|
+
* @param tokenAddr
|
|
12
|
+
*/
|
|
13
|
+
constructor(loanAmount, tokenAddr) {
|
|
14
|
+
super(tokenAddr, getAddr('FLMorphoBlue'), loanAmount);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from './AaveV3FlashLoanAction';
|
|
|
6
6
|
export * from './AaveV3FlashLoanPaybackAction';
|
|
7
7
|
export * from './AaveV3FlashLoanNoFeeAction';
|
|
8
8
|
export * from './AaveV3FlashLoanNoFeePaybackAction';
|
|
9
|
+
export * from './AaveV3FlashLoanCarryDebtAction';
|
|
9
10
|
export * from './SparkFlashLoanAction';
|
|
10
11
|
export * from './SparkFlashLoanPaybackAction';
|
|
11
12
|
export * from './MakerFlashLoanAction';
|
|
@@ -19,3 +20,5 @@ export * from './UniV3FlashLoanAction';
|
|
|
19
20
|
export * from './UniV3FlashLoanPaybackAction';
|
|
20
21
|
export * from './GhoFlashLoanAction';
|
|
21
22
|
export * from './GhoFlashLoanPaybackAction';
|
|
23
|
+
export * from './MorphoBlueFlashLoanAction';
|
|
24
|
+
export * from './MorphoBlueFlashLoanPaybackAction';
|
|
@@ -6,6 +6,7 @@ export * from './AaveV3FlashLoanAction';
|
|
|
6
6
|
export * from './AaveV3FlashLoanPaybackAction';
|
|
7
7
|
export * from './AaveV3FlashLoanNoFeeAction';
|
|
8
8
|
export * from './AaveV3FlashLoanNoFeePaybackAction';
|
|
9
|
+
export * from './AaveV3FlashLoanCarryDebtAction';
|
|
9
10
|
export * from './SparkFlashLoanAction';
|
|
10
11
|
export * from './SparkFlashLoanPaybackAction';
|
|
11
12
|
export * from './MakerFlashLoanAction';
|
|
@@ -19,3 +20,5 @@ export * from './UniV3FlashLoanAction';
|
|
|
19
20
|
export * from './UniV3FlashLoanPaybackAction';
|
|
20
21
|
export * from './GhoFlashLoanAction';
|
|
21
22
|
export * from './GhoFlashLoanPaybackAction';
|
|
23
|
+
export * from './MorphoBlueFlashLoanAction';
|
|
24
|
+
export * from './MorphoBlueFlashLoanPaybackAction';
|
|
@@ -23,6 +23,8 @@ import * as chickenBonds from './chickenBonds';
|
|
|
23
23
|
import * as compoundV3 from './compoundV3';
|
|
24
24
|
import * as morpho from './morpho';
|
|
25
25
|
import * as bprotocol from './bprotocol';
|
|
26
|
+
import * as lsv from './lsv';
|
|
26
27
|
import * as curveusd from './curveusd';
|
|
27
28
|
import * as spark from './spark';
|
|
28
|
-
|
|
29
|
+
import * as morphoblue from './morpho-blue';
|
|
30
|
+
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, };
|
package/esm/src/actions/index.js
CHANGED
|
@@ -23,6 +23,8 @@ import * as chickenBonds from './chickenBonds';
|
|
|
23
23
|
import * as compoundV3 from './compoundV3';
|
|
24
24
|
import * as morpho from './morpho';
|
|
25
25
|
import * as bprotocol from './bprotocol';
|
|
26
|
+
import * as lsv from './lsv';
|
|
26
27
|
import * as curveusd from './curveusd';
|
|
27
28
|
import * as spark from './spark';
|
|
28
|
-
|
|
29
|
+
import * as morphoblue from './morpho-blue';
|
|
30
|
+
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, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { uint256, uint8 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category LSV
|
|
7
|
+
*/
|
|
8
|
+
export declare class LSVBorrowAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param protocol
|
|
11
|
+
* @param amount
|
|
12
|
+
*/
|
|
13
|
+
constructor(protocol: uint8, amount: uint256);
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category LSV
|
|
7
|
+
*/
|
|
8
|
+
export class LSVBorrowAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param protocol
|
|
11
|
+
* @param amount
|
|
12
|
+
*/
|
|
13
|
+
constructor(protocol, amount) {
|
|
14
|
+
super('LSVBorrow', getAddr('LSVBorrow'), ['uint256', 'uint256'], [protocol, amount]);
|
|
15
|
+
this.mappableArgs = [
|
|
16
|
+
this.args[1],
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { uint8, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category LSV
|
|
6
|
+
*/
|
|
7
|
+
export declare class LSVPaybackAction extends Action {
|
|
8
|
+
/**
|
|
9
|
+
* @param protocol
|
|
10
|
+
* @param amount
|
|
11
|
+
*/
|
|
12
|
+
constructor(protocol: uint8, amount: uint256);
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category LSV
|
|
6
|
+
*/
|
|
7
|
+
export class LSVPaybackAction extends Action {
|
|
8
|
+
/**
|
|
9
|
+
* @param protocol
|
|
10
|
+
* @param amount
|
|
11
|
+
*/
|
|
12
|
+
constructor(protocol, amount) {
|
|
13
|
+
super('LSVPayback', getAddr('LSVPayback'), ['uint256', 'uint256'], [protocol, amount]);
|
|
14
|
+
this.mappableArgs = [
|
|
15
|
+
this.args[1],
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint8 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category LSV
|
|
7
|
+
*/
|
|
8
|
+
export declare class LSVSupplyAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param protocol
|
|
11
|
+
* @param token
|
|
12
|
+
* @param amount
|
|
13
|
+
*/
|
|
14
|
+
constructor(protocol: uint8, token: EthAddress, amount: uint256);
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category LSV
|
|
7
|
+
*/
|
|
8
|
+
export class LSVSupplyAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param protocol
|
|
11
|
+
* @param token
|
|
12
|
+
* @param amount
|
|
13
|
+
*/
|
|
14
|
+
constructor(protocol, token, amount) {
|
|
15
|
+
super('LSVSupply', getAddr('LSVSupply'), ['uint256', 'address', 'uint256'], [protocol, token, amount]);
|
|
16
|
+
this.mappableArgs = [
|
|
17
|
+
this.args[1],
|
|
18
|
+
this.args[2],
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256, uint8 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category LSV
|
|
6
|
+
*/
|
|
7
|
+
export declare class LSVWithdrawAction extends Action {
|
|
8
|
+
/**
|
|
9
|
+
* @param protocol
|
|
10
|
+
* @param token
|
|
11
|
+
* @param amount
|
|
12
|
+
* @param isPositionClosing
|
|
13
|
+
*/
|
|
14
|
+
constructor(protocol: uint8, token: EthAddress, amount: uint256, isPositionClosing: boolean);
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category LSV
|
|
6
|
+
*/
|
|
7
|
+
export class LSVWithdrawAction extends Action {
|
|
8
|
+
/**
|
|
9
|
+
* @param protocol
|
|
10
|
+
* @param token
|
|
11
|
+
* @param amount
|
|
12
|
+
* @param isPositionClosing
|
|
13
|
+
*/
|
|
14
|
+
constructor(protocol, token, amount, isPositionClosing) {
|
|
15
|
+
super('LSVWithdraw', getAddr('LSVWithdraw'), ['uint256', 'address', 'uint256', 'bool'], [protocol, token, amount, isPositionClosing]);
|
|
16
|
+
this.mappableArgs = [
|
|
17
|
+
this.args[1],
|
|
18
|
+
this.args[2],
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -9,8 +9,7 @@ export declare class MakerGiveAction extends Action {
|
|
|
9
9
|
/**
|
|
10
10
|
* @param vaultId
|
|
11
11
|
* @param newOwner
|
|
12
|
-
* @param createProxy
|
|
13
12
|
* @param mcdManager
|
|
14
13
|
*/
|
|
15
|
-
constructor(vaultId: uint256, newOwner: EthAddress,
|
|
14
|
+
constructor(vaultId: uint256, newOwner: EthAddress, mcdManager?: EthAddress);
|
|
16
15
|
}
|
|
@@ -10,12 +10,11 @@ export class MakerGiveAction extends Action {
|
|
|
10
10
|
/**
|
|
11
11
|
* @param vaultId
|
|
12
12
|
* @param newOwner
|
|
13
|
-
* @param createProxy
|
|
14
13
|
* @param mcdManager
|
|
15
14
|
*/
|
|
16
|
-
constructor(vaultId, newOwner,
|
|
15
|
+
constructor(vaultId, newOwner, mcdManager = getAddr('McdCdpManager')) {
|
|
17
16
|
requireAddress(newOwner);
|
|
18
|
-
super('McdGive', getAddr('McdGive'), ['uint256', 'address', '
|
|
17
|
+
super('McdGive', getAddr('McdGive'), ['uint256', 'address', 'address'], [vaultId, newOwner, mcdManager]);
|
|
19
18
|
this.mappableArgs = [
|
|
20
19
|
this.args[0],
|
|
21
20
|
this.args[1],
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action } from '../../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category MorphoAaveV3
|
|
6
|
+
*/
|
|
7
|
+
export declare class MorphoAaveV3SetManagerAction extends Action {
|
|
8
|
+
/**
|
|
9
|
+
* @param emodeId
|
|
10
|
+
* @param manager
|
|
11
|
+
* @param isAllowed
|
|
12
|
+
*/
|
|
13
|
+
constructor(emodeId: uint256, manager: EthAddress, isAllowed: boolean);
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../../Action';
|
|
2
|
+
import { getAddr } from '../../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @category MorphoAaveV3
|
|
6
|
+
*/
|
|
7
|
+
export class MorphoAaveV3SetManagerAction extends Action {
|
|
8
|
+
/**
|
|
9
|
+
* @param emodeId
|
|
10
|
+
* @param manager
|
|
11
|
+
* @param isAllowed
|
|
12
|
+
*/
|
|
13
|
+
constructor(emodeId, manager, isAllowed) {
|
|
14
|
+
super('MorphoAaveV3SetManager', getAddr('MorphoAaveV3SetManager'), [
|
|
15
|
+
'uint256',
|
|
16
|
+
'address',
|
|
17
|
+
'bool',
|
|
18
|
+
], [emodeId, manager, isAllowed]);
|
|
19
|
+
this.mappableArgs = [
|
|
20
|
+
this.args[0],
|
|
21
|
+
this.args[1],
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* MorphoBlueBorrowAction - Borrow a token from MorphoBlue
|
|
5
|
+
*
|
|
6
|
+
* @category MorphoBlue
|
|
7
|
+
*/
|
|
8
|
+
export declare class MorphoBlueBorrowAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanToken - MarketParams loanToken
|
|
11
|
+
* @param collateralToken - MarketParams collateralToken
|
|
12
|
+
* @param oracle - MarketParams oracle
|
|
13
|
+
* @param irm - MarketParams irm
|
|
14
|
+
* @param lltv - MarketParams lltv
|
|
15
|
+
* @param borrowAmount - amount of loanToken to borrow
|
|
16
|
+
* @param onBehalf - onBehalf of whom to borrow
|
|
17
|
+
* @param to - address to receive borrowed tokens
|
|
18
|
+
*/
|
|
19
|
+
constructor(loanToken: EthAddress, collateralToken: EthAddress, oracle: EthAddress, irm: EthAddress, lltv: uint256, borrowAmount: uint256, onBehalf: EthAddress, to: EthAddress);
|
|
20
|
+
getAssetsToApprove(): Promise<never[]>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { Action } from '../../Action';
|
|
11
|
+
import { getAddr } from '../../addresses';
|
|
12
|
+
/**
|
|
13
|
+
* MorphoBlueBorrowAction - Borrow a token from MorphoBlue
|
|
14
|
+
*
|
|
15
|
+
* @category MorphoBlue
|
|
16
|
+
*/
|
|
17
|
+
export class MorphoBlueBorrowAction extends Action {
|
|
18
|
+
/**
|
|
19
|
+
* @param loanToken - MarketParams loanToken
|
|
20
|
+
* @param collateralToken - MarketParams collateralToken
|
|
21
|
+
* @param oracle - MarketParams oracle
|
|
22
|
+
* @param irm - MarketParams irm
|
|
23
|
+
* @param lltv - MarketParams lltv
|
|
24
|
+
* @param borrowAmount - amount of loanToken to borrow
|
|
25
|
+
* @param onBehalf - onBehalf of whom to borrow
|
|
26
|
+
* @param to - address to receive borrowed tokens
|
|
27
|
+
*/
|
|
28
|
+
constructor(loanToken, collateralToken, oracle, irm, lltv, borrowAmount, onBehalf, to) {
|
|
29
|
+
super('MorphoBlueBorrow', getAddr('MorphoBlueBorrow'), [['address', 'address', 'address', 'address', 'uint256'], 'uint256', 'address', 'address'], [[loanToken, collateralToken, oracle, irm, lltv], borrowAmount, onBehalf, to]);
|
|
30
|
+
this.mappableArgs = [
|
|
31
|
+
this.args[0][0],
|
|
32
|
+
this.args[0][1],
|
|
33
|
+
this.args[0][2],
|
|
34
|
+
this.args[0][3],
|
|
35
|
+
this.args[0][4],
|
|
36
|
+
this.args[1],
|
|
37
|
+
this.args[2],
|
|
38
|
+
this.args[3],
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
getAssetsToApprove() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return [];
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* MorphoBluePaybackAction - Payback debt on MorphoBlue
|
|
5
|
+
*
|
|
6
|
+
* @category MorphoBlue
|
|
7
|
+
*/
|
|
8
|
+
export declare class MorphoBluePaybackAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanToken - MarketParams loanToken
|
|
11
|
+
* @param collateralToken - MarketParams collateralToken
|
|
12
|
+
* @param oracle - MarketParams oracle
|
|
13
|
+
* @param irm - MarketParams irm
|
|
14
|
+
* @param lltv - MarketParams lltv
|
|
15
|
+
* @param paybackAmount - Amount of debt to repay (uint.max for full debt repayment)
|
|
16
|
+
* @param from - Address from which to pull tokens with which to repay debt
|
|
17
|
+
* @param onBehalf - Position owner whose debt we are paying back
|
|
18
|
+
*/
|
|
19
|
+
constructor(loanToken: EthAddress, collateralToken: EthAddress, oracle: EthAddress, irm: EthAddress, lltv: uint256, paybackAmount: uint256, from: EthAddress, onBehalf: EthAddress);
|
|
20
|
+
getAssetsToApprove(): Promise<{
|
|
21
|
+
asset: any;
|
|
22
|
+
owner: any;
|
|
23
|
+
}[]>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { Action } from '../../Action';
|
|
11
|
+
import { getAddr } from '../../addresses';
|
|
12
|
+
/**
|
|
13
|
+
* MorphoBluePaybackAction - Payback debt on MorphoBlue
|
|
14
|
+
*
|
|
15
|
+
* @category MorphoBlue
|
|
16
|
+
*/
|
|
17
|
+
export class MorphoBluePaybackAction extends Action {
|
|
18
|
+
/**
|
|
19
|
+
* @param loanToken - MarketParams loanToken
|
|
20
|
+
* @param collateralToken - MarketParams collateralToken
|
|
21
|
+
* @param oracle - MarketParams oracle
|
|
22
|
+
* @param irm - MarketParams irm
|
|
23
|
+
* @param lltv - MarketParams lltv
|
|
24
|
+
* @param paybackAmount - Amount of debt to repay (uint.max for full debt repayment)
|
|
25
|
+
* @param from - Address from which to pull tokens with which to repay debt
|
|
26
|
+
* @param onBehalf - Position owner whose debt we are paying back
|
|
27
|
+
*/
|
|
28
|
+
constructor(loanToken, collateralToken, oracle, irm, lltv, paybackAmount, from, onBehalf) {
|
|
29
|
+
super('MorphoBluePayback', getAddr('MorphoBluePayback'), [['address', 'address', 'address', 'address', 'uint256'], 'uint256', 'address', 'address'], [[loanToken, collateralToken, oracle, irm, lltv], paybackAmount, from, onBehalf]);
|
|
30
|
+
this.mappableArgs = [
|
|
31
|
+
this.args[0][0],
|
|
32
|
+
this.args[0][1],
|
|
33
|
+
this.args[0][2],
|
|
34
|
+
this.args[0][3],
|
|
35
|
+
this.args[0][4],
|
|
36
|
+
this.args[1],
|
|
37
|
+
this.args[2],
|
|
38
|
+
this.args[3],
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
getAssetsToApprove() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return [{ asset: this.args[0][0], owner: this.args[2] }];
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @category MorphoBlue
|
|
5
|
+
*/
|
|
6
|
+
export declare class MorphoBlueSetAuthAction extends Action {
|
|
7
|
+
/**
|
|
8
|
+
* @param manager
|
|
9
|
+
* @param newIsAuthorized
|
|
10
|
+
*/
|
|
11
|
+
constructor(manager: EthAddress, newIsAuthorized: boolean);
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* @category MorphoBlue
|
|
5
|
+
*/
|
|
6
|
+
export class MorphoBlueSetAuthAction extends Action {
|
|
7
|
+
/**
|
|
8
|
+
* @param manager
|
|
9
|
+
* @param newIsAuthorized
|
|
10
|
+
*/
|
|
11
|
+
constructor(manager, newIsAuthorized) {
|
|
12
|
+
super('MorphoBlueSetAuth', getAddr('MorphoBlueSetAuth'), [
|
|
13
|
+
'address',
|
|
14
|
+
'bool',
|
|
15
|
+
], [manager, newIsAuthorized]);
|
|
16
|
+
this.mappableArgs = [this.args[0], this.args[1]];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, bytes32, uint256, uint8 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @category MorphoBlue
|
|
5
|
+
*/
|
|
6
|
+
export declare class MorphoBlueSetAuthWithSigAction extends Action {
|
|
7
|
+
/**
|
|
8
|
+
* @param manager
|
|
9
|
+
* @param newIsAuthorized
|
|
10
|
+
*/
|
|
11
|
+
constructor(authorizer: EthAddress, authorized: EthAddress, isAuthorized: boolean, nonce: uint256, deadline: uint256, v: uint8, r: bytes32, s: bytes32);
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* @category MorphoBlue
|
|
5
|
+
*/
|
|
6
|
+
export class MorphoBlueSetAuthWithSigAction extends Action {
|
|
7
|
+
/**
|
|
8
|
+
* @param manager
|
|
9
|
+
* @param newIsAuthorized
|
|
10
|
+
*/
|
|
11
|
+
constructor(authorizer, authorized, isAuthorized, nonce, deadline, v, r, s) {
|
|
12
|
+
super('MorphoBlueSetAuthWithSig', getAddr('MorphoBlueSetAuthWithSig'), [
|
|
13
|
+
['address', 'address', 'bool', 'uint256', 'uint256'],
|
|
14
|
+
['uint8', 'bytes32', 'bytes32'],
|
|
15
|
+
], [
|
|
16
|
+
[authorizer, authorized, isAuthorized, nonce, deadline],
|
|
17
|
+
[v, r, s],
|
|
18
|
+
]);
|
|
19
|
+
this.mappableArgs = [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* MorphoBlueSupplyAction - Supply token as a lender on MorphoBlue to earn interest
|
|
5
|
+
*
|
|
6
|
+
* @category MorphoBlue
|
|
7
|
+
*/
|
|
8
|
+
export declare class MorphoBlueSupplyAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanToken - MarketParams loanToken
|
|
11
|
+
* @param collateralToken - MarketParams collateralToken
|
|
12
|
+
* @param oracle - MarketParams oracle
|
|
13
|
+
* @param irm - MarketParams irm
|
|
14
|
+
* @param lltv - MarketParams lltv
|
|
15
|
+
* @param supplyAmount - Amount of loanToken to supply
|
|
16
|
+
* @param from - Address from which to pull tokens
|
|
17
|
+
* @param onBehalf - on whose behalf to supply the tokens
|
|
18
|
+
*/
|
|
19
|
+
constructor(loanToken: EthAddress, collateralToken: EthAddress, oracle: EthAddress, irm: EthAddress, lltv: uint256, supplyAmount: uint256, from: EthAddress, onBehalf: EthAddress);
|
|
20
|
+
getAssetsToApprove(): Promise<{
|
|
21
|
+
asset: any;
|
|
22
|
+
owner: any;
|
|
23
|
+
}[]>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { Action } from '../../Action';
|
|
11
|
+
import { getAddr } from '../../addresses';
|
|
12
|
+
/**
|
|
13
|
+
* MorphoBlueSupplyAction - Supply token as a lender on MorphoBlue to earn interest
|
|
14
|
+
*
|
|
15
|
+
* @category MorphoBlue
|
|
16
|
+
*/
|
|
17
|
+
export class MorphoBlueSupplyAction extends Action {
|
|
18
|
+
/**
|
|
19
|
+
* @param loanToken - MarketParams loanToken
|
|
20
|
+
* @param collateralToken - MarketParams collateralToken
|
|
21
|
+
* @param oracle - MarketParams oracle
|
|
22
|
+
* @param irm - MarketParams irm
|
|
23
|
+
* @param lltv - MarketParams lltv
|
|
24
|
+
* @param supplyAmount - Amount of loanToken to supply
|
|
25
|
+
* @param from - Address from which to pull tokens
|
|
26
|
+
* @param onBehalf - on whose behalf to supply the tokens
|
|
27
|
+
*/
|
|
28
|
+
constructor(loanToken, collateralToken, oracle, irm, lltv, supplyAmount, from, onBehalf) {
|
|
29
|
+
super('MorphoBlueSupply', getAddr('MorphoBlueSupply'), [['address', 'address', 'address', 'address', 'uint256'], 'uint256', 'address', 'address'], [[loanToken, collateralToken, oracle, irm, lltv], supplyAmount, from, onBehalf]);
|
|
30
|
+
this.mappableArgs = [
|
|
31
|
+
this.args[0][0],
|
|
32
|
+
this.args[0][1],
|
|
33
|
+
this.args[0][2],
|
|
34
|
+
this.args[0][3],
|
|
35
|
+
this.args[0][4],
|
|
36
|
+
this.args[1],
|
|
37
|
+
this.args[2],
|
|
38
|
+
this.args[3],
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
getAssetsToApprove() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return [{ asset: this.args[0][0], owner: this.args[2] }];
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* MorphoBlueSupplyCollateralAction - Supply token to use as collateral on MorphoBlue
|
|
5
|
+
*
|
|
6
|
+
* @category MorphoBlue
|
|
7
|
+
*/
|
|
8
|
+
export declare class MorphoBlueSupplyCollateralAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param loanToken - MarketParams loanToken
|
|
11
|
+
* @param collateralToken - MarketParams collateralToken
|
|
12
|
+
* @param oracle - MarketParams oracle
|
|
13
|
+
* @param irm - MarketParams irm
|
|
14
|
+
* @param lltv - MarketParams lltv
|
|
15
|
+
* @param supplyAmount - Amount of collateral token to supply
|
|
16
|
+
* @param from - Address from which to pull tokens
|
|
17
|
+
* @param onBehalf - On whose behalf to supply tokens as collateral
|
|
18
|
+
*/
|
|
19
|
+
constructor(loanToken: EthAddress, collateralToken: EthAddress, oracle: EthAddress, irm: EthAddress, lltv: uint256, supplyAmount: uint256, from: EthAddress, onBehalf: EthAddress);
|
|
20
|
+
getAssetsToApprove(): Promise<{
|
|
21
|
+
asset: any;
|
|
22
|
+
owner: any;
|
|
23
|
+
}[]>;
|
|
24
|
+
}
|