@morpho-org/bundler-sdk-viem 3.0.0-next.16 → 3.0.0-next.18
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/lib/BundlerAction.d.ts +76 -78
- package/lib/BundlerAction.js +110 -99
- package/lib/actions.js +15 -9
- package/lib/errors.d.ts +4 -0
- package/lib/errors.js +6 -0
- package/lib/operations.js +14 -11
- package/lib/types/actions.d.ts +15 -25
- package/package.json +5 -5
package/lib/BundlerAction.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare namespace BundlerAction {
|
|
|
19
19
|
};
|
|
20
20
|
function encode(chainId: ChainId, { type, args }: Action): BundlerCall[];
|
|
21
21
|
/**
|
|
22
|
-
* Encodes a call to the
|
|
22
|
+
* Encodes a call to the GeneralAdapter1 to transfer native tokens (ETH on ethereum, MATIC on polygon, etc).
|
|
23
23
|
* @param chainId The chain id for which to encode the call.
|
|
24
24
|
* @param owner The owner of native tokens.
|
|
25
25
|
* @param recipient The address to send native tokens to.
|
|
@@ -28,50 +28,48 @@ export declare namespace BundlerAction {
|
|
|
28
28
|
*/
|
|
29
29
|
function nativeTransfer(chainId: ChainId, owner: Address, recipient: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
|
|
30
30
|
/**
|
|
31
|
-
* Encodes a call to the
|
|
31
|
+
* Encodes a call to the requested adapter to transfer ERC20 tokens.
|
|
32
32
|
* @param chainId The chain id for which to encode the call.
|
|
33
33
|
* @param asset The address of the ERC20 token to transfer.
|
|
34
34
|
* @param recipient The address to send tokens to.
|
|
35
35
|
* @param amount The amount of tokens to send.
|
|
36
|
-
* @param adapter The address of the adapter to use.
|
|
36
|
+
* @param adapter The address of the adapter to use.
|
|
37
37
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
38
38
|
*/
|
|
39
|
-
function erc20Transfer(
|
|
39
|
+
function erc20Transfer(asset: Address, recipient: Address, amount: bigint, adapter: Address, skipRevert?: boolean): BundlerCall[];
|
|
40
40
|
/**
|
|
41
|
-
* Encodes a call to the
|
|
41
|
+
* Encodes a call to the GeneralAdapter1 to transfer ERC20 tokens with `transferFrom`.
|
|
42
42
|
* @param chainId The chain id for which to encode the call.
|
|
43
43
|
* @param asset The address of the ERC20 token to transfer.
|
|
44
44
|
* @param amount The amount of tokens to send.
|
|
45
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
45
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
46
46
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
47
47
|
*/
|
|
48
|
-
function erc20TransferFrom(chainId: ChainId, asset: Address, amount: bigint, recipient
|
|
48
|
+
function erc20TransferFrom(chainId: ChainId, asset: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
49
49
|
/**
|
|
50
|
-
* Encodes a call to the
|
|
50
|
+
* Encodes a call to the GeneralAdapter1 to permit an ERC20 token.
|
|
51
51
|
* @param chainId The chain id for which to encode the call.
|
|
52
52
|
* @param owner The address which owns the tokens.
|
|
53
53
|
* @param asset The address of the ERC20 token to permit.
|
|
54
54
|
* @param amount The amount of tokens to permit.
|
|
55
55
|
* @param deadline The timestamp until which the signature is valid.
|
|
56
56
|
* @param signature The Ethers signature to permit the tokens.
|
|
57
|
-
* @param spender The address allowed to spend the tokens.
|
|
58
57
|
* @param skipRevert Whether to allow the permit to revert without making the whole bundle revert. Defaults to true.
|
|
59
58
|
*/
|
|
60
|
-
function permit(chainId: ChainId, owner: Address, asset: Address, amount: bigint, deadline: bigint, signature: Hex,
|
|
59
|
+
function permit(chainId: ChainId, owner: Address, asset: Address, amount: bigint, deadline: bigint, signature: Hex, skipRevert?: boolean): BundlerCall[];
|
|
61
60
|
/**
|
|
62
|
-
* Encodes a call to the
|
|
61
|
+
* Encodes a call to the GeneralAdapter1 to permit DAI.
|
|
63
62
|
* @param chainId The chain id for which to encode the call.
|
|
64
63
|
* @param owner The address which owns the tokens.
|
|
65
64
|
* @param nonce The permit nonce used.
|
|
66
65
|
* @param expiry The timestamp until which the signature is valid.
|
|
67
66
|
* @param allowed The amount of DAI to permit.
|
|
68
67
|
* @param signature The Ethers signature to permit the tokens.
|
|
69
|
-
* @param spender The address allowed to spend the tokens.
|
|
70
68
|
* @param skipRevert Whether to allow the permit to revert without making the whole bundle revert.
|
|
71
69
|
*/
|
|
72
|
-
function permitDai(chainId: ChainId, owner: Address, nonce: bigint, expiry: bigint, allowed: boolean, signature: Hex,
|
|
70
|
+
function permitDai(chainId: ChainId, owner: Address, nonce: bigint, expiry: bigint, allowed: boolean, signature: Hex, skipRevert?: boolean): BundlerCall[];
|
|
73
71
|
/**
|
|
74
|
-
* Encodes a call to the
|
|
72
|
+
* Encodes a call to permit the chain's GeneralAdapter1 ERC20 tokens via Permit2.
|
|
75
73
|
* @param chainId The chain id for which to encode the call.
|
|
76
74
|
* @param owner The owner of ERC20 tokens.
|
|
77
75
|
* @param permitSingle The permit details to submit to Permit2.
|
|
@@ -80,17 +78,17 @@ export declare namespace BundlerAction {
|
|
|
80
78
|
*/
|
|
81
79
|
function approve2(chainId: ChainId, owner: Address, permitSingle: Permit2PermitSingle, signature: Hex, skipRevert?: boolean): BundlerCall[];
|
|
82
80
|
/**
|
|
83
|
-
* Encodes a call to the
|
|
81
|
+
* Encodes a call to the GeneralAdapter1 to transfer ERC20 tokens via Permit2.
|
|
84
82
|
* @param chainId The chain id for which to encode the call.
|
|
85
83
|
* @param asset The address of the ERC20 token to transfer.
|
|
86
84
|
* @param owner The owner of ERC20 tokens.
|
|
87
85
|
* @param amount The amount of tokens to send.
|
|
88
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
86
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
89
87
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
90
88
|
*/
|
|
91
|
-
function transferFrom2(chainId: ChainId, asset: Address, amount: bigint, recipient
|
|
89
|
+
function transferFrom2(chainId: ChainId, asset: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
92
90
|
/**
|
|
93
|
-
* Encodes a call to the
|
|
91
|
+
* Encodes a call to the GeneralAdapter1 to wrap ERC20 tokens via the provided ERC20Wrapper.
|
|
94
92
|
* @param chainId The chain id for which to encode the call.
|
|
95
93
|
* @param wrapper The address of the ERC20 wrapper token.
|
|
96
94
|
* @param underlying The address of the underlying ERC20 token.
|
|
@@ -99,7 +97,7 @@ export declare namespace BundlerAction {
|
|
|
99
97
|
*/
|
|
100
98
|
function erc20WrapperDepositFor(chainId: ChainId, wrapper: Address, underlying: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
|
|
101
99
|
/**
|
|
102
|
-
* Encodes a call to the
|
|
100
|
+
* Encodes a call to the GeneralAdapter1 to unwrap ERC20 tokens from the provided ERC20Wrapper.
|
|
103
101
|
* @param chainId The chain id for which to encode the call.
|
|
104
102
|
* @param wrapper The address of the ERC20 wrapper token.
|
|
105
103
|
* @param account The address to send the underlying ERC20 tokens.
|
|
@@ -108,7 +106,7 @@ export declare namespace BundlerAction {
|
|
|
108
106
|
*/
|
|
109
107
|
function erc20WrapperWithdrawTo(chainId: ChainId, wrapper: Address, receiver: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
|
|
110
108
|
/**
|
|
111
|
-
* Encodes a call to the
|
|
109
|
+
* Encodes a call to the GeneralAdapter1 to mint shares of the provided ERC4626 vault.
|
|
112
110
|
* @param chainId The chain id for which to encode the call.
|
|
113
111
|
* @param erc4626 The address of the ERC4626 vault.
|
|
114
112
|
* @param shares The amount of shares to mint.
|
|
@@ -118,7 +116,7 @@ export declare namespace BundlerAction {
|
|
|
118
116
|
*/
|
|
119
117
|
function erc4626Mint(chainId: ChainId, erc4626: Address, shares: bigint, maxSharePrice: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
|
|
120
118
|
/**
|
|
121
|
-
* Encodes a call to the
|
|
119
|
+
* Encodes a call to the GeneralAdapter1 to deposit assets into the provided ERC4626 vault.
|
|
122
120
|
* @param chainId The chain id for which to encode the call.
|
|
123
121
|
* @param erc4626 The address of the ERC4626 vault.
|
|
124
122
|
* @param assets The amount of assets to deposit.
|
|
@@ -128,7 +126,7 @@ export declare namespace BundlerAction {
|
|
|
128
126
|
*/
|
|
129
127
|
function erc4626Deposit(chainId: ChainId, erc4626: Address, assets: bigint, maxSharePrice: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
|
|
130
128
|
/**
|
|
131
|
-
* Encodes a call to the
|
|
129
|
+
* Encodes a call to the GeneralAdapter1 to withdraw assets from the provided ERC4626 vault.
|
|
132
130
|
* @param chainId The chain id for which to encode the call.
|
|
133
131
|
* @param erc4626 The address of the ERC4626 vault.
|
|
134
132
|
* @param assets The amount of assets to withdraw.
|
|
@@ -139,7 +137,7 @@ export declare namespace BundlerAction {
|
|
|
139
137
|
*/
|
|
140
138
|
function erc4626Withdraw(chainId: ChainId, erc4626: Address, assets: bigint, minSharePrice: bigint, receiver: Address, owner: Address, skipRevert?: boolean): BundlerCall[];
|
|
141
139
|
/**
|
|
142
|
-
* Encodes a call to the
|
|
140
|
+
* Encodes a call to the GeneralAdapter1 to redeem shares from the provided ERC4626 vault.
|
|
143
141
|
* @param chainId The chain id for which to encode the call.
|
|
144
142
|
* @param erc4626 The address of the ERC4626 vault.
|
|
145
143
|
* @param shares The amount of shares to redeem.
|
|
@@ -150,7 +148,7 @@ export declare namespace BundlerAction {
|
|
|
150
148
|
*/
|
|
151
149
|
function erc4626Redeem(chainId: ChainId, erc4626: Address, shares: bigint, minSharePrice: bigint, receiver: Address, owner: Address, skipRevert?: boolean): BundlerCall[];
|
|
152
150
|
/**
|
|
153
|
-
* Encodes a call to
|
|
151
|
+
* Encodes a call to authorize an account on Morpho Blue.
|
|
154
152
|
* @param chainId The chain id for which to encode the call.
|
|
155
153
|
* @param authorization The authorization details to submit to Morpho Blue.
|
|
156
154
|
* @param signature The Ethers signature to authorize the account.
|
|
@@ -158,7 +156,7 @@ export declare namespace BundlerAction {
|
|
|
158
156
|
*/
|
|
159
157
|
function morphoSetAuthorizationWithSig(chainId: ChainId, authorization: Authorization, signature: Hex, skipRevert?: boolean): BundlerCall[];
|
|
160
158
|
/**
|
|
161
|
-
* Encodes a call to the
|
|
159
|
+
* Encodes a call to the GeneralAdapter1 to supply to a Morpho Blue market.
|
|
162
160
|
* @param chainId The chain id for which to encode the call.
|
|
163
161
|
* @param market The market params to supply to.
|
|
164
162
|
* @param assets The amount of assets to supply.
|
|
@@ -170,7 +168,7 @@ export declare namespace BundlerAction {
|
|
|
170
168
|
*/
|
|
171
169
|
function morphoSupply(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, onBehalf: Address, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
|
|
172
170
|
/**
|
|
173
|
-
* Encodes a call to the
|
|
171
|
+
* Encodes a call to the GeneralAdapter1 to supply collateral to a Morpho Blue market.
|
|
174
172
|
* @param chainId The chain id for which to encode the call.
|
|
175
173
|
* @param market The market params to supply to.
|
|
176
174
|
* @param assets The amount of assets to supply.
|
|
@@ -180,7 +178,7 @@ export declare namespace BundlerAction {
|
|
|
180
178
|
*/
|
|
181
179
|
function morphoSupplyCollateral(chainId: ChainId, market: InputMarketParams, assets: bigint, onBehalf: Address, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
|
|
182
180
|
/**
|
|
183
|
-
* Encodes a call to the
|
|
181
|
+
* Encodes a call to the GeneralAdapter1 to borrow from a Morpho Blue market.
|
|
184
182
|
* @param chainId The chain id for which to encode the call.
|
|
185
183
|
* @param market The market params to borrow from.
|
|
186
184
|
* @param assets The amount of assets to borrow.
|
|
@@ -191,7 +189,7 @@ export declare namespace BundlerAction {
|
|
|
191
189
|
*/
|
|
192
190
|
function morphoBorrow(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
|
|
193
191
|
/**
|
|
194
|
-
* Encodes a call to the
|
|
192
|
+
* Encodes a call to the GeneralAdapter1 to repay to a Morpho Blue market.
|
|
195
193
|
* @param chainId The chain id for which to encode the call.
|
|
196
194
|
* @param market The market params to repay to.
|
|
197
195
|
* @param assets The amount of assets to repay.
|
|
@@ -203,7 +201,7 @@ export declare namespace BundlerAction {
|
|
|
203
201
|
*/
|
|
204
202
|
function morphoRepay(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, onBehalf: Address, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
|
|
205
203
|
/**
|
|
206
|
-
* Encodes a call to the
|
|
204
|
+
* Encodes a call to the GeneralAdapter1 to withdraw from a Morpho Blue market.
|
|
207
205
|
* @param chainId The chain id for which to encode the call.
|
|
208
206
|
* @param market The market params to withdraw from.
|
|
209
207
|
* @param assets The amount of assets to withdraw.
|
|
@@ -214,7 +212,7 @@ export declare namespace BundlerAction {
|
|
|
214
212
|
*/
|
|
215
213
|
function morphoWithdraw(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
|
|
216
214
|
/**
|
|
217
|
-
* Encodes a call to the
|
|
215
|
+
* Encodes a call to the GeneralAdapter1 to withdraw collateral from a Morpho Blue market.
|
|
218
216
|
* @param chainId The chain id for which to encode the call.
|
|
219
217
|
* @param market The market params to withdraw from.
|
|
220
218
|
* @param assets The amount of assets to withdraw.
|
|
@@ -223,7 +221,7 @@ export declare namespace BundlerAction {
|
|
|
223
221
|
*/
|
|
224
222
|
function morphoWithdrawCollateral(chainId: ChainId, market: InputMarketParams, assets: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
|
|
225
223
|
/**
|
|
226
|
-
* Encodes a call to the
|
|
224
|
+
* Encodes a call to the GeneralAdapter1 to flash loan from Morpho Blue.
|
|
227
225
|
* @param chainId The chain id for which to encode the call.
|
|
228
226
|
* @param asset The address of the ERC20 token to flash loan.
|
|
229
227
|
* @param amount The amount of tokens to flash loan.
|
|
@@ -232,7 +230,7 @@ export declare namespace BundlerAction {
|
|
|
232
230
|
*/
|
|
233
231
|
function morphoFlashLoan(chainId: ChainId, asset: Address, amount: bigint, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
|
|
234
232
|
/**
|
|
235
|
-
* Encodes a call to
|
|
233
|
+
* Encodes a call to trigger a public reallocation on the PublicAllocator.
|
|
236
234
|
* @param chainId The chain id for which to encode the call.
|
|
237
235
|
* @param vault The vault to reallocate.
|
|
238
236
|
* @param fee The vault public reallocation fee.
|
|
@@ -242,7 +240,7 @@ export declare namespace BundlerAction {
|
|
|
242
240
|
*/
|
|
243
241
|
function publicAllocatorReallocateTo(chainId: ChainId, vault: Address, fee: bigint, withdrawals: InputReallocation[], supplyMarketParams: InputMarketParams, skipRevert?: boolean): BundlerCall[];
|
|
244
242
|
/**
|
|
245
|
-
* Encodes a call to the
|
|
243
|
+
* Encodes a call to the Universal Rewards Distributor to claim rewards.
|
|
246
244
|
* @param chainId The chain id for which to encode the call.
|
|
247
245
|
* @param distributor The address of the distributor to claim rewards from.
|
|
248
246
|
* @param account The address to claim rewards for.
|
|
@@ -253,49 +251,49 @@ export declare namespace BundlerAction {
|
|
|
253
251
|
*/
|
|
254
252
|
function urdClaim(distributor: Address, account: Address, reward: Address, amount: bigint, proof: Hex[], skipRevert?: boolean): BundlerCall[];
|
|
255
253
|
/**
|
|
256
|
-
* Encodes a call to the
|
|
254
|
+
* Encodes a call to the GeneralAdapter1 to wrap native tokens (ETH to WETH on ethereum, MATIC to WMATIC on polygon, etc).
|
|
257
255
|
* @param chainId The chain id for which to encode the call.
|
|
258
256
|
* @param amount The amount of native tokens to wrap (in wei).
|
|
259
|
-
* @param recipient The address to send tokens to.
|
|
257
|
+
* @param recipient The address to send tokens to.
|
|
260
258
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
261
259
|
*/
|
|
262
|
-
function wrapNative(chainId: ChainId, amount: bigint, recipient
|
|
260
|
+
function wrapNative(chainId: ChainId, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
263
261
|
/**
|
|
264
|
-
* Encodes a call to the
|
|
262
|
+
* Encodes a call to the GeneralAdapter1 to unwrap native tokens (WETH to ETH on ethereum, WMATIC to MATIC on polygon, etc).
|
|
265
263
|
* @param chainId The chain id for which to encode the call.
|
|
266
264
|
* @param amount The amount of native tokens to unwrap (in wei).
|
|
267
|
-
* @param recipient The address to send tokens to.
|
|
265
|
+
* @param recipient The address to send tokens to.
|
|
268
266
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
269
267
|
*/
|
|
270
|
-
function unwrapNative(chainId: ChainId, amount: bigint, recipient
|
|
268
|
+
function unwrapNative(chainId: ChainId, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
271
269
|
/**
|
|
272
|
-
* Encodes a call to the
|
|
270
|
+
* Encodes a call to the GeneralAdapter1 to stake native tokens using Lido (ETH to stETH on ethereum).
|
|
273
271
|
* @param chainId The chain id for which to encode the call.
|
|
274
272
|
* @param amount The amount of native tokens to stake (in wei).
|
|
275
273
|
* @param maxSharePrice The maximum amount of wei to pay for minting 1 share (scaled by RAY).
|
|
276
274
|
* @param referral The referral address to use.
|
|
277
|
-
* @param recipient The address to send stETH to.
|
|
275
|
+
* @param recipient The address to send stETH to.
|
|
278
276
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
279
277
|
*/
|
|
280
|
-
function stakeEth(chainId: ChainId, amount: bigint, maxSharePrice: bigint, referral: Address, recipient
|
|
278
|
+
function stakeEth(chainId: ChainId, amount: bigint, maxSharePrice: bigint, referral: Address, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
281
279
|
/**
|
|
282
|
-
* Encodes a call to the
|
|
280
|
+
* Encodes a call to the GeneralAdapter1 to wrap stETH (stETH to wstETH on ethereum).
|
|
283
281
|
* @param chainId The chain id for which to encode the call.
|
|
284
282
|
* @param amount The amount of stETH to wrap (in wei).
|
|
285
|
-
* @param recipient The address to send wstETH to.
|
|
283
|
+
* @param recipient The address to send wstETH to.
|
|
286
284
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
287
285
|
*/
|
|
288
|
-
function wrapStEth(chainId: ChainId, amount: bigint, recipient
|
|
286
|
+
function wrapStEth(chainId: ChainId, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
289
287
|
/**
|
|
290
|
-
* Encodes a call to the
|
|
288
|
+
* Encodes a call to the GeneralAdapter1 to unwrap wstETH (wstETH to stETH on ethereum).
|
|
291
289
|
* @param chainId The chain id for which to encode the call.
|
|
292
290
|
* @param amount The amount of wstETH to unwrap (in wei).
|
|
293
|
-
* @param recipient The address to send stETH to.
|
|
291
|
+
* @param recipient The address to send stETH to.
|
|
294
292
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
295
293
|
*/
|
|
296
|
-
function unwrapStEth(chainId: ChainId, amount: bigint, recipient
|
|
294
|
+
function unwrapStEth(chainId: ChainId, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
297
295
|
/**
|
|
298
|
-
* Encodes a call to the
|
|
296
|
+
* Encodes a call to the AaveV2MigrationAdapter to repay a debt on AaveV2.
|
|
299
297
|
* @param chainId The chain id for which to encode the call.
|
|
300
298
|
* @param asset The debt asset to repay.
|
|
301
299
|
* @param amount The amount of debt to repay.
|
|
@@ -305,16 +303,16 @@ export declare namespace BundlerAction {
|
|
|
305
303
|
*/
|
|
306
304
|
function aaveV2Repay(chainId: ChainId, asset: Address, amount: bigint, onBehalf: Address, rateMode?: bigint, skipRevert?: boolean): BundlerCall[];
|
|
307
305
|
/**
|
|
308
|
-
* Encodes a call to the
|
|
306
|
+
* Encodes a call to the AaveV2MigrationAdapter to withdraw from AaveV2.
|
|
309
307
|
* @param chainId The chain id for which to encode the call.
|
|
310
308
|
* @param asset The asset to withdraw.
|
|
311
309
|
* @param amount The amount of asset to withdraw.
|
|
312
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
310
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
313
311
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
314
312
|
*/
|
|
315
|
-
function aaveV2Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient
|
|
313
|
+
function aaveV2Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
316
314
|
/**
|
|
317
|
-
* Encodes a call to the
|
|
315
|
+
* Encodes a call to the AaveV3CoreMigrationAdapter to repay a debt on AaveV3.
|
|
318
316
|
* @param chainId The chain id for which to encode the call.
|
|
319
317
|
* @param asset The debt asset to repay.
|
|
320
318
|
* @param amount The amount of debt to repay.
|
|
@@ -324,16 +322,16 @@ export declare namespace BundlerAction {
|
|
|
324
322
|
*/
|
|
325
323
|
function aaveV3Repay(chainId: ChainId, asset: Address, amount: bigint, onBehalf: Address, rateMode?: bigint, skipRevert?: boolean): BundlerCall[];
|
|
326
324
|
/**
|
|
327
|
-
* Encodes a call to the
|
|
325
|
+
* Encodes a call to the AaveV3CoreMigrationAdapter to withdrawn from AaveV3.
|
|
328
326
|
* @param chainId The chain id for which to encode the call.
|
|
329
327
|
* @param asset The asset to withdraw.
|
|
330
328
|
* @param amount The amount of asset to withdraw.
|
|
331
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
329
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
332
330
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
333
331
|
*/
|
|
334
|
-
function aaveV3Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient
|
|
332
|
+
function aaveV3Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
335
333
|
/**
|
|
336
|
-
* Encodes a call to the
|
|
334
|
+
* Encodes a call to the AaveV3OptimizerMigrationAdapter to repay a debt on Morpho's AaveV3Optimizer.
|
|
337
335
|
* @param chainId The chain id for which to encode the call.
|
|
338
336
|
* @param underlying The underlying debt asset to repay.
|
|
339
337
|
* @param amount The amount of debt to repay.
|
|
@@ -342,56 +340,56 @@ export declare namespace BundlerAction {
|
|
|
342
340
|
*/
|
|
343
341
|
function aaveV3OptimizerRepay(chainId: ChainId, underlying: Address, amount: bigint, onBehalf: Address, skipRevert?: boolean): BundlerCall[];
|
|
344
342
|
/**
|
|
345
|
-
* Encodes a call to the
|
|
343
|
+
* Encodes a call to the AaveV3OptimizerMigrationAdapter to withdraw from Morpho's AaveV3Optimizer.
|
|
346
344
|
* @param chainId The chain id for which to encode the call.
|
|
347
345
|
* @param underlying The underlying asset to withdraw.
|
|
348
346
|
* @param amount The amount to withdraw.
|
|
349
347
|
* @param maxIterations The maximum amount of iterations to use for the withdrawal.
|
|
350
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
348
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
351
349
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
352
350
|
*/
|
|
353
|
-
function aaveV3OptimizerWithdraw(chainId: ChainId, underlying: Address, amount: bigint, maxIterations: bigint, recipient
|
|
351
|
+
function aaveV3OptimizerWithdraw(chainId: ChainId, underlying: Address, amount: bigint, maxIterations: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
354
352
|
/**
|
|
355
|
-
* Encodes a call to the
|
|
353
|
+
* Encodes a call to the AaveV3OptimizerMigrationAdapter to withdraw collateral from Morpho's AaveV3Optimizer.
|
|
356
354
|
* @param chainId The chain id for which to encode the call.
|
|
357
355
|
* @param underlying The underlying asset to withdraw.
|
|
358
356
|
* @param amount The amount to withdraw.
|
|
359
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
357
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
360
358
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
361
359
|
*/
|
|
362
|
-
function aaveV3OptimizerWithdrawCollateral(chainId: ChainId, underlying: Address, amount: bigint, recipient
|
|
360
|
+
function aaveV3OptimizerWithdrawCollateral(chainId: ChainId, underlying: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
363
361
|
/**
|
|
364
|
-
* Encodes a call to the
|
|
362
|
+
* Encodes a call to the AaveV3 optimizer to approve the chain's AaveV3OptimizerMigrationAdapter.
|
|
363
|
+
* as the sender's manager on Morpho's AaveV3Optimizer.
|
|
365
364
|
* @param chainId The chain id for which to encode the call.
|
|
366
365
|
* @param owner The owner of the AaveV3Optimizer position.
|
|
367
366
|
* @param isApproved Whether the manager is approved.
|
|
368
367
|
* @param nonce The nonce used to sign.
|
|
369
368
|
* @param deadline The timestamp until which the signature is valid.
|
|
370
369
|
* @param signature The Ethers signature to submit.
|
|
371
|
-
* @param manager The address of the manager to approve. Defaults to the chain's bundler3 AaveV3OptimizerMigrationAdapter.
|
|
372
370
|
* @param skipRevert Whether to allow the signature to revert without making the whole bundle revert. Defaults to true.
|
|
373
371
|
*/
|
|
374
|
-
function aaveV3OptimizerApproveManagerWithSig(chainId: ChainId, aaveV3Optimizer: Address, owner: Address, isApproved: boolean, nonce: bigint, deadline: bigint, signature: Hex,
|
|
372
|
+
function aaveV3OptimizerApproveManagerWithSig(chainId: ChainId, aaveV3Optimizer: Address, owner: Address, isApproved: boolean, nonce: bigint, deadline: bigint, signature: Hex, skipRevert?: boolean): BundlerCall[];
|
|
375
373
|
/**
|
|
376
|
-
* Encodes a call to the
|
|
374
|
+
* Encodes a call to the CompoundV2MigrationAdapter to repay a debt on CompoundV2.
|
|
377
375
|
* @param chainId The chain id for which to encode the call.
|
|
378
376
|
* @param cToken The cToken on which to repay the debt.
|
|
379
377
|
* @param amount The amount of debt to repay.
|
|
380
|
-
* @param
|
|
378
|
+
* @param onBehalf The account on behalf of which to repay.
|
|
381
379
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
382
380
|
*/
|
|
383
381
|
function compoundV2Repay(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, onBehalf: Address, skipRevert?: boolean): BundlerCall[];
|
|
384
382
|
/**
|
|
385
|
-
* Encodes a call to the
|
|
383
|
+
* Encodes a call to the CompoundV2MigrationAdapter to withdraw collateral from CompoundV2.
|
|
386
384
|
* @param chainId The chain id for which to encode the call.
|
|
387
385
|
* @param cToken The cToken on which to withdraw.
|
|
388
386
|
* @param amount The amount to withdraw.
|
|
389
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
387
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
390
388
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
391
389
|
*/
|
|
392
|
-
function compoundV2Redeem(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, recipient
|
|
390
|
+
function compoundV2Redeem(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
393
391
|
/**
|
|
394
|
-
* Encodes a call to the
|
|
392
|
+
* Encodes a call to the CompoundV3MigrationAdapter to repay a debt on CompoundV3.
|
|
395
393
|
* @param chainId The chain id for which to encode the call.
|
|
396
394
|
* @param instance The CompoundV3 instance on which to repay the debt.
|
|
397
395
|
* @param amount The amount of debt to repay.
|
|
@@ -400,17 +398,18 @@ export declare namespace BundlerAction {
|
|
|
400
398
|
*/
|
|
401
399
|
function compoundV3Repay(chainId: ChainId, instance: Address, amount: bigint, onBehalf: Address, skipRevert?: boolean): BundlerCall[];
|
|
402
400
|
/**
|
|
403
|
-
* Encodes a call to the
|
|
401
|
+
* Encodes a call to the CompoundV3MigrationAdapter to withdraw collateral from CompoundV3.
|
|
404
402
|
* @param chainId The chain id for which to encode the call.
|
|
405
403
|
* @param instance The CompoundV3 instance on which to withdraw.
|
|
406
404
|
* @param asset The asset to withdraw.
|
|
407
405
|
* @param amount The amount to withdraw.
|
|
408
|
-
* @param recipient The recipient of ERC20 tokens.
|
|
406
|
+
* @param recipient The recipient of ERC20 tokens.
|
|
409
407
|
* @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
|
|
410
408
|
*/
|
|
411
|
-
function compoundV3WithdrawFrom(chainId: ChainId, instance: Address, asset: Address, amount: bigint, recipient
|
|
409
|
+
function compoundV3WithdrawFrom(chainId: ChainId, instance: Address, asset: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
|
|
412
410
|
/**
|
|
413
|
-
* Encodes a call to the
|
|
411
|
+
* Encodes a call to the CompoundV3 instance to allow the chain's CompoundV3MigrationAdapter.
|
|
412
|
+
* to act on the sender's position on CompoundV3.
|
|
414
413
|
* @param chainId The chain id for which to encode the call.
|
|
415
414
|
* @param instance The CompoundV3 instance on which to submit the signature.
|
|
416
415
|
* @param owner The owner of the CompoundV3 position.
|
|
@@ -418,8 +417,7 @@ export declare namespace BundlerAction {
|
|
|
418
417
|
* @param nonce The nonce used to sign.
|
|
419
418
|
* @param expiry The timestamp until which the signature is valid.
|
|
420
419
|
* @param signature The Ethers signature to submit.
|
|
421
|
-
* @param manager The address of the manager to approve. Defaults to the chain's bundler3 CompoundV3MigrationAdapter.
|
|
422
420
|
* @param skipRevert Whether to allow the signature to revert without making the whole bundle revert. Defaults to true.
|
|
423
421
|
*/
|
|
424
|
-
function compoundV3AllowBySig(chainId: ChainId, instance: Address, owner: Address, isAllowed: boolean, nonce: bigint, expiry: bigint, signature: Hex,
|
|
422
|
+
function compoundV3AllowBySig(chainId: ChainId, instance: Address, owner: Address, isAllowed: boolean, nonce: bigint, expiry: bigint, signature: Hex, skipRevert?: boolean): BundlerCall[];
|
|
425
423
|
}
|