@defisaver/sdk 1.3.7 → 1.3.8

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 (79) hide show
  1. package/esm/src/actions/checkers/LiquityV2NewInterestRateCheckerAction.d.ts +15 -0
  2. package/esm/src/actions/checkers/LiquityV2NewInterestRateCheckerAction.js +22 -0
  3. package/esm/src/actions/checkers/index.d.ts +1 -0
  4. package/esm/src/actions/checkers/index.js +1 -0
  5. package/esm/src/actions/fluid/FluidDexOpenAction.d.ts +20 -0
  6. package/esm/src/actions/fluid/FluidDexOpenAction.js +45 -0
  7. package/esm/src/actions/fluid/FluidDexRegularBorrowAction.d.ts +17 -0
  8. package/esm/src/actions/fluid/FluidDexRegularBorrowAction.js +36 -0
  9. package/esm/src/actions/fluid/FluidDexRegularPaybackAction.d.ts +16 -0
  10. package/esm/src/actions/fluid/FluidDexRegularPaybackAction.js +34 -0
  11. package/esm/src/actions/fluid/FluidDexRegularSupplyAction.d.ts +16 -0
  12. package/esm/src/actions/fluid/FluidDexRegularSupplyAction.js +33 -0
  13. package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.d.ts +17 -0
  14. package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.js +37 -0
  15. package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.d.ts +16 -0
  16. package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.js +33 -0
  17. package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.d.ts +17 -0
  18. package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.js +37 -0
  19. package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.d.ts +17 -0
  20. package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.js +36 -0
  21. package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.d.ts +16 -0
  22. package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.js +34 -0
  23. package/esm/src/actions/fluid/index.d.ts +9 -0
  24. package/esm/src/actions/fluid/index.js +9 -0
  25. package/esm/src/actions/index.d.ts +3 -1
  26. package/esm/src/actions/index.js +3 -1
  27. package/esm/src/actions/sky/SkyClaimRewardsAction.d.ts +2 -2
  28. package/esm/src/actions/sky/SkyClaimRewardsAction.js +2 -2
  29. package/esm/src/actions/sky/SkyStakingEngineClaimRewards.d.ts +16 -0
  30. package/esm/src/actions/sky/SkyStakingEngineClaimRewards.js +24 -0
  31. package/esm/src/actions/sky/SkyStakingEngineOpen.d.ts +13 -0
  32. package/esm/src/actions/sky/SkyStakingEngineOpen.js +18 -0
  33. package/esm/src/actions/sky/SkyStakingEngineSelectFarm.d.ts +15 -0
  34. package/esm/src/actions/sky/SkyStakingEngineSelectFarm.js +22 -0
  35. package/esm/src/actions/sky/SkyStakingEngineStake.d.ts +16 -0
  36. package/esm/src/actions/sky/SkyStakingEngineStake.js +24 -0
  37. package/esm/src/actions/sky/SkyStakingEngineUnstake.d.ts +16 -0
  38. package/esm/src/actions/sky/SkyStakingEngineUnstake.js +24 -0
  39. package/esm/src/actions/sky/SkyUnstakeAction.d.ts +1 -1
  40. package/esm/src/actions/sky/SkyUnstakeAction.js +1 -1
  41. package/esm/src/actions/sky/index.d.ts +5 -0
  42. package/esm/src/actions/sky/index.js +6 -0
  43. package/esm/src/actions/spark/SparkSPKClaimAction.d.ts +20 -0
  44. package/esm/src/actions/spark/SparkSPKClaimAction.js +25 -0
  45. package/esm/src/actions/spark/index.d.ts +1 -0
  46. package/esm/src/actions/spark/index.js +1 -0
  47. package/esm/src/actions/stkgho/GhoStakeAction.d.ts +15 -0
  48. package/esm/src/actions/stkgho/GhoStakeAction.js +25 -0
  49. package/esm/src/actions/stkgho/index.d.ts +1 -0
  50. package/esm/src/actions/stkgho/index.js +1 -0
  51. package/esm/src/actions/summerfi/SFApproveTokensAction.d.ts +14 -0
  52. package/esm/src/actions/summerfi/SFApproveTokensAction.js +17 -0
  53. package/esm/src/actions/summerfi/index.d.ts +1 -0
  54. package/esm/src/actions/summerfi/index.js +1 -0
  55. package/esm/src/actions/umbrella/UmbrellaClaimRewardsAction.d.ts +16 -0
  56. package/esm/src/actions/umbrella/UmbrellaClaimRewardsAction.js +22 -0
  57. package/esm/src/actions/umbrella/UmbrellaFinalizeUnstakeAction.d.ts +18 -0
  58. package/esm/src/actions/umbrella/UmbrellaFinalizeUnstakeAction.js +31 -0
  59. package/esm/src/actions/umbrella/UmbrellaStakeAction.d.ts +19 -0
  60. package/esm/src/actions/umbrella/UmbrellaStakeAction.js +29 -0
  61. package/esm/src/actions/umbrella/UmbrellaStartUnstakeAction.d.ts +13 -0
  62. package/esm/src/actions/umbrella/UmbrellaStartUnstakeAction.js +18 -0
  63. package/esm/src/actions/umbrella/index.d.ts +4 -0
  64. package/esm/src/actions/umbrella/index.js +4 -0
  65. package/esm/src/addresses.d.ts +736 -70
  66. package/esm/src/addresses.js +126 -10
  67. package/esm/src/config.js +18 -2
  68. package/esm/src/index.d.ts +3856 -1192
  69. package/esm/src/triggers/CompV3PriceRangeTrigger.d.ts +10 -0
  70. package/esm/src/triggers/CompV3PriceRangeTrigger.js +12 -0
  71. package/esm/src/triggers/CompV3PriceTrigger.d.ts +10 -0
  72. package/esm/src/triggers/CompV3PriceTrigger.js +12 -0
  73. package/esm/src/triggers/LiquityV2AdjustRateDebtInFrontTrigger.d.ts +8 -0
  74. package/esm/src/triggers/LiquityV2AdjustRateDebtInFrontTrigger.js +10 -0
  75. package/esm/src/triggers/index.d.ts +3 -0
  76. package/esm/src/triggers/index.js +3 -0
  77. package/esm/src/types.d.ts +2 -0
  78. package/package.json +1 -1
  79. package/umd/index.js +1559 -571
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256, EthAddress } from '../../types';
3
+ /**
4
+ * SkyStakingEngineClaimRewardsAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export declare class SkyStakingEngineClaimRewardsAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param farm
13
+ * @param to
14
+ */
15
+ constructor(stakingContract: EthAddress, index: uint256, farm: EthAddress, to: EthAddress);
16
+ }
@@ -0,0 +1,24 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SkyStakingEngineClaimRewardsAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export class SkyStakingEngineClaimRewardsAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param farm
13
+ * @param to
14
+ */
15
+ constructor(stakingContract, index, farm, to) {
16
+ super('SkyStakingEngineClaimRewards', getAddr('SkyStakingEngineClaimRewards'), ['address', 'uint256', 'address', 'address'], [stakingContract, index, farm, to]);
17
+ this.mappableArgs = [
18
+ this.args[0],
19
+ this.args[1],
20
+ this.args[2],
21
+ this.args[3],
22
+ ];
23
+ }
24
+ }
@@ -0,0 +1,13 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress } from '../../types';
3
+ /**
4
+ * SkyStakingEngineOpenAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export declare class SkyStakingEngineOpenAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ */
12
+ constructor(stakingContract: EthAddress);
13
+ }
@@ -0,0 +1,18 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SkyStakingEngineOpenAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export class SkyStakingEngineOpenAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ */
12
+ constructor(stakingContract) {
13
+ super('SkyStakingEngineOpen', getAddr('SkyStakingEngineOpen'), ['address'], [stakingContract]);
14
+ this.mappableArgs = [
15
+ this.args[0],
16
+ ];
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256, EthAddress } from '../../types';
3
+ /**
4
+ * SkyStakingEngineSelectFarmAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export declare class SkyStakingEngineSelectFarmAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param farm
13
+ */
14
+ constructor(stakingContract: EthAddress, index: uint256, farm: EthAddress);
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SkyStakingEngineSelectFarmAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export class SkyStakingEngineSelectFarmAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param farm
13
+ */
14
+ constructor(stakingContract, index, farm) {
15
+ super('SkyStakingEngineSelectFarm', getAddr('SkyStakingEngineSelectFarm'), ['address', 'uint256', 'address'], [stakingContract, index, farm]);
16
+ this.mappableArgs = [
17
+ this.args[0],
18
+ this.args[1],
19
+ this.args[2],
20
+ ];
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256, EthAddress } from '../../types';
3
+ /**
4
+ * SkyStakingEngineStakeAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export declare class SkyStakingEngineStakeAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param amount
13
+ * @param from
14
+ */
15
+ constructor(stakingContract: EthAddress, index: uint256, amount: uint256, from: EthAddress);
16
+ }
@@ -0,0 +1,24 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SkyStakingEngineStakeAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export class SkyStakingEngineStakeAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param amount
13
+ * @param from
14
+ */
15
+ constructor(stakingContract, index, amount, from) {
16
+ super('SkyStakingEngineStake', getAddr('SkyStakingEngineStake'), ['address', 'uint256', 'uint256', 'address'], [stakingContract, index, amount, from]);
17
+ this.mappableArgs = [
18
+ this.args[0],
19
+ this.args[1],
20
+ this.args[2],
21
+ this.args[3],
22
+ ];
23
+ }
24
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { uint256, EthAddress } from '../../types';
3
+ /**
4
+ * SkyStakingEngineUnstakeAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export declare class SkyStakingEngineUnstakeAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param amount
13
+ * @param to
14
+ */
15
+ constructor(stakingContract: EthAddress, index: uint256, amount: uint256, to: EthAddress);
16
+ }
@@ -0,0 +1,24 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SkyStakingEngineUnstakeAction
5
+ *
6
+ * @category Sky
7
+ */
8
+ export class SkyStakingEngineUnstakeAction extends Action {
9
+ /**
10
+ * @param stakingContract
11
+ * @param index
12
+ * @param amount
13
+ * @param to
14
+ */
15
+ constructor(stakingContract, index, amount, to) {
16
+ super('SkyStakingEngineUnstake', getAddr('SkyStakingEngineUnstake'), ['address', 'uint256', 'uint256', 'address'], [stakingContract, index, amount, to]);
17
+ this.mappableArgs = [
18
+ this.args[0],
19
+ this.args[1],
20
+ this.args[2],
21
+ this.args[3],
22
+ ];
23
+ }
24
+ }
@@ -1,7 +1,7 @@
1
1
  import { Action } from '../../Action';
2
2
  import { uint256, EthAddress } from '../../types';
3
3
  /**
4
- * SkyStakeAction
4
+ * SkyUnstakeAction
5
5
  *
6
6
  * @category Sky
7
7
  */
@@ -1,7 +1,7 @@
1
1
  import { Action } from '../../Action';
2
2
  import { getAddr } from '../../addresses';
3
3
  /**
4
- * SkyStakeAction
4
+ * SkyUnstakeAction
5
5
  *
6
6
  * @category Sky
7
7
  */
@@ -1,3 +1,8 @@
1
1
  export * from './SkyClaimRewardsAction';
2
2
  export * from './SkyStakeAction';
3
3
  export * from './SkyUnstakeAction';
4
+ export * from './SkyStakingEngineOpen';
5
+ export * from './SkyStakingEngineSelectFarm';
6
+ export * from './SkyStakingEngineStake';
7
+ export * from './SkyStakingEngineUnstake';
8
+ export * from './SkyStakingEngineClaimRewards';
@@ -1,3 +1,9 @@
1
1
  export * from './SkyClaimRewardsAction';
2
2
  export * from './SkyStakeAction';
3
3
  export * from './SkyUnstakeAction';
4
+ // Sky Staking Engine
5
+ export * from './SkyStakingEngineOpen';
6
+ export * from './SkyStakingEngineSelectFarm';
7
+ export * from './SkyStakingEngineStake';
8
+ export * from './SkyStakingEngineUnstake';
9
+ export * from './SkyStakingEngineClaimRewards';
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256, bytes32 } from '../../types';
3
+ /**
4
+ * SparkSPKClaimAction - Claim SPK tokens
5
+ *
6
+ * @category Spark
7
+ */
8
+ export declare class SparkSPKClaimAction extends Action {
9
+ /**
10
+ * @param rewardContract - Reward contract address
11
+ * @param to - Address to claim to
12
+ * @param epoch - Epoch number
13
+ * @param account - Account address
14
+ * @param token - Token address
15
+ * @param cumulativeAmount - Cumulative amount to claim
16
+ * @param expectedMerkleRoot - Expected merkle root
17
+ * @param merkleProof - Merkle proof array
18
+ */
19
+ constructor(rewardContract: EthAddress, to: EthAddress, epoch: uint256, account: EthAddress, token: EthAddress, cumulativeAmount: uint256, expectedMerkleRoot: bytes32, merkleProof: Array<bytes32>);
20
+ }
@@ -0,0 +1,25 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * SparkSPKClaimAction - Claim SPK tokens
5
+ *
6
+ * @category Spark
7
+ */
8
+ export class SparkSPKClaimAction extends Action {
9
+ /**
10
+ * @param rewardContract - Reward contract address
11
+ * @param to - Address to claim to
12
+ * @param epoch - Epoch number
13
+ * @param account - Account address
14
+ * @param token - Token address
15
+ * @param cumulativeAmount - Cumulative amount to claim
16
+ * @param expectedMerkleRoot - Expected merkle root
17
+ * @param merkleProof - Merkle proof array
18
+ */
19
+ constructor(rewardContract, to, epoch, account, token, cumulativeAmount, expectedMerkleRoot, merkleProof) {
20
+ super('SparkSPKClaim', getAddr('SparkSPKClaim'), ['address', 'address', 'uint256', 'address', 'address', 'uint256', 'bytes32', 'bytes32[]'], [rewardContract, to, epoch, account, token, cumulativeAmount, expectedMerkleRoot, merkleProof]);
21
+ this.mappableArgs = [
22
+ this.args[0],
23
+ ];
24
+ }
25
+ }
@@ -9,3 +9,4 @@ export * from './SparkClaimRewardsAction';
9
9
  export * from './SparkSwapBorrowRateModeAction';
10
10
  export * from './SparkDelegateCredit';
11
11
  export * from './SparkDelegateWithSigAction';
12
+ export * from './SparkSPKClaimAction';
@@ -9,3 +9,4 @@ export * from './SparkClaimRewardsAction';
9
9
  export * from './SparkSwapBorrowRateModeAction';
10
10
  export * from './SparkDelegateCredit';
11
11
  export * from './SparkDelegateWithSigAction';
12
+ export * from './SparkSPKClaimAction';
@@ -0,0 +1,15 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * GhoStakeAction - stakes GHO tokens
5
+ *
6
+ * @category StkGHO
7
+ */
8
+ export declare class GhoStakeAction extends Action {
9
+ /**
10
+ * @param from - Address to pull the GHO tokens from
11
+ * @param to - Address to send the stkGHO tokens to
12
+ * @param amount - Amount of GHO tokens to stake
13
+ */
14
+ constructor(from: EthAddress, to: EthAddress, amount: uint256);
15
+ }
@@ -0,0 +1,25 @@
1
+ import { Action } from '../../Action';
2
+ import { requireAddress } from '../../utils/general';
3
+ import { getAddr } from '../../addresses';
4
+ /**
5
+ * GhoStakeAction - stakes GHO tokens
6
+ *
7
+ * @category StkGHO
8
+ */
9
+ export class GhoStakeAction extends Action {
10
+ /**
11
+ * @param from - Address to pull the GHO tokens from
12
+ * @param to - Address to send the stkGHO tokens to
13
+ * @param amount - Amount of GHO tokens to stake
14
+ */
15
+ constructor(from, to, amount) {
16
+ requireAddress(from);
17
+ requireAddress(to);
18
+ super('GhoStake', getAddr('GhoStake'), ['address', 'address', 'uint256'], [from, to, amount]);
19
+ this.mappableArgs = [
20
+ this.args[0],
21
+ this.args[1],
22
+ this.args[2],
23
+ ];
24
+ }
25
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './GhoClaimAAVEAction';
2
2
  export * from './GhoFinalizeUnstakeAction';
3
3
  export * from './GhoStartUnstakeAction';
4
+ export * from './GhoStakeAction';
@@ -1,3 +1,4 @@
1
1
  export * from './GhoClaimAAVEAction';
2
2
  export * from './GhoFinalizeUnstakeAction';
3
3
  export * from './GhoStartUnstakeAction';
4
+ export * from './GhoStakeAction';
@@ -0,0 +1,14 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export declare class SFApproveTokensAction extends Action {
7
+ /**
8
+ * @param sfProxy Summerfi proxy address
9
+ * @param spender DSProxy address
10
+ * @param tokens List of assets to approve
11
+ * @param allowances Approve amounts
12
+ */
13
+ constructor(sfProxy: EthAddress, spender: EthAddress, tokens: EthAddress[], allowances: uint256[]);
14
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * @category Summerfi
5
+ */
6
+ export class SFApproveTokensAction extends Action {
7
+ /**
8
+ * @param sfProxy Summerfi proxy address
9
+ * @param spender DSProxy address
10
+ * @param tokens List of assets to approve
11
+ * @param allowances Approve amounts
12
+ */
13
+ constructor(sfProxy, spender, tokens, allowances) {
14
+ super('SFApproveTokens', getAddr('SFApproveTokens'), ['address', 'address', 'address[]', 'uint256[]'], [sfProxy, spender, tokens, allowances]);
15
+ this.mappableArgs = [];
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export * from './SFApproveTokensAction';
@@ -0,0 +1 @@
1
+ export * from './SFApproveTokensAction';
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress } from '../../types';
3
+ /**
4
+ * UmbrellaClaimRewardsAction - Claim rewards from staking in Umbrella staking system
5
+
6
+ *
7
+ * @category Umbrella
8
+ */
9
+ export declare class UmbrellaClaimRewardsAction extends Action {
10
+ /**
11
+ * @param asset The asset to claim rewards from
12
+ * @param to The address to send the rewards to
13
+ * @param rewards The rewards to claim
14
+ */
15
+ constructor(asset: EthAddress, to: EthAddress, rewards: Array<EthAddress>);
16
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * UmbrellaClaimRewardsAction - Claim rewards from staking in Umbrella staking system
5
+
6
+ *
7
+ * @category Umbrella
8
+ */
9
+ export class UmbrellaClaimRewardsAction extends Action {
10
+ /**
11
+ * @param asset The asset to claim rewards from
12
+ * @param to The address to send the rewards to
13
+ * @param rewards The rewards to claim
14
+ */
15
+ constructor(asset, to, rewards) {
16
+ super('UmbrellaClaimRewards', getAddr('UmbrellaClaimRewards'), ['address', 'address', 'address[]'], [asset, to, rewards]);
17
+ this.mappableArgs = [
18
+ this.args[0],
19
+ this.args[1],
20
+ ];
21
+ }
22
+ }
@@ -0,0 +1,18 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * UmbrellaFinalizeUnstakeAction - Finalize un-staking of aTokens/underlying or GHO tokens using Umbrella Stake Token
5
+ * This action will always unwrap waTokens to aTokens or underlying after un-staking.
6
+ *
7
+ * @category Umbrella
8
+ */
9
+ export declare class UmbrellaFinalizeUnstakeAction extends Action {
10
+ /**
11
+ * @param stkToken The umbrella stake token.
12
+ * @param to The address to which the aToken/underlying or GHO will be transferred
13
+ * @param stkAmount The amount of stkToken shares to burn (max.uint to redeem whole balance, 0 to start cooldown period)
14
+ * @param useATokens Whether to unwrap waTokens to aTokens or underlying (e.g. aUSDC or USDC).
15
+ * @param minAmountOut The minimum amount of aToken/underlying or GHO to be received
16
+ */
17
+ constructor(stkToken: EthAddress, to: EthAddress, stkAmount: uint256, useATokens: boolean, minAmountOut: uint256);
18
+ }
@@ -0,0 +1,31 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { requireAddress } from '../../utils/general';
4
+ /**
5
+ * UmbrellaFinalizeUnstakeAction - Finalize un-staking of aTokens/underlying or GHO tokens using Umbrella Stake Token
6
+ * This action will always unwrap waTokens to aTokens or underlying after un-staking.
7
+ *
8
+ * @category Umbrella
9
+ */
10
+ export class UmbrellaFinalizeUnstakeAction extends Action {
11
+ /**
12
+ * @param stkToken The umbrella stake token.
13
+ * @param to The address to which the aToken/underlying or GHO will be transferred
14
+ * @param stkAmount The amount of stkToken shares to burn (max.uint to redeem whole balance, 0 to start cooldown period)
15
+ * @param useATokens Whether to unwrap waTokens to aTokens or underlying (e.g. aUSDC or USDC).
16
+ * @param minAmountOut The minimum amount of aToken/underlying or GHO to be received
17
+ */
18
+ constructor(stkToken, to, stkAmount, useATokens, minAmountOut) {
19
+ requireAddress(to);
20
+ if (stkAmount === '0')
21
+ throw new Error('Amount must be greater than 0. If you want to start cooldown period, use UmbrellaStartUnstakeAction');
22
+ super('UmbrellaUnstake', getAddr('UmbrellaUnstake'), ['address', 'address', 'uint256', 'bool', 'uint256'], [stkToken, to, stkAmount, useATokens, minAmountOut]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4],
29
+ ];
30
+ }
31
+ }
@@ -0,0 +1,19 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * UmbrellaStakeAction - Stake aTokens/underlying or GHO tokens using Umbrella Stake Token
5
+ * This action will always pull aTokens/underlying for non GHO staking and wrap them into waTokens for staking.
6
+ *
7
+ * @category Umbrella
8
+ */
9
+ export declare class UmbrellaStakeAction extends Action {
10
+ /**
11
+ * @param stkToken The umbrella stake token.
12
+ * @param from The address from which the aToken/underlying or GHO will be pulled.
13
+ * @param to The address to which the stkToken will be transferred
14
+ * @param amount The amount of aToken/underlying or GHO to be staked.
15
+ * @param useATokens Whether to wrap aTokens to waTokens (e.g. aUSDC to waUSDC) before staking.
16
+ * @param minSharesOut The minimum amount of stkToken shares to receive.
17
+ */
18
+ constructor(stkToken: EthAddress, from: EthAddress, to: EthAddress, amount: uint256, useATokens: boolean, minSharesOut: uint256);
19
+ }
@@ -0,0 +1,29 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * UmbrellaStakeAction - Stake aTokens/underlying or GHO tokens using Umbrella Stake Token
5
+ * This action will always pull aTokens/underlying for non GHO staking and wrap them into waTokens for staking.
6
+ *
7
+ * @category Umbrella
8
+ */
9
+ export class UmbrellaStakeAction extends Action {
10
+ /**
11
+ * @param stkToken The umbrella stake token.
12
+ * @param from The address from which the aToken/underlying or GHO will be pulled.
13
+ * @param to The address to which the stkToken will be transferred
14
+ * @param amount The amount of aToken/underlying or GHO to be staked.
15
+ * @param useATokens Whether to wrap aTokens to waTokens (e.g. aUSDC to waUSDC) before staking.
16
+ * @param minSharesOut The minimum amount of stkToken shares to receive.
17
+ */
18
+ constructor(stkToken, from, to, amount, useATokens, minSharesOut) {
19
+ super('UmbrellaStake', getAddr('UmbrellaStake'), ['address', 'address', 'address', 'uint256', 'bool', 'uint256'], [stkToken, from, to, amount, useATokens, minSharesOut]);
20
+ this.mappableArgs = [
21
+ this.args[0],
22
+ this.args[1],
23
+ this.args[2],
24
+ this.args[3],
25
+ this.args[4],
26
+ this.args[5],
27
+ ];
28
+ }
29
+ }
@@ -0,0 +1,13 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress } from '../../types';
3
+ /**
4
+ * UmbrellaStartUnstakeAction - Start un-staking of aTokens/underlying or GHO tokens using Umbrella Stake Token
5
+ *
6
+ * @category Umbrella
7
+ */
8
+ export declare class UmbrellaStartUnstakeAction extends Action {
9
+ /**
10
+ * @param stkToken The umbrella stake token.
11
+ */
12
+ constructor(stkToken: EthAddress);
13
+ }
@@ -0,0 +1,18 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * UmbrellaStartUnstakeAction - Start un-staking of aTokens/underlying or GHO tokens using Umbrella Stake Token
5
+ *
6
+ * @category Umbrella
7
+ */
8
+ export class UmbrellaStartUnstakeAction extends Action {
9
+ /**
10
+ * @param stkToken The umbrella stake token.
11
+ */
12
+ constructor(stkToken) {
13
+ super('UmbrellaUnstake', getAddr('UmbrellaUnstake'), ['address', 'address', 'uint256', 'bool', 'uint256'], [stkToken, getAddr('Empty'), '0', false, '0']);
14
+ this.mappableArgs = [
15
+ this.args[0],
16
+ ];
17
+ }
18
+ }
@@ -0,0 +1,4 @@
1
+ export * from './UmbrellaStakeAction';
2
+ export * from './UmbrellaStartUnstakeAction';
3
+ export * from './UmbrellaFinalizeUnstakeAction';
4
+ export * from './UmbrellaClaimRewardsAction';
@@ -0,0 +1,4 @@
1
+ export * from './UmbrellaStakeAction';
2
+ export * from './UmbrellaStartUnstakeAction';
3
+ export * from './UmbrellaFinalizeUnstakeAction';
4
+ export * from './UmbrellaClaimRewardsAction';