@defisaver/sdk 1.3.7 → 1.3.9-dev-plasma

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 (91) hide show
  1. package/esm/src/actions/checkers/AaveV3OpenRatioCheckAction.d.ts +3 -2
  2. package/esm/src/actions/checkers/AaveV3OpenRatioCheckAction.js +5 -7
  3. package/esm/src/actions/checkers/AaveV3RatioCheckAction.d.ts +4 -2
  4. package/esm/src/actions/checkers/AaveV3RatioCheckAction.js +6 -2
  5. package/esm/src/actions/checkers/LiquityV2NewInterestRateCheckerAction.d.ts +15 -0
  6. package/esm/src/actions/checkers/LiquityV2NewInterestRateCheckerAction.js +22 -0
  7. package/esm/src/actions/checkers/index.d.ts +1 -0
  8. package/esm/src/actions/checkers/index.js +1 -0
  9. package/esm/src/actions/fluid/FluidDexOpenAction.d.ts +20 -0
  10. package/esm/src/actions/fluid/FluidDexOpenAction.js +45 -0
  11. package/esm/src/actions/fluid/FluidDexRegularBorrowAction.d.ts +17 -0
  12. package/esm/src/actions/fluid/FluidDexRegularBorrowAction.js +36 -0
  13. package/esm/src/actions/fluid/FluidDexRegularPaybackAction.d.ts +16 -0
  14. package/esm/src/actions/fluid/FluidDexRegularPaybackAction.js +34 -0
  15. package/esm/src/actions/fluid/FluidDexRegularSupplyAction.d.ts +16 -0
  16. package/esm/src/actions/fluid/FluidDexRegularSupplyAction.js +33 -0
  17. package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.d.ts +17 -0
  18. package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.js +37 -0
  19. package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.d.ts +16 -0
  20. package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.js +33 -0
  21. package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.d.ts +17 -0
  22. package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.js +37 -0
  23. package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.d.ts +17 -0
  24. package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.js +36 -0
  25. package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.d.ts +16 -0
  26. package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.js +34 -0
  27. package/esm/src/actions/fluid/index.d.ts +9 -0
  28. package/esm/src/actions/fluid/index.js +9 -0
  29. package/esm/src/actions/index.d.ts +3 -1
  30. package/esm/src/actions/index.js +3 -1
  31. package/esm/src/actions/sky/SkyClaimRewardsAction.d.ts +2 -2
  32. package/esm/src/actions/sky/SkyClaimRewardsAction.js +2 -2
  33. package/esm/src/actions/sky/SkyStakingEngineClaimRewards.d.ts +16 -0
  34. package/esm/src/actions/sky/SkyStakingEngineClaimRewards.js +24 -0
  35. package/esm/src/actions/sky/SkyStakingEngineOpen.d.ts +13 -0
  36. package/esm/src/actions/sky/SkyStakingEngineOpen.js +18 -0
  37. package/esm/src/actions/sky/SkyStakingEngineSelectFarm.d.ts +15 -0
  38. package/esm/src/actions/sky/SkyStakingEngineSelectFarm.js +22 -0
  39. package/esm/src/actions/sky/SkyStakingEngineStake.d.ts +16 -0
  40. package/esm/src/actions/sky/SkyStakingEngineStake.js +24 -0
  41. package/esm/src/actions/sky/SkyStakingEngineUnstake.d.ts +16 -0
  42. package/esm/src/actions/sky/SkyStakingEngineUnstake.js +24 -0
  43. package/esm/src/actions/sky/SkyUnstakeAction.d.ts +1 -1
  44. package/esm/src/actions/sky/SkyUnstakeAction.js +1 -1
  45. package/esm/src/actions/sky/index.d.ts +5 -0
  46. package/esm/src/actions/sky/index.js +6 -0
  47. package/esm/src/actions/spark/SparkSPKClaimAction.d.ts +20 -0
  48. package/esm/src/actions/spark/SparkSPKClaimAction.js +25 -0
  49. package/esm/src/actions/spark/index.d.ts +1 -0
  50. package/esm/src/actions/spark/index.js +1 -0
  51. package/esm/src/actions/stkgho/GhoStakeAction.d.ts +15 -0
  52. package/esm/src/actions/stkgho/GhoStakeAction.js +25 -0
  53. package/esm/src/actions/stkgho/index.d.ts +1 -0
  54. package/esm/src/actions/stkgho/index.js +1 -0
  55. package/esm/src/actions/summerfi/SFApproveTokensAction.d.ts +14 -0
  56. package/esm/src/actions/summerfi/SFApproveTokensAction.js +17 -0
  57. package/esm/src/actions/summerfi/index.d.ts +1 -0
  58. package/esm/src/actions/summerfi/index.js +1 -0
  59. package/esm/src/actions/umbrella/UmbrellaClaimRewardsAction.d.ts +16 -0
  60. package/esm/src/actions/umbrella/UmbrellaClaimRewardsAction.js +22 -0
  61. package/esm/src/actions/umbrella/UmbrellaFinalizeUnstakeAction.d.ts +18 -0
  62. package/esm/src/actions/umbrella/UmbrellaFinalizeUnstakeAction.js +31 -0
  63. package/esm/src/actions/umbrella/UmbrellaStakeAction.d.ts +19 -0
  64. package/esm/src/actions/umbrella/UmbrellaStakeAction.js +29 -0
  65. package/esm/src/actions/umbrella/UmbrellaStartUnstakeAction.d.ts +13 -0
  66. package/esm/src/actions/umbrella/UmbrellaStartUnstakeAction.js +18 -0
  67. package/esm/src/actions/umbrella/index.d.ts +4 -0
  68. package/esm/src/actions/umbrella/index.js +4 -0
  69. package/esm/src/addresses.d.ts +737 -71
  70. package/esm/src/addresses.js +145 -10
  71. package/esm/src/config.js +18 -2
  72. package/esm/src/index.d.ts +3794 -1130
  73. package/esm/src/triggers/AaveV3QuotePriceRangeTrigger.d.ts +13 -0
  74. package/esm/src/triggers/AaveV3QuotePriceRangeTrigger.js +15 -0
  75. package/esm/src/triggers/CompV3PriceRangeTrigger.d.ts +10 -0
  76. package/esm/src/triggers/CompV3PriceRangeTrigger.js +12 -0
  77. package/esm/src/triggers/CompV3PriceTrigger.d.ts +10 -0
  78. package/esm/src/triggers/CompV3PriceTrigger.js +12 -0
  79. package/esm/src/triggers/LiquityV2AdjustRateDebtInFrontTrigger.d.ts +8 -0
  80. package/esm/src/triggers/LiquityV2AdjustRateDebtInFrontTrigger.js +10 -0
  81. package/esm/src/triggers/index.d.ts +4 -0
  82. package/esm/src/triggers/index.js +4 -0
  83. package/esm/src/types.d.ts +2 -0
  84. package/package.json +2 -2
  85. package/src/actions/checkers/AaveV3OpenRatioCheckAction.ts +10 -8
  86. package/src/actions/checkers/AaveV3RatioCheckAction.ts +18 -4
  87. package/src/addresses.ts +19 -0
  88. package/src/triggers/AaveV3QuotePriceRangeTrigger.ts +27 -0
  89. package/src/triggers/index.ts +1 -0
  90. package/umd/index.js +1620 -578
  91. package/yarn-error.log +3976 -0
@@ -1,7 +1,7 @@
1
1
  import { Action } from '../../Action';
2
2
  import { EthAddress, uint256 } from '../../types';
3
3
  /**
4
- * AaveV3OpenRatioCheckAction - Checks aave V3 ratio for users proxy position and reverts if faulty.
4
+ * AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
5
5
  *
6
6
  * @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
7
7
  *
@@ -11,6 +11,7 @@ export declare class AaveV3OpenRatioCheckAction extends Action {
11
11
  /**
12
12
  * @param targetRatio The ratio user want to be at
13
13
  * @param market Address provider for specific market
14
+ * @param user Address of the user (EOA/SW). This param was added later
14
15
  */
15
- constructor(targetRatio: uint256, market: EthAddress);
16
+ constructor(targetRatio: uint256, market: EthAddress, user?: EthAddress);
16
17
  }
@@ -1,7 +1,7 @@
1
1
  import { Action } from '../../Action';
2
2
  import { getAddr } from '../../addresses';
3
3
  /**
4
- * AaveV3OpenRatioCheckAction - Checks aave V3 ratio for users proxy position and reverts if faulty.
4
+ * AaveV3OpenRatioCheckAction - Checks aave V3 ratio for position of `user` and reverts if faulty.
5
5
  *
6
6
  * @dev This checker action is different from AaveV3RatioCheckAction in that it checks current ratio without checking previous ratio.
7
7
  *
@@ -11,12 +11,10 @@ export class AaveV3OpenRatioCheckAction extends Action {
11
11
  /**
12
12
  * @param targetRatio The ratio user want to be at
13
13
  * @param market Address provider for specific market
14
+ * @param user Address of the user (EOA/SW). This param was added later
14
15
  */
15
- constructor(targetRatio, market) {
16
- super('AaveV3OpenRatioCheck', getAddr('Empty'), ['uint256', 'address'], [targetRatio, market]);
17
- this.mappableArgs = [
18
- this.args[0],
19
- this.args[1],
20
- ];
16
+ constructor(targetRatio, market, user = getAddr('Empty')) {
17
+ super('AaveV3OpenRatioCheck', getAddr('Empty'), ['uint256', 'address', 'address'], [targetRatio, market, user]);
18
+ this.mappableArgs = [this.args[0], this.args[1], this.args[2]];
21
19
  }
22
20
  }
@@ -1,5 +1,5 @@
1
1
  import { Action } from '../../Action';
2
- import { uint8, uint256 } from '../../types';
2
+ import { uint8, uint256, EthAddress } from '../../types';
3
3
  /**
4
4
  * AaveV3RatioCheckAction - Checks aave V3 ratio for users proxy position and reverts if faulty
5
5
  *
@@ -9,6 +9,8 @@ export declare class AaveV3RatioCheckAction extends Action {
9
9
  /**
10
10
  * @param ratioState If it should lower/higher
11
11
  * @param targetRatio The ratio user want to be at
12
+ * @param market Address provider for specific market. This param was added later
13
+ * @param user Address of the user (EOA/SW). This param was added later
12
14
  */
13
- constructor(ratioState: uint8, targetRatio: uint256);
15
+ constructor(ratioState: uint8, targetRatio: uint256, market?: EthAddress, user?: EthAddress);
14
16
  }
@@ -9,12 +9,16 @@ export class AaveV3RatioCheckAction extends Action {
9
9
  /**
10
10
  * @param ratioState If it should lower/higher
11
11
  * @param targetRatio The ratio user want to be at
12
+ * @param market Address provider for specific market. This param was added later
13
+ * @param user Address of the user (EOA/SW). This param was added later
12
14
  */
13
- constructor(ratioState, targetRatio) {
14
- super('AaveV3RatioCheck', getAddr('AaveV3RatioCheck'), ['uint8', 'uint256'], [ratioState, targetRatio]);
15
+ constructor(ratioState, targetRatio, market = getAddr('Empty'), user = getAddr('Empty')) {
16
+ super('AaveV3RatioCheck', getAddr('Empty'), ['uint8', 'uint256', 'address', 'address'], [ratioState, targetRatio, market, user]);
15
17
  this.mappableArgs = [
16
18
  this.args[0],
17
19
  this.args[1],
20
+ this.args[2],
21
+ this.args[3],
18
22
  ];
19
23
  }
20
24
  }
@@ -0,0 +1,15 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256, EthAddress } from '../../types';
3
+ /**
4
+ * LiquityV2NewInterestRateCheckerAction - Checks new interest rate for user position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export declare class LiquityV2NewInterestRateCheckerAction extends Action {
9
+ /**
10
+ * @param market Address of the market
11
+ * @param troveId Trove id of the user
12
+ * @param interestRateChange The interest rate change to check
13
+ */
14
+ constructor(market: EthAddress, troveId: uint256, interestRateChange: uint256);
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * LiquityV2NewInterestRateCheckerAction - Checks new interest rate for user position and reverts if faulty
5
+ *
6
+ * @category Checkers
7
+ */
8
+ export class LiquityV2NewInterestRateCheckerAction extends Action {
9
+ /**
10
+ * @param market Address of the market
11
+ * @param troveId Trove id of the user
12
+ * @param interestRateChange The interest rate change to check
13
+ */
14
+ constructor(market, troveId, interestRateChange) {
15
+ super('LiquityV2NewInterestRateChecker', getAddr('Empty'), ['address', 'uint256', 'uint256'], [market, troveId, interestRateChange]);
16
+ this.mappableArgs = [
17
+ this.args[0],
18
+ this.args[1],
19
+ this.args[2],
20
+ ];
21
+ }
22
+ }
@@ -13,4 +13,5 @@ export * from './AaveV3OpenRatioCheckAction';
13
13
  export * from './MorphoBlueTargetRatioCheckAction';
14
14
  export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
+ export * from './LiquityV2NewInterestRateCheckerAction';
16
17
  export * from './FluidRatioCheckAction';
@@ -13,4 +13,5 @@ export * from './AaveV3OpenRatioCheckAction';
13
13
  export * from './MorphoBlueTargetRatioCheckAction';
14
14
  export * from './LiquityV2RatioCheckAction';
15
15
  export * from './LiquityV2TargetRatioCheckAction';
16
+ export * from './LiquityV2NewInterestRateCheckerAction';
16
17
  export * from './FluidRatioCheckAction';
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexOpenAction - Open a new position in the Fluid DEX vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexOpenAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param to Address to send the borrowed assets to.
13
+ * @param supplyAmount Amount of collateral to deposit. Used if vault is T3.
14
+ * @param supplyVariableData Variable data for supply action. Used if vault is T2 or T4.
15
+ * @param borrowAmount Amount of debt to borrow. Used if vault is T2.
16
+ * @param borrowVariableData Variable data for borrow action. Used if vault is T3 or T4.
17
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
18
+ */
19
+ constructor(vault: EthAddress, from: EthAddress, to: EthAddress, supplyAmount: uint256, supplyVariableData: Array<any>, borrowAmount: uint256, borrowVariableData: Array<any>, wrapBorrowedEth: boolean);
20
+ }
@@ -0,0 +1,45 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexOpenAction - Open a new position in the Fluid DEX vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexOpenAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param to Address to send the borrowed assets to.
13
+ * @param supplyAmount Amount of collateral to deposit. Used if vault is T3.
14
+ * @param supplyVariableData Variable data for supply action. Used if vault is T2 or T4.
15
+ * @param borrowAmount Amount of debt to borrow. Used if vault is T2.
16
+ * @param borrowVariableData Variable data for borrow action. Used if vault is T3 or T4.
17
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
18
+ */
19
+ constructor(vault, from, to, supplyAmount, supplyVariableData, borrowAmount, borrowVariableData, wrapBorrowedEth) {
20
+ super('FluidDexOpen', getAddr('FluidDexOpen'), [
21
+ 'address',
22
+ 'address',
23
+ 'address',
24
+ 'uint256',
25
+ ['uint256', 'uint256', 'uint256'],
26
+ 'uint256',
27
+ ['uint256', 'uint256', 'uint256'],
28
+ 'bool',
29
+ ], [vault, from, to, supplyAmount, supplyVariableData, borrowAmount, borrowVariableData, wrapBorrowedEth]);
30
+ this.mappableArgs = [
31
+ this.args[0],
32
+ this.args[1],
33
+ this.args[2],
34
+ this.args[3],
35
+ this.args[4][0],
36
+ this.args[4][1],
37
+ this.args[4][2],
38
+ this.args[5],
39
+ this.args[6][0],
40
+ this.args[6][1],
41
+ this.args[6][2],
42
+ this.args[7],
43
+ ];
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularBorrowAction - Borrow assets from the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowAmount Amount of debt to borrow
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, borrowAmount: uint256, wrapBorrowedEth: boolean);
17
+ }
@@ -0,0 +1,36 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularBorrowAction - Borrow assets from the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowAmount Amount of debt to borrow
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, borrowAmount, wrapBorrowedEth) {
17
+ super('FluidDexBorrow', getAddr('FluidDexBorrow'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, borrowAmount, ['0', '0', '0'], wrapBorrowedEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[5],
34
+ ];
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularPaybackAction - Payback debt on the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackAmount The amount of debt to payback.
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, paybackAmount: uint256);
16
+ }
@@ -0,0 +1,34 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularPaybackAction - Payback debt on the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackAmount The amount of debt to payback.
14
+ */
15
+ constructor(vault, from, nftId, paybackAmount) {
16
+ super('FluidDexPayback', getAddr('FluidDexPayback'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, paybackAmount, ['0', '0', '0', '0']]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ this.args[4][3],
32
+ ];
33
+ }
34
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularSupplyAction - Supply collateral to the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyAmount Amount of collateral to deposit.
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, supplyAmount: uint256);
16
+ }
@@ -0,0 +1,33 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularSupplyAction - Supply collateral to the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyAmount Amount of collateral to deposit.
14
+ */
15
+ constructor(vault, from, nftId, supplyAmount) {
16
+ super('FluidDexSupply', getAddr('FluidDexSupply'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, supplyAmount, ['0', '0', '0']]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ ];
32
+ }
33
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularWithdrawAction - Withdraw assets from the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawAmount Amount of collateral to withdraw.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, withdrawAmount: uint256, wrapWithdrawnEth: boolean);
17
+ }
@@ -0,0 +1,37 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularWithdrawAction - Withdraw assets from the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawAmount Amount of collateral to withdraw.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, withdrawAmount, wrapWithdrawnEth) {
17
+ super('FluidDexWithdraw', getAddr('FluidDexWithdraw'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, withdrawAmount, ['0', '0', '0', '0'], wrapWithdrawnEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[4][3],
34
+ this.args[5],
35
+ ];
36
+ }
37
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartCollSupplyAction - Supply collateral to the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartCollSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyVariableData Variable data for supply action
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, supplyVariableData: Array<any>);
16
+ }
@@ -0,0 +1,33 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartCollSupplyAction - Supply collateral to the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartCollSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyVariableData Variable data for supply action
14
+ */
15
+ constructor(vault, from, nftId, supplyVariableData) {
16
+ super('FluidDexSupply', getAddr('FluidDexSupply'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, '0', supplyVariableData]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ ];
32
+ }
33
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartCollWithdrawAction - Withdraw assets from the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartCollWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawVariableData Variable data for withdraw action.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, withdrawVariableData: Array<any>, wrapWithdrawnEth: boolean);
17
+ }
@@ -0,0 +1,37 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartCollWithdrawAction - Withdraw assets from the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartCollWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawVariableData Variable data for withdraw action.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, withdrawVariableData, wrapWithdrawnEth) {
17
+ super('FluidDexWithdraw', getAddr('FluidDexWithdraw'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, '0', withdrawVariableData, wrapWithdrawnEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[4][3],
34
+ this.args[5],
35
+ ];
36
+ }
37
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartDebtBorrowAction - Borrow assets from the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartDebtBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowVariableData Variable data for borrow action.
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, borrowVariableData: Array<any>, wrapBorrowedEth: boolean);
17
+ }
@@ -0,0 +1,36 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartDebtBorrowAction - Borrow assets from the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartDebtBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowVariableData Variable data for borrow action.
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, borrowVariableData, wrapBorrowedEth) {
17
+ super('FluidDexBorrow', getAddr('FluidDexBorrow'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, '0', borrowVariableData, wrapBorrowedEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[5],
34
+ ];
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartDebtPaybackAction - Payback debt on the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartDebtPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackVariableData Variable data for payback action.
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, paybackVariableData: Array<any>);
16
+ }
@@ -0,0 +1,34 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartDebtPaybackAction - Payback debt on the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartDebtPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackVariableData Variable data for payback action.
14
+ */
15
+ constructor(vault, from, nftId, paybackVariableData) {
16
+ super('FluidDexPayback', getAddr('FluidDexPayback'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, '0', paybackVariableData]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ this.args[4][3],
32
+ ];
33
+ }
34
+ }
@@ -5,3 +5,12 @@ export * from './FluidVaultT1PaybackAction';
5
5
  export * from './FluidVaultT1SupplyAction';
6
6
  export * from './FluidVaultT1WithdrawAction';
7
7
  export * from './FluidClaimAction';
8
+ export * from './FluidDexOpenAction';
9
+ export * from './FluidDexRegularBorrowAction';
10
+ export * from './FluidDexRegularSupplyAction';
11
+ export * from './FluidDexRegularPaybackAction';
12
+ export * from './FluidDexRegularWithdrawAction';
13
+ export * from './FluidDexSmartCollSupplyAction';
14
+ export * from './FluidDexSmartCollWithdrawAction';
15
+ export * from './FluidDexSmartDebtBorrowAction';
16
+ export * from './FluidDexSmartDebtPaybackAction';