@defisaver/sdk 0.2.12 → 0.2.13
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 +379 -21
- package/DEV.md +0 -298
- package/package.json +2 -2
- package/src/Action.js +3 -6
- package/src/actions/aave/AaveBorrowAction.js +2 -11
- package/src/actions/aave/AaveClaimStkAaveAction.js +5 -5
- package/src/actions/aave/AaveCollateralSwitchAction.js +4 -5
- package/src/actions/aave/AavePaybackAction.js +2 -11
- package/src/actions/aave/AaveSupplyAction.js +6 -6
- package/src/actions/aave/AaveWithdrawAction.js +1 -8
- package/src/actions/aaveV3/AaveV3ATokenPaybackAction.js +13 -13
- package/src/actions/aaveV3/AaveV3BorrowAction.js +16 -16
- package/src/actions/aaveV3/AaveV3ClaimRewardsAction.js +8 -8
- package/src/actions/aaveV3/AaveV3CollateralSwitchAction.js +9 -9
- package/src/actions/aaveV3/AaveV3PaybackAction.js +16 -16
- package/src/actions/aaveV3/AaveV3SetEModeAction.js +7 -7
- package/src/actions/aaveV3/AaveV3SupplyAction.js +17 -17
- package/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.js +8 -8
- package/src/actions/aaveV3/AaveV3WithdrawAction.js +11 -11
- package/src/actions/balancer/BalancerV2ClaimAction.js +10 -12
- package/src/actions/balancer/BalancerV2SupplyAction.js +14 -16
- package/src/actions/balancer/BalancerV2WithdrawAction.js +15 -17
- package/src/actions/basic/AutomationV2Unsub.js +3 -3
- package/src/actions/basic/ChangeProxyOwnerAction.js +2 -4
- package/src/actions/basic/GasFeeAction.js +6 -6
- package/src/actions/basic/PullTokenAction.js +3 -9
- package/src/actions/basic/SellAction.js +5 -6
- package/src/actions/basic/SendTokenAction.js +3 -9
- package/src/actions/basic/SendTokenAndUnwrapAction.js +30 -0
- package/src/actions/basic/SubInputsAction.js +3 -8
- package/src/actions/basic/SumInputsAction.js +3 -8
- package/src/actions/basic/ToggleSubAction.js +19 -0
- package/src/actions/basic/TokenBalanceAction.js +3 -3
- package/src/actions/basic/UnwrapEthAction.js +3 -8
- package/src/actions/basic/UpdateSubAction.js +19 -0
- package/src/actions/basic/WrapEthAction.js +5 -8
- package/src/actions/basic/index.js +6 -0
- package/src/actions/checkers/MakerRatioCheckAction.js +5 -5
- package/src/actions/compound/CompoundBorrowAction.js +1 -7
- package/src/actions/compound/CompoundClaimAction.js +3 -3
- package/src/actions/compound/CompoundCollateralSwitchAction.js +2 -4
- package/src/actions/compound/CompoundGetDebtAction.js +3 -3
- package/src/actions/compound/CompoundPaybackAction.js +1 -7
- package/src/actions/compound/CompoundSupplyAction.js +4 -4
- package/src/actions/compound/CompoundWithdrawAction.js +1 -7
- package/src/actions/convex/ConvexClaimAction.js +60 -0
- package/src/actions/convex/ConvexDepositAction.js +67 -0
- package/src/actions/convex/ConvexWithdrawAction.js +65 -0
- package/src/actions/convex/index.js +9 -0
- 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 +11 -9
- package/src/actions/curve/CurveSwapAction.js +15 -15
- package/src/actions/curve/CurveWithdrawAction.js +7 -7
- package/src/actions/dydx/DyDxWithdrawAction.js +1 -7
- package/src/actions/flashloan/AaveV2FlashLoanAction.js +2 -2
- package/src/actions/flashloan/AaveV3FlashLoanAction.js +2 -2
- package/src/actions/flashloan/BalancerFlashLoanAction.js +2 -2
- package/src/actions/flashloan/DyDxFlashLoanAction.js +5 -1
- package/src/actions/flashloan/MakerFlashLoanAction.js +2 -2
- package/src/actions/guni/GUniDeposit.js +9 -9
- package/src/actions/guni/GUniWithdraw.js +5 -5
- package/src/actions/index.js +2 -0
- package/src/actions/insta/InstPullTokensAction.js +4 -4
- package/src/actions/lido/LidoStakeAction.js +2 -7
- package/src/actions/lido/LidoUnwrapAction.js +2 -7
- 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 +1 -8
- package/src/actions/maker/MakerGiveAction.js +4 -4
- package/src/actions/maker/MakerMergeAction.js +1 -7
- package/src/actions/maker/MakerOpenVaultAction.js +1 -6
- package/src/actions/maker/MakerPaybackAction.js +2 -9
- package/src/actions/maker/MakerRatioAction.js +1 -5
- package/src/actions/maker/MakerSupplyAction.js +1 -9
- package/src/actions/maker/MakerWithdrawAction.js +1 -9
- 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 +1 -7
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +5 -5
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +3 -8
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +4 -9
- package/src/actions/reflexer/ReflexerOpenSafeAction.js +1 -5
- package/src/actions/reflexer/ReflexerPaybackAction.js +1 -7
- package/src/actions/reflexer/ReflexerSupplyAction.js +1 -8
- package/src/actions/reflexer/ReflexerWithdrawAction.js +1 -8
- package/src/actions/uniswap/UniswapSupplyAction.js +20 -22
- package/src/actions/uniswap/UniswapWithdrawAction.js +16 -18
- package/src/actions/uniswapV3/UniswapV3CollectAction.js +7 -9
- package/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +20 -22
- package/src/actions/uniswapV3/UniswapV3MintAction.js +19 -21
- package/src/actions/uniswapV3/UniswapV3SupplyAction.js +17 -19
- package/src/actions/uniswapV3/UniswapV3WithdrawAction.js +12 -14
- package/src/actions/yearn/YearnSupplyAction.js +6 -6
- package/src/actions/yearn/YearnWithdrawAction.js +6 -6
- package/src/addresses.js +19 -12
- 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 +1 -5
- package/src/triggers/ReflexerRatioTrigger.js +1 -1
- package/src/triggers/TimestampTrigger.js +1 -1
- package/src/triggers/UniV3CurrentTickTrigger.js +1 -1
- package/src/utils/convex-utils.js +20 -0
- package/src/utils/convexPoolInfo.json +1039 -0
- package/src/utils/index.js +2 -0
- package/test/Action.js +2 -1
- package/test/Strategy.js +44 -0
- package/test/accessLists/access-lists.js +1 -2
- package/test/actions/maker/MakerPaybackAction.js +2 -2
package/ACTIONS.md
CHANGED
|
@@ -10,9 +10,6 @@
|
|
|
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>
|
|
16
13
|
<dt><a href="#AavePaybackAction">AavePaybackAction</a></dt>
|
|
17
14
|
<dd><p>AavePaybackAction - Payback borrowed tokens from Aave</p>
|
|
18
15
|
</dd>
|
|
@@ -32,6 +29,8 @@
|
|
|
32
29
|
<dt><a href="#ChangeProxyOwnerAction">ChangeProxyOwnerAction</a></dt>
|
|
33
30
|
<dd><p>ChangeProxyOwnerAction - Changes EOA which owns the proxy that is being called</p>
|
|
34
31
|
</dd>
|
|
32
|
+
<dt><a href="#GasFeeAction">GasFeeAction</a></dt>
|
|
33
|
+
<dd></dd>
|
|
35
34
|
<dt><a href="#PullTokenAction">PullTokenAction</a></dt>
|
|
36
35
|
<dd><p>Transfers specified token from a specified address to DSProxy (recipe)</p>
|
|
37
36
|
</dd>
|
|
@@ -41,18 +40,30 @@
|
|
|
41
40
|
<dt><a href="#SendTokenAction">SendTokenAction</a></dt>
|
|
42
41
|
<dd><p>Transfers specified token from recipe (DsProxy) to specified address</p>
|
|
43
42
|
</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>
|
|
44
46
|
<dt><a href="#SubInputsAction">SubInputsAction</a></dt>
|
|
45
47
|
<dd><p>Subs 2 inputs/return values</p>
|
|
46
48
|
</dd>
|
|
47
49
|
<dt><a href="#SumInputsAction">SumInputsAction</a></dt>
|
|
48
50
|
<dd><p>Sums up 2 inputs/return values</p>
|
|
49
51
|
</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>
|
|
50
55
|
<dt><a href="#UnwrapEthAction">UnwrapEthAction</a></dt>
|
|
51
56
|
<dd><p>Unwraps a specified amount of WETH from the proxy</p>
|
|
52
57
|
</dd>
|
|
58
|
+
<dt><a href="#UpdateSubAction">UpdateSubAction</a></dt>
|
|
59
|
+
<dd><p>Action for updating sub data</p>
|
|
60
|
+
</dd>
|
|
53
61
|
<dt><a href="#WrapEthAction">WrapEthAction</a></dt>
|
|
54
62
|
<dd><p>Wraps a specified amount of ETH from the wallet to WETH on the recipe</p>
|
|
55
63
|
</dd>
|
|
64
|
+
<dt><a href="#MakerRatioCheckAction">MakerRatioCheckAction</a></dt>
|
|
65
|
+
<dd><p>MakerRatioCheckAction - Checks mcd ratio at end of all actions</p>
|
|
66
|
+
</dd>
|
|
56
67
|
<dt><a href="#CompoundBorrowAction">CompoundBorrowAction</a></dt>
|
|
57
68
|
<dd><p>CompoundBorrowAction - Borrow tokens from Compound</p>
|
|
58
69
|
</dd>
|
|
@@ -71,6 +82,26 @@
|
|
|
71
82
|
<dt><a href="#CompoundWithdrawAction">CompoundWithdrawAction</a></dt>
|
|
72
83
|
<dd><p>CompoundWithdrawAction - Withdraw token from an Compound position</p>
|
|
73
84
|
</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>
|
|
74
105
|
<dt><a href="#DyDxWithdrawAction">DyDxWithdrawAction</a></dt>
|
|
75
106
|
<dd><p>DyDxWithdrawAction - Withdraw token from an DyDx position</p>
|
|
76
107
|
</dd>
|
|
@@ -92,9 +123,27 @@
|
|
|
92
123
|
<dt><a href="#DyDxFlashLoanPaybackAction">DyDxFlashLoanPaybackAction</a></dt>
|
|
93
124
|
<dd><p>Pays back a flashloan from DyDx</p>
|
|
94
125
|
</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>
|
|
95
138
|
<dt><a href="#LidoStakeAction">LidoStakeAction</a></dt>
|
|
96
139
|
<dd><p>LidoStakeAction - Receives WETH, transforms it to ETH then sends it to Lido staking contract receiving stETH in return</p>
|
|
97
140
|
</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>
|
|
98
147
|
<dt><a href="#LiquityBorrowAction">LiquityBorrowAction</a></dt>
|
|
99
148
|
<dd><p>LiquityBorrowAction - Borrows LUSD from the trove</p>
|
|
100
149
|
</dd>
|
|
@@ -140,6 +189,9 @@
|
|
|
140
189
|
<dt><a href="#LiquityWithdrawAction">LiquityWithdrawAction</a></dt>
|
|
141
190
|
<dd><p>LiquityWithdrawAction - Withdraws collateral from the trove</p>
|
|
142
191
|
</dd>
|
|
192
|
+
<dt><a href="#MakerClaimAction">MakerClaimAction</a></dt>
|
|
193
|
+
<dd><p>MakerClaimAction - Claim bonus tokens in CropJoin types</p>
|
|
194
|
+
</dd>
|
|
143
195
|
<dt><a href="#MakerGenerateAction">MakerGenerateAction</a></dt>
|
|
144
196
|
<dd><p>MakerGenerateAction - Generated Dai from a Vault</p>
|
|
145
197
|
</dd>
|
|
@@ -155,6 +207,9 @@
|
|
|
155
207
|
<dt><a href="#MakerPaybackAction">MakerPaybackAction</a></dt>
|
|
156
208
|
<dd><p>MakerPaybackAction - Payback dai to a Vault</p>
|
|
157
209
|
</dd>
|
|
210
|
+
<dt><a href="#MakerRatioAction">MakerRatioAction</a></dt>
|
|
211
|
+
<dd><p>MakerRatioAction</p>
|
|
212
|
+
</dd>
|
|
158
213
|
<dt><a href="#MakerSupplyAction">MakerSupplyAction</a></dt>
|
|
159
214
|
<dd><p>MakerSupplyAction - Supply token to a Vault</p>
|
|
160
215
|
</dd>
|
|
@@ -258,18 +313,6 @@ AaveClaimStkAaveAction - Claims stkAave from incentives controller
|
|
|
258
313
|
## AaveCollateralSwitchAction
|
|
259
314
|
AaveCollateralSwitchAction - Aave enable/disable token usage as collateral
|
|
260
315
|
|
|
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
|
-
|
|
273
316
|
**Kind**: global class
|
|
274
317
|
<a name="AavePaybackAction"></a>
|
|
275
318
|
|
|
@@ -386,6 +429,20 @@ ChangeProxyOwnerAction - Changes EOA which owns the proxy that is being called
|
|
|
386
429
|
|
|
387
430
|
- newOwner <code>Address</code> - Address of new owner
|
|
388
431
|
|
|
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
|
+
|
|
389
446
|
<a name="PullTokenAction"></a>
|
|
390
447
|
|
|
391
448
|
## PullTokenAction
|
|
@@ -432,6 +489,21 @@ Transfers specified token from recipe (DsProxy) to specified address
|
|
|
432
489
|
- to <code>string</code> - Transfer recipient
|
|
433
490
|
- amount <code>string</code> - Transfer amount (-1 for whole Recipe (DsProxy) balance)
|
|
434
491
|
|
|
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
|
+
|
|
435
507
|
<a name="SubInputsAction"></a>
|
|
436
508
|
|
|
437
509
|
## SubInputsAction
|
|
@@ -444,6 +516,20 @@ Subs 2 inputs/return values
|
|
|
444
516
|
Sums up 2 inputs/return values
|
|
445
517
|
|
|
446
518
|
**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
|
+
|
|
447
533
|
<a name="UnwrapEthAction"></a>
|
|
448
534
|
|
|
449
535
|
## UnwrapEthAction
|
|
@@ -458,6 +544,20 @@ Unwraps a specified amount of WETH from the proxy
|
|
|
458
544
|
- amount <code>string</code> - Token address
|
|
459
545
|
- to <code>string</code> - Transfer recipient
|
|
460
546
|
|
|
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
|
+
|
|
461
561
|
<a name="WrapEthAction"></a>
|
|
462
562
|
|
|
463
563
|
## WrapEthAction
|
|
@@ -471,6 +571,23 @@ Wraps a specified amount of ETH from the wallet to WETH on the recipe
|
|
|
471
571
|
|
|
472
572
|
- amount <code>string</code> - Transfer amount
|
|
473
573
|
|
|
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
|
+
|
|
474
591
|
<a name="CompoundBorrowAction"></a>
|
|
475
592
|
|
|
476
593
|
## CompoundBorrowAction
|
|
@@ -522,7 +639,7 @@ CompoundPaybackAction - Payback borrowed tokens from Compound
|
|
|
522
639
|
- cTokenAddr <code>EthAddress</code>
|
|
523
640
|
- amount <code>string</code> - Wei amount in underlying asset decimals (not cAsset) - ie. 18 dec for cETH, not 8
|
|
524
641
|
- from <code>EthAddress</code>
|
|
525
|
-
- onBehalf <code>
|
|
642
|
+
- onBehalf <code>EthAddress</code> - Defaults to DsProxy address if 0x0
|
|
526
643
|
|
|
527
644
|
<a name="CompoundSupplyAction"></a>
|
|
528
645
|
|
|
@@ -555,6 +672,148 @@ CompoundWithdrawAction - Withdraw token from an Compound position
|
|
|
555
672
|
- amount <code>string</code> - Wei amount in underlying asset decimals (not cAsset) - ie. 18 dec for cETH, not 8
|
|
556
673
|
- to <code>EthAddress</code>
|
|
557
674
|
|
|
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
|
+
|
|
558
817
|
<a name="DyDxWithdrawAction"></a>
|
|
559
818
|
|
|
560
819
|
## DyDxWithdrawAction
|
|
@@ -662,6 +921,46 @@ Pays back a flashloan from DyDx
|
|
|
662
921
|
- loanAmount <code>string</code>
|
|
663
922
|
- tokenAddr <code>EthAddress</code>
|
|
664
923
|
|
|
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
|
|
665
964
|
<a name="LidoStakeAction"></a>
|
|
666
965
|
|
|
667
966
|
## LidoStakeAction
|
|
@@ -677,6 +976,37 @@ LidoStakeAction - Receives WETH, transforms it to ETH then sends it to Lido stak
|
|
|
677
976
|
- from <code>EthAddress</code> - WETH will be taken from this address
|
|
678
977
|
- to <code>EthAddress</code> - stETH will be sent to this address
|
|
679
978
|
|
|
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
|
+
|
|
680
1010
|
<a name="LiquityBorrowAction"></a>
|
|
681
1011
|
|
|
682
1012
|
## LiquityBorrowAction
|
|
@@ -899,6 +1229,21 @@ LiquityWithdrawAction - Withdraws collateral from the trove
|
|
|
899
1229
|
- collAmount - Amount of WETH tokens to withdraw
|
|
900
1230
|
- to - Address that will receive the withdrawn tokens
|
|
901
1231
|
|
|
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
|
+
|
|
902
1247
|
<a name="MakerGenerateAction"></a>
|
|
903
1248
|
|
|
904
1249
|
## MakerGenerateAction
|
|
@@ -976,6 +1321,19 @@ MakerPaybackAction - Payback dai to a Vault
|
|
|
976
1321
|
- from <code>EthAddress</code> - DAI will be sent from this address
|
|
977
1322
|
- mcdManager <code>EthAddress</code>
|
|
978
1323
|
|
|
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
|
+
|
|
979
1337
|
<a name="MakerSupplyAction"></a>
|
|
980
1338
|
|
|
981
1339
|
## MakerSupplyAction
|
|
@@ -1007,7 +1365,7 @@ MakerWithdrawAction - Withdraw token from a Vault
|
|
|
1007
1365
|
- vaultId <code>VaultId</code>
|
|
1008
1366
|
- amount <code>string</code>
|
|
1009
1367
|
- joinAddr <code>EthAddress</code>
|
|
1010
|
-
- to <code>
|
|
1368
|
+
- to <code>string</code>
|
|
1011
1369
|
- mcdManager <code>EthAddress</code>
|
|
1012
1370
|
|
|
1013
1371
|
<a name="MStableClaimAction"></a>
|
|
@@ -1034,7 +1392,7 @@ MStableDepositAction
|
|
|
1034
1392
|
**Kind**: global class
|
|
1035
1393
|
<a name="new_MStableDepositAction_new"></a>
|
|
1036
1394
|
|
|
1037
|
-
### new MStableDepositAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut,
|
|
1395
|
+
### new MStableDepositAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, assetPair)
|
|
1038
1396
|
**Params**
|
|
1039
1397
|
|
|
1040
1398
|
- bAsset
|
|
@@ -1045,7 +1403,7 @@ MStableDepositAction
|
|
|
1045
1403
|
- to
|
|
1046
1404
|
- amount
|
|
1047
1405
|
- minOut
|
|
1048
|
-
-
|
|
1406
|
+
- assetPair
|
|
1049
1407
|
|
|
1050
1408
|
<a name="MStableWithdrawAction"></a>
|
|
1051
1409
|
|
|
@@ -1055,7 +1413,7 @@ MStableWithdrawAction
|
|
|
1055
1413
|
**Kind**: global class
|
|
1056
1414
|
<a name="new_MStableWithdrawAction_new"></a>
|
|
1057
1415
|
|
|
1058
|
-
### new MStableWithdrawAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut,
|
|
1416
|
+
### new MStableWithdrawAction(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, assetPair)
|
|
1059
1417
|
**Params**
|
|
1060
1418
|
|
|
1061
1419
|
- bAsset
|
|
@@ -1066,7 +1424,7 @@ MStableWithdrawAction
|
|
|
1066
1424
|
- to
|
|
1067
1425
|
- amount
|
|
1068
1426
|
- minOut
|
|
1069
|
-
-
|
|
1427
|
+
- assetPair
|
|
1070
1428
|
|
|
1071
1429
|
<a name="RariDepositAction"></a>
|
|
1072
1430
|
|