ox 0.4.3 → 0.5.0

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/core/Siwe.js +1 -1
  3. package/_cjs/core/Siwe.js.map +1 -1
  4. package/_cjs/erc4337/EntryPoint.js +1320 -0
  5. package/_cjs/erc4337/EntryPoint.js.map +1 -0
  6. package/_cjs/erc4337/RpcSchema.js +3 -0
  7. package/_cjs/erc4337/RpcSchema.js.map +1 -0
  8. package/_cjs/erc4337/UserOperation.js +152 -0
  9. package/_cjs/erc4337/UserOperation.js.map +1 -0
  10. package/_cjs/erc4337/UserOperationGas.js +31 -0
  11. package/_cjs/erc4337/UserOperationGas.js.map +1 -0
  12. package/_cjs/erc4337/UserOperationReceipt.js +35 -0
  13. package/_cjs/erc4337/UserOperationReceipt.js.map +1 -0
  14. package/_cjs/erc4337/index.js +9 -0
  15. package/_cjs/erc4337/index.js.map +1 -0
  16. package/_cjs/index.docs.js +1 -0
  17. package/_cjs/index.docs.js.map +1 -1
  18. package/_cjs/version.js +1 -1
  19. package/_esm/core/Siwe.js +1 -1
  20. package/_esm/core/Siwe.js.map +1 -1
  21. package/_esm/erc4337/EntryPoint.js +1321 -0
  22. package/_esm/erc4337/EntryPoint.js.map +1 -0
  23. package/_esm/erc4337/RpcSchema.js +2 -0
  24. package/_esm/erc4337/RpcSchema.js.map +1 -0
  25. package/_esm/erc4337/UserOperation.js +324 -0
  26. package/_esm/erc4337/UserOperation.js.map +1 -0
  27. package/_esm/erc4337/UserOperationGas.js +61 -0
  28. package/_esm/erc4337/UserOperationGas.js.map +1 -0
  29. package/_esm/erc4337/UserOperationReceipt.js +79 -0
  30. package/_esm/erc4337/UserOperationReceipt.js.map +1 -0
  31. package/_esm/erc4337/index.js +31 -0
  32. package/_esm/erc4337/index.js.map +1 -0
  33. package/_esm/index.docs.js +1 -0
  34. package/_esm/index.docs.js.map +1 -1
  35. package/_esm/version.js +1 -1
  36. package/_types/erc4337/EntryPoint.d.ts +1480 -0
  37. package/_types/erc4337/EntryPoint.d.ts.map +1 -0
  38. package/_types/erc4337/RpcSchema.d.ts +159 -0
  39. package/_types/erc4337/RpcSchema.d.ts.map +1 -0
  40. package/_types/erc4337/UserOperation.d.ts +330 -0
  41. package/_types/erc4337/UserOperation.d.ts.map +1 -0
  42. package/_types/erc4337/UserOperationGas.d.ts +62 -0
  43. package/_types/erc4337/UserOperationGas.d.ts.map +1 -0
  44. package/_types/erc4337/UserOperationReceipt.d.ts +87 -0
  45. package/_types/erc4337/UserOperationReceipt.d.ts.map +1 -0
  46. package/_types/erc4337/index.d.ts +33 -0
  47. package/_types/erc4337/index.d.ts.map +1 -0
  48. package/_types/index.docs.d.ts +1 -0
  49. package/_types/index.docs.d.ts.map +1 -1
  50. package/_types/version.d.ts +1 -1
  51. package/core/Siwe.ts +1 -1
  52. package/erc4337/EntryPoint/package.json +6 -0
  53. package/erc4337/EntryPoint.ts +1419 -0
  54. package/erc4337/RpcSchema/package.json +6 -0
  55. package/erc4337/RpcSchema.ts +179 -0
  56. package/erc4337/UserOperation/package.json +6 -0
  57. package/erc4337/UserOperation.ts +617 -0
  58. package/erc4337/UserOperationGas/package.json +6 -0
  59. package/erc4337/UserOperationGas.ts +109 -0
  60. package/erc4337/UserOperationReceipt/package.json +6 -0
  61. package/erc4337/UserOperationReceipt.ts +139 -0
  62. package/erc4337/index.ts +38 -0
  63. package/erc4337/package.json +6 -0
  64. package/index.docs.ts +1 -0
  65. package/package.json +31 -1
  66. package/version.ts +1 -1
@@ -0,0 +1,1419 @@
1
+ /**
2
+ * EntryPoint version.
3
+ *
4
+ * @see https://github.com/eth-infinitism/account-abstraction/releases
5
+ */
6
+ export type Version = '0.6' | '0.7'
7
+
8
+ /** EntryPoint 0.6 ABI. */
9
+ export const abiV06 = [
10
+ {
11
+ inputs: [
12
+ { name: 'preOpGas', type: 'uint256' },
13
+ { name: 'paid', type: 'uint256' },
14
+ { name: 'validAfter', type: 'uint48' },
15
+ { name: 'validUntil', type: 'uint48' },
16
+ { name: 'targetSuccess', type: 'bool' },
17
+ { name: 'targetResult', type: 'bytes' },
18
+ ],
19
+ name: 'ExecutionResult',
20
+ type: 'error',
21
+ },
22
+ {
23
+ inputs: [
24
+ { name: 'opIndex', type: 'uint256' },
25
+ { name: 'reason', type: 'string' },
26
+ ],
27
+ name: 'FailedOp',
28
+ type: 'error',
29
+ },
30
+ {
31
+ inputs: [{ name: 'sender', type: 'address' }],
32
+ name: 'SenderAddressResult',
33
+ type: 'error',
34
+ },
35
+ {
36
+ inputs: [{ name: 'aggregator', type: 'address' }],
37
+ name: 'SignatureValidationFailed',
38
+ type: 'error',
39
+ },
40
+ {
41
+ inputs: [
42
+ {
43
+ components: [
44
+ { name: 'preOpGas', type: 'uint256' },
45
+ { name: 'prefund', type: 'uint256' },
46
+ { name: 'sigFailed', type: 'bool' },
47
+ { name: 'validAfter', type: 'uint48' },
48
+ { name: 'validUntil', type: 'uint48' },
49
+ { name: 'paymasterContext', type: 'bytes' },
50
+ ],
51
+
52
+ name: 'returnInfo',
53
+ type: 'tuple',
54
+ },
55
+ {
56
+ components: [
57
+ { name: 'stake', type: 'uint256' },
58
+ { name: 'unstakeDelaySec', type: 'uint256' },
59
+ ],
60
+
61
+ name: 'senderInfo',
62
+ type: 'tuple',
63
+ },
64
+ {
65
+ components: [
66
+ { name: 'stake', type: 'uint256' },
67
+ { name: 'unstakeDelaySec', type: 'uint256' },
68
+ ],
69
+
70
+ name: 'factoryInfo',
71
+ type: 'tuple',
72
+ },
73
+ {
74
+ components: [
75
+ { name: 'stake', type: 'uint256' },
76
+ { name: 'unstakeDelaySec', type: 'uint256' },
77
+ ],
78
+
79
+ name: 'paymasterInfo',
80
+ type: 'tuple',
81
+ },
82
+ ],
83
+ name: 'ValidationResult',
84
+ type: 'error',
85
+ },
86
+ {
87
+ inputs: [
88
+ {
89
+ components: [
90
+ { name: 'preOpGas', type: 'uint256' },
91
+ { name: 'prefund', type: 'uint256' },
92
+ { name: 'sigFailed', type: 'bool' },
93
+ { name: 'validAfter', type: 'uint48' },
94
+ { name: 'validUntil', type: 'uint48' },
95
+ { name: 'paymasterContext', type: 'bytes' },
96
+ ],
97
+
98
+ name: 'returnInfo',
99
+ type: 'tuple',
100
+ },
101
+ {
102
+ components: [
103
+ { name: 'stake', type: 'uint256' },
104
+ { name: 'unstakeDelaySec', type: 'uint256' },
105
+ ],
106
+
107
+ name: 'senderInfo',
108
+ type: 'tuple',
109
+ },
110
+ {
111
+ components: [
112
+ { name: 'stake', type: 'uint256' },
113
+ { name: 'unstakeDelaySec', type: 'uint256' },
114
+ ],
115
+
116
+ name: 'factoryInfo',
117
+ type: 'tuple',
118
+ },
119
+ {
120
+ components: [
121
+ { name: 'stake', type: 'uint256' },
122
+ { name: 'unstakeDelaySec', type: 'uint256' },
123
+ ],
124
+
125
+ name: 'paymasterInfo',
126
+ type: 'tuple',
127
+ },
128
+ {
129
+ components: [
130
+ { name: 'aggregator', type: 'address' },
131
+ {
132
+ components: [
133
+ { name: 'stake', type: 'uint256' },
134
+ {
135
+ name: 'unstakeDelaySec',
136
+ type: 'uint256',
137
+ },
138
+ ],
139
+
140
+ name: 'stakeInfo',
141
+ type: 'tuple',
142
+ },
143
+ ],
144
+
145
+ name: 'aggregatorInfo',
146
+ type: 'tuple',
147
+ },
148
+ ],
149
+ name: 'ValidationResultWithAggregation',
150
+ type: 'error',
151
+ },
152
+ {
153
+ anonymous: false,
154
+ inputs: [
155
+ {
156
+ indexed: true,
157
+
158
+ name: 'userOpHash',
159
+ type: 'bytes32',
160
+ },
161
+ {
162
+ indexed: true,
163
+
164
+ name: 'sender',
165
+ type: 'address',
166
+ },
167
+ {
168
+ indexed: false,
169
+
170
+ name: 'factory',
171
+ type: 'address',
172
+ },
173
+ {
174
+ indexed: false,
175
+
176
+ name: 'paymaster',
177
+ type: 'address',
178
+ },
179
+ ],
180
+ name: 'AccountDeployed',
181
+ type: 'event',
182
+ },
183
+ { anonymous: false, inputs: [], name: 'BeforeExecution', type: 'event' },
184
+ {
185
+ anonymous: false,
186
+ inputs: [
187
+ {
188
+ indexed: true,
189
+
190
+ name: 'account',
191
+ type: 'address',
192
+ },
193
+ {
194
+ indexed: false,
195
+
196
+ name: 'totalDeposit',
197
+ type: 'uint256',
198
+ },
199
+ ],
200
+ name: 'Deposited',
201
+ type: 'event',
202
+ },
203
+ {
204
+ anonymous: false,
205
+ inputs: [
206
+ {
207
+ indexed: true,
208
+
209
+ name: 'aggregator',
210
+ type: 'address',
211
+ },
212
+ ],
213
+ name: 'SignatureAggregatorChanged',
214
+ type: 'event',
215
+ },
216
+ {
217
+ anonymous: false,
218
+ inputs: [
219
+ {
220
+ indexed: true,
221
+
222
+ name: 'account',
223
+ type: 'address',
224
+ },
225
+ {
226
+ indexed: false,
227
+
228
+ name: 'totalStaked',
229
+ type: 'uint256',
230
+ },
231
+ {
232
+ indexed: false,
233
+
234
+ name: 'unstakeDelaySec',
235
+ type: 'uint256',
236
+ },
237
+ ],
238
+ name: 'StakeLocked',
239
+ type: 'event',
240
+ },
241
+ {
242
+ anonymous: false,
243
+ inputs: [
244
+ {
245
+ indexed: true,
246
+
247
+ name: 'account',
248
+ type: 'address',
249
+ },
250
+ {
251
+ indexed: false,
252
+
253
+ name: 'withdrawTime',
254
+ type: 'uint256',
255
+ },
256
+ ],
257
+ name: 'StakeUnlocked',
258
+ type: 'event',
259
+ },
260
+ {
261
+ anonymous: false,
262
+ inputs: [
263
+ {
264
+ indexed: true,
265
+
266
+ name: 'account',
267
+ type: 'address',
268
+ },
269
+ {
270
+ indexed: false,
271
+
272
+ name: 'withdrawAddress',
273
+ type: 'address',
274
+ },
275
+ {
276
+ indexed: false,
277
+
278
+ name: 'amount',
279
+ type: 'uint256',
280
+ },
281
+ ],
282
+ name: 'StakeWithdrawn',
283
+ type: 'event',
284
+ },
285
+ {
286
+ anonymous: false,
287
+ inputs: [
288
+ {
289
+ indexed: true,
290
+
291
+ name: 'userOpHash',
292
+ type: 'bytes32',
293
+ },
294
+ {
295
+ indexed: true,
296
+
297
+ name: 'sender',
298
+ type: 'address',
299
+ },
300
+ {
301
+ indexed: true,
302
+
303
+ name: 'paymaster',
304
+ type: 'address',
305
+ },
306
+ {
307
+ indexed: false,
308
+
309
+ name: 'nonce',
310
+ type: 'uint256',
311
+ },
312
+ { indexed: false, name: 'success', type: 'bool' },
313
+ {
314
+ indexed: false,
315
+
316
+ name: 'actualGasCost',
317
+ type: 'uint256',
318
+ },
319
+ {
320
+ indexed: false,
321
+
322
+ name: 'actualGasUsed',
323
+ type: 'uint256',
324
+ },
325
+ ],
326
+ name: 'UserOperationEvent',
327
+ type: 'event',
328
+ },
329
+ {
330
+ anonymous: false,
331
+ inputs: [
332
+ {
333
+ indexed: true,
334
+
335
+ name: 'userOpHash',
336
+ type: 'bytes32',
337
+ },
338
+ {
339
+ indexed: true,
340
+
341
+ name: 'sender',
342
+ type: 'address',
343
+ },
344
+ {
345
+ indexed: false,
346
+
347
+ name: 'nonce',
348
+ type: 'uint256',
349
+ },
350
+ {
351
+ indexed: false,
352
+
353
+ name: 'revertReason',
354
+ type: 'bytes',
355
+ },
356
+ ],
357
+ name: 'UserOperationRevertReason',
358
+ type: 'event',
359
+ },
360
+ {
361
+ anonymous: false,
362
+ inputs: [
363
+ {
364
+ indexed: true,
365
+
366
+ name: 'account',
367
+ type: 'address',
368
+ },
369
+ {
370
+ indexed: false,
371
+
372
+ name: 'withdrawAddress',
373
+ type: 'address',
374
+ },
375
+ {
376
+ indexed: false,
377
+
378
+ name: 'amount',
379
+ type: 'uint256',
380
+ },
381
+ ],
382
+ name: 'Withdrawn',
383
+ type: 'event',
384
+ },
385
+ {
386
+ inputs: [],
387
+ name: 'SIG_VALIDATION_FAILED',
388
+ outputs: [{ name: '', type: 'uint256' }],
389
+ stateMutability: 'view',
390
+ type: 'function',
391
+ },
392
+ {
393
+ inputs: [
394
+ { name: 'initCode', type: 'bytes' },
395
+ { name: 'sender', type: 'address' },
396
+ { name: 'paymasterAndData', type: 'bytes' },
397
+ ],
398
+ name: '_validateSenderAndPaymaster',
399
+ outputs: [],
400
+ stateMutability: 'view',
401
+ type: 'function',
402
+ },
403
+ {
404
+ inputs: [{ name: 'unstakeDelaySec', type: 'uint32' }],
405
+ name: 'addStake',
406
+ outputs: [],
407
+ stateMutability: 'payable',
408
+ type: 'function',
409
+ },
410
+ {
411
+ inputs: [{ name: 'account', type: 'address' }],
412
+ name: 'balanceOf',
413
+ outputs: [{ name: '', type: 'uint256' }],
414
+ stateMutability: 'view',
415
+ type: 'function',
416
+ },
417
+ {
418
+ inputs: [{ name: 'account', type: 'address' }],
419
+ name: 'depositTo',
420
+ outputs: [],
421
+ stateMutability: 'payable',
422
+ type: 'function',
423
+ },
424
+ {
425
+ inputs: [{ name: '', type: 'address' }],
426
+ name: 'deposits',
427
+ outputs: [
428
+ { name: 'deposit', type: 'uint112' },
429
+ { name: 'staked', type: 'bool' },
430
+ { name: 'stake', type: 'uint112' },
431
+ { name: 'unstakeDelaySec', type: 'uint32' },
432
+ { name: 'withdrawTime', type: 'uint48' },
433
+ ],
434
+ stateMutability: 'view',
435
+ type: 'function',
436
+ },
437
+ {
438
+ inputs: [{ name: 'account', type: 'address' }],
439
+ name: 'getDepositInfo',
440
+ outputs: [
441
+ {
442
+ components: [
443
+ { name: 'deposit', type: 'uint112' },
444
+ { name: 'staked', type: 'bool' },
445
+ { name: 'stake', type: 'uint112' },
446
+ { name: 'unstakeDelaySec', type: 'uint32' },
447
+ { name: 'withdrawTime', type: 'uint48' },
448
+ ],
449
+
450
+ name: 'info',
451
+ type: 'tuple',
452
+ },
453
+ ],
454
+ stateMutability: 'view',
455
+ type: 'function',
456
+ },
457
+ {
458
+ inputs: [
459
+ { name: 'sender', type: 'address' },
460
+ { name: 'key', type: 'uint192' },
461
+ ],
462
+ name: 'getNonce',
463
+ outputs: [{ name: 'nonce', type: 'uint256' }],
464
+ stateMutability: 'view',
465
+ type: 'function',
466
+ },
467
+ {
468
+ inputs: [{ name: 'initCode', type: 'bytes' }],
469
+ name: 'getSenderAddress',
470
+ outputs: [],
471
+ stateMutability: 'nonpayable',
472
+ type: 'function',
473
+ },
474
+ {
475
+ inputs: [
476
+ {
477
+ components: [
478
+ { name: 'sender', type: 'address' },
479
+ { name: 'nonce', type: 'uint256' },
480
+ { name: 'initCode', type: 'bytes' },
481
+ { name: 'callData', type: 'bytes' },
482
+ { name: 'callGasLimit', type: 'uint256' },
483
+ {
484
+ name: 'verificationGasLimit',
485
+ type: 'uint256',
486
+ },
487
+ {
488
+ name: 'preVerificationGas',
489
+ type: 'uint256',
490
+ },
491
+ { name: 'maxFeePerGas', type: 'uint256' },
492
+ {
493
+ name: 'maxPriorityFeePerGas',
494
+ type: 'uint256',
495
+ },
496
+ { name: 'paymasterAndData', type: 'bytes' },
497
+ { name: 'signature', type: 'bytes' },
498
+ ],
499
+
500
+ name: 'userOp',
501
+ type: 'tuple',
502
+ },
503
+ ],
504
+ name: 'getUserOpHash',
505
+ outputs: [{ name: '', type: 'bytes32' }],
506
+ stateMutability: 'view',
507
+ type: 'function',
508
+ },
509
+ {
510
+ inputs: [
511
+ {
512
+ components: [
513
+ {
514
+ components: [
515
+ { name: 'sender', type: 'address' },
516
+ { name: 'nonce', type: 'uint256' },
517
+ { name: 'initCode', type: 'bytes' },
518
+ { name: 'callData', type: 'bytes' },
519
+ {
520
+ name: 'callGasLimit',
521
+ type: 'uint256',
522
+ },
523
+ {
524
+ name: 'verificationGasLimit',
525
+ type: 'uint256',
526
+ },
527
+ {
528
+ name: 'preVerificationGas',
529
+ type: 'uint256',
530
+ },
531
+ {
532
+ name: 'maxFeePerGas',
533
+ type: 'uint256',
534
+ },
535
+ {
536
+ name: 'maxPriorityFeePerGas',
537
+ type: 'uint256',
538
+ },
539
+ {
540
+ name: 'paymasterAndData',
541
+ type: 'bytes',
542
+ },
543
+ { name: 'signature', type: 'bytes' },
544
+ ],
545
+
546
+ name: 'userOps',
547
+ type: 'tuple[]',
548
+ },
549
+ {
550
+ name: 'aggregator',
551
+ type: 'address',
552
+ },
553
+ { name: 'signature', type: 'bytes' },
554
+ ],
555
+
556
+ name: 'opsPerAggregator',
557
+ type: 'tuple[]',
558
+ },
559
+ { name: 'beneficiary', type: 'address' },
560
+ ],
561
+ name: 'handleAggregatedOps',
562
+ outputs: [],
563
+ stateMutability: 'nonpayable',
564
+ type: 'function',
565
+ },
566
+ {
567
+ inputs: [
568
+ {
569
+ components: [
570
+ { name: 'sender', type: 'address' },
571
+ { name: 'nonce', type: 'uint256' },
572
+ { name: 'initCode', type: 'bytes' },
573
+ { name: 'callData', type: 'bytes' },
574
+ { name: 'callGasLimit', type: 'uint256' },
575
+ {
576
+ name: 'verificationGasLimit',
577
+ type: 'uint256',
578
+ },
579
+ {
580
+ name: 'preVerificationGas',
581
+ type: 'uint256',
582
+ },
583
+ { name: 'maxFeePerGas', type: 'uint256' },
584
+ {
585
+ name: 'maxPriorityFeePerGas',
586
+ type: 'uint256',
587
+ },
588
+ { name: 'paymasterAndData', type: 'bytes' },
589
+ { name: 'signature', type: 'bytes' },
590
+ ],
591
+
592
+ name: 'ops',
593
+ type: 'tuple[]',
594
+ },
595
+ { name: 'beneficiary', type: 'address' },
596
+ ],
597
+ name: 'handleOps',
598
+ outputs: [],
599
+ stateMutability: 'nonpayable',
600
+ type: 'function',
601
+ },
602
+ {
603
+ inputs: [{ name: 'key', type: 'uint192' }],
604
+ name: 'incrementNonce',
605
+ outputs: [],
606
+ stateMutability: 'nonpayable',
607
+ type: 'function',
608
+ },
609
+ {
610
+ inputs: [
611
+ { name: 'callData', type: 'bytes' },
612
+ {
613
+ components: [
614
+ {
615
+ components: [
616
+ { name: 'sender', type: 'address' },
617
+ { name: 'nonce', type: 'uint256' },
618
+ {
619
+ name: 'callGasLimit',
620
+ type: 'uint256',
621
+ },
622
+ {
623
+ name: 'verificationGasLimit',
624
+ type: 'uint256',
625
+ },
626
+ {
627
+ name: 'preVerificationGas',
628
+ type: 'uint256',
629
+ },
630
+ { name: 'paymaster', type: 'address' },
631
+ {
632
+ name: 'maxFeePerGas',
633
+ type: 'uint256',
634
+ },
635
+ {
636
+ name: 'maxPriorityFeePerGas',
637
+ type: 'uint256',
638
+ },
639
+ ],
640
+
641
+ name: 'mUserOp',
642
+ type: 'tuple',
643
+ },
644
+ { name: 'userOpHash', type: 'bytes32' },
645
+ { name: 'prefund', type: 'uint256' },
646
+ { name: 'contextOffset', type: 'uint256' },
647
+ { name: 'preOpGas', type: 'uint256' },
648
+ ],
649
+
650
+ name: 'opInfo',
651
+ type: 'tuple',
652
+ },
653
+ { name: 'context', type: 'bytes' },
654
+ ],
655
+ name: 'innerHandleOp',
656
+ outputs: [{ name: 'actualGasCost', type: 'uint256' }],
657
+ stateMutability: 'nonpayable',
658
+ type: 'function',
659
+ },
660
+ {
661
+ inputs: [
662
+ { name: '', type: 'address' },
663
+ { name: '', type: 'uint192' },
664
+ ],
665
+ name: 'nonceSequenceNumber',
666
+ outputs: [{ name: '', type: 'uint256' }],
667
+ stateMutability: 'view',
668
+ type: 'function',
669
+ },
670
+ {
671
+ inputs: [
672
+ {
673
+ components: [
674
+ { name: 'sender', type: 'address' },
675
+ { name: 'nonce', type: 'uint256' },
676
+ { name: 'initCode', type: 'bytes' },
677
+ { name: 'callData', type: 'bytes' },
678
+ { name: 'callGasLimit', type: 'uint256' },
679
+ {
680
+ name: 'verificationGasLimit',
681
+ type: 'uint256',
682
+ },
683
+ {
684
+ name: 'preVerificationGas',
685
+ type: 'uint256',
686
+ },
687
+ { name: 'maxFeePerGas', type: 'uint256' },
688
+ {
689
+ name: 'maxPriorityFeePerGas',
690
+ type: 'uint256',
691
+ },
692
+ { name: 'paymasterAndData', type: 'bytes' },
693
+ { name: 'signature', type: 'bytes' },
694
+ ],
695
+
696
+ name: 'op',
697
+ type: 'tuple',
698
+ },
699
+ { name: 'target', type: 'address' },
700
+ { name: 'targetCallData', type: 'bytes' },
701
+ ],
702
+ name: 'simulateHandleOp',
703
+ outputs: [],
704
+ stateMutability: 'nonpayable',
705
+ type: 'function',
706
+ },
707
+ {
708
+ inputs: [
709
+ {
710
+ components: [
711
+ { name: 'sender', type: 'address' },
712
+ { name: 'nonce', type: 'uint256' },
713
+ { name: 'initCode', type: 'bytes' },
714
+ { name: 'callData', type: 'bytes' },
715
+ { name: 'callGasLimit', type: 'uint256' },
716
+ {
717
+ name: 'verificationGasLimit',
718
+ type: 'uint256',
719
+ },
720
+ {
721
+ name: 'preVerificationGas',
722
+ type: 'uint256',
723
+ },
724
+ { name: 'maxFeePerGas', type: 'uint256' },
725
+ {
726
+ name: 'maxPriorityFeePerGas',
727
+ type: 'uint256',
728
+ },
729
+ { name: 'paymasterAndData', type: 'bytes' },
730
+ { name: 'signature', type: 'bytes' },
731
+ ],
732
+
733
+ name: 'userOp',
734
+ type: 'tuple',
735
+ },
736
+ ],
737
+ name: 'simulateValidation',
738
+ outputs: [],
739
+ stateMutability: 'nonpayable',
740
+ type: 'function',
741
+ },
742
+ {
743
+ inputs: [],
744
+ name: 'unlockStake',
745
+ outputs: [],
746
+ stateMutability: 'nonpayable',
747
+ type: 'function',
748
+ },
749
+ {
750
+ inputs: [
751
+ {
752
+ name: 'withdrawAddress',
753
+ type: 'address',
754
+ },
755
+ ],
756
+ name: 'withdrawStake',
757
+ outputs: [],
758
+ stateMutability: 'nonpayable',
759
+ type: 'function',
760
+ },
761
+ {
762
+ inputs: [
763
+ {
764
+ name: 'withdrawAddress',
765
+ type: 'address',
766
+ },
767
+ { name: 'withdrawAmount', type: 'uint256' },
768
+ ],
769
+ name: 'withdrawTo',
770
+ outputs: [],
771
+ stateMutability: 'nonpayable',
772
+ type: 'function',
773
+ },
774
+ { stateMutability: 'payable', type: 'receive' },
775
+ ] as const
776
+
777
+ /** EntryPoint 0.7 ABI. */
778
+ export const abiV07 = [
779
+ {
780
+ inputs: [
781
+ { name: 'success', type: 'bool' },
782
+ { name: 'ret', type: 'bytes' },
783
+ ],
784
+ name: 'DelegateAndRevert',
785
+ type: 'error',
786
+ },
787
+ {
788
+ inputs: [
789
+ { name: 'opIndex', type: 'uint256' },
790
+ { name: 'reason', type: 'string' },
791
+ ],
792
+ name: 'FailedOp',
793
+ type: 'error',
794
+ },
795
+ {
796
+ inputs: [
797
+ { name: 'opIndex', type: 'uint256' },
798
+ { name: 'reason', type: 'string' },
799
+ { name: 'inner', type: 'bytes' },
800
+ ],
801
+ name: 'FailedOpWithRevert',
802
+ type: 'error',
803
+ },
804
+ {
805
+ inputs: [{ name: 'returnData', type: 'bytes' }],
806
+ name: 'PostOpReverted',
807
+ type: 'error',
808
+ },
809
+ { inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' },
810
+ {
811
+ inputs: [{ name: 'sender', type: 'address' }],
812
+ name: 'SenderAddressResult',
813
+ type: 'error',
814
+ },
815
+ {
816
+ inputs: [{ name: 'aggregator', type: 'address' }],
817
+ name: 'SignatureValidationFailed',
818
+ type: 'error',
819
+ },
820
+ {
821
+ anonymous: false,
822
+ inputs: [
823
+ {
824
+ indexed: true,
825
+
826
+ name: 'userOpHash',
827
+ type: 'bytes32',
828
+ },
829
+ {
830
+ indexed: true,
831
+
832
+ name: 'sender',
833
+ type: 'address',
834
+ },
835
+ {
836
+ indexed: false,
837
+
838
+ name: 'factory',
839
+ type: 'address',
840
+ },
841
+ {
842
+ indexed: false,
843
+
844
+ name: 'paymaster',
845
+ type: 'address',
846
+ },
847
+ ],
848
+ name: 'AccountDeployed',
849
+ type: 'event',
850
+ },
851
+ { anonymous: false, inputs: [], name: 'BeforeExecution', type: 'event' },
852
+ {
853
+ anonymous: false,
854
+ inputs: [
855
+ {
856
+ indexed: true,
857
+
858
+ name: 'account',
859
+ type: 'address',
860
+ },
861
+ {
862
+ indexed: false,
863
+
864
+ name: 'totalDeposit',
865
+ type: 'uint256',
866
+ },
867
+ ],
868
+ name: 'Deposited',
869
+ type: 'event',
870
+ },
871
+ {
872
+ anonymous: false,
873
+ inputs: [
874
+ {
875
+ indexed: true,
876
+
877
+ name: 'userOpHash',
878
+ type: 'bytes32',
879
+ },
880
+ {
881
+ indexed: true,
882
+
883
+ name: 'sender',
884
+ type: 'address',
885
+ },
886
+ {
887
+ indexed: false,
888
+
889
+ name: 'nonce',
890
+ type: 'uint256',
891
+ },
892
+ {
893
+ indexed: false,
894
+
895
+ name: 'revertReason',
896
+ type: 'bytes',
897
+ },
898
+ ],
899
+ name: 'PostOpRevertReason',
900
+ type: 'event',
901
+ },
902
+ {
903
+ anonymous: false,
904
+ inputs: [
905
+ {
906
+ indexed: true,
907
+
908
+ name: 'aggregator',
909
+ type: 'address',
910
+ },
911
+ ],
912
+ name: 'SignatureAggregatorChanged',
913
+ type: 'event',
914
+ },
915
+ {
916
+ anonymous: false,
917
+ inputs: [
918
+ {
919
+ indexed: true,
920
+
921
+ name: 'account',
922
+ type: 'address',
923
+ },
924
+ {
925
+ indexed: false,
926
+
927
+ name: 'totalStaked',
928
+ type: 'uint256',
929
+ },
930
+ {
931
+ indexed: false,
932
+
933
+ name: 'unstakeDelaySec',
934
+ type: 'uint256',
935
+ },
936
+ ],
937
+ name: 'StakeLocked',
938
+ type: 'event',
939
+ },
940
+ {
941
+ anonymous: false,
942
+ inputs: [
943
+ {
944
+ indexed: true,
945
+
946
+ name: 'account',
947
+ type: 'address',
948
+ },
949
+ {
950
+ indexed: false,
951
+
952
+ name: 'withdrawTime',
953
+ type: 'uint256',
954
+ },
955
+ ],
956
+ name: 'StakeUnlocked',
957
+ type: 'event',
958
+ },
959
+ {
960
+ anonymous: false,
961
+ inputs: [
962
+ {
963
+ indexed: true,
964
+
965
+ name: 'account',
966
+ type: 'address',
967
+ },
968
+ {
969
+ indexed: false,
970
+
971
+ name: 'withdrawAddress',
972
+ type: 'address',
973
+ },
974
+ {
975
+ indexed: false,
976
+
977
+ name: 'amount',
978
+ type: 'uint256',
979
+ },
980
+ ],
981
+ name: 'StakeWithdrawn',
982
+ type: 'event',
983
+ },
984
+ {
985
+ anonymous: false,
986
+ inputs: [
987
+ {
988
+ indexed: true,
989
+
990
+ name: 'userOpHash',
991
+ type: 'bytes32',
992
+ },
993
+ {
994
+ indexed: true,
995
+
996
+ name: 'sender',
997
+ type: 'address',
998
+ },
999
+ {
1000
+ indexed: true,
1001
+
1002
+ name: 'paymaster',
1003
+ type: 'address',
1004
+ },
1005
+ {
1006
+ indexed: false,
1007
+
1008
+ name: 'nonce',
1009
+ type: 'uint256',
1010
+ },
1011
+ { indexed: false, name: 'success', type: 'bool' },
1012
+ {
1013
+ indexed: false,
1014
+
1015
+ name: 'actualGasCost',
1016
+ type: 'uint256',
1017
+ },
1018
+ {
1019
+ indexed: false,
1020
+
1021
+ name: 'actualGasUsed',
1022
+ type: 'uint256',
1023
+ },
1024
+ ],
1025
+ name: 'UserOperationEvent',
1026
+ type: 'event',
1027
+ },
1028
+ {
1029
+ anonymous: false,
1030
+ inputs: [
1031
+ {
1032
+ indexed: true,
1033
+
1034
+ name: 'userOpHash',
1035
+ type: 'bytes32',
1036
+ },
1037
+ {
1038
+ indexed: true,
1039
+
1040
+ name: 'sender',
1041
+ type: 'address',
1042
+ },
1043
+ {
1044
+ indexed: false,
1045
+
1046
+ name: 'nonce',
1047
+ type: 'uint256',
1048
+ },
1049
+ ],
1050
+ name: 'UserOperationPrefundTooLow',
1051
+ type: 'event',
1052
+ },
1053
+ {
1054
+ anonymous: false,
1055
+ inputs: [
1056
+ {
1057
+ indexed: true,
1058
+
1059
+ name: 'userOpHash',
1060
+ type: 'bytes32',
1061
+ },
1062
+ {
1063
+ indexed: true,
1064
+
1065
+ name: 'sender',
1066
+ type: 'address',
1067
+ },
1068
+ {
1069
+ indexed: false,
1070
+
1071
+ name: 'nonce',
1072
+ type: 'uint256',
1073
+ },
1074
+ {
1075
+ indexed: false,
1076
+
1077
+ name: 'revertReason',
1078
+ type: 'bytes',
1079
+ },
1080
+ ],
1081
+ name: 'UserOperationRevertReason',
1082
+ type: 'event',
1083
+ },
1084
+ {
1085
+ anonymous: false,
1086
+ inputs: [
1087
+ {
1088
+ indexed: true,
1089
+
1090
+ name: 'account',
1091
+ type: 'address',
1092
+ },
1093
+ {
1094
+ indexed: false,
1095
+
1096
+ name: 'withdrawAddress',
1097
+ type: 'address',
1098
+ },
1099
+ {
1100
+ indexed: false,
1101
+
1102
+ name: 'amount',
1103
+ type: 'uint256',
1104
+ },
1105
+ ],
1106
+ name: 'Withdrawn',
1107
+ type: 'event',
1108
+ },
1109
+ {
1110
+ inputs: [{ name: 'unstakeDelaySec', type: 'uint32' }],
1111
+ name: 'addStake',
1112
+ outputs: [],
1113
+ stateMutability: 'payable',
1114
+ type: 'function',
1115
+ },
1116
+ {
1117
+ inputs: [{ name: 'account', type: 'address' }],
1118
+ name: 'balanceOf',
1119
+ outputs: [{ name: '', type: 'uint256' }],
1120
+ stateMutability: 'view',
1121
+ type: 'function',
1122
+ },
1123
+ {
1124
+ inputs: [
1125
+ { name: 'target', type: 'address' },
1126
+ { name: 'data', type: 'bytes' },
1127
+ ],
1128
+ name: 'delegateAndRevert',
1129
+ outputs: [],
1130
+ stateMutability: 'nonpayable',
1131
+ type: 'function',
1132
+ },
1133
+ {
1134
+ inputs: [{ name: 'account', type: 'address' }],
1135
+ name: 'depositTo',
1136
+ outputs: [],
1137
+ stateMutability: 'payable',
1138
+ type: 'function',
1139
+ },
1140
+ {
1141
+ inputs: [{ name: '', type: 'address' }],
1142
+ name: 'deposits',
1143
+ outputs: [
1144
+ { name: 'deposit', type: 'uint256' },
1145
+ { name: 'staked', type: 'bool' },
1146
+ { name: 'stake', type: 'uint112' },
1147
+ { name: 'unstakeDelaySec', type: 'uint32' },
1148
+ { name: 'withdrawTime', type: 'uint48' },
1149
+ ],
1150
+ stateMutability: 'view',
1151
+ type: 'function',
1152
+ },
1153
+ {
1154
+ inputs: [{ name: 'account', type: 'address' }],
1155
+ name: 'getDepositInfo',
1156
+ outputs: [
1157
+ {
1158
+ components: [
1159
+ { name: 'deposit', type: 'uint256' },
1160
+ { name: 'staked', type: 'bool' },
1161
+ { name: 'stake', type: 'uint112' },
1162
+ { name: 'unstakeDelaySec', type: 'uint32' },
1163
+ { name: 'withdrawTime', type: 'uint48' },
1164
+ ],
1165
+
1166
+ name: 'info',
1167
+ type: 'tuple',
1168
+ },
1169
+ ],
1170
+ stateMutability: 'view',
1171
+ type: 'function',
1172
+ },
1173
+ {
1174
+ inputs: [
1175
+ { name: 'sender', type: 'address' },
1176
+ { name: 'key', type: 'uint192' },
1177
+ ],
1178
+ name: 'getNonce',
1179
+ outputs: [{ name: 'nonce', type: 'uint256' }],
1180
+ stateMutability: 'view',
1181
+ type: 'function',
1182
+ },
1183
+ {
1184
+ inputs: [{ name: 'initCode', type: 'bytes' }],
1185
+ name: 'getSenderAddress',
1186
+ outputs: [],
1187
+ stateMutability: 'nonpayable',
1188
+ type: 'function',
1189
+ },
1190
+ {
1191
+ inputs: [
1192
+ {
1193
+ components: [
1194
+ { name: 'sender', type: 'address' },
1195
+ { name: 'nonce', type: 'uint256' },
1196
+ { name: 'initCode', type: 'bytes' },
1197
+ { name: 'callData', type: 'bytes' },
1198
+ {
1199
+ name: 'accountGasLimits',
1200
+ type: 'bytes32',
1201
+ },
1202
+ {
1203
+ name: 'preVerificationGas',
1204
+ type: 'uint256',
1205
+ },
1206
+ { name: 'gasFees', type: 'bytes32' },
1207
+ { name: 'paymasterAndData', type: 'bytes' },
1208
+ { name: 'signature', type: 'bytes' },
1209
+ ],
1210
+
1211
+ name: 'userOp',
1212
+ type: 'tuple',
1213
+ },
1214
+ ],
1215
+ name: 'getUserOpHash',
1216
+ outputs: [{ name: '', type: 'bytes32' }],
1217
+ stateMutability: 'view',
1218
+ type: 'function',
1219
+ },
1220
+ {
1221
+ inputs: [
1222
+ {
1223
+ components: [
1224
+ {
1225
+ components: [
1226
+ { name: 'sender', type: 'address' },
1227
+ { name: 'nonce', type: 'uint256' },
1228
+ { name: 'initCode', type: 'bytes' },
1229
+ { name: 'callData', type: 'bytes' },
1230
+ {
1231
+ name: 'accountGasLimits',
1232
+ type: 'bytes32',
1233
+ },
1234
+ {
1235
+ name: 'preVerificationGas',
1236
+ type: 'uint256',
1237
+ },
1238
+ { name: 'gasFees', type: 'bytes32' },
1239
+ {
1240
+ name: 'paymasterAndData',
1241
+ type: 'bytes',
1242
+ },
1243
+ { name: 'signature', type: 'bytes' },
1244
+ ],
1245
+
1246
+ name: 'userOps',
1247
+ type: 'tuple[]',
1248
+ },
1249
+ {
1250
+ name: 'aggregator',
1251
+ type: 'address',
1252
+ },
1253
+ { name: 'signature', type: 'bytes' },
1254
+ ],
1255
+
1256
+ name: 'opsPerAggregator',
1257
+ type: 'tuple[]',
1258
+ },
1259
+ { name: 'beneficiary', type: 'address' },
1260
+ ],
1261
+ name: 'handleAggregatedOps',
1262
+ outputs: [],
1263
+ stateMutability: 'nonpayable',
1264
+ type: 'function',
1265
+ },
1266
+ {
1267
+ inputs: [
1268
+ {
1269
+ components: [
1270
+ { name: 'sender', type: 'address' },
1271
+ { name: 'nonce', type: 'uint256' },
1272
+ { name: 'initCode', type: 'bytes' },
1273
+ { name: 'callData', type: 'bytes' },
1274
+ {
1275
+ name: 'accountGasLimits',
1276
+ type: 'bytes32',
1277
+ },
1278
+ {
1279
+ name: 'preVerificationGas',
1280
+ type: 'uint256',
1281
+ },
1282
+ { name: 'gasFees', type: 'bytes32' },
1283
+ { name: 'paymasterAndData', type: 'bytes' },
1284
+ { name: 'signature', type: 'bytes' },
1285
+ ],
1286
+
1287
+ name: 'ops',
1288
+ type: 'tuple[]',
1289
+ },
1290
+ { name: 'beneficiary', type: 'address' },
1291
+ ],
1292
+ name: 'handleOps',
1293
+ outputs: [],
1294
+ stateMutability: 'nonpayable',
1295
+ type: 'function',
1296
+ },
1297
+ {
1298
+ inputs: [{ name: 'key', type: 'uint192' }],
1299
+ name: 'incrementNonce',
1300
+ outputs: [],
1301
+ stateMutability: 'nonpayable',
1302
+ type: 'function',
1303
+ },
1304
+ {
1305
+ inputs: [
1306
+ { name: 'callData', type: 'bytes' },
1307
+ {
1308
+ components: [
1309
+ {
1310
+ components: [
1311
+ { name: 'sender', type: 'address' },
1312
+ { name: 'nonce', type: 'uint256' },
1313
+ {
1314
+ name: 'verificationGasLimit',
1315
+ type: 'uint256',
1316
+ },
1317
+ {
1318
+ name: 'callGasLimit',
1319
+ type: 'uint256',
1320
+ },
1321
+ {
1322
+ name: 'paymasterVerificationGasLimit',
1323
+ type: 'uint256',
1324
+ },
1325
+ {
1326
+ name: 'paymasterPostOpGasLimit',
1327
+ type: 'uint256',
1328
+ },
1329
+ {
1330
+ name: 'preVerificationGas',
1331
+ type: 'uint256',
1332
+ },
1333
+ { name: 'paymaster', type: 'address' },
1334
+ {
1335
+ name: 'maxFeePerGas',
1336
+ type: 'uint256',
1337
+ },
1338
+ {
1339
+ name: 'maxPriorityFeePerGas',
1340
+ type: 'uint256',
1341
+ },
1342
+ ],
1343
+
1344
+ name: 'mUserOp',
1345
+ type: 'tuple',
1346
+ },
1347
+ { name: 'userOpHash', type: 'bytes32' },
1348
+ { name: 'prefund', type: 'uint256' },
1349
+ { name: 'contextOffset', type: 'uint256' },
1350
+ { name: 'preOpGas', type: 'uint256' },
1351
+ ],
1352
+
1353
+ name: 'opInfo',
1354
+ type: 'tuple',
1355
+ },
1356
+ { name: 'context', type: 'bytes' },
1357
+ ],
1358
+ name: 'innerHandleOp',
1359
+ outputs: [{ name: 'actualGasCost', type: 'uint256' }],
1360
+ stateMutability: 'nonpayable',
1361
+ type: 'function',
1362
+ },
1363
+ {
1364
+ inputs: [
1365
+ { name: '', type: 'address' },
1366
+ { name: '', type: 'uint192' },
1367
+ ],
1368
+ name: 'nonceSequenceNumber',
1369
+ outputs: [{ name: '', type: 'uint256' }],
1370
+ stateMutability: 'view',
1371
+ type: 'function',
1372
+ },
1373
+ {
1374
+ inputs: [{ name: 'interfaceId', type: 'bytes4' }],
1375
+ name: 'supportsInterface',
1376
+ outputs: [{ name: '', type: 'bool' }],
1377
+ stateMutability: 'view',
1378
+ type: 'function',
1379
+ },
1380
+ {
1381
+ inputs: [],
1382
+ name: 'unlockStake',
1383
+ outputs: [],
1384
+ stateMutability: 'nonpayable',
1385
+ type: 'function',
1386
+ },
1387
+ {
1388
+ inputs: [
1389
+ {
1390
+ name: 'withdrawAddress',
1391
+ type: 'address',
1392
+ },
1393
+ ],
1394
+ name: 'withdrawStake',
1395
+ outputs: [],
1396
+ stateMutability: 'nonpayable',
1397
+ type: 'function',
1398
+ },
1399
+ {
1400
+ inputs: [
1401
+ {
1402
+ name: 'withdrawAddress',
1403
+ type: 'address',
1404
+ },
1405
+ { name: 'withdrawAmount', type: 'uint256' },
1406
+ ],
1407
+ name: 'withdrawTo',
1408
+ outputs: [],
1409
+ stateMutability: 'nonpayable',
1410
+ type: 'function',
1411
+ },
1412
+ { stateMutability: 'payable', type: 'receive' },
1413
+ ] as const
1414
+
1415
+ /** EntryPoint 0.6 address. */
1416
+ export const addressV06 = '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789' as const
1417
+
1418
+ /** EntryPoint 0.7 address. */
1419
+ export const addressV07 = '0x0000000071727De22E5E9d8BAf0edAc6f37da032' as const