@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.
Files changed (130) hide show
  1. package/esm/src/Action.d.ts +2 -2
  2. package/esm/src/actions/aave/AaveBorrowAction.js +8 -0
  3. package/esm/src/actions/basic/ApproveTokenAction.js +5 -0
  4. package/esm/src/actions/basic/ExecuteSafeTxAction.d.ts +23 -0
  5. package/esm/src/actions/basic/ExecuteSafeTxAction.js +60 -0
  6. package/esm/src/actions/basic/LSVSellAction.d.ts +23 -0
  7. package/esm/src/actions/basic/LSVSellAction.js +61 -0
  8. package/esm/src/actions/basic/LimitSellAction.d.ts +24 -0
  9. package/esm/src/actions/basic/LimitSellAction.js +63 -0
  10. package/esm/src/actions/basic/RemoveTokenApprovalAction.d.ts +15 -0
  11. package/esm/src/actions/basic/RemoveTokenApprovalAction.js +42 -0
  12. package/esm/src/actions/basic/index.d.ts +5 -1
  13. package/esm/src/actions/basic/index.js +5 -1
  14. package/esm/src/actions/checkers/AaveV2RatioCheckAction.d.ts +14 -0
  15. package/esm/src/actions/checkers/AaveV2RatioCheckAction.js +20 -0
  16. package/esm/src/actions/checkers/CompoundV2RatioCheckAction.d.ts +14 -0
  17. package/esm/src/actions/checkers/CompoundV2RatioCheckAction.js +20 -0
  18. package/esm/src/actions/checkers/CurveUsdCollRatioCheck.d.ts +15 -0
  19. package/esm/src/actions/checkers/CurveUsdCollRatioCheck.js +22 -0
  20. package/esm/src/actions/checkers/index.d.ts +4 -1
  21. package/esm/src/actions/checkers/index.js +4 -1
  22. package/esm/src/actions/curveusd/CurveUsdGetDebtAction.d.ts +8 -0
  23. package/esm/src/actions/curveusd/CurveUsdGetDebtAction.js +13 -0
  24. package/esm/src/actions/curveusd/index.d.ts +1 -0
  25. package/esm/src/actions/curveusd/index.js +1 -0
  26. package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.d.ts +18 -0
  27. package/esm/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.js +28 -0
  28. package/esm/src/actions/flashloan/FLAction.js +3 -0
  29. package/esm/src/actions/flashloan/MorphoBlueFlashLoanAction.d.ts +16 -0
  30. package/esm/src/actions/flashloan/MorphoBlueFlashLoanAction.js +18 -0
  31. package/esm/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.d.ts +14 -0
  32. package/esm/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.js +16 -0
  33. package/esm/src/actions/flashloan/index.d.ts +3 -0
  34. package/esm/src/actions/flashloan/index.js +3 -0
  35. package/esm/src/actions/index.d.ts +3 -1
  36. package/esm/src/actions/index.js +3 -1
  37. package/esm/src/actions/lsv/LSVBorrowAction.d.ts +14 -0
  38. package/esm/src/actions/lsv/LSVBorrowAction.js +19 -0
  39. package/esm/src/actions/lsv/LSVPaybackAction.d.ts +13 -0
  40. package/esm/src/actions/lsv/LSVPaybackAction.js +18 -0
  41. package/esm/src/actions/lsv/LSVSupplyAction.d.ts +15 -0
  42. package/esm/src/actions/lsv/LSVSupplyAction.js +21 -0
  43. package/esm/src/actions/lsv/LSVWithdrawAction.d.ts +15 -0
  44. package/esm/src/actions/lsv/LSVWithdrawAction.js +21 -0
  45. package/esm/src/actions/lsv/index.d.ts +4 -0
  46. package/esm/src/actions/lsv/index.js +4 -0
  47. package/esm/src/actions/maker/MakerGiveAction.d.ts +1 -2
  48. package/esm/src/actions/maker/MakerGiveAction.js +2 -3
  49. package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.d.ts +14 -0
  50. package/esm/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.js +24 -0
  51. package/esm/src/actions/morpho/index.d.ts +1 -0
  52. package/esm/src/actions/morpho/index.js +1 -0
  53. package/esm/src/actions/morpho-blue/MorphoBlueBorrowAction.d.ts +21 -0
  54. package/esm/src/actions/morpho-blue/MorphoBlueBorrowAction.js +46 -0
  55. package/esm/src/actions/morpho-blue/MorphoBluePaybackAction.d.ts +24 -0
  56. package/esm/src/actions/morpho-blue/MorphoBluePaybackAction.js +46 -0
  57. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthAction.d.ts +12 -0
  58. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthAction.js +18 -0
  59. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.d.ts +12 -0
  60. package/esm/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.js +21 -0
  61. package/esm/src/actions/morpho-blue/MorphoBlueSupplyAction.d.ts +24 -0
  62. package/esm/src/actions/morpho-blue/MorphoBlueSupplyAction.js +46 -0
  63. package/esm/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.d.ts +24 -0
  64. package/esm/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.js +46 -0
  65. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawAction.d.ts +21 -0
  66. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawAction.js +46 -0
  67. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.d.ts +21 -0
  68. package/esm/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.js +46 -0
  69. package/esm/src/actions/morpho-blue/index.d.ts +8 -0
  70. package/esm/src/actions/morpho-blue/index.js +8 -0
  71. package/esm/src/addresses.d.ts +79 -3
  72. package/esm/src/addresses.js +24 -3
  73. package/esm/src/index.d.ts +316 -12
  74. package/esm/src/triggers/AaveV2RatioTrigger.d.ts +10 -0
  75. package/esm/src/triggers/AaveV2RatioTrigger.js +12 -0
  76. package/esm/src/triggers/CurveUsdCollRatioTrigger.d.ts +10 -0
  77. package/esm/src/triggers/CurveUsdCollRatioTrigger.js +12 -0
  78. package/esm/src/triggers/OffchainPriceTrigger.d.ts +10 -0
  79. package/esm/src/triggers/OffchainPriceTrigger.js +12 -0
  80. package/esm/src/triggers/index.d.ts +3 -0
  81. package/esm/src/triggers/index.js +3 -0
  82. package/esm/src/types.d.ts +20 -20
  83. package/esm/src/utils/curveusd-utils.d.ts +10 -0
  84. package/esm/src/utils/curveusd-utils.js +7 -3
  85. package/package.json +1 -1
  86. package/src/actions/aave/AaveBorrowAction.ts +9 -0
  87. package/src/actions/basic/ApproveTokenAction.ts +5 -0
  88. package/src/actions/basic/ExecuteSafeTxAction.ts +85 -0
  89. package/src/actions/basic/LSVSellAction.ts +61 -0
  90. package/src/actions/basic/LimitSellAction.ts +63 -0
  91. package/src/actions/basic/RemoveTokenApprovalAction.ts +39 -0
  92. package/src/actions/basic/index.ts +5 -1
  93. package/src/actions/checkers/AaveV2RatioCheckAction.ts +23 -0
  94. package/src/actions/checkers/CompoundV2RatioCheckAction.ts +23 -0
  95. package/src/actions/checkers/CurveUsdCollRatioCheck.ts +25 -0
  96. package/src/actions/checkers/index.ts +4 -1
  97. package/src/actions/curveusd/CurveUsdGetDebtAction.ts +21 -0
  98. package/src/actions/curveusd/index.ts +2 -1
  99. package/src/actions/flashloan/AaveV3FlashLoanCarryDebtAction.ts +35 -0
  100. package/src/actions/flashloan/FLAction.ts +3 -0
  101. package/src/actions/flashloan/MorphoBlueFlashLoanAction.ts +25 -0
  102. package/src/actions/flashloan/MorphoBlueFlashLoanPaybackAction.ts +18 -0
  103. package/src/actions/flashloan/index.ts +4 -1
  104. package/src/actions/index.ts +4 -0
  105. package/src/actions/lsv/LSVBorrowAction.ts +21 -0
  106. package/src/actions/lsv/LSVPaybackAction.ts +20 -0
  107. package/src/actions/lsv/LSVSupplyAction.ts +23 -0
  108. package/src/actions/lsv/LSVWithdrawAction.ts +23 -0
  109. package/src/actions/lsv/index.ts +4 -0
  110. package/src/actions/maker/MakerGiveAction.ts +2 -3
  111. package/src/actions/morpho/aaveV3/MorphoAaveV3SetManagerAction.ts +32 -0
  112. package/src/actions/morpho/index.ts +1 -0
  113. package/src/actions/morpho-blue/MorphoBlueBorrowAction.ts +54 -0
  114. package/src/actions/morpho-blue/MorphoBluePaybackAction.ts +54 -0
  115. package/src/actions/morpho-blue/MorphoBlueSetAuthAction.ts +25 -0
  116. package/src/actions/morpho-blue/MorphoBlueSetAuthWithSigAction.ts +39 -0
  117. package/src/actions/morpho-blue/MorphoBlueSupplyAction.ts +54 -0
  118. package/src/actions/morpho-blue/MorphoBlueSupplyCollateralAction.ts +54 -0
  119. package/src/actions/morpho-blue/MorphoBlueWithdrawAction.ts +54 -0
  120. package/src/actions/morpho-blue/MorphoBlueWithdrawCollateralAction.ts +54 -0
  121. package/src/actions/morpho-blue/index.ts +8 -0
  122. package/src/addresses.ts +26 -3
  123. package/src/triggers/AaveV2RatioTrigger.ts +14 -0
  124. package/src/triggers/CurveUsdCollRatioTrigger.ts +14 -0
  125. package/src/triggers/OffchainPriceTrigger.ts +14 -0
  126. package/src/triggers/index.ts +4 -0
  127. package/src/utils/basic-utils.ts +1 -1
  128. package/src/utils/curveusd-utils.ts +7 -3
  129. package/umd/index.js +1627 -584
  130. 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
- 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, spark, curveusd, };
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, };
@@ -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
- 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, spark, curveusd, };
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
+ }
@@ -0,0 +1,4 @@
1
+ export * from './LSVPaybackAction';
2
+ export * from './LSVWithdrawAction';
3
+ export * from './LSVSupplyAction';
4
+ export * from './LSVBorrowAction';
@@ -0,0 +1,4 @@
1
+ export * from './LSVPaybackAction';
2
+ export * from './LSVWithdrawAction';
3
+ export * from './LSVSupplyAction';
4
+ export * from './LSVBorrowAction';
@@ -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, createProxy: boolean, mcdManager?: 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, createProxy, mcdManager = getAddr('McdCdpManager')) {
15
+ constructor(vaultId, newOwner, mcdManager = getAddr('McdCdpManager')) {
17
16
  requireAddress(newOwner);
18
- super('McdGive', getAddr('McdGive'), ['uint256', 'address', 'bool', 'address'], [vaultId, newOwner, createProxy, mcdManager]);
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
+ }
@@ -7,3 +7,4 @@ export * from './aaveV3/MorphoAaveV3SupplyAction';
7
7
  export * from './aaveV3/MorphoAaveV3WithdrawAction';
8
8
  export * from './aaveV3/MorphoAaveV3BorrowAction';
9
9
  export * from './aaveV3/MorphoAaveV3PaybackAction';
10
+ export * from './aaveV3/MorphoAaveV3SetManagerAction';
@@ -7,3 +7,4 @@ export * from './aaveV3/MorphoAaveV3SupplyAction';
7
7
  export * from './aaveV3/MorphoAaveV3WithdrawAction';
8
8
  export * from './aaveV3/MorphoAaveV3BorrowAction';
9
9
  export * from './aaveV3/MorphoAaveV3PaybackAction';
10
+ export * from './aaveV3/MorphoAaveV3SetManagerAction';
@@ -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
+ }