@morpho-org/bundler-sdk-viem 3.0.0-next.10 → 3.0.0-next.11
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 -41
- package/lib/BundlerAction.js +120 -85
- package/lib/actions.js +89 -24
- package/lib/types/actions.d.ts +86 -33
- package/package.json +6 -6
package/lib/actions.js
CHANGED
|
@@ -103,7 +103,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
103
103
|
};
|
|
104
104
|
const action = {
|
|
105
105
|
type: "morphoSetAuthorizationWithSig",
|
|
106
|
-
args: [authorization, null],
|
|
106
|
+
args: [authorization, null, operation.skipRevert],
|
|
107
107
|
};
|
|
108
108
|
actions.push(action);
|
|
109
109
|
requirements.signatures.push({
|
|
@@ -162,11 +162,27 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
162
162
|
const action = address === dai
|
|
163
163
|
? {
|
|
164
164
|
type: "permitDai",
|
|
165
|
-
args: [
|
|
165
|
+
args: [
|
|
166
|
+
sender,
|
|
167
|
+
nonce,
|
|
168
|
+
deadline,
|
|
169
|
+
true,
|
|
170
|
+
null,
|
|
171
|
+
spender,
|
|
172
|
+
operation.skipRevert,
|
|
173
|
+
],
|
|
166
174
|
}
|
|
167
175
|
: {
|
|
168
176
|
type: "permit",
|
|
169
|
-
args: [
|
|
177
|
+
args: [
|
|
178
|
+
sender,
|
|
179
|
+
address,
|
|
180
|
+
amount,
|
|
181
|
+
deadline,
|
|
182
|
+
null,
|
|
183
|
+
spender,
|
|
184
|
+
operation.skipRevert,
|
|
185
|
+
],
|
|
170
186
|
};
|
|
171
187
|
actions.push(action);
|
|
172
188
|
const tokenData = dataBefore.getToken(address);
|
|
@@ -243,6 +259,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
243
259
|
sigDeadline: deadline,
|
|
244
260
|
},
|
|
245
261
|
null,
|
|
262
|
+
operation.skipRevert,
|
|
246
263
|
],
|
|
247
264
|
};
|
|
248
265
|
actions.push(action);
|
|
@@ -284,7 +301,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
284
301
|
if (address === NATIVE_ADDRESS) {
|
|
285
302
|
actions.push({
|
|
286
303
|
type: "nativeTransfer",
|
|
287
|
-
args: [from, to, amount],
|
|
304
|
+
args: [from, to, amount, operation.skipRevert],
|
|
288
305
|
});
|
|
289
306
|
break;
|
|
290
307
|
}
|
|
@@ -292,13 +309,13 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
292
309
|
if (from === generalAdapter1) {
|
|
293
310
|
actions.push({
|
|
294
311
|
type: "erc20Transfer",
|
|
295
|
-
args: [address, to, amount],
|
|
312
|
+
args: [address, to, amount, undefined, operation.skipRevert],
|
|
296
313
|
});
|
|
297
314
|
break;
|
|
298
315
|
}
|
|
299
316
|
actions.push({
|
|
300
317
|
type: "erc20TransferFrom",
|
|
301
|
-
args: [address, amount, to],
|
|
318
|
+
args: [address, amount, to, operation.skipRevert],
|
|
302
319
|
});
|
|
303
320
|
break;
|
|
304
321
|
}
|
|
@@ -307,14 +324,14 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
307
324
|
if (supportsSignature) {
|
|
308
325
|
actions.push({
|
|
309
326
|
type: "transferFrom2",
|
|
310
|
-
args: [address, from, amount, to],
|
|
327
|
+
args: [address, from, amount, to, operation.skipRevert],
|
|
311
328
|
});
|
|
312
329
|
break;
|
|
313
330
|
}
|
|
314
331
|
// Signatures are not supported, fallback to standard transfer.
|
|
315
332
|
actions.push({
|
|
316
333
|
type: "erc20TransferFrom",
|
|
317
|
-
args: [address, amount, to],
|
|
334
|
+
args: [address, amount, to, operation.skipRevert],
|
|
318
335
|
});
|
|
319
336
|
break;
|
|
320
337
|
}
|
|
@@ -324,21 +341,27 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
324
341
|
case wNative: {
|
|
325
342
|
actions.push({
|
|
326
343
|
type: "wrapNative",
|
|
327
|
-
args: [amount],
|
|
344
|
+
args: [amount, undefined, operation.skipRevert],
|
|
328
345
|
});
|
|
329
346
|
break;
|
|
330
347
|
}
|
|
331
348
|
case wstEth: {
|
|
332
349
|
actions.push({
|
|
333
350
|
type: "wrapStEth",
|
|
334
|
-
args: [amount],
|
|
351
|
+
args: [amount, undefined, operation.skipRevert],
|
|
335
352
|
});
|
|
336
353
|
break;
|
|
337
354
|
}
|
|
338
355
|
case stEth: {
|
|
339
356
|
actions.push({
|
|
340
357
|
type: "stakeEth",
|
|
341
|
-
args: [
|
|
358
|
+
args: [
|
|
359
|
+
amount,
|
|
360
|
+
MathLib.MAX_UINT_256,
|
|
361
|
+
zeroAddress,
|
|
362
|
+
undefined,
|
|
363
|
+
operation.skipRevert,
|
|
364
|
+
],
|
|
342
365
|
});
|
|
343
366
|
break;
|
|
344
367
|
}
|
|
@@ -349,7 +372,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
349
372
|
throw Error(`unknown wrapped token: ${address}`);
|
|
350
373
|
actions.push({
|
|
351
374
|
type: "erc20WrapperDepositFor",
|
|
352
|
-
args: [address, underlying, amount],
|
|
375
|
+
args: [address, underlying, amount, operation.skipRevert],
|
|
353
376
|
});
|
|
354
377
|
break;
|
|
355
378
|
}
|
|
@@ -366,14 +389,14 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
366
389
|
case wNative: {
|
|
367
390
|
actions.push({
|
|
368
391
|
type: "unwrapNative",
|
|
369
|
-
args: [amount],
|
|
392
|
+
args: [amount, undefined, operation.skipRevert],
|
|
370
393
|
});
|
|
371
394
|
break;
|
|
372
395
|
}
|
|
373
396
|
case wstEth: {
|
|
374
397
|
actions.push({
|
|
375
398
|
type: "unwrapStEth",
|
|
376
|
-
args: [amount],
|
|
399
|
+
args: [amount, undefined, operation.skipRevert],
|
|
377
400
|
});
|
|
378
401
|
break;
|
|
379
402
|
}
|
|
@@ -382,7 +405,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
382
405
|
throw Error(`unexpected token unwrap: ${address}`);
|
|
383
406
|
actions.push({
|
|
384
407
|
type: "erc20WrapperWithdrawTo",
|
|
385
|
-
args: [address, receiver, amount],
|
|
408
|
+
args: [address, receiver, amount, operation.skipRevert],
|
|
386
409
|
});
|
|
387
410
|
}
|
|
388
411
|
}
|
|
@@ -401,6 +424,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
401
424
|
maxSharePrice,
|
|
402
425
|
onBehalf,
|
|
403
426
|
callbackBundle?.actions ?? [],
|
|
427
|
+
operation.skipRevert,
|
|
404
428
|
],
|
|
405
429
|
});
|
|
406
430
|
break;
|
|
@@ -411,7 +435,14 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
411
435
|
const minSharePrice = market.toSupplyAssets(MathLib.wToRay(MathLib.WAD - slippage));
|
|
412
436
|
actions.push({
|
|
413
437
|
type: "morphoWithdraw",
|
|
414
|
-
args: [
|
|
438
|
+
args: [
|
|
439
|
+
market.params,
|
|
440
|
+
assets,
|
|
441
|
+
shares,
|
|
442
|
+
minSharePrice,
|
|
443
|
+
receiver,
|
|
444
|
+
operation.skipRevert,
|
|
445
|
+
],
|
|
415
446
|
});
|
|
416
447
|
break;
|
|
417
448
|
}
|
|
@@ -421,7 +452,14 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
421
452
|
const minSharePrice = market.toBorrowAssets(MathLib.wToRay(MathLib.WAD - slippage));
|
|
422
453
|
actions.push({
|
|
423
454
|
type: "morphoBorrow",
|
|
424
|
-
args: [
|
|
455
|
+
args: [
|
|
456
|
+
market.params,
|
|
457
|
+
assets,
|
|
458
|
+
shares,
|
|
459
|
+
minSharePrice,
|
|
460
|
+
receiver,
|
|
461
|
+
operation.skipRevert,
|
|
462
|
+
],
|
|
425
463
|
});
|
|
426
464
|
break;
|
|
427
465
|
}
|
|
@@ -438,6 +476,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
438
476
|
maxSharePrice,
|
|
439
477
|
onBehalf,
|
|
440
478
|
callbackBundle?.actions ?? [],
|
|
479
|
+
operation.skipRevert,
|
|
441
480
|
],
|
|
442
481
|
});
|
|
443
482
|
break;
|
|
@@ -451,13 +490,24 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
451
490
|
throw Error(`unknown wrapped token: ${address}`);
|
|
452
491
|
actions.push({
|
|
453
492
|
type: "erc20WrapperDepositFor",
|
|
454
|
-
args: [
|
|
493
|
+
args: [
|
|
494
|
+
params.collateralToken,
|
|
495
|
+
underlying,
|
|
496
|
+
assets,
|
|
497
|
+
operation.skipRevert,
|
|
498
|
+
],
|
|
455
499
|
});
|
|
456
500
|
break;
|
|
457
501
|
}
|
|
458
502
|
actions.push({
|
|
459
503
|
type: "morphoSupplyCollateral",
|
|
460
|
-
args: [
|
|
504
|
+
args: [
|
|
505
|
+
params,
|
|
506
|
+
assets,
|
|
507
|
+
onBehalf,
|
|
508
|
+
callbackBundle?.actions ?? [],
|
|
509
|
+
operation.skipRevert,
|
|
510
|
+
],
|
|
461
511
|
});
|
|
462
512
|
break;
|
|
463
513
|
}
|
|
@@ -466,7 +516,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
466
516
|
const { params } = dataBefore.getMarket(id);
|
|
467
517
|
actions.push({
|
|
468
518
|
type: "morphoWithdrawCollateral",
|
|
469
|
-
args: [params, assets, receiver],
|
|
519
|
+
args: [params, assets, receiver, operation.skipRevert],
|
|
470
520
|
});
|
|
471
521
|
break;
|
|
472
522
|
}
|
|
@@ -477,12 +527,12 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
477
527
|
if (shares === 0n)
|
|
478
528
|
actions.push({
|
|
479
529
|
type: "erc4626Deposit",
|
|
480
|
-
args: [address, assets, maxSharePrice, owner],
|
|
530
|
+
args: [address, assets, maxSharePrice, owner, operation.skipRevert],
|
|
481
531
|
});
|
|
482
532
|
else
|
|
483
533
|
actions.push({
|
|
484
534
|
type: "erc4626Mint",
|
|
485
|
-
args: [address, shares, maxSharePrice, owner],
|
|
535
|
+
args: [address, shares, maxSharePrice, owner, operation.skipRevert],
|
|
486
536
|
});
|
|
487
537
|
break;
|
|
488
538
|
}
|
|
@@ -493,12 +543,26 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
493
543
|
if (assets > 0n)
|
|
494
544
|
actions.push({
|
|
495
545
|
type: "erc4626Withdraw",
|
|
496
|
-
args: [
|
|
546
|
+
args: [
|
|
547
|
+
address,
|
|
548
|
+
assets,
|
|
549
|
+
minSharePrice,
|
|
550
|
+
receiver,
|
|
551
|
+
owner,
|
|
552
|
+
operation.skipRevert,
|
|
553
|
+
],
|
|
497
554
|
});
|
|
498
555
|
else
|
|
499
556
|
actions.push({
|
|
500
557
|
type: "erc4626Redeem",
|
|
501
|
-
args: [
|
|
558
|
+
args: [
|
|
559
|
+
address,
|
|
560
|
+
shares,
|
|
561
|
+
minSharePrice,
|
|
562
|
+
receiver,
|
|
563
|
+
owner,
|
|
564
|
+
operation.skipRevert,
|
|
565
|
+
],
|
|
502
566
|
});
|
|
503
567
|
break;
|
|
504
568
|
}
|
|
@@ -516,6 +580,7 @@ export const encodeOperation = (operation, dataBefore, supportsSignature = true,
|
|
|
516
580
|
amount: assets,
|
|
517
581
|
})),
|
|
518
582
|
dataBefore.getMarket(supplyMarketId).params,
|
|
583
|
+
operation.skipRevert,
|
|
519
584
|
],
|
|
520
585
|
});
|
|
521
586
|
break;
|
package/lib/types/actions.d.ts
CHANGED
|
@@ -23,20 +23,37 @@ export interface Permit2PermitSingle {
|
|
|
23
23
|
sigDeadline: bigint;
|
|
24
24
|
}
|
|
25
25
|
export interface ActionArgs {
|
|
26
|
-
nativeTransfer: [
|
|
26
|
+
nativeTransfer: [
|
|
27
|
+
owner: Address,
|
|
28
|
+
recipient: Address,
|
|
29
|
+
amount: bigint,
|
|
30
|
+
skipRevert?: boolean
|
|
31
|
+
];
|
|
27
32
|
erc20Transfer: [
|
|
28
33
|
asset: Address,
|
|
29
34
|
recipient: Address,
|
|
30
35
|
amount: bigint,
|
|
31
|
-
adapter?: Address
|
|
36
|
+
adapter?: Address,
|
|
37
|
+
skipRevert?: boolean
|
|
38
|
+
];
|
|
39
|
+
erc20TransferFrom: [
|
|
40
|
+
asset: Address,
|
|
41
|
+
amount: bigint,
|
|
42
|
+
recipient?: Address,
|
|
43
|
+
skipRevert?: boolean
|
|
32
44
|
];
|
|
33
|
-
erc20TransferFrom: [asset: Address, amount: bigint, recipient?: Address];
|
|
34
45
|
erc20WrapperDepositFor: [
|
|
35
46
|
wrapper: Address,
|
|
36
47
|
underlying: Address,
|
|
37
|
-
amount: bigint
|
|
48
|
+
amount: bigint,
|
|
49
|
+
skipRevert?: boolean
|
|
50
|
+
];
|
|
51
|
+
erc20WrapperWithdrawTo: [
|
|
52
|
+
wrapper: Address,
|
|
53
|
+
receiver: Address,
|
|
54
|
+
amount: bigint,
|
|
55
|
+
skipRevert?: boolean
|
|
38
56
|
];
|
|
39
|
-
erc20WrapperWithdrawTo: [wrapper: Address, receiver: Address, amount: bigint];
|
|
40
57
|
permit: [
|
|
41
58
|
owner: Address,
|
|
42
59
|
asset: Address,
|
|
@@ -65,33 +82,38 @@ export interface ActionArgs {
|
|
|
65
82
|
asset: Address,
|
|
66
83
|
owner: Address,
|
|
67
84
|
amount: bigint,
|
|
68
|
-
recipient?: Address
|
|
85
|
+
recipient?: Address,
|
|
86
|
+
skipRevert?: boolean
|
|
69
87
|
];
|
|
70
88
|
erc4626Mint: [
|
|
71
89
|
erc4626: Address,
|
|
72
90
|
shares: bigint,
|
|
73
91
|
maxSharePrice: bigint,
|
|
74
|
-
receiver: Address
|
|
92
|
+
receiver: Address,
|
|
93
|
+
skipRevert?: boolean
|
|
75
94
|
];
|
|
76
95
|
erc4626Deposit: [
|
|
77
96
|
erc4626: Address,
|
|
78
97
|
assets: bigint,
|
|
79
98
|
maxSharePrice: bigint,
|
|
80
|
-
receiver: Address
|
|
99
|
+
receiver: Address,
|
|
100
|
+
skipRevert?: boolean
|
|
81
101
|
];
|
|
82
102
|
erc4626Withdraw: [
|
|
83
103
|
erc4626: Address,
|
|
84
104
|
assets: bigint,
|
|
85
105
|
minSharePrice: bigint,
|
|
86
106
|
receiver: Address,
|
|
87
|
-
owner: Address
|
|
107
|
+
owner: Address,
|
|
108
|
+
skipRevert?: boolean
|
|
88
109
|
];
|
|
89
110
|
erc4626Redeem: [
|
|
90
111
|
erc4626: Address,
|
|
91
112
|
shares: bigint,
|
|
92
113
|
minSharePrice: bigint,
|
|
93
114
|
receiver: Address,
|
|
94
|
-
owner: Address
|
|
115
|
+
owner: Address,
|
|
116
|
+
skipRevert?: boolean
|
|
95
117
|
];
|
|
96
118
|
morphoSetAuthorizationWithSig: [
|
|
97
119
|
authorization: {
|
|
@@ -110,20 +132,23 @@ export interface ActionArgs {
|
|
|
110
132
|
shares: bigint,
|
|
111
133
|
slippageAmount: bigint,
|
|
112
134
|
onBehalf: Address,
|
|
113
|
-
onMorphoSupply: Action[]
|
|
135
|
+
onMorphoSupply: Action[],
|
|
136
|
+
skipRevert?: boolean
|
|
114
137
|
];
|
|
115
138
|
morphoSupplyCollateral: [
|
|
116
139
|
market: InputMarketParams,
|
|
117
140
|
assets: bigint,
|
|
118
141
|
onBehalf: Address,
|
|
119
|
-
onMorphoSupplyCollateral: Action[]
|
|
142
|
+
onMorphoSupplyCollateral: Action[],
|
|
143
|
+
skipRevert?: boolean
|
|
120
144
|
];
|
|
121
145
|
morphoBorrow: [
|
|
122
146
|
market: InputMarketParams,
|
|
123
147
|
assets: bigint,
|
|
124
148
|
shares: bigint,
|
|
125
149
|
slippageAmount: bigint,
|
|
126
|
-
receiver: Address
|
|
150
|
+
receiver: Address,
|
|
151
|
+
skipRevert?: boolean
|
|
127
152
|
];
|
|
128
153
|
morphoRepay: [
|
|
129
154
|
market: InputMarketParams,
|
|
@@ -131,25 +156,29 @@ export interface ActionArgs {
|
|
|
131
156
|
shares: bigint,
|
|
132
157
|
slippageAmount: bigint,
|
|
133
158
|
onBehalf: Address,
|
|
134
|
-
onMorphoRepay: Action[]
|
|
159
|
+
onMorphoRepay: Action[],
|
|
160
|
+
skipRevert?: boolean
|
|
135
161
|
];
|
|
136
162
|
morphoWithdraw: [
|
|
137
163
|
market: InputMarketParams,
|
|
138
164
|
assets: bigint,
|
|
139
165
|
shares: bigint,
|
|
140
166
|
slippageAmount: bigint,
|
|
141
|
-
receiver: Address
|
|
167
|
+
receiver: Address,
|
|
168
|
+
skipRevert?: boolean
|
|
142
169
|
];
|
|
143
170
|
morphoWithdrawCollateral: [
|
|
144
171
|
market: InputMarketParams,
|
|
145
172
|
assets: bigint,
|
|
146
|
-
receiver: Address
|
|
173
|
+
receiver: Address,
|
|
174
|
+
skipRevert?: boolean
|
|
147
175
|
];
|
|
148
176
|
reallocateTo: [
|
|
149
177
|
vault: Address,
|
|
150
178
|
fee: bigint,
|
|
151
179
|
withdrawals: InputReallocation[],
|
|
152
|
-
supplyMarket: InputMarketParams
|
|
180
|
+
supplyMarket: InputMarketParams,
|
|
181
|
+
skipRevert?: boolean
|
|
153
182
|
];
|
|
154
183
|
urdClaim: [
|
|
155
184
|
distributor: Address,
|
|
@@ -159,45 +188,61 @@ export interface ActionArgs {
|
|
|
159
188
|
proof: Hex[],
|
|
160
189
|
skipRevert?: boolean
|
|
161
190
|
];
|
|
162
|
-
wrapNative: [amount: bigint, recipient?: Address];
|
|
163
|
-
unwrapNative: [amount: bigint, recipient?: Address];
|
|
191
|
+
wrapNative: [amount: bigint, recipient?: Address, skipRevert?: boolean];
|
|
192
|
+
unwrapNative: [amount: bigint, recipient?: Address, skipRevert?: boolean];
|
|
164
193
|
stakeEth: [
|
|
165
194
|
amount: bigint,
|
|
166
195
|
minShares: bigint,
|
|
167
196
|
referral: Address,
|
|
168
|
-
recipient?: Address
|
|
197
|
+
recipient?: Address,
|
|
198
|
+
skipRevert?: boolean
|
|
169
199
|
];
|
|
170
|
-
wrapStEth: [amount: bigint, recipient?: Address];
|
|
171
|
-
unwrapStEth: [amount: bigint, recipient?: Address];
|
|
200
|
+
wrapStEth: [amount: bigint, recipient?: Address, skipRevert?: boolean];
|
|
201
|
+
unwrapStEth: [amount: bigint, recipient?: Address, skipRevert?: boolean];
|
|
172
202
|
aaveV2Repay: [
|
|
173
203
|
asset: Address,
|
|
174
204
|
amount: bigint,
|
|
175
205
|
onBehalf: Address,
|
|
176
|
-
rateMode?: bigint
|
|
206
|
+
rateMode?: bigint,
|
|
207
|
+
skipRevert?: boolean
|
|
208
|
+
];
|
|
209
|
+
aaveV2Withdraw: [
|
|
210
|
+
asset: Address,
|
|
211
|
+
amount: bigint,
|
|
212
|
+
recipient?: Address,
|
|
213
|
+
skipRevert?: boolean
|
|
177
214
|
];
|
|
178
|
-
aaveV2Withdraw: [asset: Address, amount: bigint, recipient?: Address];
|
|
179
215
|
aaveV3Repay: [
|
|
180
216
|
asset: Address,
|
|
181
217
|
amount: bigint,
|
|
182
218
|
onBehalf: Address,
|
|
183
|
-
rateMode?: bigint
|
|
219
|
+
rateMode?: bigint,
|
|
220
|
+
skipRevert?: boolean
|
|
221
|
+
];
|
|
222
|
+
aaveV3Withdraw: [
|
|
223
|
+
asset: Address,
|
|
224
|
+
amount: bigint,
|
|
225
|
+
recipient?: Address,
|
|
226
|
+
skipRevert?: boolean
|
|
184
227
|
];
|
|
185
|
-
aaveV3Withdraw: [asset: Address, amount: bigint, recipient?: Address];
|
|
186
228
|
aaveV3OptimizerRepay: [
|
|
187
229
|
underlying: Address,
|
|
188
230
|
amount: bigint,
|
|
189
|
-
onBehalf: Address
|
|
231
|
+
onBehalf: Address,
|
|
232
|
+
skipRevert?: boolean
|
|
190
233
|
];
|
|
191
234
|
aaveV3OptimizerWithdraw: [
|
|
192
235
|
underlying: Address,
|
|
193
236
|
amount: bigint,
|
|
194
237
|
maxIterations: bigint,
|
|
195
|
-
recipient?: Address
|
|
238
|
+
recipient?: Address,
|
|
239
|
+
skipRevert?: boolean
|
|
196
240
|
];
|
|
197
241
|
aaveV3OptimizerWithdrawCollateral: [
|
|
198
242
|
underlying: Address,
|
|
199
243
|
amount: bigint,
|
|
200
|
-
recipient?: Address
|
|
244
|
+
recipient?: Address,
|
|
245
|
+
skipRevert?: boolean
|
|
201
246
|
];
|
|
202
247
|
aaveV3OptimizerApproveManagerWithSig: [
|
|
203
248
|
aaveV3Optimizer: Address,
|
|
@@ -213,20 +258,28 @@ export interface ActionArgs {
|
|
|
213
258
|
cToken: Address,
|
|
214
259
|
amount: bigint,
|
|
215
260
|
isEth: boolean,
|
|
216
|
-
onBehalf: Address
|
|
261
|
+
onBehalf: Address,
|
|
262
|
+
skipRevert?: boolean
|
|
217
263
|
];
|
|
218
264
|
compoundV2Redeem: [
|
|
219
265
|
cToken: Address,
|
|
220
266
|
amount: bigint,
|
|
221
267
|
isEth: boolean,
|
|
222
|
-
recipient?: Address
|
|
268
|
+
recipient?: Address,
|
|
269
|
+
skipRevert?: boolean
|
|
270
|
+
];
|
|
271
|
+
compoundV3Repay: [
|
|
272
|
+
instance: Address,
|
|
273
|
+
amount: bigint,
|
|
274
|
+
onBehalf: Address,
|
|
275
|
+
skipRevert?: boolean
|
|
223
276
|
];
|
|
224
|
-
compoundV3Repay: [instance: Address, amount: bigint, onBehalf: Address];
|
|
225
277
|
compoundV3WithdrawFrom: [
|
|
226
278
|
instance: Address,
|
|
227
279
|
asset: Address,
|
|
228
280
|
amount: bigint,
|
|
229
|
-
recipient?: Address
|
|
281
|
+
recipient?: Address,
|
|
282
|
+
skipRevert?: boolean
|
|
230
283
|
];
|
|
231
284
|
compoundV3AllowBySig: [
|
|
232
285
|
instance: Address,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/bundler-sdk-viem",
|
|
3
3
|
"description": "Viem-based extension of `@morpho-org/simulation-sdk` that exports utilities to transform simple interactions on Morpho (such as `Blue_Borrow`) and Morpho Vaults (such as `MetaMorpho_Deposit`) into the required bundles (with ERC20 approvals, transfers, etc) to submit to the bundler onchain.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.11",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"viem": "^2.0.0",
|
|
23
23
|
"@morpho-org/blue-sdk": "^2.3.2",
|
|
24
|
-
"@morpho-org/
|
|
24
|
+
"@morpho-org/simulation-sdk": "^3.0.0-next.5",
|
|
25
25
|
"@morpho-org/morpho-ts": "^2.2.0",
|
|
26
|
-
"@morpho-org/
|
|
26
|
+
"@morpho-org/blue-sdk-viem": "^2.2.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@tanstack/query-core": "^5.62.16",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@morpho-org/blue-sdk-viem": "^2.2.2",
|
|
40
40
|
"@morpho-org/morpho-test": "^2.2.1",
|
|
41
41
|
"@morpho-org/morpho-ts": "^2.2.0",
|
|
42
|
-
"@morpho-org/simulation-sdk": "^
|
|
43
|
-
"@morpho-org/simulation-sdk-wagmi": "^2.0.5",
|
|
42
|
+
"@morpho-org/simulation-sdk": "^3.0.0-next.5",
|
|
44
43
|
"@morpho-org/test-wagmi": "^2.0.4",
|
|
45
|
-
"@morpho-org/test": "^2.1.0"
|
|
44
|
+
"@morpho-org/test": "^2.1.0",
|
|
45
|
+
"@morpho-org/simulation-sdk-wagmi": "^2.0.5"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"prepublish": "$npm_execpath build",
|