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