@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.
- package/esm/src/actions/checkers/AaveV3OpenRatioCheckAction.d.ts +3 -2
- package/esm/src/actions/checkers/AaveV3OpenRatioCheckAction.js +5 -7
- package/esm/src/actions/checkers/AaveV3RatioCheckAction.d.ts +4 -2
- package/esm/src/actions/checkers/AaveV3RatioCheckAction.js +6 -2
- package/esm/src/actions/checkers/LiquityV2NewInterestRateCheckerAction.d.ts +15 -0
- package/esm/src/actions/checkers/LiquityV2NewInterestRateCheckerAction.js +22 -0
- package/esm/src/actions/checkers/index.d.ts +1 -0
- package/esm/src/actions/checkers/index.js +1 -0
- package/esm/src/actions/fluid/FluidDexOpenAction.d.ts +20 -0
- package/esm/src/actions/fluid/FluidDexOpenAction.js +45 -0
- package/esm/src/actions/fluid/FluidDexRegularBorrowAction.d.ts +17 -0
- package/esm/src/actions/fluid/FluidDexRegularBorrowAction.js +36 -0
- package/esm/src/actions/fluid/FluidDexRegularPaybackAction.d.ts +16 -0
- package/esm/src/actions/fluid/FluidDexRegularPaybackAction.js +34 -0
- package/esm/src/actions/fluid/FluidDexRegularSupplyAction.d.ts +16 -0
- package/esm/src/actions/fluid/FluidDexRegularSupplyAction.js +33 -0
- package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.d.ts +17 -0
- package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.js +37 -0
- package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.d.ts +16 -0
- package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.js +33 -0
- package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.d.ts +17 -0
- package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.js +37 -0
- package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.d.ts +17 -0
- package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.js +36 -0
- package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.d.ts +16 -0
- package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.js +34 -0
- package/esm/src/actions/fluid/index.d.ts +9 -0
- package/esm/src/actions/fluid/index.js +9 -0
- package/esm/src/actions/index.d.ts +3 -1
- package/esm/src/actions/index.js +3 -1
- package/esm/src/actions/sky/SkyClaimRewardsAction.d.ts +2 -2
- package/esm/src/actions/sky/SkyClaimRewardsAction.js +2 -2
- package/esm/src/actions/sky/SkyStakingEngineClaimRewards.d.ts +16 -0
- package/esm/src/actions/sky/SkyStakingEngineClaimRewards.js +24 -0
- package/esm/src/actions/sky/SkyStakingEngineOpen.d.ts +13 -0
- package/esm/src/actions/sky/SkyStakingEngineOpen.js +18 -0
- package/esm/src/actions/sky/SkyStakingEngineSelectFarm.d.ts +15 -0
- package/esm/src/actions/sky/SkyStakingEngineSelectFarm.js +22 -0
- package/esm/src/actions/sky/SkyStakingEngineStake.d.ts +16 -0
- package/esm/src/actions/sky/SkyStakingEngineStake.js +24 -0
- package/esm/src/actions/sky/SkyStakingEngineUnstake.d.ts +16 -0
- package/esm/src/actions/sky/SkyStakingEngineUnstake.js +24 -0
- package/esm/src/actions/sky/SkyUnstakeAction.d.ts +1 -1
- package/esm/src/actions/sky/SkyUnstakeAction.js +1 -1
- package/esm/src/actions/sky/index.d.ts +5 -0
- package/esm/src/actions/sky/index.js +6 -0
- package/esm/src/actions/spark/SparkSPKClaimAction.d.ts +20 -0
- package/esm/src/actions/spark/SparkSPKClaimAction.js +25 -0
- package/esm/src/actions/spark/index.d.ts +1 -0
- package/esm/src/actions/spark/index.js +1 -0
- package/esm/src/actions/stkgho/GhoStakeAction.d.ts +15 -0
- package/esm/src/actions/stkgho/GhoStakeAction.js +25 -0
- package/esm/src/actions/stkgho/index.d.ts +1 -0
- package/esm/src/actions/stkgho/index.js +1 -0
- package/esm/src/actions/summerfi/SFApproveTokensAction.d.ts +14 -0
- package/esm/src/actions/summerfi/SFApproveTokensAction.js +17 -0
- package/esm/src/actions/summerfi/index.d.ts +1 -0
- package/esm/src/actions/summerfi/index.js +1 -0
- package/esm/src/actions/umbrella/UmbrellaClaimRewardsAction.d.ts +16 -0
- package/esm/src/actions/umbrella/UmbrellaClaimRewardsAction.js +22 -0
- package/esm/src/actions/umbrella/UmbrellaFinalizeUnstakeAction.d.ts +18 -0
- package/esm/src/actions/umbrella/UmbrellaFinalizeUnstakeAction.js +31 -0
- package/esm/src/actions/umbrella/UmbrellaStakeAction.d.ts +19 -0
- package/esm/src/actions/umbrella/UmbrellaStakeAction.js +29 -0
- package/esm/src/actions/umbrella/UmbrellaStartUnstakeAction.d.ts +13 -0
- package/esm/src/actions/umbrella/UmbrellaStartUnstakeAction.js +18 -0
- package/esm/src/actions/umbrella/index.d.ts +4 -0
- package/esm/src/actions/umbrella/index.js +4 -0
- package/esm/src/addresses.d.ts +737 -71
- package/esm/src/addresses.js +145 -10
- package/esm/src/config.js +18 -2
- package/esm/src/index.d.ts +3794 -1130
- package/esm/src/triggers/AaveV3QuotePriceRangeTrigger.d.ts +13 -0
- package/esm/src/triggers/AaveV3QuotePriceRangeTrigger.js +15 -0
- package/esm/src/triggers/CompV3PriceRangeTrigger.d.ts +10 -0
- package/esm/src/triggers/CompV3PriceRangeTrigger.js +12 -0
- package/esm/src/triggers/CompV3PriceTrigger.d.ts +10 -0
- package/esm/src/triggers/CompV3PriceTrigger.js +12 -0
- package/esm/src/triggers/LiquityV2AdjustRateDebtInFrontTrigger.d.ts +8 -0
- package/esm/src/triggers/LiquityV2AdjustRateDebtInFrontTrigger.js +10 -0
- package/esm/src/triggers/index.d.ts +4 -0
- package/esm/src/triggers/index.js +4 -0
- package/esm/src/types.d.ts +2 -0
- package/package.json +2 -2
- package/src/actions/checkers/AaveV3OpenRatioCheckAction.ts +10 -8
- package/src/actions/checkers/AaveV3RatioCheckAction.ts +18 -4
- package/src/addresses.ts +19 -0
- package/src/triggers/AaveV3QuotePriceRangeTrigger.ts +27 -0
- package/src/triggers/index.ts +1 -0
- package/umd/index.js +1620 -578
- package/yarn-error.log +3976 -0
|
@@ -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';
|
|
@@ -27,6 +27,7 @@ import * as lsv from './lsv';
|
|
|
27
27
|
import * as curveusd from './curveusd';
|
|
28
28
|
import * as spark from './spark';
|
|
29
29
|
import * as morphoblue from './morpho-blue';
|
|
30
|
+
import * as summerfi from './summerfi';
|
|
30
31
|
import * as llamalend from './llamalend';
|
|
31
32
|
import * as merkl from './merkl';
|
|
32
33
|
import * as eulerV2 from './eulerV2';
|
|
@@ -37,4 +38,5 @@ import * as renzo from './renzo';
|
|
|
37
38
|
import * as etherfi from './etherfi';
|
|
38
39
|
import * as fluid from './fluid';
|
|
39
40
|
import * as pendle from './pendle';
|
|
40
|
-
|
|
41
|
+
import * as umbrella from './umbrella';
|
|
42
|
+
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, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, };
|
package/esm/src/actions/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import * as lsv from './lsv';
|
|
|
27
27
|
import * as curveusd from './curveusd';
|
|
28
28
|
import * as spark from './spark';
|
|
29
29
|
import * as morphoblue from './morpho-blue';
|
|
30
|
+
import * as summerfi from './summerfi';
|
|
30
31
|
import * as llamalend from './llamalend';
|
|
31
32
|
import * as merkl from './merkl';
|
|
32
33
|
import * as eulerV2 from './eulerV2';
|
|
@@ -37,4 +38,5 @@ import * as renzo from './renzo';
|
|
|
37
38
|
import * as etherfi from './etherfi';
|
|
38
39
|
import * as fluid from './fluid';
|
|
39
40
|
import * as pendle from './pendle';
|
|
40
|
-
|
|
41
|
+
import * as umbrella from './umbrella';
|
|
42
|
+
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, summerfi, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, umbrella, };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Action } from '../../Action';
|
|
2
2
|
import { EthAddress } from '../../types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* SkyClaimRewardsAction
|
|
5
5
|
*
|
|
6
6
|
* @category Sky
|
|
7
7
|
*/
|
|
8
8
|
export declare class SkyClaimRewardsAction extends Action {
|
|
9
9
|
/**
|
|
10
10
|
* @param stakingContract
|
|
11
|
-
* @param
|
|
11
|
+
* @param rewardToken
|
|
12
12
|
* @param to
|
|
13
13
|
*/
|
|
14
14
|
constructor(stakingContract: EthAddress, rewardToken: EthAddress, to: EthAddress);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Action } from '../../Action';
|
|
2
2
|
import { getAddr } from '../../addresses';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* SkyClaimRewardsAction
|
|
5
5
|
*
|
|
6
6
|
* @category Sky
|
|
7
7
|
*/
|
|
8
8
|
export class SkyClaimRewardsAction extends Action {
|
|
9
9
|
/**
|
|
10
10
|
* @param stakingContract
|
|
11
|
-
* @param
|
|
11
|
+
* @param rewardToken
|
|
12
12
|
* @param to
|
|
13
13
|
*/
|
|
14
14
|
constructor(stakingContract, rewardToken, to) {
|
|
@@ -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,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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|