@defisaver/sdk 0.2.11 → 0.2.12
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/ACTIONS.md +21 -379
- package/DEV.md +298 -0
- package/index.js +11 -2
- package/package.json +4 -4
- package/src/Action.js +20 -8
- package/src/ActionWithL2.js +36 -0
- package/src/actions/aave/AaveBorrowAction.js +11 -2
- package/src/actions/aave/AaveClaimStkAaveAction.js +5 -5
- package/src/actions/aave/AaveCollateralSwitchAction.js +5 -4
- package/src/actions/aave/AavePaybackAction.js +11 -2
- package/src/actions/aave/AaveSupplyAction.js +6 -6
- package/src/actions/aave/AaveWithdrawAction.js +8 -1
- package/src/actions/aaveV3/AaveV3ATokenPaybackAction.js +58 -0
- package/src/actions/aaveV3/AaveV3BorrowAction.js +59 -0
- package/src/actions/aaveV3/AaveV3ClaimRewardsAction.js +45 -0
- package/src/actions/aaveV3/AaveV3CollateralSwitchAction.js +45 -0
- package/src/actions/aaveV3/AaveV3PaybackAction.js +68 -0
- package/src/actions/aaveV3/AaveV3SetEModeAction.js +40 -0
- package/src/actions/aaveV3/AaveV3SupplyAction.js +69 -0
- package/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.js +43 -0
- package/src/actions/aaveV3/AaveV3WithdrawAction.js +46 -0
- package/src/actions/aaveV3/index.js +21 -0
- package/src/actions/balancer/BalancerV2ClaimAction.js +12 -10
- package/src/actions/balancer/BalancerV2SupplyAction.js +16 -14
- package/src/actions/balancer/BalancerV2WithdrawAction.js +17 -15
- package/src/actions/basic/AutomationV2Unsub.js +3 -3
- package/src/actions/basic/ChangeProxyOwnerAction.js +4 -2
- package/src/actions/basic/GasFeeAction.js +6 -6
- package/src/actions/basic/PullTokenAction.js +9 -3
- package/src/actions/basic/SellAction.js +17 -10
- package/src/actions/basic/SendTokenAction.js +9 -4
- package/src/actions/basic/SubInputsAction.js +8 -3
- package/src/actions/basic/SumInputsAction.js +8 -3
- package/src/actions/basic/TokenBalanceAction.js +3 -3
- package/src/actions/basic/UnwrapEthAction.js +18 -5
- package/src/actions/basic/WrapEthAction.js +15 -5
- package/src/actions/basic/index.js +0 -6
- package/src/actions/checkers/MakerRatioCheckAction.js +5 -5
- package/src/actions/compound/CompoundBorrowAction.js +7 -1
- package/src/actions/compound/CompoundClaimAction.js +3 -3
- package/src/actions/compound/CompoundCollateralSwitchAction.js +4 -2
- package/src/actions/compound/CompoundGetDebtAction.js +3 -3
- package/src/actions/compound/CompoundPaybackAction.js +7 -1
- package/src/actions/compound/CompoundSupplyAction.js +4 -4
- package/src/actions/compound/CompoundWithdrawAction.js +7 -1
- package/src/actions/curve/CurveClaimFeesAction.js +4 -4
- package/src/actions/curve/CurveDepositAction.js +7 -7
- package/src/actions/curve/CurveGaugeDepositAction.js +6 -6
- package/src/actions/curve/CurveGaugeWithdrawAction.js +4 -4
- package/src/actions/curve/CurveMintCrvAction.js +3 -3
- package/src/actions/curve/CurveStethPoolDepositAction.js +9 -9
- package/src/actions/curve/CurveStethPoolWithdrawAction.js +9 -11
- package/src/actions/curve/CurveSwapAction.js +15 -15
- package/src/actions/curve/CurveWithdrawAction.js +7 -7
- package/src/actions/dydx/DyDxWithdrawAction.js +7 -1
- package/src/actions/flashloan/AaveV2FlashLoanAction.js +2 -2
- package/src/actions/flashloan/AaveV3FlashLoanAction.js +26 -0
- package/src/actions/flashloan/AaveV3FlashLoanPaybackAction.js +17 -0
- package/src/actions/flashloan/BalancerFlashLoanAction.js +2 -2
- package/src/actions/flashloan/DyDxFlashLoanAction.js +1 -5
- package/src/actions/flashloan/MakerFlashLoanAction.js +2 -2
- package/src/actions/flashloan/index.js +4 -0
- package/src/actions/guni/GUniDeposit.js +9 -9
- package/src/actions/guni/GUniWithdraw.js +5 -5
- package/src/actions/index.js +2 -2
- package/src/actions/insta/InstPullTokensAction.js +4 -4
- package/src/actions/lido/LidoStakeAction.js +7 -2
- package/src/actions/lido/LidoUnwrapAction.js +7 -2
- package/src/actions/lido/LidoWrapAction.js +7 -7
- package/src/actions/liquity/LiquityBorrowAction.js +5 -5
- package/src/actions/liquity/LiquityClaimAction.js +3 -3
- package/src/actions/liquity/LiquityCloseAction.js +4 -4
- package/src/actions/liquity/LiquityEthGainToTroveAction.js +3 -3
- package/src/actions/liquity/LiquityOpenAction.js +8 -8
- package/src/actions/liquity/LiquityPaybackAction.js +5 -5
- package/src/actions/liquity/LiquityRedeemAction.js +7 -7
- package/src/actions/liquity/LiquitySPDepositAction.js +7 -7
- package/src/actions/liquity/LiquitySPWithdrawAction.js +6 -6
- package/src/actions/liquity/LiquityStakeAction.js +7 -7
- package/src/actions/liquity/LiquitySupplyAction.js +5 -5
- package/src/actions/liquity/LiquityUnstakeAction.js +6 -6
- package/src/actions/liquity/LiquityWithdrawAction.js +4 -4
- package/src/actions/maker/MakerClaimAction.js +4 -4
- package/src/actions/maker/MakerGenerateAction.js +8 -1
- package/src/actions/maker/MakerGiveAction.js +4 -4
- package/src/actions/maker/MakerMergeAction.js +7 -1
- package/src/actions/maker/MakerOpenVaultAction.js +6 -1
- package/src/actions/maker/MakerPaybackAction.js +9 -2
- package/src/actions/maker/MakerRatioAction.js +5 -1
- package/src/actions/maker/MakerSupplyAction.js +9 -1
- package/src/actions/maker/MakerWithdrawAction.js +9 -1
- package/src/actions/mstable/MStableClaimAction.js +4 -4
- package/src/actions/mstable/MStableDepositAction.js +16 -16
- package/src/actions/mstable/MStableWithdrawAction.js +15 -15
- package/src/actions/rari/RariDepositAction.js +5 -5
- package/src/actions/rari/RariWithdrawAction.js +6 -6
- package/src/actions/reflexer/ReflexerGenerateAction.js +7 -1
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +5 -5
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +8 -3
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +9 -4
- package/src/actions/reflexer/ReflexerOpenSafeAction.js +5 -1
- package/src/actions/reflexer/ReflexerPaybackAction.js +7 -1
- package/src/actions/reflexer/ReflexerSupplyAction.js +8 -1
- package/src/actions/reflexer/ReflexerWithdrawAction.js +8 -1
- package/src/actions/uniswap/UniswapSupplyAction.js +22 -20
- package/src/actions/uniswap/UniswapWithdrawAction.js +18 -16
- package/src/actions/uniswapV3/UniswapV3CollectAction.js +9 -7
- package/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +22 -20
- package/src/actions/uniswapV3/UniswapV3MintAction.js +21 -19
- package/src/actions/uniswapV3/UniswapV3SupplyAction.js +19 -17
- package/src/actions/uniswapV3/UniswapV3WithdrawAction.js +14 -12
- package/src/actions/yearn/YearnSupplyAction.js +6 -6
- package/src/actions/yearn/YearnWithdrawAction.js +6 -6
- package/src/addresses.js +217 -152
- package/src/config.js +83 -0
- package/src/triggers/ChainLinkPriceTrigger.js +2 -2
- package/src/triggers/CompoundRatioTrigger.js +1 -1
- package/src/triggers/GasPriceTrigger.js +1 -1
- package/src/triggers/LiquityRatioTrigger.js +2 -2
- package/src/triggers/MakerRatioTrigger.js +5 -1
- package/src/triggers/ReflexerRatioTrigger.js +1 -1
- package/src/triggers/TimestampTrigger.js +1 -1
- package/src/triggers/UniV3CurrentTickTrigger.js +1 -1
- package/src/types.js +33 -0
- package/src/utils/index.js +0 -2
- package/test/Action.js +1 -2
- package/test/accessLists/access-lists.js +2 -1
- package/test/actions/maker/MakerPaybackAction.js +2 -2
- package/test/index.js +4 -1
- package/package-lock.json +0 -5415
- package/src/actions/basic/SendTokenAndUnwrapAction.js +0 -30
- package/src/actions/basic/ToggleSubAction.js +0 -19
- package/src/actions/basic/UpdateSubAction.js +0 -19
- package/src/actions/convex/ConvexClaimAction.js +0 -60
- package/src/actions/convex/ConvexDepositAction.js +0 -67
- package/src/actions/convex/ConvexWithdrawAction.js +0 -65
- package/src/actions/convex/index.js +0 -9
- package/src/utils/convex-utils.js +0 -20
- package/src/utils/convexPoolInfo.json +0 -1039
- package/test/Strategy.js +0 -44
package/ACTIONS.md
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
<dt><a href="#AaveCollateralSwitchAction">AaveCollateralSwitchAction</a></dt>
|
|
11
11
|
<dd><p>AaveCollateralSwitchAction - Aave enable/disable token usage as collateral</p>
|
|
12
12
|
</dd>
|
|
13
|
+
<dt><a href="#AaveMigrateLendAction">AaveMigrateLendAction</a></dt>
|
|
14
|
+
<dd><p>AaveMigrateLendAction - Migrates Lend to Aave</p>
|
|
15
|
+
</dd>
|
|
13
16
|
<dt><a href="#AavePaybackAction">AavePaybackAction</a></dt>
|
|
14
17
|
<dd><p>AavePaybackAction - Payback borrowed tokens from Aave</p>
|
|
15
18
|
</dd>
|
|
@@ -29,8 +32,6 @@
|
|
|
29
32
|
<dt><a href="#ChangeProxyOwnerAction">ChangeProxyOwnerAction</a></dt>
|
|
30
33
|
<dd><p>ChangeProxyOwnerAction - Changes EOA which owns the proxy that is being called</p>
|
|
31
34
|
</dd>
|
|
32
|
-
<dt><a href="#GasFeeAction">GasFeeAction</a></dt>
|
|
33
|
-
<dd></dd>
|
|
34
35
|
<dt><a href="#PullTokenAction">PullTokenAction</a></dt>
|
|
35
36
|
<dd><p>Transfers specified token from a specified address to DSProxy (recipe)</p>
|
|
36
37
|
</dd>
|
|
@@ -40,30 +41,18 @@
|
|
|
40
41
|
<dt><a href="#SendTokenAction">SendTokenAction</a></dt>
|
|
41
42
|
<dd><p>Transfers specified token from recipe (DsProxy) to specified address</p>
|
|
42
43
|
</dd>
|
|
43
|
-
<dt><a href="#SendTokenAndUnwrapAction">SendTokenAndUnwrapAction</a></dt>
|
|
44
|
-
<dd><p>Transfers specified token from recipe (DsProxy) to specified address unwraps if Weth address</p>
|
|
45
|
-
</dd>
|
|
46
44
|
<dt><a href="#SubInputsAction">SubInputsAction</a></dt>
|
|
47
45
|
<dd><p>Subs 2 inputs/return values</p>
|
|
48
46
|
</dd>
|
|
49
47
|
<dt><a href="#SumInputsAction">SumInputsAction</a></dt>
|
|
50
48
|
<dd><p>Sums up 2 inputs/return values</p>
|
|
51
49
|
</dd>
|
|
52
|
-
<dt><a href="#ToggleSubAction">ToggleSubAction</a></dt>
|
|
53
|
-
<dd><p>Sets the state of the sub to active or deactivated</p>
|
|
54
|
-
</dd>
|
|
55
50
|
<dt><a href="#UnwrapEthAction">UnwrapEthAction</a></dt>
|
|
56
51
|
<dd><p>Unwraps a specified amount of WETH from the proxy</p>
|
|
57
52
|
</dd>
|
|
58
|
-
<dt><a href="#UpdateSubAction">UpdateSubAction</a></dt>
|
|
59
|
-
<dd><p>Action for updating sub data</p>
|
|
60
|
-
</dd>
|
|
61
53
|
<dt><a href="#WrapEthAction">WrapEthAction</a></dt>
|
|
62
54
|
<dd><p>Wraps a specified amount of ETH from the wallet to WETH on the recipe</p>
|
|
63
55
|
</dd>
|
|
64
|
-
<dt><a href="#MakerRatioCheckAction">MakerRatioCheckAction</a></dt>
|
|
65
|
-
<dd><p>MakerRatioCheckAction - Checks mcd ratio at end of all actions</p>
|
|
66
|
-
</dd>
|
|
67
56
|
<dt><a href="#CompoundBorrowAction">CompoundBorrowAction</a></dt>
|
|
68
57
|
<dd><p>CompoundBorrowAction - Borrow tokens from Compound</p>
|
|
69
58
|
</dd>
|
|
@@ -82,26 +71,6 @@
|
|
|
82
71
|
<dt><a href="#CompoundWithdrawAction">CompoundWithdrawAction</a></dt>
|
|
83
72
|
<dd><p>CompoundWithdrawAction - Withdraw token from an Compound position</p>
|
|
84
73
|
</dd>
|
|
85
|
-
<dt><a href="#CurveClaimFeesAction">CurveClaimFeesAction</a></dt>
|
|
86
|
-
<dd></dd>
|
|
87
|
-
<dt><a href="#CurveDepositAction">CurveDepositAction</a></dt>
|
|
88
|
-
<dd></dd>
|
|
89
|
-
<dt><a href="#CurveGaugeDepositAction">CurveGaugeDepositAction</a></dt>
|
|
90
|
-
<dd></dd>
|
|
91
|
-
<dt><a href="#CurveGaugeWithdrawAction">CurveGaugeWithdrawAction</a></dt>
|
|
92
|
-
<dd></dd>
|
|
93
|
-
<dt><a href="#CurveMintCrvAction">CurveMintCrvAction</a></dt>
|
|
94
|
-
<dd></dd>
|
|
95
|
-
<dt><a href="#CurveStethPoolDepositAction">CurveStethPoolDepositAction</a></dt>
|
|
96
|
-
<dd><p>CurveStethPoolDepositAction - Deposits tokens into curve steth pool</p>
|
|
97
|
-
</dd>
|
|
98
|
-
<dt><a href="#CurveStethPoolWithdrawAction">CurveStethPoolWithdrawAction</a></dt>
|
|
99
|
-
<dd><p>CurveStethPoolWithdrawAction - Withdraws tokens from curve steth pool</p>
|
|
100
|
-
</dd>
|
|
101
|
-
<dt><a href="#CurveSwapAction">CurveSwapAction</a></dt>
|
|
102
|
-
<dd></dd>
|
|
103
|
-
<dt><a href="#CurveWithdrawAction">CurveWithdrawAction</a></dt>
|
|
104
|
-
<dd></dd>
|
|
105
74
|
<dt><a href="#DyDxWithdrawAction">DyDxWithdrawAction</a></dt>
|
|
106
75
|
<dd><p>DyDxWithdrawAction - Withdraw token from an DyDx position</p>
|
|
107
76
|
</dd>
|
|
@@ -123,27 +92,9 @@
|
|
|
123
92
|
<dt><a href="#DyDxFlashLoanPaybackAction">DyDxFlashLoanPaybackAction</a></dt>
|
|
124
93
|
<dd><p>Pays back a flashloan from DyDx</p>
|
|
125
94
|
</dd>
|
|
126
|
-
<dt><a href="#MakerFlashLoanAction">MakerFlashLoanAction</a></dt>
|
|
127
|
-
<dd><p>Gets a flashloan from Maker</p>
|
|
128
|
-
</dd>
|
|
129
|
-
<dt><a href="#MakerFlashLoanPaybackAction">MakerFlashLoanPaybackAction</a></dt>
|
|
130
|
-
<dd><p>Pays back a flashloan from Maker</p>
|
|
131
|
-
</dd>
|
|
132
|
-
<dt><a href="#GUniDeposit">GUniDeposit</a></dt>
|
|
133
|
-
<dd><p>Action that adds liquidity to G-UNI pool of interest (mints G-UNI LP tokens)</p>
|
|
134
|
-
</dd>
|
|
135
|
-
<dt><a href="#GUniWithdraw">GUniWithdraw</a></dt>
|
|
136
|
-
<dd><p>Action that removes liquidity from a G-UNI pool and burns G-UNI LP tokens</p>
|
|
137
|
-
</dd>
|
|
138
95
|
<dt><a href="#LidoStakeAction">LidoStakeAction</a></dt>
|
|
139
96
|
<dd><p>LidoStakeAction - Receives WETH, transforms it to ETH then sends it to Lido staking contract receiving stETH in return</p>
|
|
140
97
|
</dd>
|
|
141
|
-
<dt><a href="#LidoUnwrapAction">LidoUnwrapAction</a></dt>
|
|
142
|
-
<dd><p>LidoUnwrapAction - Unwraps WStEth into StEth</p>
|
|
143
|
-
</dd>
|
|
144
|
-
<dt><a href="#LidoWrapAction">LidoWrapAction</a></dt>
|
|
145
|
-
<dd><p>LidoWrapAction - Turns WETH or StEth into WStEth</p>
|
|
146
|
-
</dd>
|
|
147
98
|
<dt><a href="#LiquityBorrowAction">LiquityBorrowAction</a></dt>
|
|
148
99
|
<dd><p>LiquityBorrowAction - Borrows LUSD from the trove</p>
|
|
149
100
|
</dd>
|
|
@@ -189,9 +140,6 @@
|
|
|
189
140
|
<dt><a href="#LiquityWithdrawAction">LiquityWithdrawAction</a></dt>
|
|
190
141
|
<dd><p>LiquityWithdrawAction - Withdraws collateral from the trove</p>
|
|
191
142
|
</dd>
|
|
192
|
-
<dt><a href="#MakerClaimAction">MakerClaimAction</a></dt>
|
|
193
|
-
<dd><p>MakerClaimAction - Claim bonus tokens in CropJoin types</p>
|
|
194
|
-
</dd>
|
|
195
143
|
<dt><a href="#MakerGenerateAction">MakerGenerateAction</a></dt>
|
|
196
144
|
<dd><p>MakerGenerateAction - Generated Dai from a Vault</p>
|
|
197
145
|
</dd>
|
|
@@ -207,9 +155,6 @@
|
|
|
207
155
|
<dt><a href="#MakerPaybackAction">MakerPaybackAction</a></dt>
|
|
208
156
|
<dd><p>MakerPaybackAction - Payback dai to a Vault</p>
|
|
209
157
|
</dd>
|
|
210
|
-
<dt><a href="#MakerRatioAction">MakerRatioAction</a></dt>
|
|
211
|
-
<dd><p>MakerRatioAction</p>
|
|
212
|
-
</dd>
|
|
213
158
|
<dt><a href="#MakerSupplyAction">MakerSupplyAction</a></dt>
|
|
214
159
|
<dd><p>MakerSupplyAction - Supply token to a Vault</p>
|
|
215
160
|
</dd>
|
|
@@ -313,6 +258,18 @@ AaveClaimStkAaveAction - Claims stkAave from incentives controller
|
|
|
313
258
|
## AaveCollateralSwitchAction
|
|
314
259
|
AaveCollateralSwitchAction - Aave enable/disable token usage as collateral
|
|
315
260
|
|
|
261
|
+
**Kind**: global class
|
|
262
|
+
<a name="AaveMigrateLendAction"></a>
|
|
263
|
+
|
|
264
|
+
## AaveClaimStkAaveAction
|
|
265
|
+
AaveClaimStkAaveAction - Claims stkAave from incentives controller
|
|
266
|
+
|
|
267
|
+
**Kind**: global class
|
|
268
|
+
<a name="AaveCollateralSwitchAction"></a>
|
|
269
|
+
|
|
270
|
+
## AaveCollateralSwitchAction
|
|
271
|
+
AaveCollateralSwitchAction - Aave enable/disable token usage as collateral
|
|
272
|
+
|
|
316
273
|
**Kind**: global class
|
|
317
274
|
<a name="AavePaybackAction"></a>
|
|
318
275
|
|
|
@@ -429,20 +386,6 @@ ChangeProxyOwnerAction - Changes EOA which owns the proxy that is being called
|
|
|
429
386
|
|
|
430
387
|
- newOwner <code>Address</code> - Address of new owner
|
|
431
388
|
|
|
432
|
-
<a name="GasFeeAction"></a>
|
|
433
|
-
|
|
434
|
-
## GasFeeAction
|
|
435
|
-
**Kind**: global class
|
|
436
|
-
<a name="new_GasFeeAction_new"></a>
|
|
437
|
-
|
|
438
|
-
### new GasFeeAction(gasStart, feeToken, availableAmount, dfsFeeDivider)
|
|
439
|
-
**Params**
|
|
440
|
-
|
|
441
|
-
- gasStart <code>string</code> - Always 0 will be inject value
|
|
442
|
-
- feeToken <code>string</code> - Address of the token we are taken the fee in
|
|
443
|
-
- availableAmount - Amount we have available to pay the gas fee
|
|
444
|
-
- dfsFeeDivider <code> = 2000</code> - Additional fee for DFS, default is 5bps
|
|
445
|
-
|
|
446
389
|
<a name="PullTokenAction"></a>
|
|
447
390
|
|
|
448
391
|
## PullTokenAction
|
|
@@ -489,21 +432,6 @@ Transfers specified token from recipe (DsProxy) to specified address
|
|
|
489
432
|
- to <code>string</code> - Transfer recipient
|
|
490
433
|
- amount <code>string</code> - Transfer amount (-1 for whole Recipe (DsProxy) balance)
|
|
491
434
|
|
|
492
|
-
<a name="SendTokenAndUnwrapAction"></a>
|
|
493
|
-
|
|
494
|
-
## SendTokenAndUnwrapAction
|
|
495
|
-
Transfers specified token from recipe (DsProxy) to specified address unwraps if Weth address
|
|
496
|
-
|
|
497
|
-
**Kind**: global class
|
|
498
|
-
<a name="new_SendTokenAndUnwrapAction_new"></a>
|
|
499
|
-
|
|
500
|
-
### new SendTokenAndUnwrapAction(token, to, amount)
|
|
501
|
-
**Params**
|
|
502
|
-
|
|
503
|
-
- token <code>string</code> - Token address
|
|
504
|
-
- to <code>string</code> - Transfer recipient
|
|
505
|
-
- amount <code>string</code> - Transfer amount (-1 for whole Recipe (DsProxy) balance)
|
|
506
|
-
|
|
507
435
|
<a name="SubInputsAction"></a>
|
|
508
436
|
|
|
509
437
|
## SubInputsAction
|
|
@@ -516,20 +444,6 @@ Subs 2 inputs/return values
|
|
|
516
444
|
Sums up 2 inputs/return values
|
|
517
445
|
|
|
518
446
|
**Kind**: global class
|
|
519
|
-
<a name="ToggleSubAction"></a>
|
|
520
|
-
|
|
521
|
-
## ToggleSubAction
|
|
522
|
-
Sets the state of the sub to active or deactivated
|
|
523
|
-
|
|
524
|
-
**Kind**: global class
|
|
525
|
-
<a name="new_ToggleSubAction_new"></a>
|
|
526
|
-
|
|
527
|
-
### new ToggleSubAction(subId, active)
|
|
528
|
-
**Params**
|
|
529
|
-
|
|
530
|
-
- subId - Id of the subscription in the SubStorage contract
|
|
531
|
-
- active - Set to true to activate action, to false to deactivate
|
|
532
|
-
|
|
533
447
|
<a name="UnwrapEthAction"></a>
|
|
534
448
|
|
|
535
449
|
## UnwrapEthAction
|
|
@@ -544,20 +458,6 @@ Unwraps a specified amount of WETH from the proxy
|
|
|
544
458
|
- amount <code>string</code> - Token address
|
|
545
459
|
- to <code>string</code> - Transfer recipient
|
|
546
460
|
|
|
547
|
-
<a name="UpdateSubAction"></a>
|
|
548
|
-
|
|
549
|
-
## UpdateSubAction
|
|
550
|
-
Action for updating sub data
|
|
551
|
-
|
|
552
|
-
**Kind**: global class
|
|
553
|
-
<a name="new_UpdateSubAction_new"></a>
|
|
554
|
-
|
|
555
|
-
### new UpdateSubAction(subId, sub)
|
|
556
|
-
**Params**
|
|
557
|
-
|
|
558
|
-
- subId - id of the subscription in the SubStorage contract
|
|
559
|
-
- sub - object that contains new sub information
|
|
560
|
-
|
|
561
461
|
<a name="WrapEthAction"></a>
|
|
562
462
|
|
|
563
463
|
## WrapEthAction
|
|
@@ -571,23 +471,6 @@ Wraps a specified amount of ETH from the wallet to WETH on the recipe
|
|
|
571
471
|
|
|
572
472
|
- amount <code>string</code> - Transfer amount
|
|
573
473
|
|
|
574
|
-
<a name="MakerRatioCheckAction"></a>
|
|
575
|
-
|
|
576
|
-
## MakerRatioCheckAction
|
|
577
|
-
MakerRatioCheckAction - Checks mcd ratio at end of all actions
|
|
578
|
-
|
|
579
|
-
**Kind**: global class
|
|
580
|
-
<a name="new_MakerRatioCheckAction_new"></a>
|
|
581
|
-
|
|
582
|
-
### new MakerRatioCheckAction(ratioState, checkTarget, targetRatio, vaultId, startRatioIndex)
|
|
583
|
-
**Params**
|
|
584
|
-
|
|
585
|
-
- ratioState <code>uint8</code> - If it should lower/higher
|
|
586
|
-
- checkTarget
|
|
587
|
-
- targetRatio <code>string</code> - The ratio user want to be at
|
|
588
|
-
- vaultId <code>string</code> - Id of the vault
|
|
589
|
-
- startRatioIndex <code>uint256</code> - Index in returnValues where ratio before actions is stored
|
|
590
|
-
|
|
591
474
|
<a name="CompoundBorrowAction"></a>
|
|
592
475
|
|
|
593
476
|
## CompoundBorrowAction
|
|
@@ -639,7 +522,7 @@ CompoundPaybackAction - Payback borrowed tokens from Compound
|
|
|
639
522
|
- cTokenAddr <code>EthAddress</code>
|
|
640
523
|
- amount <code>string</code> - Wei amount in underlying asset decimals (not cAsset) - ie. 18 dec for cETH, not 8
|
|
641
524
|
- from <code>EthAddress</code>
|
|
642
|
-
- onBehalf <code>EthAddress
|
|
525
|
+
- onBehalf <code>Array.<EthAddress></code>
|
|
643
526
|
|
|
644
527
|
<a name="CompoundSupplyAction"></a>
|
|
645
528
|
|
|
@@ -672,148 +555,6 @@ CompoundWithdrawAction - Withdraw token from an Compound position
|
|
|
672
555
|
- amount <code>string</code> - Wei amount in underlying asset decimals (not cAsset) - ie. 18 dec for cETH, not 8
|
|
673
556
|
- to <code>EthAddress</code>
|
|
674
557
|
|
|
675
|
-
<a name="CurveClaimFeesAction"></a>
|
|
676
|
-
|
|
677
|
-
## CurveClaimFeesAction
|
|
678
|
-
**Kind**: global class
|
|
679
|
-
<a name="new_CurveClaimFeesAction_new"></a>
|
|
680
|
-
|
|
681
|
-
### new CurveClaimFeesAction(claimFor, receiver)
|
|
682
|
-
**Params**
|
|
683
|
-
|
|
684
|
-
- claimFor <code>EthAddress</code>
|
|
685
|
-
- receiver <code>EthAddress</code>
|
|
686
|
-
|
|
687
|
-
<a name="CurveDepositAction"></a>
|
|
688
|
-
|
|
689
|
-
## CurveDepositAction
|
|
690
|
-
**Kind**: global class
|
|
691
|
-
<a name="new_CurveDepositAction_new"></a>
|
|
692
|
-
|
|
693
|
-
### new CurveDepositAction(sender, receiver, depositTarget, lpToken, sig, minMintAmount, amounts, tokens, useUnderlying)
|
|
694
|
-
**Params**
|
|
695
|
-
|
|
696
|
-
- sender <code>EthAddress</code>
|
|
697
|
-
- receiver <code>EthAddress</code>
|
|
698
|
-
- depositTarget <code>EthAddress</code>
|
|
699
|
-
- lpToken <code>EthAddress</code>
|
|
700
|
-
- sig <code>bytes4</code>
|
|
701
|
-
- minMintAmount <code>string</code>
|
|
702
|
-
- amounts <code>Array.<string></code>
|
|
703
|
-
- tokens <code>Array.<EthAddress></code>
|
|
704
|
-
- useUnderlying <code>boolean</code>
|
|
705
|
-
|
|
706
|
-
<a name="CurveGaugeDepositAction"></a>
|
|
707
|
-
|
|
708
|
-
## CurveGaugeDepositAction
|
|
709
|
-
**Kind**: global class
|
|
710
|
-
<a name="new_CurveGaugeDepositAction_new"></a>
|
|
711
|
-
|
|
712
|
-
### new CurveGaugeDepositAction(gaugeAddr, lpToken, sender, onBehalfOf, amount)
|
|
713
|
-
**Params**
|
|
714
|
-
|
|
715
|
-
- gaugeAddr <code>EthAddress</code>
|
|
716
|
-
- lpToken <code>EthAddress</code>
|
|
717
|
-
- sender <code>EthAddress</code>
|
|
718
|
-
- onBehalfOf <code>EthAddress</code>
|
|
719
|
-
- amount <code>string</code>
|
|
720
|
-
|
|
721
|
-
<a name="CurveGaugeWithdrawAction"></a>
|
|
722
|
-
|
|
723
|
-
## CurveGaugeWithdrawAction
|
|
724
|
-
**Kind**: global class
|
|
725
|
-
<a name="new_CurveGaugeWithdrawAction_new"></a>
|
|
726
|
-
|
|
727
|
-
### new CurveGaugeWithdrawAction(gaugeAddr, lpToken, receiver, amount)
|
|
728
|
-
**Params**
|
|
729
|
-
|
|
730
|
-
- gaugeAddr <code>EthAddress</code>
|
|
731
|
-
- lpToken <code>EthAddress</code>
|
|
732
|
-
- receiver <code>EthAddress</code>
|
|
733
|
-
- amount <code>string</code>
|
|
734
|
-
|
|
735
|
-
<a name="CurveMintCrvAction"></a>
|
|
736
|
-
|
|
737
|
-
## CurveMintCrvAction
|
|
738
|
-
**Kind**: global class
|
|
739
|
-
<a name="new_CurveMintCrvAction_new"></a>
|
|
740
|
-
|
|
741
|
-
### new CurveMintCrvAction(gaugeAddrs, receiver)
|
|
742
|
-
**Params**
|
|
743
|
-
|
|
744
|
-
- gaugeAddrs <code>Array.<EthAddress></code>
|
|
745
|
-
- receiver <code>EthAddress</code>
|
|
746
|
-
|
|
747
|
-
<a name="CurveStethPoolDepositAction"></a>
|
|
748
|
-
|
|
749
|
-
## CurveStethPoolDepositAction
|
|
750
|
-
CurveStethPoolDepositAction - Deposits tokens into curve steth pool
|
|
751
|
-
|
|
752
|
-
**Kind**: global class
|
|
753
|
-
<a name="new_CurveStethPoolDepositAction_new"></a>
|
|
754
|
-
|
|
755
|
-
### new CurveStethPoolDepositAction(from, to, amounts, minMintAmount)
|
|
756
|
-
**Params**
|
|
757
|
-
|
|
758
|
-
- from <code>address</code>
|
|
759
|
-
- to <code>address</code>
|
|
760
|
-
- amounts <code>Array.<string></code>
|
|
761
|
-
- minMintAmount <code>string</code>
|
|
762
|
-
|
|
763
|
-
<a name="CurveStethPoolWithdrawAction"></a>
|
|
764
|
-
|
|
765
|
-
## CurveStethPoolWithdrawAction
|
|
766
|
-
CurveStethPoolWithdrawAction - Withdraws tokens from curve steth pool
|
|
767
|
-
|
|
768
|
-
**Kind**: global class
|
|
769
|
-
<a name="new_CurveStethPoolWithdrawAction_new"></a>
|
|
770
|
-
|
|
771
|
-
### new CurveStethPoolWithdrawAction(from, to, amounts, maxBurnAmount, returnValue)
|
|
772
|
-
**Params**
|
|
773
|
-
|
|
774
|
-
- from <code>address</code>
|
|
775
|
-
- to <code>address</code>
|
|
776
|
-
- amounts <code>Array.<string></code>
|
|
777
|
-
- maxBurnAmount <code>string</code>
|
|
778
|
-
- returnValue <code>string</code>
|
|
779
|
-
|
|
780
|
-
<a name="CurveSwapAction"></a>
|
|
781
|
-
|
|
782
|
-
## CurveSwapAction
|
|
783
|
-
**Kind**: global class
|
|
784
|
-
<a name="new_CurveSwapAction_new"></a>
|
|
785
|
-
|
|
786
|
-
### new CurveSwapAction(sender, receiver, pool, tokenA, tokenB, amount, expected)
|
|
787
|
-
**Params**
|
|
788
|
-
|
|
789
|
-
- sender <code>EthAddress</code>
|
|
790
|
-
- receiver <code>EthAddress</code>
|
|
791
|
-
- pool <code>EthAddress</code>
|
|
792
|
-
- tokenA <code>EthAddress</code>
|
|
793
|
-
- tokenB <code>EthAddress</code>
|
|
794
|
-
- amount <code>string</code>
|
|
795
|
-
- expected <code>string</code>
|
|
796
|
-
|
|
797
|
-
<a name="CurveWithdrawAction"></a>
|
|
798
|
-
|
|
799
|
-
## CurveWithdrawAction
|
|
800
|
-
**Kind**: global class
|
|
801
|
-
<a name="new_CurveWithdrawAction_new"></a>
|
|
802
|
-
|
|
803
|
-
### new CurveWithdrawAction(sender, receiver, depositTarget, lpToken, sig, burnAmount, minAmounts, tokens, withdrawExact, useUnderlying)
|
|
804
|
-
**Params**
|
|
805
|
-
|
|
806
|
-
- sender <code>EthAddress</code>
|
|
807
|
-
- receiver <code>EthAddress</code>
|
|
808
|
-
- depositTarget <code>EthAddress</code>
|
|
809
|
-
- lpToken <code>EthAddress</code>
|
|
810
|
-
- sig <code>bytes4</code>
|
|
811
|
-
- burnAmount <code>string</code>
|
|
812
|
-
- minAmounts <code>Array.<string></code>
|
|
813
|
-
- tokens <code>Array.<EthAddress></code>
|
|
814
|
-
- withdrawExact <code>boolean</code>
|
|
815
|
-
- useUnderlying <code>boolean</code>
|
|
816
|
-
|
|
817
558
|
<a name="DyDxWithdrawAction"></a>
|
|
818
559
|
|
|
819
560
|
## DyDxWithdrawAction
|
|
@@ -921,46 +662,6 @@ Pays back a flashloan from DyDx
|
|
|
921
662
|
- loanAmount <code>string</code>
|
|
922
663
|
- tokenAddr <code>EthAddress</code>
|
|
923
664
|
|
|
924
|
-
<a name="MakerFlashLoanAction"></a>
|
|
925
|
-
|
|
926
|
-
## MakerFlashLoanAction
|
|
927
|
-
Gets a flashloan from Maker
|
|
928
|
-
|
|
929
|
-
**Kind**: global class
|
|
930
|
-
<a name="new_MakerFlashLoanAction_new"></a>
|
|
931
|
-
|
|
932
|
-
### new MakerFlashLoanAction(amount, flParamGetterAddr, flParamGetterData)
|
|
933
|
-
**Params**
|
|
934
|
-
|
|
935
|
-
- amount <code>string</code>
|
|
936
|
-
- flParamGetterAddr <code>EthAddress</code>
|
|
937
|
-
- flParamGetterData <code>bytes</code>
|
|
938
|
-
|
|
939
|
-
<a name="MakerFlashLoanPaybackAction"></a>
|
|
940
|
-
|
|
941
|
-
## MakerFlashLoanPaybackAction
|
|
942
|
-
Pays back a flashloan from Maker
|
|
943
|
-
|
|
944
|
-
**Kind**: global class
|
|
945
|
-
<a name="new_MakerFlashLoanPaybackAction_new"></a>
|
|
946
|
-
|
|
947
|
-
### new MakerFlashLoanPaybackAction(loanAmount)
|
|
948
|
-
**Params**
|
|
949
|
-
|
|
950
|
-
- loanAmount <code>string</code>
|
|
951
|
-
|
|
952
|
-
<a name="GUniDeposit"></a>
|
|
953
|
-
|
|
954
|
-
## GUniDeposit
|
|
955
|
-
Action that adds liquidity to G-UNI pool of interest (mints G-UNI LP tokens)
|
|
956
|
-
|
|
957
|
-
**Kind**: global class
|
|
958
|
-
<a name="GUniWithdraw"></a>
|
|
959
|
-
|
|
960
|
-
## GUniWithdraw
|
|
961
|
-
Action that removes liquidity from a G-UNI pool and burns G-UNI LP tokens
|
|
962
|
-
|
|
963
|
-
**Kind**: global class
|
|
964
665
|
<a name="LidoStakeAction"></a>
|
|
965
666
|
|
|
966
667
|
## LidoStakeAction
|
|
@@ -976,37 +677,6 @@ LidoStakeAction - Receives WETH, transforms it to ETH then sends it to Lido stak
|
|
|
976
677
|
- from <code>EthAddress</code> - WETH will be taken from this address
|
|
977
678
|
- to <code>EthAddress</code> - stETH will be sent to this address
|
|
978
679
|
|
|
979
|
-
<a name="LidoUnwrapAction"></a>
|
|
980
|
-
|
|
981
|
-
## LidoUnwrapAction
|
|
982
|
-
LidoUnwrapAction - Unwraps WStEth into StEth
|
|
983
|
-
|
|
984
|
-
**Kind**: global class
|
|
985
|
-
<a name="new_LidoUnwrapAction_new"></a>
|
|
986
|
-
|
|
987
|
-
### new LidoUnwrapAction(amount, from, to)
|
|
988
|
-
**Params**
|
|
989
|
-
|
|
990
|
-
- amount <code>string</code> - amount of WStEth to pull and Unwrap
|
|
991
|
-
- from <code>EthAddress</code> - WstEth will be taken from this address
|
|
992
|
-
- to <code>EthAddress</code> - stETH will be sent to this address
|
|
993
|
-
|
|
994
|
-
<a name="LidoWrapAction"></a>
|
|
995
|
-
|
|
996
|
-
## LidoWrapAction
|
|
997
|
-
LidoWrapAction - Turns WETH or StEth into WStEth
|
|
998
|
-
|
|
999
|
-
**Kind**: global class
|
|
1000
|
-
<a name="new_LidoWrapAction_new"></a>
|
|
1001
|
-
|
|
1002
|
-
### new LidoWrapAction(amount, from, to, useEth)
|
|
1003
|
-
**Params**
|
|
1004
|
-
|
|
1005
|
-
- amount <code>string</code> - amount to pull and stake
|
|
1006
|
-
- from <code>EthAddress</code> - tokens will be taken from this address
|
|
1007
|
-
- to <code>EthAddress</code> - WStEth will be sent to this address
|
|
1008
|
-
- useEth <code>boolean</code> - true for using WETH, false for using stEth
|
|
1009
|
-
|
|
1010
680
|
<a name="LiquityBorrowAction"></a>
|
|
1011
681
|
|
|
1012
682
|
## LiquityBorrowAction
|
|
@@ -1229,21 +899,6 @@ LiquityWithdrawAction - Withdraws collateral from the trove
|
|
|
1229
899
|
- collAmount - Amount of WETH tokens to withdraw
|
|
1230
900
|
- to - Address that will receive the withdrawn tokens
|
|
1231
901
|
|
|
1232
|
-
<a name="MakerClaimAction"></a>
|
|
1233
|
-
|
|
1234
|
-
## MakerClaimAction
|
|
1235
|
-
MakerClaimAction - Claim bonus tokens in CropJoin types
|
|
1236
|
-
|
|
1237
|
-
**Kind**: global class
|
|
1238
|
-
<a name="new_MakerClaimAction_new"></a>
|
|
1239
|
-
|
|
1240
|
-
### new MakerClaimAction(vaultId, joinAddr, to)
|
|
1241
|
-
**Params**
|
|
1242
|
-
|
|
1243
|
-
- vaultId <code>VaultId</code>
|
|
1244
|
-
- joinAddr <code>EthAddress</code>
|
|
1245
|
-
- to <code>EthAddress</code> - Tokens will be sent to this address
|
|
1246
|
-
|
|
1247
902
|
<a name="MakerGenerateAction"></a>
|
|
1248
903
|
|
|
1249
904
|
## MakerGenerateAction
|
|
@@ -1321,19 +976,6 @@ MakerPaybackAction - Payback dai to a Vault
|
|
|
1321
976
|
- from <code>EthAddress</code> - DAI will be sent from this address
|
|
1322
977
|
- mcdManager <code>EthAddress</code>
|
|
1323
978
|
|
|
1324
|
-
<a name="MakerRatioAction"></a>
|
|
1325
|
-
|
|
1326
|
-
## MakerRatioAction
|
|
1327
|
-
MakerRatioAction
|
|
1328
|
-
|
|
1329
|
-
**Kind**: global class
|
|
1330
|
-
<a name="new_MakerRatioAction_new"></a>
|
|
1331
|
-
|
|
1332
|
-
### new MakerRatioAction(vaultId)
|
|
1333
|
-
**Params**
|
|
1334
|
-
|
|
1335
|
-
- vaultId <code>uint256</code>
|
|
1336
|
-
|
|
1337
979
|
<a name="MakerSupplyAction"></a>
|
|
1338
980
|
|
|
1339
981
|
## MakerSupplyAction
|
|
@@ -1365,7 +1007,7 @@ MakerWithdrawAction - Withdraw token from a Vault
|
|
|
1365
1007
|
- vaultId <code>VaultId</code>
|
|
1366
1008
|
- amount <code>string</code>
|
|
1367
1009
|
- joinAddr <code>EthAddress</code>
|
|
1368
|
-
- to <code>
|
|
1010
|
+
- to <code>EthAddress</code>
|
|
1369
1011
|
- mcdManager <code>EthAddress</code>
|
|
1370
1012
|
|
|
1371
1013
|
<a name="MStableClaimAction"></a>
|
|
@@ -1392,7 +1034,7 @@ MStableDepositAction
|
|
|
1392
1034
|
**Kind**: global class
|
|
1393
1035
|
<a name="new_MStableDepositAction_new"></a>
|
|
1394
1036
|
|
|
1395
|
-
### new MStableDepositAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut,
|
|
1037
|
+
### new MStableDepositAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, stake)
|
|
1396
1038
|
**Params**
|
|
1397
1039
|
|
|
1398
1040
|
- bAsset
|
|
@@ -1403,7 +1045,7 @@ MStableDepositAction
|
|
|
1403
1045
|
- to
|
|
1404
1046
|
- amount
|
|
1405
1047
|
- minOut
|
|
1406
|
-
-
|
|
1048
|
+
- stake
|
|
1407
1049
|
|
|
1408
1050
|
<a name="MStableWithdrawAction"></a>
|
|
1409
1051
|
|
|
@@ -1413,7 +1055,7 @@ MStableWithdrawAction
|
|
|
1413
1055
|
**Kind**: global class
|
|
1414
1056
|
<a name="new_MStableWithdrawAction_new"></a>
|
|
1415
1057
|
|
|
1416
|
-
### new MStableWithdrawAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut,
|
|
1058
|
+
### new MStableWithdrawAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, stake)
|
|
1417
1059
|
**Params**
|
|
1418
1060
|
|
|
1419
1061
|
- bAsset
|
|
@@ -1424,7 +1066,7 @@ MStableWithdrawAction
|
|
|
1424
1066
|
- to
|
|
1425
1067
|
- amount
|
|
1426
1068
|
- minOut
|
|
1427
|
-
-
|
|
1069
|
+
- stake
|
|
1428
1070
|
|
|
1429
1071
|
<a name="RariDepositAction"></a>
|
|
1430
1072
|
|