@defisaver/sdk 1.3.36 → 1.3.37-semi-continuous-dev
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/README.md +55 -9
- package/docs/DEV.md +63 -0
- package/esm/src/Action.js +21 -13
- package/esm/src/ActionWithL2.js +4 -0
- package/esm/src/Recipe.js +5 -1
- package/package.json +2 -6
- package/src/Action.ts +18 -9
- package/src/ActionWithL2.ts +2 -0
- package/src/Recipe.ts +4 -1
- package/test/Action.js +83 -3
- package/test/ActionWithL2.js +65 -19
- package/test/Recipe.js +97 -0
- package/tsconfig.json +1 -5
- package/umd/index.js +24 -13
- package/ACTIONS.md +0 -1765
- package/DEV.md +0 -43
- package/docs/md/.nojekyll +0 -1
- package/docs/md/README.md +0 -12
- package/docs/md/classes/AaveBorrowAction.md +0 -458
- package/docs/md/classes/AaveClaimStkAaveAction.md +0 -455
- package/docs/md/classes/AaveCollateralSwitchAction.md +0 -455
- package/docs/md/classes/AavePaybackAction.md +0 -458
- package/docs/md/classes/AaveSupplyAction.md +0 -458
- package/docs/md/classes/AaveV2FlashLoanAction.md +0 -458
- package/docs/md/classes/AaveV2FlashLoanPaybackAction.md +0 -454
- package/docs/md/classes/AaveV3ATokenPaybackAction.md +0 -644
- package/docs/md/classes/AaveV3BorrowAction.md +0 -606
- package/docs/md/classes/AaveV3ClaimRewardsAction.md +0 -603
- package/docs/md/classes/AaveV3CollateralSwitchAction.md +0 -603
- package/docs/md/classes/AaveV3FlashLoanAction.md +0 -604
- package/docs/md/classes/AaveV3FlashLoanPaybackAction.md +0 -454
- package/docs/md/classes/AaveV3PaybackAction.md +0 -618
- package/docs/md/classes/AaveV3RatioCheckAction.md +0 -454
- package/docs/md/classes/AaveV3RatioTrigger.md +0 -454
- package/docs/md/classes/AaveV3SetEModeAction.md +0 -601
- package/docs/md/classes/AaveV3SupplyAction.md +0 -618
- package/docs/md/classes/AaveV3SwapBorrowRateModeAction.md +0 -602
- package/docs/md/classes/AaveV3WithdrawAction.md +0 -603
- package/docs/md/classes/AaveWithdrawAction.md +0 -456
- package/docs/md/classes/Action.md +0 -604
- package/docs/md/classes/ActionWithL2.md +0 -612
- package/docs/md/classes/AutomationV2Unsub.md +0 -452
- package/docs/md/classes/BalancerFlashLoanAction.md +0 -456
- package/docs/md/classes/BalancerFlashLoanPaybackAction.md +0 -454
- package/docs/md/classes/BalancerV2ClaimAction.md +0 -457
- package/docs/md/classes/BalancerV2SupplyAction.md +0 -458
- package/docs/md/classes/BalancerV2WithdrawAction.md +0 -470
- package/docs/md/classes/CBChickenInAction.md +0 -454
- package/docs/md/classes/CBChickenOutAction.md +0 -455
- package/docs/md/classes/CBCreateAction.md +0 -454
- package/docs/md/classes/CBRedeemAction.md +0 -456
- package/docs/md/classes/ChainLinkPriceTrigger.md +0 -453
- package/docs/md/classes/ChangeProxyOwnerAction.md +0 -453
- package/docs/md/classes/CompV3RatioTrigger.md +0 -454
- package/docs/md/classes/CompoundBorrowAction.md +0 -455
- package/docs/md/classes/CompoundClaimAction.md +0 -456
- package/docs/md/classes/CompoundCollateralSwitchAction.md +0 -454
- package/docs/md/classes/CompoundGetDebtAction.md +0 -452
- package/docs/md/classes/CompoundPaybackAction.md +0 -456
- package/docs/md/classes/CompoundRatioTrigger.md +0 -453
- package/docs/md/classes/CompoundSupplyAction.md +0 -456
- package/docs/md/classes/CompoundV3AllowAction.md +0 -455
- package/docs/md/classes/CompoundV3BorrowAction.md +0 -456
- package/docs/md/classes/CompoundV3ClaimAction.md +0 -456
- package/docs/md/classes/CompoundV3PaybackAction.md +0 -468
- package/docs/md/classes/CompoundV3RatioCheckAction.md +0 -456
- package/docs/md/classes/CompoundV3SupplyAction.md +0 -468
- package/docs/md/classes/CompoundV3TransferAction.md +0 -457
- package/docs/md/classes/CompoundV3WithdrawAction.md +0 -457
- package/docs/md/classes/CompoundWithdrawAction.md +0 -455
- package/docs/md/classes/ConvexClaimAction.md +0 -466
- package/docs/md/classes/ConvexDepositAction.md +0 -468
- package/docs/md/classes/ConvexWithdrawAction.md +0 -468
- package/docs/md/classes/CurveClaimFeesAction.md +0 -452
- package/docs/md/classes/CurveDepositAction.md +0 -467
- package/docs/md/classes/CurveGaugeDepositAction.md +0 -455
- package/docs/md/classes/CurveGaugeWithdrawAction.md +0 -454
- package/docs/md/classes/CurveMintCrvAction.md +0 -452
- package/docs/md/classes/CurveStethPoolDepositAction.md +0 -456
- package/docs/md/classes/CurveStethPoolWithdrawAction.md +0 -457
- package/docs/md/classes/CurveSwapAction.md +0 -457
- package/docs/md/classes/CurveWithdrawAction.md +0 -468
- package/docs/md/classes/DfsWeb3.md +0 -212
- package/docs/md/classes/DyDxFlashLoanAction.md +0 -456
- package/docs/md/classes/DyDxFlashLoanPaybackAction.md +0 -454
- package/docs/md/classes/DyDxWithdrawAction.md +0 -455
- package/docs/md/classes/EulerFlashLoanAction.md +0 -456
- package/docs/md/classes/EulerFlashLoanPaybackAction.md +0 -454
- package/docs/md/classes/GUniDeposit.md +0 -461
- package/docs/md/classes/GUniWithdraw.md +0 -458
- package/docs/md/classes/GasFeeAction.md +0 -454
- package/docs/md/classes/GasFeeActionL2.md +0 -455
- package/docs/md/classes/GasPriceTrigger.md +0 -35
- package/docs/md/classes/InstPullTokensAction.md +0 -454
- package/docs/md/classes/LidoStakeAction.md +0 -455
- package/docs/md/classes/LidoUnwrapAction.md +0 -455
- package/docs/md/classes/LidoWrapAction.md +0 -456
- package/docs/md/classes/LiquityBorrowAction.md +0 -457
- package/docs/md/classes/LiquityClaimAction.md +0 -453
- package/docs/md/classes/LiquityClaimSPRewardsAction.md +0 -454
- package/docs/md/classes/LiquityClaimStakingRewardsAction.md +0 -454
- package/docs/md/classes/LiquityCloseAction.md +0 -454
- package/docs/md/classes/LiquityEthGainToTroveAction.md +0 -455
- package/docs/md/classes/LiquityOpenAction.md +0 -459
- package/docs/md/classes/LiquityPaybackAction.md +0 -456
- package/docs/md/classes/LiquityRatioTrigger.md +0 -453
- package/docs/md/classes/LiquityRedeemAction.md +0 -461
- package/docs/md/classes/LiquitySPDepositAction.md +0 -456
- package/docs/md/classes/LiquitySPWithdrawAction.md +0 -458
- package/docs/md/classes/LiquityStakeAction.md +0 -456
- package/docs/md/classes/LiquitySupplyAction.md +0 -456
- package/docs/md/classes/LiquityUnstakeAction.md +0 -458
- package/docs/md/classes/LiquityWithdrawAction.md +0 -456
- package/docs/md/classes/MStableClaimAction.md +0 -456
- package/docs/md/classes/MStableDepositAction.md +0 -461
- package/docs/md/classes/MStableWithdrawAction.md +0 -461
- package/docs/md/classes/MakerClaimAction.md +0 -455
- package/docs/md/classes/MakerFlashLoanAction.md +0 -455
- package/docs/md/classes/MakerFlashLoanPaybackAction.md +0 -454
- package/docs/md/classes/MakerGenerateAction.md +0 -456
- package/docs/md/classes/MakerGiveAction.md +0 -456
- package/docs/md/classes/MakerMergeAction.md +0 -455
- package/docs/md/classes/MakerOpenVaultAction.md +0 -454
- package/docs/md/classes/MakerPaybackAction.md +0 -456
- package/docs/md/classes/MakerRatioAction.md +0 -453
- package/docs/md/classes/MakerRatioCheckAction.md +0 -457
- package/docs/md/classes/MakerRatioTrigger.md +0 -453
- package/docs/md/classes/MakerSupplyAction.md +0 -457
- package/docs/md/classes/MakerWithdrawAction.md +0 -457
- package/docs/md/classes/PullTokenAction.md +0 -455
- package/docs/md/classes/RariDepositAction.md +0 -458
- package/docs/md/classes/RariWithdrawAction.md +0 -459
- package/docs/md/classes/Recipe.md +0 -195
- package/docs/md/classes/ReflexerGenerateAction.md +0 -455
- package/docs/md/classes/ReflexerNativeUniV2SaviourDepositAction.md +0 -455
- package/docs/md/classes/ReflexerNativeUniV2SaviourGetReservesAction.md +0 -454
- package/docs/md/classes/ReflexerNativeUniV2SaviourWithdrawAction.md +0 -455
- package/docs/md/classes/ReflexerOpenSafeAction.md +0 -453
- package/docs/md/classes/ReflexerPaybackAction.md +0 -455
- package/docs/md/classes/ReflexerRatioTrigger.md +0 -453
- package/docs/md/classes/ReflexerSupplyAction.md +0 -456
- package/docs/md/classes/ReflexerWithdrawAction.md +0 -456
- package/docs/md/classes/SellAction.md +0 -613
- package/docs/md/classes/SendTokenAction.md +0 -467
- package/docs/md/classes/SendTokenAndUnwrapAction.md +0 -455
- package/docs/md/classes/Strategy.md +0 -195
- package/docs/md/classes/SubInputsAction.md +0 -454
- package/docs/md/classes/SumInputsAction.md +0 -454
- package/docs/md/classes/TimestampTrigger.md +0 -451
- package/docs/md/classes/ToggleSubAction.md +0 -454
- package/docs/md/classes/TokenBalanceAction.md +0 -452
- package/docs/md/classes/TrailingStopTrigger.md +0 -453
- package/docs/md/classes/TransferNFTAction.md +0 -454
- package/docs/md/classes/UniV3CurrentTickTrigger.md +0 -452
- package/docs/md/classes/UniswapSupplyAction.md +0 -461
- package/docs/md/classes/UniswapV3CollectAction.md +0 -614
- package/docs/md/classes/UniswapV3CreatePoolAction.md +0 -611
- package/docs/md/classes/UniswapV3MintAction.md +0 -610
- package/docs/md/classes/UniswapV3SupplyAction.md +0 -63
- package/docs/md/classes/UniswapV3WithdrawAction.md +0 -618
- package/docs/md/classes/UniswapWithdrawAction.md +0 -460
- package/docs/md/classes/UnwrapEthAction.md +0 -600
- package/docs/md/classes/UpdateSubAction.md +0 -454
- package/docs/md/classes/WrapEthAction.md +0 -599
- package/docs/md/classes/YearnSupplyAction.md +0 -456
- package/docs/md/classes/YearnWithdrawAction.md +0 -456
- package/docs/md/modules.md +0 -814
package/DEV.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# DeFi Saver SDK
|
|
2
|
-
|
|
3
|
-
Every specific action is a class that has to extend base class [Action](https://github.com/defisaver/defisaver-sdk/blob/master/src/Action.ts) or [ActionWithL2](https://github.com/defisaver/defisaver-sdk/blob/master/src/ActionWithL2.ts)
|
|
4
|
-
|
|
5
|
-
When using an action in a recipe, you can pipe an output of an action used before it by putting $ and then the number of action which output you want to use (starting from 1, not 0)
|
|
6
|
-
e.g.
|
|
7
|
-
|
|
8
|
-
```js
|
|
9
|
-
const recipe = new Recipe('exampleLiquitySupply', [
|
|
10
|
-
// pull 1 WETH from user address
|
|
11
|
-
new dfs.actions.basic.PullToken('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', '0x123..', 1000000000000000000),
|
|
12
|
-
// $1 will use the output of the first action as that argument - in this case, it will be 1 WETH
|
|
13
|
-
new dfs.actions.liquity.LiquitySupplyAction('$1', '0xProxy', 'upperHint', 'lowerHint'),
|
|
14
|
-
]);
|
|
15
|
-
```
|
|
16
|
-
## Action
|
|
17
|
-
|
|
18
|
-
- ```constructor``` - here you should sanity check arguments, and call ```super(actionName, addressOfAction, types, args)``` where types are used for encoding args
|
|
19
|
-
- ```mappableArgs``` - if needed, have to be defined in ```constructor```
|
|
20
|
-
- ```getAssetsToApprove``` - if action pulls tokens from the address, this should return an array of tokens that need to be approved (erc20 and/or nfts). [Return type object](https://github.com/defisaver/defisaver-sdk/blob/29aa14835240b977ceb053dfc947faae5d19ff9d/src/Action.ts#L195) is defined here.
|
|
21
|
-
- ```getEthValue``` - needed if action is using pure ETH, then value is required when sending a tx
|
|
22
|
-
- ```encodeInputs``` - if Action extends ActionWithL2, it can have custom function for gas savings e.g. pack address as 20 bytes instead od 32
|
|
23
|
-
- ```encodeForDsProxyCall```
|
|
24
|
-
- ```encodeForL2DsProxyCall```
|
|
25
|
-
- ```encodeForRecipe```
|
|
26
|
-
- ```encodeForL2Recipe```
|
|
27
|
-
- ```encodeForStrategy```
|
|
28
|
-
|
|
29
|
-
## Recipe
|
|
30
|
-
|
|
31
|
-
- ```constructor(name, actions)``` - name of the recipe is required, actions are optional
|
|
32
|
-
- ```addAction``` - add Action to Recipe
|
|
33
|
-
- ```getAssetsToApprove``` - returns an array of all unique token approvals from all actions from the recipe
|
|
34
|
-
- ```getEthValue``` - sum of values from all actions
|
|
35
|
-
- ```encodeForDsProxyCall```
|
|
36
|
-
|
|
37
|
-
## Addresses
|
|
38
|
-
|
|
39
|
-
All contract addresses can be found [here](https://github.com/defisaver/defisaver-sdk/blob/master/src/addresses.ts)
|
|
40
|
-
|
|
41
|
-
## Examples
|
|
42
|
-
|
|
43
|
-
Examples and tests can be found [here](https://github.com/defisaver/defisaver-sdk/tree/master/test)
|
package/docs/md/.nojekyll
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
package/docs/md/README.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
@defisaver/sdk / [Exports](modules.md)
|
|
2
|
-
|
|
3
|
-
# DeFi Saver Recipe SDK
|
|
4
|
-
|
|
5
|
-
Create complex transactions that interact with multiple DeFi protocols.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
- [General docs](https://docs.defisaver.com/)
|
|
10
|
-
- [SDK docs](https://github.com/DecenterApps/defisaver-sdk/blob/master/DEV.md)
|
|
11
|
-
- [Available Actions](https://github.com/DecenterApps/defisaver-sdk/blob/master/ACTIONS.md)
|
|
12
|
-
- [Pre-made recipes - TODO](https://github.com/DecenterApps/defisaver-sdk/blob/master/RECIPES.md)
|
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
[@defisaver/sdk](../README.md) / [Exports](../modules.md) / AaveBorrowAction
|
|
2
|
-
|
|
3
|
-
# Class: AaveBorrowAction
|
|
4
|
-
|
|
5
|
-
AaveBorrowAction - Borrow tokens from Aave
|
|
6
|
-
|
|
7
|
-
## Hierarchy
|
|
8
|
-
|
|
9
|
-
- [`Action`](Action.md)
|
|
10
|
-
|
|
11
|
-
↳ **`AaveBorrowAction`**
|
|
12
|
-
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
### Constructors
|
|
16
|
-
|
|
17
|
-
- [constructor](AaveBorrowAction.md#constructor)
|
|
18
|
-
|
|
19
|
-
### Properties
|
|
20
|
-
|
|
21
|
-
- [args](AaveBorrowAction.md#args)
|
|
22
|
-
- [contractAddress](AaveBorrowAction.md#contractaddress)
|
|
23
|
-
- [mappableArgs](AaveBorrowAction.md#mappableargs)
|
|
24
|
-
- [name](AaveBorrowAction.md#name)
|
|
25
|
-
- [paramTypes](AaveBorrowAction.md#paramtypes)
|
|
26
|
-
|
|
27
|
-
### Methods
|
|
28
|
-
|
|
29
|
-
- [\_encodeForCall](AaveBorrowAction.md#_encodeforcall)
|
|
30
|
-
- [\_formatType](AaveBorrowAction.md#_formattype)
|
|
31
|
-
- [\_getArgumentMapping](AaveBorrowAction.md#_getargumentmapping)
|
|
32
|
-
- [\_getArgumentMappingWithSlots](AaveBorrowAction.md#_getargumentmappingwithslots)
|
|
33
|
-
- [\_getPlaceholderForType](AaveBorrowAction.md#_getplaceholderfortype)
|
|
34
|
-
- [\_replaceWithPlaceholders](AaveBorrowAction.md#_replacewithplaceholders)
|
|
35
|
-
- [encodeForDsProxyCall](AaveBorrowAction.md#encodefordsproxycall)
|
|
36
|
-
- [encodeForL2DsProxyCall](AaveBorrowAction.md#encodeforl2dsproxycall)
|
|
37
|
-
- [encodeForL2Recipe](AaveBorrowAction.md#encodeforl2recipe)
|
|
38
|
-
- [encodeForRecipe](AaveBorrowAction.md#encodeforrecipe)
|
|
39
|
-
- [encodeForStrategy](AaveBorrowAction.md#encodeforstrategy)
|
|
40
|
-
- [getAccessList](AaveBorrowAction.md#getaccesslist)
|
|
41
|
-
- [getAssetsToApprove](AaveBorrowAction.md#getassetstoapprove)
|
|
42
|
-
- [getEthValue](AaveBorrowAction.md#getethvalue)
|
|
43
|
-
- [getId](AaveBorrowAction.md#getid)
|
|
44
|
-
|
|
45
|
-
## Constructors
|
|
46
|
-
|
|
47
|
-
### constructor
|
|
48
|
-
|
|
49
|
-
• **new AaveBorrowAction**(`market`, `tokenAddr`, `amount`, `rateMode`, `to`, `onBehalf?`)
|
|
50
|
-
|
|
51
|
-
#### Parameters
|
|
52
|
-
|
|
53
|
-
| Name | Type | Description |
|
|
54
|
-
| :------ | :------ | :------ |
|
|
55
|
-
| `market` | `string` | Market Address |
|
|
56
|
-
| `tokenAddr` | `string` | Token Address |
|
|
57
|
-
| `amount` | `string` | Amount to borrow |
|
|
58
|
-
| `rateMode` | `string` | Borrow rate mode: Stable: 1, Variable: 2 |
|
|
59
|
-
| `to` | `string` | Borrowed tokens will be sent to this address |
|
|
60
|
-
| `onBehalf` | `string` | Borrowing on behalf of address |
|
|
61
|
-
|
|
62
|
-
#### Overrides
|
|
63
|
-
|
|
64
|
-
[Action](Action.md).[constructor](Action.md#constructor)
|
|
65
|
-
|
|
66
|
-
#### Defined in
|
|
67
|
-
|
|
68
|
-
[src/actions/aave/AaveBorrowAction.ts:20](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/actions/aave/AaveBorrowAction.ts#L20)
|
|
69
|
-
|
|
70
|
-
## Properties
|
|
71
|
-
|
|
72
|
-
### args
|
|
73
|
-
|
|
74
|
-
• **args**: `any`[]
|
|
75
|
-
|
|
76
|
-
#### Inherited from
|
|
77
|
-
|
|
78
|
-
[Action](Action.md).[args](Action.md#args)
|
|
79
|
-
|
|
80
|
-
#### Defined in
|
|
81
|
-
|
|
82
|
-
[src/Action.ts:18](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L18)
|
|
83
|
-
|
|
84
|
-
___
|
|
85
|
-
|
|
86
|
-
### contractAddress
|
|
87
|
-
|
|
88
|
-
• **contractAddress**: `string`
|
|
89
|
-
|
|
90
|
-
#### Inherited from
|
|
91
|
-
|
|
92
|
-
[Action](Action.md).[contractAddress](Action.md#contractaddress)
|
|
93
|
-
|
|
94
|
-
#### Defined in
|
|
95
|
-
|
|
96
|
-
[src/Action.ts:15](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L15)
|
|
97
|
-
|
|
98
|
-
___
|
|
99
|
-
|
|
100
|
-
### mappableArgs
|
|
101
|
-
|
|
102
|
-
• **mappableArgs**: `any`[]
|
|
103
|
-
|
|
104
|
-
#### Inherited from
|
|
105
|
-
|
|
106
|
-
[Action](Action.md).[mappableArgs](Action.md#mappableargs)
|
|
107
|
-
|
|
108
|
-
#### Defined in
|
|
109
|
-
|
|
110
|
-
[src/Action.ts:19](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L19)
|
|
111
|
-
|
|
112
|
-
___
|
|
113
|
-
|
|
114
|
-
### name
|
|
115
|
-
|
|
116
|
-
• **name**: `string`
|
|
117
|
-
|
|
118
|
-
#### Inherited from
|
|
119
|
-
|
|
120
|
-
[Action](Action.md).[name](Action.md#name)
|
|
121
|
-
|
|
122
|
-
#### Defined in
|
|
123
|
-
|
|
124
|
-
[src/Action.ts:17](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L17)
|
|
125
|
-
|
|
126
|
-
___
|
|
127
|
-
|
|
128
|
-
### paramTypes
|
|
129
|
-
|
|
130
|
-
• **paramTypes**: (`string` \| `any`[])[]
|
|
131
|
-
|
|
132
|
-
#### Inherited from
|
|
133
|
-
|
|
134
|
-
[Action](Action.md).[paramTypes](Action.md#paramtypes)
|
|
135
|
-
|
|
136
|
-
#### Defined in
|
|
137
|
-
|
|
138
|
-
[src/Action.ts:16](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L16)
|
|
139
|
-
|
|
140
|
-
## Methods
|
|
141
|
-
|
|
142
|
-
### \_encodeForCall
|
|
143
|
-
|
|
144
|
-
▸ `Private` **_encodeForCall**(): `string`[]
|
|
145
|
-
|
|
146
|
-
Encode arguments for calling the action directly
|
|
147
|
-
|
|
148
|
-
#### Returns
|
|
149
|
-
|
|
150
|
-
`string`[]
|
|
151
|
-
|
|
152
|
-
bytes-encoded args
|
|
153
|
-
|
|
154
|
-
#### Inherited from
|
|
155
|
-
|
|
156
|
-
[Action](Action.md).[_encodeForCall](Action.md#_encodeforcall)
|
|
157
|
-
|
|
158
|
-
#### Defined in
|
|
159
|
-
|
|
160
|
-
[src/Action.ts:117](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L117)
|
|
161
|
-
|
|
162
|
-
___
|
|
163
|
-
|
|
164
|
-
### \_formatType
|
|
165
|
-
|
|
166
|
-
▸ `Private` **_formatType**(`paramType`): `string`
|
|
167
|
-
|
|
168
|
-
#### Parameters
|
|
169
|
-
|
|
170
|
-
| Name | Type |
|
|
171
|
-
| :------ | :------ |
|
|
172
|
-
| `paramType` | `string` \| `any`[] |
|
|
173
|
-
|
|
174
|
-
#### Returns
|
|
175
|
-
|
|
176
|
-
`string`
|
|
177
|
-
|
|
178
|
-
#### Inherited from
|
|
179
|
-
|
|
180
|
-
[Action](Action.md).[_formatType](Action.md#_formattype)
|
|
181
|
-
|
|
182
|
-
#### Defined in
|
|
183
|
-
|
|
184
|
-
[src/Action.ts:107](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L107)
|
|
185
|
-
|
|
186
|
-
___
|
|
187
|
-
|
|
188
|
-
### \_getArgumentMapping
|
|
189
|
-
|
|
190
|
-
▸ `Private` **_getArgumentMapping**(): `number`[]
|
|
191
|
-
|
|
192
|
-
#### Returns
|
|
193
|
-
|
|
194
|
-
`number`[]
|
|
195
|
-
|
|
196
|
-
#### Inherited from
|
|
197
|
-
|
|
198
|
-
[Action](Action.md).[_getArgumentMapping](Action.md#_getargumentmapping)
|
|
199
|
-
|
|
200
|
-
#### Defined in
|
|
201
|
-
|
|
202
|
-
[src/Action.ts:70](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L70)
|
|
203
|
-
|
|
204
|
-
___
|
|
205
|
-
|
|
206
|
-
### \_getArgumentMappingWithSlots
|
|
207
|
-
|
|
208
|
-
▸ `Private` **_getArgumentMappingWithSlots**(`subSlots`): `number`[]
|
|
209
|
-
|
|
210
|
-
#### Parameters
|
|
211
|
-
|
|
212
|
-
| Name | Type |
|
|
213
|
-
| :------ | :------ |
|
|
214
|
-
| `subSlots` | `any`[] |
|
|
215
|
-
|
|
216
|
-
#### Returns
|
|
217
|
-
|
|
218
|
-
`number`[]
|
|
219
|
-
|
|
220
|
-
#### Inherited from
|
|
221
|
-
|
|
222
|
-
[Action](Action.md).[_getArgumentMappingWithSlots](Action.md#_getargumentmappingwithslots)
|
|
223
|
-
|
|
224
|
-
#### Defined in
|
|
225
|
-
|
|
226
|
-
[src/Action.ts:49](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L49)
|
|
227
|
-
|
|
228
|
-
___
|
|
229
|
-
|
|
230
|
-
### \_getPlaceholderForType
|
|
231
|
-
|
|
232
|
-
▸ `Private` **_getPlaceholderForType**(`type`): `string`
|
|
233
|
-
|
|
234
|
-
#### Parameters
|
|
235
|
-
|
|
236
|
-
| Name | Type |
|
|
237
|
-
| :------ | :------ |
|
|
238
|
-
| `type` | `string` |
|
|
239
|
-
|
|
240
|
-
#### Returns
|
|
241
|
-
|
|
242
|
-
`string`
|
|
243
|
-
|
|
244
|
-
#### Inherited from
|
|
245
|
-
|
|
246
|
-
[Action](Action.md).[_getPlaceholderForType](Action.md#_getplaceholderfortype)
|
|
247
|
-
|
|
248
|
-
#### Defined in
|
|
249
|
-
|
|
250
|
-
[src/Action.ts:84](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L84)
|
|
251
|
-
|
|
252
|
-
___
|
|
253
|
-
|
|
254
|
-
### \_replaceWithPlaceholders
|
|
255
|
-
|
|
256
|
-
▸ `Private` **_replaceWithPlaceholders**(`arg`, `paramType`): `any`
|
|
257
|
-
|
|
258
|
-
#### Parameters
|
|
259
|
-
|
|
260
|
-
| Name | Type |
|
|
261
|
-
| :------ | :------ |
|
|
262
|
-
| `arg` | `any` |
|
|
263
|
-
| `paramType` | `string` \| `any`[] |
|
|
264
|
-
|
|
265
|
-
#### Returns
|
|
266
|
-
|
|
267
|
-
`any`
|
|
268
|
-
|
|
269
|
-
#### Inherited from
|
|
270
|
-
|
|
271
|
-
[Action](Action.md).[_replaceWithPlaceholders](Action.md#_replacewithplaceholders)
|
|
272
|
-
|
|
273
|
-
#### Defined in
|
|
274
|
-
|
|
275
|
-
[src/Action.ts:95](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L95)
|
|
276
|
-
|
|
277
|
-
___
|
|
278
|
-
|
|
279
|
-
### encodeForDsProxyCall
|
|
280
|
-
|
|
281
|
-
▸ **encodeForDsProxyCall**(): (`string` \| `string`[])[]
|
|
282
|
-
|
|
283
|
-
Encode arguments for calling the action via DsProxy
|
|
284
|
-
|
|
285
|
-
#### Returns
|
|
286
|
-
|
|
287
|
-
(`string` \| `string`[])[]
|
|
288
|
-
|
|
289
|
-
`address` & `data` to be passed on to DSProxy's `execute(address _target, bytes memory _data)`
|
|
290
|
-
|
|
291
|
-
#### Inherited from
|
|
292
|
-
|
|
293
|
-
[Action](Action.md).[encodeForDsProxyCall](Action.md#encodefordsproxycall)
|
|
294
|
-
|
|
295
|
-
#### Defined in
|
|
296
|
-
|
|
297
|
-
[src/Action.ts:135](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L135)
|
|
298
|
-
|
|
299
|
-
___
|
|
300
|
-
|
|
301
|
-
### encodeForL2DsProxyCall
|
|
302
|
-
|
|
303
|
-
▸ **encodeForL2DsProxyCall**(): `string`
|
|
304
|
-
|
|
305
|
-
#### Returns
|
|
306
|
-
|
|
307
|
-
`string`
|
|
308
|
-
|
|
309
|
-
#### Inherited from
|
|
310
|
-
|
|
311
|
-
[Action](Action.md).[encodeForL2DsProxyCall](Action.md#encodeforl2dsproxycall)
|
|
312
|
-
|
|
313
|
-
#### Defined in
|
|
314
|
-
|
|
315
|
-
[src/Action.ts:123](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L123)
|
|
316
|
-
|
|
317
|
-
___
|
|
318
|
-
|
|
319
|
-
### encodeForL2Recipe
|
|
320
|
-
|
|
321
|
-
▸ **encodeForL2Recipe**(): `string`
|
|
322
|
-
|
|
323
|
-
#### Returns
|
|
324
|
-
|
|
325
|
-
`string`
|
|
326
|
-
|
|
327
|
-
#### Inherited from
|
|
328
|
-
|
|
329
|
-
[Action](Action.md).[encodeForL2Recipe](Action.md#encodeforl2recipe)
|
|
330
|
-
|
|
331
|
-
#### Defined in
|
|
332
|
-
|
|
333
|
-
[src/Action.ts:127](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L127)
|
|
334
|
-
|
|
335
|
-
___
|
|
336
|
-
|
|
337
|
-
### encodeForRecipe
|
|
338
|
-
|
|
339
|
-
▸ **encodeForRecipe**(): (`string` \| `string`[] \| `number`[])[]
|
|
340
|
-
|
|
341
|
-
Encodes action for Recipe call
|
|
342
|
-
|
|
343
|
-
#### Returns
|
|
344
|
-
|
|
345
|
-
(`string` \| `string`[] \| `number`[])[]
|
|
346
|
-
|
|
347
|
-
#### Inherited from
|
|
348
|
-
|
|
349
|
-
[Action](Action.md).[encodeForRecipe](Action.md#encodeforrecipe)
|
|
350
|
-
|
|
351
|
-
#### Defined in
|
|
352
|
-
|
|
353
|
-
[src/Action.ts:150](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L150)
|
|
354
|
-
|
|
355
|
-
___
|
|
356
|
-
|
|
357
|
-
### encodeForStrategy
|
|
358
|
-
|
|
359
|
-
▸ **encodeForStrategy**(`subSlots`): (`string` \| `number`[])[]
|
|
360
|
-
|
|
361
|
-
#### Parameters
|
|
362
|
-
|
|
363
|
-
| Name | Type |
|
|
364
|
-
| :------ | :------ |
|
|
365
|
-
| `subSlots` | `any` |
|
|
366
|
-
|
|
367
|
-
#### Returns
|
|
368
|
-
|
|
369
|
-
(`string` \| `number`[])[]
|
|
370
|
-
|
|
371
|
-
#### Inherited from
|
|
372
|
-
|
|
373
|
-
[Action](Action.md).[encodeForStrategy](Action.md#encodeforstrategy)
|
|
374
|
-
|
|
375
|
-
#### Defined in
|
|
376
|
-
|
|
377
|
-
[src/Action.ts:159](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L159)
|
|
378
|
-
|
|
379
|
-
___
|
|
380
|
-
|
|
381
|
-
### getAccessList
|
|
382
|
-
|
|
383
|
-
▸ **getAccessList**(): [`AccessListItem`](../modules.md#accesslistitem)[]
|
|
384
|
-
|
|
385
|
-
Access list for single action
|
|
386
|
-
|
|
387
|
-
#### Returns
|
|
388
|
-
|
|
389
|
-
[`AccessListItem`](../modules.md#accesslistitem)[]
|
|
390
|
-
|
|
391
|
-
#### Inherited from
|
|
392
|
-
|
|
393
|
-
[Action](Action.md).[getAccessList](Action.md#getaccesslist)
|
|
394
|
-
|
|
395
|
-
#### Defined in
|
|
396
|
-
|
|
397
|
-
[src/Action.ts:185](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L185)
|
|
398
|
-
|
|
399
|
-
___
|
|
400
|
-
|
|
401
|
-
### getAssetsToApprove
|
|
402
|
-
|
|
403
|
-
▸ **getAssetsToApprove**(): `Promise`<{ `[key: string]`: `any`; `asset?`: `string` ; `owner?`: `string` }[]\>
|
|
404
|
-
|
|
405
|
-
Assets requiring approval to be used by DsProxy
|
|
406
|
-
Approval is done from owner to DsProxy
|
|
407
|
-
|
|
408
|
-
#### Returns
|
|
409
|
-
|
|
410
|
-
`Promise`<{ `[key: string]`: `any`; `asset?`: `string` ; `owner?`: `string` }[]\>
|
|
411
|
-
|
|
412
|
-
#### Inherited from
|
|
413
|
-
|
|
414
|
-
[Action](Action.md).[getAssetsToApprove](Action.md#getassetstoapprove)
|
|
415
|
-
|
|
416
|
-
#### Defined in
|
|
417
|
-
|
|
418
|
-
[src/Action.ts:170](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L170)
|
|
419
|
-
|
|
420
|
-
___
|
|
421
|
-
|
|
422
|
-
### getEthValue
|
|
423
|
-
|
|
424
|
-
▸ **getEthValue**(): `Promise`<`string`\>
|
|
425
|
-
|
|
426
|
-
ETH value to be sent with transaction
|
|
427
|
-
|
|
428
|
-
#### Returns
|
|
429
|
-
|
|
430
|
-
`Promise`<`string`\>
|
|
431
|
-
|
|
432
|
-
ETH value in wei
|
|
433
|
-
|
|
434
|
-
#### Inherited from
|
|
435
|
-
|
|
436
|
-
[Action](Action.md).[getEthValue](Action.md#getethvalue)
|
|
437
|
-
|
|
438
|
-
#### Defined in
|
|
439
|
-
|
|
440
|
-
[src/Action.ts:178](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L178)
|
|
441
|
-
|
|
442
|
-
___
|
|
443
|
-
|
|
444
|
-
### getId
|
|
445
|
-
|
|
446
|
-
▸ `Private` **getId**(): `string`
|
|
447
|
-
|
|
448
|
-
#### Returns
|
|
449
|
-
|
|
450
|
-
`string`
|
|
451
|
-
|
|
452
|
-
#### Inherited from
|
|
453
|
-
|
|
454
|
-
[Action](Action.md).[getId](Action.md#getid)
|
|
455
|
-
|
|
456
|
-
#### Defined in
|
|
457
|
-
|
|
458
|
-
[src/Action.ts:42](https://github.com/defisaver/defisaver-sdk/blob/7ebb702/src/Action.ts#L42)
|