@morpho-org/bundler-sdk-viem 3.0.0-next.9 → 3.0.1

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