@morpho-org/bundler-sdk-viem 3.0.0-next.10 → 3.0.0-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,10 +19,12 @@ export declare class ActionBundle<TR extends {
19
19
  data: Hex;
20
20
  };
21
21
  } = TransactionRequirement, SR extends SignatureRequirement = SignatureRequirement> {
22
- readonly steps: SimulationResult;
23
22
  readonly actions: Action[];
24
23
  readonly requirements: ActionBundleRequirements<TR, SR>;
24
+ readonly steps?: SimulationResult;
25
+ readonly chainId: number;
25
26
  constructor(steps: SimulationResult, actions?: Action[], requirements?: ActionBundleRequirements<TR, SR>);
27
+ constructor(chainId: number, actions?: Action[], requirements?: ActionBundleRequirements<TR, SR>);
26
28
  tx(): {
27
29
  to: `0x${string}`;
28
30
  value: bigint;
@@ -11,16 +11,23 @@ export class ActionBundleRequirements {
11
11
  }
12
12
  }
13
13
  export class ActionBundle {
14
- steps;
15
14
  actions;
16
15
  requirements;
17
- constructor(steps, actions = [], requirements = new ActionBundleRequirements()) {
18
- this.steps = steps;
16
+ steps;
17
+ chainId;
18
+ constructor(stepsOrChainId, actions = [], requirements = new ActionBundleRequirements()) {
19
19
  this.actions = actions;
20
20
  this.requirements = requirements;
21
+ if (typeof stepsOrChainId === "number") {
22
+ this.chainId = stepsOrChainId;
23
+ }
24
+ else {
25
+ this.steps = stepsOrChainId;
26
+ this.chainId = stepsOrChainId[0].chainId;
27
+ }
21
28
  }
22
29
  tx() {
23
- return BundlerAction.encodeBundle(this.steps[0].chainId, this.actions);
30
+ return BundlerAction.encodeBundle(this.chainId, this.actions);
24
31
  }
25
32
  txs() {
26
33
  return this.requirements.txs.map(({ tx }) => tx).concat([this.tx()]);
@@ -24,24 +24,28 @@ export declare namespace BundlerAction {
24
24
  * @param owner The owner of native tokens.
25
25
  * @param recipient The address to send native tokens to.
26
26
  * @param amount The amount of native tokens to send (in wei).
27
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
27
28
  */
28
- function nativeTransfer(chainId: ChainId, owner: Address, recipient: Address, amount: bigint): BundlerCall[];
29
+ function nativeTransfer(chainId: ChainId, owner: Address, recipient: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
29
30
  /**
30
31
  * Encodes a call to the Adapter to transfer ERC20 tokens.
31
32
  * @param chainId The chain id for which to encode the call.
32
33
  * @param asset The address of the ERC20 token to transfer.
33
34
  * @param recipient The address to send tokens to.
34
35
  * @param amount The amount of tokens to send.
36
+ * @param adapter The address of the adapter to use. Defaults to the chain's bundler3 general adapter.
37
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
35
38
  */
36
- function erc20Transfer(chainId: ChainId, asset: Address, recipient: Address, amount: bigint, adapter?: Address): BundlerCall[];
39
+ function erc20Transfer(chainId: ChainId, asset: Address, recipient: Address, amount: bigint, adapter?: Address, skipRevert?: boolean): BundlerCall[];
37
40
  /**
38
41
  * Encodes a call to the Adapter to transfer ERC20 tokens from the sender to the Bundler.
39
42
  * @param chainId The chain id for which to encode the call.
40
43
  * @param asset The address of the ERC20 token to transfer.
41
44
  * @param amount The amount of tokens to send.
42
45
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
46
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
43
47
  */
44
- function erc20TransferFrom(chainId: ChainId, asset: Address, amount: bigint, recipient?: Address): BundlerCall[];
48
+ function erc20TransferFrom(chainId: ChainId, asset: Address, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
45
49
  /**
46
50
  * Encodes a call to the Adapter to permit an ERC20 token.
47
51
  * @param chainId The chain id for which to encode the call.
@@ -51,7 +55,7 @@ export declare namespace BundlerAction {
51
55
  * @param deadline The timestamp until which the signature is valid.
52
56
  * @param signature The Ethers signature to permit the tokens.
53
57
  * @param spender The address allowed to spend the tokens.
54
- * @param skipRevert Whether to allow the permit to revert without making the whole multicall revert.
58
+ * @param skipRevert Whether to allow the permit to revert without making the whole bundle revert. Defaults to true.
55
59
  */
56
60
  function permit(chainId: ChainId, owner: Address, asset: Address, amount: bigint, deadline: bigint, signature: Hex, spender?: Address, skipRevert?: boolean): BundlerCall[];
57
61
  /**
@@ -63,7 +67,7 @@ export declare namespace BundlerAction {
63
67
  * @param allowed The amount of DAI to permit.
64
68
  * @param signature The Ethers signature to permit the tokens.
65
69
  * @param spender The address allowed to spend the tokens.
66
- * @param skipRevert Whether to allow the permit to revert without making the whole multicall revert.
70
+ * @param skipRevert Whether to allow the permit to revert without making the whole bundle revert.
67
71
  */
68
72
  function permitDai(chainId: ChainId, owner: Address, nonce: bigint, expiry: bigint, allowed: boolean, signature: Hex, spender?: Address, skipRevert?: boolean): BundlerCall[];
69
73
  /**
@@ -72,7 +76,7 @@ export declare namespace BundlerAction {
72
76
  * @param owner The owner of ERC20 tokens.
73
77
  * @param permitSingle The permit details to submit to Permit2.
74
78
  * @param signature The Ethers signature to permit the tokens.
75
- * @param skipRevert Whether to allow the permit to revert without making the whole multicall revert.
79
+ * @param skipRevert Whether to allow the permit to revert without making the whole bundle revert. Defaults to true.
76
80
  */
77
81
  function approve2(chainId: ChainId, owner: Address, permitSingle: Permit2PermitSingle, signature: Hex, skipRevert?: boolean): BundlerCall[];
78
82
  /**
@@ -82,24 +86,27 @@ export declare namespace BundlerAction {
82
86
  * @param owner The owner of ERC20 tokens.
83
87
  * @param amount The amount of tokens to send.
84
88
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
89
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
85
90
  */
86
- function transferFrom2(chainId: ChainId, asset: Address, owner: Address, amount: bigint, recipient?: Address): BundlerCall[];
91
+ function transferFrom2(chainId: ChainId, asset: Address, owner: Address, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
87
92
  /**
88
93
  * Encodes a call to the Adapter to wrap ERC20 tokens via the provided ERC20Wrapper.
89
94
  * @param chainId The chain id for which to encode the call.
90
95
  * @param wrapper The address of the ERC20 wrapper token.
91
96
  * @param underlying The address of the underlying ERC20 token.
92
97
  * @param amount The amount of tokens to send.
98
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
93
99
  */
94
- function erc20WrapperDepositFor(chainId: ChainId, wrapper: Address, underlying: Address, amount: bigint): BundlerCall[];
100
+ function erc20WrapperDepositFor(chainId: ChainId, wrapper: Address, underlying: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
95
101
  /**
96
102
  * Encodes a call to the Adapter to unwrap ERC20 tokens from the provided ERC20Wrapper.
97
103
  * @param chainId The chain id for which to encode the call.
98
104
  * @param wrapper The address of the ERC20 wrapper token.
99
105
  * @param account The address to send the underlying ERC20 tokens.
100
106
  * @param amount The amount of tokens to send.
107
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
101
108
  */
102
- function erc20WrapperWithdrawTo(chainId: ChainId, wrapper: Address, receiver: Address, amount: bigint): BundlerCall[];
109
+ function erc20WrapperWithdrawTo(chainId: ChainId, wrapper: Address, receiver: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
103
110
  /**
104
111
  * Encodes a call to the Adapter to mint shares of the provided ERC4626 vault.
105
112
  * @param chainId The chain id for which to encode the call.
@@ -107,8 +114,9 @@ export declare namespace BundlerAction {
107
114
  * @param shares The amount of shares to mint.
108
115
  * @param maxSharePrice The maximum amount of assets to pay to get 1 share (scaled by RAY).
109
116
  * @param receiver The address to send the shares to.
117
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
110
118
  */
111
- function erc4626Mint(chainId: ChainId, erc4626: Address, shares: bigint, maxSharePrice: bigint, receiver: Address): BundlerCall[];
119
+ function erc4626Mint(chainId: ChainId, erc4626: Address, shares: bigint, maxSharePrice: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
112
120
  /**
113
121
  * Encodes a call to the Adapter to deposit assets into the provided ERC4626 vault.
114
122
  * @param chainId The chain id for which to encode the call.
@@ -116,8 +124,9 @@ export declare namespace BundlerAction {
116
124
  * @param assets The amount of assets to deposit.
117
125
  * @param maxSharePrice The maximum amount of assets to pay to get 1 share (scaled by RAY).
118
126
  * @param receiver The address to send the shares to.
127
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
119
128
  */
120
- function erc4626Deposit(chainId: ChainId, erc4626: Address, assets: bigint, maxSharePrice: bigint, receiver: Address): BundlerCall[];
129
+ function erc4626Deposit(chainId: ChainId, erc4626: Address, assets: bigint, maxSharePrice: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
121
130
  /**
122
131
  * Encodes a call to the Adapter to withdraw assets from the provided ERC4626 vault.
123
132
  * @param chainId The chain id for which to encode the call.
@@ -126,8 +135,9 @@ export declare namespace BundlerAction {
126
135
  * @param minSharePrice The minimum number of assets to receive per share (scaled by RAY).
127
136
  * @param receiver The address to send the assets to.
128
137
  * @param owner The address on behalf of which the assets are withdrawn.
138
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
129
139
  */
130
- function erc4626Withdraw(chainId: ChainId, erc4626: Address, assets: bigint, minSharePrice: bigint, receiver: Address, owner: Address): BundlerCall[];
140
+ function erc4626Withdraw(chainId: ChainId, erc4626: Address, assets: bigint, minSharePrice: bigint, receiver: Address, owner: Address, skipRevert?: boolean): BundlerCall[];
131
141
  /**
132
142
  * Encodes a call to the Adapter to redeem shares from the provided ERC4626 vault.
133
143
  * @param chainId The chain id for which to encode the call.
@@ -136,14 +146,15 @@ export declare namespace BundlerAction {
136
146
  * @param minSharePrice The minimum number of assets to receive per share (scaled by RAY).
137
147
  * @param receiver The address to send the assets to.
138
148
  * @param owner The address on behalf of which the assets are withdrawn.
149
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
139
150
  */
140
- function erc4626Redeem(chainId: ChainId, erc4626: Address, shares: bigint, minSharePrice: bigint, receiver: Address, owner: Address): BundlerCall[];
151
+ function erc4626Redeem(chainId: ChainId, erc4626: Address, shares: bigint, minSharePrice: bigint, receiver: Address, owner: Address, skipRevert?: boolean): BundlerCall[];
141
152
  /**
142
153
  * Encodes a call to the Adapter to authorize an account on Morpho Blue.
143
154
  * @param chainId The chain id for which to encode the call.
144
155
  * @param authorization The authorization details to submit to Morpho Blue.
145
156
  * @param signature The Ethers signature to authorize the account.
146
- * @param skipRevert Whether to allow the authorization call to revert without making the whole multicall revert.
157
+ * @param skipRevert Whether to allow the authorization call to revert without making the whole bundle revert. Defaults to true.
147
158
  */
148
159
  function morphoSetAuthorizationWithSig(chainId: ChainId, authorization: Authorization, signature: Hex, skipRevert?: boolean): BundlerCall[];
149
160
  /**
@@ -155,8 +166,9 @@ export declare namespace BundlerAction {
155
166
  * @param slippageAmount The maximum (resp. minimum) amount of assets (resp. supply shares) to supply (resp. mint) (protects the sender from unexpected slippage).
156
167
  * @param onBehalf The address to supply on behalf of.
157
168
  * @param callbackCalls The array of calls to execute inside Morpho Blue's `onMorphoSupply` callback.
169
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
158
170
  */
159
- function morphoSupply(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, onBehalf: Address, callbackCalls: BundlerCall[]): BundlerCall[];
171
+ function morphoSupply(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, onBehalf: Address, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
160
172
  /**
161
173
  * Encodes a call to the Adapter to supply collateral to a Morpho Blue market.
162
174
  * @param chainId The chain id for which to encode the call.
@@ -164,8 +176,9 @@ export declare namespace BundlerAction {
164
176
  * @param assets The amount of assets to supply.
165
177
  * @param onBehalf The address to supply on behalf of.
166
178
  * @param callbackCalls The array of calls to execute inside Morpho Blue's `onMorphoSupplyCollateral` callback.
179
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
167
180
  */
168
- function morphoSupplyCollateral(chainId: ChainId, market: InputMarketParams, assets: bigint, onBehalf: Address, callbackCalls: BundlerCall[]): BundlerCall[];
181
+ function morphoSupplyCollateral(chainId: ChainId, market: InputMarketParams, assets: bigint, onBehalf: Address, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
169
182
  /**
170
183
  * Encodes a call to the Adapter to borrow from a Morpho Blue market.
171
184
  * @param chainId The chain id for which to encode the call.
@@ -174,8 +187,9 @@ export declare namespace BundlerAction {
174
187
  * @param shares The amount of borrow shares to mint.
175
188
  * @param slippageAmount The minimum (resp. maximum) amount of assets (resp. borrow shares) to borrow (resp. mint) (protects the sender from unexpected slippage).
176
189
  * @param receiver The address to send borrowed tokens to.
190
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
177
191
  */
178
- function morphoBorrow(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, receiver: Address): BundlerCall[];
192
+ function morphoBorrow(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
179
193
  /**
180
194
  * Encodes a call to the Adapter to repay to a Morpho Blue market.
181
195
  * @param chainId The chain id for which to encode the call.
@@ -185,8 +199,9 @@ export declare namespace BundlerAction {
185
199
  * @param slippageAmount The maximum (resp. minimum) amount of assets (resp. borrow shares) to repay (resp. redeem) (protects the sender from unexpected slippage).
186
200
  * @param onBehalf The address to repay on behalf of.
187
201
  * @param callbackCalls The array of calls to execute inside Morpho Blue's `onMorphoSupply` callback.
202
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
188
203
  */
189
- function morphoRepay(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, onBehalf: Address, callbackCalls: BundlerCall[]): BundlerCall[];
204
+ function morphoRepay(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, onBehalf: Address, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
190
205
  /**
191
206
  * Encodes a call to the Adapter to withdraw from a Morpho Blue market.
192
207
  * @param chainId The chain id for which to encode the call.
@@ -195,24 +210,27 @@ export declare namespace BundlerAction {
195
210
  * @param shares The amount of supply shares to redeem.
196
211
  * @param slippageAmount The minimum (resp. maximum) amount of assets (resp. supply shares) to withdraw (resp. redeem) (protects the sender from unexpected slippage).
197
212
  * @param receiver The address to send withdrawn tokens to.
213
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
198
214
  */
199
- function morphoWithdraw(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, receiver: Address): BundlerCall[];
215
+ function morphoWithdraw(chainId: ChainId, market: InputMarketParams, assets: bigint, shares: bigint, slippageAmount: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
200
216
  /**
201
217
  * Encodes a call to the Adapter to withdraw collateral from a Morpho Blue market.
202
218
  * @param chainId The chain id for which to encode the call.
203
219
  * @param market The market params to withdraw from.
204
220
  * @param assets The amount of assets to withdraw.
205
221
  * @param receiver The address to send withdrawn tokens to.
222
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
206
223
  */
207
- function morphoWithdrawCollateral(chainId: ChainId, market: InputMarketParams, assets: bigint, receiver: Address): BundlerCall[];
224
+ function morphoWithdrawCollateral(chainId: ChainId, market: InputMarketParams, assets: bigint, receiver: Address, skipRevert?: boolean): BundlerCall[];
208
225
  /**
209
226
  * Encodes a call to the Adapter to flash loan from Morpho Blue.
210
227
  * @param chainId The chain id for which to encode the call.
211
228
  * @param asset The address of the ERC20 token to flash loan.
212
229
  * @param amount The amount of tokens to flash loan.
213
230
  * @param callbackCalls The array of calls to execute inside Morpho Blue's `onMorphoFlashLoan` callback.
231
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
214
232
  */
215
- function morphoFlashLoan(chainId: ChainId, asset: Address, amount: bigint, callbackCalls: BundlerCall[]): BundlerCall[];
233
+ function morphoFlashLoan(chainId: ChainId, asset: Address, amount: bigint, callbackCalls: BundlerCall[], skipRevert?: boolean): BundlerCall[];
216
234
  /**
217
235
  * Encodes a call to the Adapter to trigger a public reallocation on the PublicAllocator.
218
236
  * @param chainId The chain id for which to encode the call.
@@ -220,8 +238,9 @@ export declare namespace BundlerAction {
220
238
  * @param fee The vault public reallocation fee.
221
239
  * @param withdrawals The array of withdrawals to perform, before supplying everything to the supply market.
222
240
  * @param supplyMarketParams The market params to reallocate to.
241
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
223
242
  */
224
- function publicAllocatorReallocateTo(chainId: ChainId, vault: Address, fee: bigint, withdrawals: InputReallocation[], supplyMarketParams: InputMarketParams): BundlerCall[];
243
+ function publicAllocatorReallocateTo(chainId: ChainId, vault: Address, fee: bigint, withdrawals: InputReallocation[], supplyMarketParams: InputMarketParams, skipRevert?: boolean): BundlerCall[];
225
244
  /**
226
245
  * Encodes a call to the Adapter to claim rewards from the Universal Rewards Distributor.
227
246
  * @param chainId The chain id for which to encode the call.
@@ -230,7 +249,7 @@ export declare namespace BundlerAction {
230
249
  * @param reward The address of the reward token to claim.
231
250
  * @param amount The amount of rewards to claim.
232
251
  * @param proof The Merkle proof to claim the rewards.
233
- * @param skipRevert Whether to allow the claim to revert without making the whole multicall revert.
252
+ * @param skipRevert Whether to allow the claim to revert without making the whole bundle revert. Defaults to true.
234
253
  */
235
254
  function urdClaim(distributor: Address, account: Address, reward: Address, amount: bigint, proof: Hex[], skipRevert?: boolean): BundlerCall[];
236
255
  /**
@@ -238,15 +257,17 @@ export declare namespace BundlerAction {
238
257
  * @param chainId The chain id for which to encode the call.
239
258
  * @param amount The amount of native tokens to wrap (in wei).
240
259
  * @param recipient The address to send tokens to. Defaults to the chain's bundler3 general adapter.
260
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
241
261
  */
242
- function wrapNative(chainId: ChainId, amount: bigint, recipient?: Address): BundlerCall[];
262
+ function wrapNative(chainId: ChainId, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
243
263
  /**
244
264
  * Encodes a call to the Adapter to unwrap native tokens (WETH to ETH on ethereum, WMATIC to MATIC on polygon, etc).
245
265
  * @param chainId The chain id for which to encode the call.
246
266
  * @param amount The amount of native tokens to unwrap (in wei).
247
267
  * @param recipient The address to send tokens to. Defaults to the chain's bundler3 general adapter.
268
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
248
269
  */
249
- function unwrapNative(chainId: ChainId, amount: bigint, recipient?: Address): BundlerCall[];
270
+ function unwrapNative(chainId: ChainId, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
250
271
  /**
251
272
  * Encodes a call to the Adapter to stake native tokens using Lido (ETH to stETH on ethereum).
252
273
  * @param chainId The chain id for which to encode the call.
@@ -254,22 +275,25 @@ export declare namespace BundlerAction {
254
275
  * @param maxSharePrice The maximum amount of wei to pay for minting 1 share (scaled by RAY).
255
276
  * @param referral The referral address to use.
256
277
  * @param recipient The address to send stETH to. Defaults to the chain's bundler3 general adapter.
278
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
257
279
  */
258
- function stakeEth(chainId: ChainId, amount: bigint, maxSharePrice: bigint, referral: Address, recipient?: Address): BundlerCall[];
280
+ function stakeEth(chainId: ChainId, amount: bigint, maxSharePrice: bigint, referral: Address, recipient?: Address, skipRevert?: boolean): BundlerCall[];
259
281
  /**
260
282
  * Encodes a call to the Adapter to wrap stETH (stETH to wstETH on ethereum).
261
283
  * @param chainId The chain id for which to encode the call.
262
284
  * @param amount The amount of stETH to wrap (in wei).
263
285
  * @param recipient The address to send wstETH to. Defaults to the chain's bundler3 general adapter.
286
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
264
287
  */
265
- function wrapStEth(chainId: ChainId, amount: bigint, recipient?: Address): BundlerCall[];
288
+ function wrapStEth(chainId: ChainId, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
266
289
  /**
267
290
  * Encodes a call to the Adapter to unwrap wstETH (wstETH to stETH on ethereum).
268
291
  * @param chainId The chain id for which to encode the call.
269
292
  * @param amount The amount of wstETH to unwrap (in wei).
270
293
  * @param recipient The address to send stETH to. Defaults to the chain's bundler3 general adapter.
294
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
271
295
  */
272
- function unwrapStEth(chainId: ChainId, amount: bigint, recipient?: Address): BundlerCall[];
296
+ function unwrapStEth(chainId: ChainId, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
273
297
  /**
274
298
  * Encodes a call to the Adapter to repay a debt on AaveV2.
275
299
  * @param chainId The chain id for which to encode the call.
@@ -277,16 +301,18 @@ export declare namespace BundlerAction {
277
301
  * @param amount The amount of debt to repay.
278
302
  * @param onBehalf The address on behalf of which to repay.
279
303
  * @param rateMode The interest rate mode used by the debt to repay.
304
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
280
305
  */
281
- function aaveV2Repay(chainId: ChainId, asset: Address, amount: bigint, onBehalf: Address, rateMode?: bigint): BundlerCall[];
306
+ function aaveV2Repay(chainId: ChainId, asset: Address, amount: bigint, onBehalf: Address, rateMode?: bigint, skipRevert?: boolean): BundlerCall[];
282
307
  /**
283
308
  * Encodes a call to the Adapter to withdrawn from AaveV2.
284
309
  * @param chainId The chain id for which to encode the call.
285
310
  * @param asset The asset to withdraw.
286
311
  * @param amount The amount of asset to withdraw.
287
312
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
313
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
288
314
  */
289
- function aaveV2Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient?: Address): BundlerCall[];
315
+ function aaveV2Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
290
316
  /**
291
317
  * Encodes a call to the Adapter to repay a debt on AaveV3.
292
318
  * @param chainId The chain id for which to encode the call.
@@ -294,24 +320,27 @@ export declare namespace BundlerAction {
294
320
  * @param amount The amount of debt to repay.
295
321
  * @param onBehalf The address on behalf of which to repay.
296
322
  * @param rateMode The interest rate mode used by the debt to repay.
323
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
297
324
  */
298
- function aaveV3Repay(chainId: ChainId, asset: Address, amount: bigint, onBehalf: Address, rateMode?: bigint): BundlerCall[];
325
+ function aaveV3Repay(chainId: ChainId, asset: Address, amount: bigint, onBehalf: Address, rateMode?: bigint, skipRevert?: boolean): BundlerCall[];
299
326
  /**
300
327
  * Encodes a call to the Adapter to withdrawn from AaveV3.
301
328
  * @param chainId The chain id for which to encode the call.
302
329
  * @param asset The asset to withdraw.
303
330
  * @param amount The amount of asset to withdraw.
304
331
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
332
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
305
333
  */
306
- function aaveV3Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient?: Address): BundlerCall[];
334
+ function aaveV3Withdraw(chainId: ChainId, asset: Address, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
307
335
  /**
308
336
  * Encodes a call to the Adapter to repay a debt on Morpho's AaveV3Optimizer.
309
337
  * @param chainId The chain id for which to encode the call.
310
338
  * @param underlying The underlying debt asset to repay.
311
339
  * @param amount The amount of debt to repay.
312
340
  * @param onBehalf The address on behalf of which to repay.
341
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
313
342
  */
314
- function aaveV3OptimizerRepay(chainId: ChainId, underlying: Address, amount: bigint, onBehalf: Address): BundlerCall[];
343
+ function aaveV3OptimizerRepay(chainId: ChainId, underlying: Address, amount: bigint, onBehalf: Address, skipRevert?: boolean): BundlerCall[];
315
344
  /**
316
345
  * Encodes a call to the Adapter to withdraw from Morpho's AaveV3Optimizer.
317
346
  * @param chainId The chain id for which to encode the call.
@@ -319,16 +348,18 @@ export declare namespace BundlerAction {
319
348
  * @param amount The amount to withdraw.
320
349
  * @param maxIterations The maximum amount of iterations to use for the withdrawal.
321
350
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
351
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
322
352
  */
323
- function aaveV3OptimizerWithdraw(chainId: ChainId, underlying: Address, amount: bigint, maxIterations: bigint, recipient?: Address): BundlerCall[];
353
+ function aaveV3OptimizerWithdraw(chainId: ChainId, underlying: Address, amount: bigint, maxIterations: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
324
354
  /**
325
355
  * Encodes a call to the Adapter to withdraw collateral from Morpho's AaveV3Optimizer.
326
356
  * @param chainId The chain id for which to encode the call.
327
357
  * @param underlying The underlying asset to withdraw.
328
358
  * @param amount The amount to withdraw.
329
359
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
360
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
330
361
  */
331
- function aaveV3OptimizerWithdrawCollateral(chainId: ChainId, underlying: Address, amount: bigint, recipient?: Address): BundlerCall[];
362
+ function aaveV3OptimizerWithdrawCollateral(chainId: ChainId, underlying: Address, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
332
363
  /**
333
364
  * Encodes a call to the Adapter to approve the Bundler as the sender's manager on Morpho's AaveV3Optimizer.
334
365
  * @param chainId The chain id for which to encode the call.
@@ -338,7 +369,7 @@ export declare namespace BundlerAction {
338
369
  * @param deadline The timestamp until which the signature is valid.
339
370
  * @param signature The Ethers signature to submit.
340
371
  * @param manager The address of the manager to approve. Defaults to the chain's bundler3 AaveV3OptimizerMigrationAdapter.
341
- * @param skipRevert Whether to allow the signature to revert without making the whole multicall revert.
372
+ * @param skipRevert Whether to allow the signature to revert without making the whole bundle revert. Defaults to true.
342
373
  */
343
374
  function aaveV3OptimizerApproveManagerWithSig(chainId: ChainId, aaveV3Optimizer: Address, owner: Address, isApproved: boolean, nonce: bigint, deadline: bigint, signature: Hex, manager?: Address, skipRevert?: boolean): BundlerCall[];
344
375
  /**
@@ -347,24 +378,27 @@ export declare namespace BundlerAction {
347
378
  * @param cToken The cToken on which to repay the debt.
348
379
  * @param amount The amount of debt to repay.
349
380
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
381
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
350
382
  */
351
- function compoundV2Repay(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, onBehalf: Address): BundlerCall[];
383
+ function compoundV2Repay(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, onBehalf: Address, skipRevert?: boolean): BundlerCall[];
352
384
  /**
353
385
  * Encodes a call to the Adapter to withdraw collateral from CompoundV2.
354
386
  * @param chainId The chain id for which to encode the call.
355
387
  * @param cToken The cToken on which to withdraw.
356
388
  * @param amount The amount to withdraw.
357
389
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
390
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
358
391
  */
359
- function compoundV2Redeem(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, recipient?: Address): BundlerCall[];
392
+ function compoundV2Redeem(chainId: ChainId, cToken: Address, amount: bigint, isEth: boolean, recipient?: Address, skipRevert?: boolean): BundlerCall[];
360
393
  /**
361
394
  * Encodes a call to the Adapter to repay a debt on CompoundV3.
362
395
  * @param chainId The chain id for which to encode the call.
363
396
  * @param instance The CompoundV3 instance on which to repay the debt.
364
397
  * @param amount The amount of debt to repay.
365
398
  * @param onBehalf The address on behalf of which to repay.
399
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
366
400
  */
367
- function compoundV3Repay(chainId: ChainId, instance: Address, amount: bigint, onBehalf: Address): BundlerCall[];
401
+ function compoundV3Repay(chainId: ChainId, instance: Address, amount: bigint, onBehalf: Address, skipRevert?: boolean): BundlerCall[];
368
402
  /**
369
403
  * Encodes a call to the Adapter to withdraw collateral from CompoundV3.
370
404
  * @param chainId The chain id for which to encode the call.
@@ -372,8 +406,9 @@ export declare namespace BundlerAction {
372
406
  * @param asset The asset to withdraw.
373
407
  * @param amount The amount to withdraw.
374
408
  * @param recipient The recipient of ERC20 tokens. Defaults to the chain's bundler3 general adapter.
409
+ * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
375
410
  */
376
- function compoundV3WithdrawFrom(chainId: ChainId, instance: Address, asset: Address, amount: bigint, recipient?: Address): BundlerCall[];
411
+ function compoundV3WithdrawFrom(chainId: ChainId, instance: Address, asset: Address, amount: bigint, recipient?: Address, skipRevert?: boolean): BundlerCall[];
377
412
  /**
378
413
  * Encodes a call to the Adapter to allow the Bundler to act on the sender's position on CompoundV3.
379
414
  * @param chainId The chain id for which to encode the call.
@@ -384,7 +419,7 @@ export declare namespace BundlerAction {
384
419
  * @param expiry The timestamp until which the signature is valid.
385
420
  * @param signature The Ethers signature to submit.
386
421
  * @param manager The address of the manager to approve. Defaults to the chain's bundler3 CompoundV3MigrationAdapter.
387
- * @param skipRevert Whether to allow the signature to revert without making the whole multicall revert.
422
+ * @param skipRevert Whether to allow the signature to revert without making the whole bundle revert. Defaults to true.
388
423
  */
389
424
  function compoundV3AllowBySig(chainId: ChainId, instance: Address, owner: Address, isAllowed: boolean, nonce: bigint, expiry: bigint, signature: Hex, manager?: Address, skipRevert?: boolean): BundlerCall[];
390
425
  }