@pimlico/alto 0.0.0-main.20240607T104359 → 0.0.0-staging.20240606T093925

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 (238) hide show
  1. package/lib/cli/index.d.ts +0 -1
  2. package/lib/cli/index.js +0 -1
  3. package/lib/cli/index.js.map +1 -1
  4. package/lib/executor/executor.js +0 -6
  5. package/lib/executor/executor.js.map +1 -1
  6. package/lib/executor/executorManager.js +0 -1
  7. package/lib/executor/executorManager.js.map +1 -1
  8. package/lib/executor/utils.js +1 -3
  9. package/lib/executor/utils.js.map +1 -1
  10. package/lib/index.d.ts +5 -1
  11. package/lib/index.js +120 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib/rpc/server.js +1 -2
  14. package/lib/rpc/server.js.map +1 -1
  15. package/lib/types/mempool.d.ts +1 -2
  16. package/package.json +67 -70
  17. package/esm/cli/alto.d.ts +0 -6
  18. package/esm/cli/alto.js +0 -92
  19. package/esm/cli/alto.js.map +0 -1
  20. package/esm/cli/config/bundler.d.ts +0 -391
  21. package/esm/cli/config/bundler.js +0 -132
  22. package/esm/cli/config/bundler.js.map +0 -1
  23. package/esm/cli/config/index.d.ts +0 -3
  24. package/esm/cli/config/index.js +0 -3
  25. package/esm/cli/config/index.js.map +0 -1
  26. package/esm/cli/config/options.d.ts +0 -11
  27. package/esm/cli/config/options.js +0 -336
  28. package/esm/cli/config/options.js.map +0 -1
  29. package/esm/cli/customTransport.d.ts +0 -14
  30. package/esm/cli/customTransport.js +0 -53
  31. package/esm/cli/customTransport.js.map +0 -1
  32. package/esm/cli/handler.d.ts +0 -3
  33. package/esm/cli/handler.js +0 -116
  34. package/esm/cli/handler.js.map +0 -1
  35. package/esm/cli/index.d.ts +0 -4
  36. package/esm/cli/index.js +0 -4
  37. package/esm/cli/index.js.map +0 -1
  38. package/esm/cli/instrumentation.d.ts +0 -2
  39. package/esm/cli/instrumentation.js +0 -39
  40. package/esm/cli/instrumentation.js.map +0 -1
  41. package/esm/cli/setupServer.d.ts +0 -17
  42. package/esm/cli/setupServer.js +0 -155
  43. package/esm/cli/setupServer.js.map +0 -1
  44. package/esm/cli/util.d.ts +0 -22
  45. package/esm/cli/util.js +0 -30
  46. package/esm/cli/util.js.map +0 -1
  47. package/esm/executor/executor.d.ts +0 -54
  48. package/esm/executor/executor.js +0 -643
  49. package/esm/executor/executor.js.map +0 -1
  50. package/esm/executor/executorManager.d.ts +0 -34
  51. package/esm/executor/executorManager.js +0 -402
  52. package/esm/executor/executorManager.js.map +0 -1
  53. package/esm/executor/index.d.ts +0 -5
  54. package/esm/executor/index.js +0 -5
  55. package/esm/executor/index.js.map +0 -1
  56. package/esm/executor/senderManager.d.ts +0 -17
  57. package/esm/executor/senderManager.js +0 -160
  58. package/esm/executor/senderManager.js.map +0 -1
  59. package/esm/executor/test/utils.d.ts +0 -13
  60. package/esm/executor/test/utils.js +0 -75
  61. package/esm/executor/test/utils.js.map +0 -1
  62. package/esm/executor/utils.d.ts +0 -32
  63. package/esm/executor/utils.js +0 -241
  64. package/esm/executor/utils.js.map +0 -1
  65. package/esm/index.d.ts +0 -2
  66. package/esm/index.js +0 -2
  67. package/esm/index.js.map +0 -1
  68. package/esm/mempool/index.d.ts +0 -5
  69. package/esm/mempool/index.js +0 -5
  70. package/esm/mempool/index.js.map +0 -1
  71. package/esm/mempool/mempool.d.ts +0 -64
  72. package/esm/mempool/mempool.js +0 -489
  73. package/esm/mempool/mempool.js.map +0 -1
  74. package/esm/mempool/monitoring.d.ts +0 -10
  75. package/esm/mempool/monitoring.js +0 -34
  76. package/esm/mempool/monitoring.js.map +0 -1
  77. package/esm/mempool/nullMempool.d.ts +0 -15
  78. package/esm/mempool/nullMempool.js +0 -36
  79. package/esm/mempool/nullMempool.js.map +0 -1
  80. package/esm/mempool/reputationManager.d.ts +0 -115
  81. package/esm/mempool/reputationManager.js +0 -397
  82. package/esm/mempool/reputationManager.js.map +0 -1
  83. package/esm/mempool/store.d.ts +0 -22
  84. package/esm/mempool/store.js +0 -123
  85. package/esm/mempool/store.js.map +0 -1
  86. package/esm/rpc/EntryPointSimulationsV07.d.ts +0 -58
  87. package/esm/rpc/EntryPointSimulationsV07.js +0 -407
  88. package/esm/rpc/EntryPointSimulationsV07.js.map +0 -1
  89. package/esm/rpc/ExecuteSimulator.d.ts +0 -37
  90. package/esm/rpc/ExecuteSimulator.js +0 -48
  91. package/esm/rpc/ExecuteSimulator.js.map +0 -1
  92. package/esm/rpc/gasEstimation.d.ts +0 -17
  93. package/esm/rpc/gasEstimation.js +0 -410
  94. package/esm/rpc/gasEstimation.js.map +0 -1
  95. package/esm/rpc/index.d.ts +0 -5
  96. package/esm/rpc/index.js +0 -5
  97. package/esm/rpc/index.js.map +0 -1
  98. package/esm/rpc/nonceQueuer.d.ts +0 -25
  99. package/esm/rpc/nonceQueuer.js +0 -135
  100. package/esm/rpc/nonceQueuer.js.map +0 -1
  101. package/esm/rpc/rpcHandler.d.ts +0 -64
  102. package/esm/rpc/rpcHandler.js +0 -727
  103. package/esm/rpc/rpcHandler.js.map +0 -1
  104. package/esm/rpc/server.d.ts +0 -31
  105. package/esm/rpc/server.js +0 -239
  106. package/esm/rpc/server.js.map +0 -1
  107. package/esm/rpc/validation/BundlerCollectorTracerV06.d.ts +0 -102
  108. package/esm/rpc/validation/BundlerCollectorTracerV06.js +0 -255
  109. package/esm/rpc/validation/BundlerCollectorTracerV06.js.map +0 -1
  110. package/esm/rpc/validation/BundlerCollectorTracerV07.d.ts +0 -102
  111. package/esm/rpc/validation/BundlerCollectorTracerV07.js +0 -254
  112. package/esm/rpc/validation/BundlerCollectorTracerV07.js.map +0 -1
  113. package/esm/rpc/validation/SafeValidator.d.ts +0 -35
  114. package/esm/rpc/validation/SafeValidator.js +0 -487
  115. package/esm/rpc/validation/SafeValidator.js.map +0 -1
  116. package/esm/rpc/validation/TracerResultParserV06.d.ts +0 -13
  117. package/esm/rpc/validation/TracerResultParserV06.js +0 -578
  118. package/esm/rpc/validation/TracerResultParserV06.js.map +0 -1
  119. package/esm/rpc/validation/TracerResultParserV07.d.ts +0 -33
  120. package/esm/rpc/validation/TracerResultParserV07.js +0 -557
  121. package/esm/rpc/validation/TracerResultParserV07.js.map +0 -1
  122. package/esm/rpc/validation/UnsafeValidator.d.ts +0 -63
  123. package/esm/rpc/validation/UnsafeValidator.js +0 -257
  124. package/esm/rpc/validation/UnsafeValidator.js.map +0 -1
  125. package/esm/rpc/validation/index.d.ts +0 -3
  126. package/esm/rpc/validation/index.js +0 -3
  127. package/esm/rpc/validation/index.js.map +0 -1
  128. package/esm/rpc/validation/tracer.d.ts +0 -122
  129. package/esm/rpc/validation/tracer.js +0 -82
  130. package/esm/rpc/validation/tracer.js.map +0 -1
  131. package/esm/types/contracts/BundleBulker.d.ts +0 -120
  132. package/esm/types/contracts/BundleBulker.js +0 -157
  133. package/esm/types/contracts/BundleBulker.js.map +0 -1
  134. package/esm/types/contracts/CallEngine.d.ts +0 -28
  135. package/esm/types/contracts/CallEngine.js +0 -37
  136. package/esm/types/contracts/CallEngine.js.map +0 -1
  137. package/esm/types/contracts/CodeHashGetter.d.ts +0 -37
  138. package/esm/types/contracts/CodeHashGetter.js +0 -45
  139. package/esm/types/contracts/CodeHashGetter.js.map +0 -1
  140. package/esm/types/contracts/EntryPoint.d.ts +0 -1789
  141. package/esm/types/contracts/EntryPoint.js +0 -2304
  142. package/esm/types/contracts/EntryPoint.js.map +0 -1
  143. package/esm/types/contracts/EntryPointSimulations.d.ts +0 -153
  144. package/esm/types/contracts/EntryPointSimulations.js +0 -15
  145. package/esm/types/contracts/EntryPointSimulations.js.map +0 -1
  146. package/esm/types/contracts/IOpInflator.d.ts +0 -61
  147. package/esm/types/contracts/IOpInflator.js +0 -80
  148. package/esm/types/contracts/IOpInflator.js.map +0 -1
  149. package/esm/types/contracts/IPaymaster.d.ts +0 -3
  150. package/esm/types/contracts/IPaymaster.js +0 -117
  151. package/esm/types/contracts/IPaymaster.js.map +0 -1
  152. package/esm/types/contracts/Inflator.d.ts +0 -65
  153. package/esm/types/contracts/Inflator.js +0 -84
  154. package/esm/types/contracts/Inflator.js.map +0 -1
  155. package/esm/types/contracts/PerOpInflator.d.ts +0 -176
  156. package/esm/types/contracts/PerOpInflator.js +0 -229
  157. package/esm/types/contracts/PerOpInflator.js.map +0 -1
  158. package/esm/types/contracts/PimlicoEntryPointSimulations.d.ts +0 -23
  159. package/esm/types/contracts/PimlicoEntryPointSimulations.js +0 -33
  160. package/esm/types/contracts/PimlicoEntryPointSimulations.js.map +0 -1
  161. package/esm/types/contracts/SenderCreator.d.ts +0 -4
  162. package/esm/types/contracts/SenderCreator.js +0 -23
  163. package/esm/types/contracts/SenderCreator.js.map +0 -1
  164. package/esm/types/contracts/SimpleAccountFactory.d.ts +0 -57
  165. package/esm/types/contracts/SimpleAccountFactory.js +0 -76
  166. package/esm/types/contracts/SimpleAccountFactory.js.map +0 -1
  167. package/esm/types/contracts/TestOpcodesAccount.d.ts +0 -4
  168. package/esm/types/contracts/TestOpcodesAccount.js +0 -281
  169. package/esm/types/contracts/TestOpcodesAccount.js.map +0 -1
  170. package/esm/types/contracts/TestOpcodesAccountFactory.d.ts +0 -4
  171. package/esm/types/contracts/TestOpcodesAccountFactory.js +0 -23
  172. package/esm/types/contracts/TestOpcodesAccountFactory.js.map +0 -1
  173. package/esm/types/contracts/TestStorageAccount.d.ts +0 -4
  174. package/esm/types/contracts/TestStorageAccount.js +0 -313
  175. package/esm/types/contracts/TestStorageAccount.js.map +0 -1
  176. package/esm/types/contracts/index.d.ts +0 -17
  177. package/esm/types/contracts/index.js +0 -17
  178. package/esm/types/contracts/index.js.map +0 -1
  179. package/esm/types/gasPrice.d.ts +0 -110
  180. package/esm/types/gasPrice.js +0 -52
  181. package/esm/types/gasPrice.js.map +0 -1
  182. package/esm/types/index.d.ts +0 -11
  183. package/esm/types/index.js +0 -11
  184. package/esm/types/index.js.map +0 -1
  185. package/esm/types/interfaces.d.ts +0 -26
  186. package/esm/types/interfaces.js +0 -2
  187. package/esm/types/interfaces.js.map +0 -1
  188. package/esm/types/mempool.d.ts +0 -79
  189. package/esm/types/mempool.js +0 -16
  190. package/esm/types/mempool.js.map +0 -1
  191. package/esm/types/schemas.d.ts +0 -4791
  192. package/esm/types/schemas.js +0 -497
  193. package/esm/types/schemas.js.map +0 -1
  194. package/esm/types/test/validationTestErrors.d.ts +0 -3
  195. package/esm/types/test/validationTestErrors.js +0 -229
  196. package/esm/types/test/validationTestErrors.js.map +0 -1
  197. package/esm/types/utils.d.ts +0 -24
  198. package/esm/types/utils.js +0 -30
  199. package/esm/types/utils.js.map +0 -1
  200. package/esm/types/validation.d.ts +0 -14327
  201. package/esm/types/validation.js +0 -304
  202. package/esm/types/validation.js.map +0 -1
  203. package/esm/utils/bigInt.d.ts +0 -3
  204. package/esm/utils/bigInt.js +0 -9
  205. package/esm/utils/bigInt.js.map +0 -1
  206. package/esm/utils/compressionHandler.d.ts +0 -11
  207. package/esm/utils/compressionHandler.js +0 -39
  208. package/esm/utils/compressionHandler.js.map +0 -1
  209. package/esm/utils/gasPriceManager.d.ts +0 -34
  210. package/esm/utils/gasPriceManager.js +0 -338
  211. package/esm/utils/gasPriceManager.js.map +0 -1
  212. package/esm/utils/helpers.d.ts +0 -4
  213. package/esm/utils/helpers.js +0 -13
  214. package/esm/utils/helpers.js.map +0 -1
  215. package/esm/utils/index.d.ts +0 -11
  216. package/esm/utils/index.js +0 -10
  217. package/esm/utils/index.js.map +0 -1
  218. package/esm/utils/logger.d.ts +0 -6
  219. package/esm/utils/logger.js +0 -76
  220. package/esm/utils/logger.js.map +0 -1
  221. package/esm/utils/metrics.d.ts +0 -22
  222. package/esm/utils/metrics.js +0 -150
  223. package/esm/utils/metrics.js.map +0 -1
  224. package/esm/utils/rpc-reply.d.ts +0 -17
  225. package/esm/utils/rpc-reply.js +0 -41
  226. package/esm/utils/rpc-reply.js.map +0 -1
  227. package/esm/utils/test.d.ts +0 -17
  228. package/esm/utils/test.js +0 -130
  229. package/esm/utils/test.js.map +0 -1
  230. package/esm/utils/userop.d.ts +0 -49
  231. package/esm/utils/userop.js +0 -408
  232. package/esm/utils/userop.js.map +0 -1
  233. package/esm/utils/validation.d.ts +0 -65
  234. package/esm/utils/validation.js +0 -461
  235. package/esm/utils/validation.js.map +0 -1
  236. package/lib/cli/alto.d.ts +0 -6
  237. package/lib/cli/alto.js +0 -123
  238. package/lib/cli/alto.js.map +0 -1
@@ -1,123 +0,0 @@
1
- export class MemoryStore {
2
- // private monitoredTransactions: Map<HexData32, TransactionInfo> = new Map() // tx hash to info
3
- outstandingUserOperations = [];
4
- processingUserOperations = [];
5
- submittedUserOperations = [];
6
- logger;
7
- metrics;
8
- constructor(logger, metrics) {
9
- this.logger = logger;
10
- this.metrics = metrics;
11
- }
12
- addOutstanding(op) {
13
- const store = this.outstandingUserOperations;
14
- store.push(op);
15
- this.logger.debug({ userOpHash: op.userOperationHash, store: "outstanding" }, "added user op to mempool");
16
- this.metrics.userOperationsInMempool
17
- .labels({
18
- status: "outstanding"
19
- })
20
- .inc();
21
- }
22
- addProcessing(op) {
23
- const store = this.processingUserOperations;
24
- store.push(op);
25
- this.logger.debug({ userOpHash: op.userOperationHash, store: "processing" }, "added user op to mempool");
26
- this.metrics.userOperationsInMempool
27
- .labels({
28
- status: "processing"
29
- })
30
- .inc();
31
- }
32
- addSubmitted(op) {
33
- const store = this.submittedUserOperations;
34
- store.push(op);
35
- this.logger.debug({
36
- userOpHash: op.userOperation.userOperationHash,
37
- store: "submitted"
38
- }, "added user op to submitted mempool");
39
- this.metrics.userOperationsInMempool
40
- .labels({
41
- status: "submitted"
42
- })
43
- .inc();
44
- }
45
- removeOutstanding(userOpHash) {
46
- const index = this.outstandingUserOperations.findIndex((op) => op.userOperationHash === userOpHash);
47
- if (index === -1) {
48
- this.logger.warn({ userOpHash, store: "outstanding" }, "tried to remove non-existent user op from mempool");
49
- return;
50
- }
51
- this.outstandingUserOperations.splice(index, 1);
52
- this.logger.debug({ userOpHash, store: "outstanding" }, "removed user op from mempool");
53
- this.metrics.userOperationsInMempool
54
- .labels({
55
- status: "outstanding"
56
- })
57
- .dec();
58
- }
59
- removeProcessing(userOpHash) {
60
- const index = this.processingUserOperations.findIndex((op) => op.userOperationHash === userOpHash);
61
- if (index === -1) {
62
- this.logger.warn({ userOpHash, store: "outstanding" }, "tried to remove non-existent user op from mempool");
63
- return;
64
- }
65
- this.processingUserOperations.splice(index, 1);
66
- this.logger.debug({ userOpHash, store: "processing" }, "removed user op from mempool");
67
- this.metrics.userOperationsInMempool
68
- .labels({
69
- status: "processing"
70
- })
71
- .dec();
72
- }
73
- removeSubmitted(userOpHash) {
74
- const index = this.submittedUserOperations.findIndex((op) => op.userOperation.userOperationHash === userOpHash);
75
- if (index === -1) {
76
- this.logger.warn({ userOpHash, store: "submitted" }, "tried to remove non-existent user op from mempool");
77
- return;
78
- }
79
- this.submittedUserOperations.splice(index, 1);
80
- this.logger.debug({ userOpHash, store: "submitted" }, "removed user op from mempool");
81
- this.metrics.userOperationsInMempool
82
- .labels({
83
- status: "submitted"
84
- })
85
- .dec();
86
- }
87
- dumpOutstanding() {
88
- this.logger.trace({
89
- store: "outstanding",
90
- length: this.outstandingUserOperations.length
91
- }, "dumping mempool");
92
- return this.outstandingUserOperations;
93
- }
94
- dumpProcessing() {
95
- this.logger.trace({
96
- store: "processing",
97
- length: this.processingUserOperations.length
98
- }, "dumping mempool");
99
- return this.processingUserOperations;
100
- }
101
- dumpSubmitted() {
102
- this.logger.trace({ store: "submitted", length: this.submittedUserOperations.length }, "dumping mempool");
103
- return this.submittedUserOperations;
104
- }
105
- clear(from) {
106
- if (from === "outstanding") {
107
- this.outstandingUserOperations = [];
108
- this.logger.debug({ store: from, length: this.outstandingUserOperations.length }, "clearing mempool");
109
- }
110
- else if (from === "processing") {
111
- this.processingUserOperations = [];
112
- this.logger.debug({ store: from, length: this.processingUserOperations.length }, "clearing mempool");
113
- }
114
- else if (from === "submitted") {
115
- this.submittedUserOperations = [];
116
- this.logger.debug({ store: from, length: this.submittedUserOperations.length }, "clearing mempool");
117
- }
118
- else {
119
- throw new Error("unreachable");
120
- }
121
- }
122
- }
123
- //# sourceMappingURL=store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../mempool/store.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,WAAW;IACpB,gGAAgG;IACxF,yBAAyB,GAAwB,EAAE,CAAA;IACnD,wBAAwB,GAAwB,EAAE,CAAA;IAClD,uBAAuB,GAA6B,EAAE,CAAA;IAEtD,MAAM,CAAQ;IACd,OAAO,CAAS;IAExB,YAAY,MAAc,EAAE,OAAgB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;IAED,cAAc,CAAC,EAAqB;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,yBAAyB,CAAA;QAE5C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACd,IAAI,CAAC,MAAM,CAAC,KAAK,CACb,EAAE,UAAU,EAAE,EAAE,CAAC,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,EAC1D,0BAA0B,CAC7B,CAAA;QACD,IAAI,CAAC,OAAO,CAAC,uBAAuB;aAC/B,MAAM,CAAC;YACJ,MAAM,EAAE,aAAa;SACxB,CAAC;aACD,GAAG,EAAE,CAAA;IACd,CAAC;IAED,aAAa,CAAC,EAAqB;QAC/B,MAAM,KAAK,GAAG,IAAI,CAAC,wBAAwB,CAAA;QAE3C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACd,IAAI,CAAC,MAAM,CAAC,KAAK,CACb,EAAE,UAAU,EAAE,EAAE,CAAC,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAE,EACzD,0BAA0B,CAC7B,CAAA;QACD,IAAI,CAAC,OAAO,CAAC,uBAAuB;aAC/B,MAAM,CAAC;YACJ,MAAM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AAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,uBAAuB,CAAC,MAAM,EAAE,EAC5D,kBAAkB,CACrB,CAAA;QACL,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;QAClC,CAAC;IACL,CAAC;CACJ"}
@@ -1,58 +0,0 @@
1
- import type { Hex } from "viem";
2
- import { type Address, type PublicClient } from "viem";
3
- import { ExecutionErrors, ValidationErrors, type StateOverrides, type UserOperationV07 } from "../types/index.js";
4
- export declare function parseFailedOpWithRevert(data: Hex): string;
5
- export declare function simulateHandleOp(userOperation: UserOperationV07, entryPoint: Address, publicClient: PublicClient, replacedEntryPoint: boolean, targetAddress: Address, targetCallData: Hex, entryPointSimulationsAddress: Address, stateOverride?: StateOverrides): Promise<{
6
- readonly result: "failed";
7
- readonly data: string;
8
- readonly code: ExecutionErrors;
9
- } | {
10
- readonly result: "failed";
11
- readonly data: unknown;
12
- readonly code: ValidationErrors.SimulateValidation;
13
- } | {
14
- readonly result: "execution";
15
- readonly data: {
16
- preOpGas: bigint;
17
- paid: bigint;
18
- validationData: bigint;
19
- paymasterValidationData: bigint;
20
- targetSuccess: boolean;
21
- targetResult: `0x${string}`;
22
- };
23
- readonly code?: undefined;
24
- }>;
25
- export declare function simulateValidation(userOperation: UserOperationV07, queuedUserOperations: UserOperationV07[], entryPoint: Address, publicClient: PublicClient, entryPointSimulationsAddress: Address): Promise<{
26
- simulateValidationResult: {
27
- status: "validation" | "failed";
28
- data: string | {
29
- returnInfo: {
30
- preOpGas: bigint;
31
- prefund: bigint;
32
- paymasterContext: `0x${string}`;
33
- accountValidationData: bigint;
34
- paymasterValidationData: bigint;
35
- accountSigFailed?: boolean | undefined;
36
- paymasterSigFailed?: boolean | undefined;
37
- validAfter?: number | undefined;
38
- validUntil?: number | undefined;
39
- };
40
- senderInfo: {
41
- stake: bigint;
42
- unstakeDelaySec: bigint;
43
- addr?: string | undefined;
44
- };
45
- factoryInfo: {
46
- stake: bigint;
47
- unstakeDelaySec: bigint;
48
- addr?: string | undefined;
49
- } | undefined;
50
- paymasterInfo: {
51
- stake: bigint;
52
- unstakeDelaySec: bigint;
53
- addr?: string | undefined;
54
- } | undefined;
55
- };
56
- };
57
- }>;
58
- //# sourceMappingURL=EntryPointSimulationsV07.d.ts.map
@@ -1,407 +0,0 @@
1
- import { decodeErrorResult, encodeFunctionData, toHex, decodeAbiParameters } from "viem";
2
- import { ExecuteSimulatorDeployedBytecode } from "./ExecuteSimulator.js";
3
- import { EntryPointV07Abi, EntryPointV07SimulationsAbi, ExecutionErrors, ValidationErrors, PimlicoEntryPointSimulationsAbi } from "../types/index.js";
4
- import { deepHexlify, toPackedUserOperation } from "../utils/index.js";
5
- const panicCodes = {
6
- // from https://docs.soliditylang.org/en/v0.8.0/control-structures.html
7
- 1: "assert(false)",
8
- 17: "arithmetic overflow/underflow",
9
- 18: "divide by zero",
10
- 33: "invalid enum value",
11
- 34: "storage byte array that is incorrectly encoded",
12
- 49: ".pop() on an empty array.",
13
- 50: "array sout-of-bounds or negative index",
14
- 65: "memory overflow",
15
- 81: "zero-initialized variable of internal function type"
16
- };
17
- export function parseFailedOpWithRevert(data) {
18
- const methodSig = data.slice(0, 10);
19
- const dataParams = `0x${data.slice(10)}`;
20
- if (methodSig === "0x08c379a0") {
21
- const [err] = decodeAbiParameters([
22
- {
23
- name: "err",
24
- type: "string"
25
- }
26
- ], dataParams);
27
- return err;
28
- }
29
- if (methodSig === "0x4e487b71") {
30
- const [code] = decodeAbiParameters([
31
- {
32
- name: "err",
33
- type: "uint256"
34
- }
35
- ], dataParams);
36
- return panicCodes[Number(code)] ?? `${code}`;
37
- }
38
- return data;
39
- }
40
- function getStateOverrides({ userOperation, entryPoint, replacedEntryPoint, stateOverride = {} }) {
41
- return replacedEntryPoint
42
- ? {
43
- ...stateOverride,
44
- [userOperation.sender]: {
45
- balance: toHex(100000000000000000000000n),
46
- ...(stateOverride
47
- ? deepHexlify(stateOverride?.[userOperation.sender])
48
- : [])
49
- },
50
- [entryPoint]: {
51
- code: ExecuteSimulatorDeployedBytecode
52
- }
53
- }
54
- : {
55
- ...stateOverride,
56
- [userOperation.sender]: {
57
- balance: toHex(100000000000000000000000n),
58
- ...(stateOverride
59
- ? deepHexlify(stateOverride?.[userOperation.sender])
60
- : [])
61
- }
62
- };
63
- }
64
- function validateTargetCallDataResult(data) {
65
- const decodedDelegateAndError = decodeErrorResult({
66
- abi: EntryPointV07Abi,
67
- data: data
68
- });
69
- if (!decodedDelegateAndError?.args?.[1]) {
70
- throw new Error("Unexpected error");
71
- }
72
- try {
73
- const decodedError = decodeErrorResult({
74
- abi: EntryPointV07SimulationsAbi,
75
- data: decodedDelegateAndError.args[1]
76
- });
77
- if (decodedError?.args) {
78
- const targetSuccess = decodedError?.args[0];
79
- const targetResult = decodedError?.args[1];
80
- if (!targetSuccess) {
81
- return {
82
- result: "failed",
83
- data: parseFailedOpWithRevert(targetResult),
84
- code: ExecutionErrors.UserOperationReverted
85
- };
86
- }
87
- return {
88
- result: "success"
89
- };
90
- }
91
- return {
92
- result: "failed",
93
- data: "Unknown error, could not parse target call data result.",
94
- code: ExecutionErrors.UserOperationReverted
95
- };
96
- }
97
- catch (e) {
98
- // no error we go the result
99
- return {
100
- result: "failed",
101
- data: "Unknown error, could not parse target call data result.",
102
- code: ExecutionErrors.UserOperationReverted
103
- };
104
- }
105
- }
106
- function getSimulateHandleOpResult(data) {
107
- const decodedDelegateAndError = decodeErrorResult({
108
- abi: EntryPointV07Abi,
109
- data: data
110
- });
111
- if (!decodedDelegateAndError?.args?.[1]) {
112
- throw new Error("Unexpected error");
113
- }
114
- try {
115
- const decodedError = decodeErrorResult({
116
- abi: EntryPointV07SimulationsAbi,
117
- data: decodedDelegateAndError.args[1]
118
- });
119
- if (decodedError &&
120
- decodedError.errorName === "FailedOp" &&
121
- decodedError.args) {
122
- return {
123
- result: "failed",
124
- data: decodedError.args[1],
125
- code: ValidationErrors.SimulateValidation
126
- };
127
- }
128
- if (decodedError &&
129
- decodedError.errorName === "FailedOpWithRevert" &&
130
- decodedError.args) {
131
- return {
132
- result: "failed",
133
- data: parseFailedOpWithRevert(decodedError.args?.[2]),
134
- code: ValidationErrors.SimulateValidation
135
- };
136
- }
137
- }
138
- catch {
139
- // no error we go the result
140
- const decodedResult = decodeAbiParameters([
141
- {
142
- components: [
143
- {
144
- internalType: "uint256",
145
- name: "preOpGas",
146
- type: "uint256"
147
- },
148
- {
149
- internalType: "uint256",
150
- name: "paid",
151
- type: "uint256"
152
- },
153
- {
154
- internalType: "uint256",
155
- name: "validationData",
156
- type: "uint256"
157
- },
158
- {
159
- internalType: "uint256",
160
- name: "paymasterValidationData",
161
- type: "uint256"
162
- },
163
- {
164
- internalType: "bool",
165
- name: "targetSuccess",
166
- type: "bool"
167
- },
168
- {
169
- internalType: "bytes",
170
- name: "targetResult",
171
- type: "bytes"
172
- }
173
- ],
174
- internalType: "struct IEntryPointSimulations.ExecutionResult",
175
- name: "",
176
- type: "tuple"
177
- }
178
- ], decodedDelegateAndError.args[1])[0];
179
- return {
180
- result: "execution",
181
- data: decodedResult
182
- };
183
- }
184
- throw new Error("Unexpected error");
185
- }
186
- async function callPimlicoEntryPointSimulations(publicClient, entryPoint, entryPointSimulationsCallData, entryPointSimulationsAddress, stateOverride) {
187
- const callData = encodeFunctionData({
188
- abi: PimlicoEntryPointSimulationsAbi,
189
- functionName: "simulateEntryPoint",
190
- args: [entryPoint, entryPointSimulationsCallData]
191
- });
192
- const result = (await publicClient.request({
193
- method: "eth_call",
194
- params: [
195
- {
196
- to: entryPointSimulationsAddress,
197
- data: callData
198
- },
199
- "latest",
200
- // @ts-ignore
201
- stateOverride
202
- ]
203
- }));
204
- const returnBytes = decodeAbiParameters([{ name: "ret", type: "bytes[]" }], result);
205
- return returnBytes[0];
206
- }
207
- export async function simulateHandleOp(userOperation, entryPoint, publicClient, replacedEntryPoint, targetAddress, targetCallData, entryPointSimulationsAddress, stateOverride = {}) {
208
- const finalParam = getStateOverrides({
209
- userOperation,
210
- entryPoint,
211
- replacedEntryPoint,
212
- stateOverride
213
- });
214
- const packedUserOperation = toPackedUserOperation(userOperation);
215
- const entryPointSimulationsSimulateHandleOpCallData = encodeFunctionData({
216
- abi: EntryPointV07SimulationsAbi,
217
- functionName: "simulateHandleOp",
218
- args: [packedUserOperation]
219
- });
220
- const entryPointSimulationsSimulateTargetCallData = encodeFunctionData({
221
- abi: EntryPointV07SimulationsAbi,
222
- functionName: "simulateCallData",
223
- args: [packedUserOperation, targetAddress, targetCallData]
224
- });
225
- const cause = await callPimlicoEntryPointSimulations(publicClient, entryPoint, [
226
- entryPointSimulationsSimulateHandleOpCallData,
227
- entryPointSimulationsSimulateTargetCallData
228
- ], entryPointSimulationsAddress, finalParam);
229
- const targetCallValidationResult = validateTargetCallDataResult(cause[1]);
230
- if (targetCallValidationResult.result === "failed") {
231
- return targetCallValidationResult;
232
- }
233
- return getSimulateHandleOpResult(cause[0]);
234
- }
235
- function getSimulateValidationResult(errorData) {
236
- const decodedDelegateAndError = decodeErrorResult({
237
- abi: EntryPointV07Abi,
238
- data: errorData
239
- });
240
- if (!decodedDelegateAndError?.args?.[1]) {
241
- throw new Error("Unexpected error");
242
- }
243
- try {
244
- const decodedError = decodeErrorResult({
245
- abi: EntryPointV07SimulationsAbi,
246
- data: decodedDelegateAndError.args[1]
247
- });
248
- if (decodedError &&
249
- decodedError.errorName === "FailedOp" &&
250
- decodedError.args) {
251
- return {
252
- status: "failed",
253
- data: decodedError.args[1]
254
- };
255
- }
256
- if (decodedError &&
257
- decodedError.errorName === "FailedOpWithRevert" &&
258
- decodedError.args) {
259
- return {
260
- status: "failed",
261
- data: `${decodedError.args?.[1]} - ${parseFailedOpWithRevert(decodedError.args?.[2])}`
262
- };
263
- }
264
- }
265
- catch {
266
- const decodedResult = decodeAbiParameters([
267
- {
268
- components: [
269
- {
270
- components: [
271
- {
272
- internalType: "uint256",
273
- name: "preOpGas",
274
- type: "uint256"
275
- },
276
- {
277
- internalType: "uint256",
278
- name: "prefund",
279
- type: "uint256"
280
- },
281
- {
282
- internalType: "uint256",
283
- name: "accountValidationData",
284
- type: "uint256"
285
- },
286
- {
287
- internalType: "uint256",
288
- name: "paymasterValidationData",
289
- type: "uint256"
290
- },
291
- {
292
- internalType: "bytes",
293
- name: "paymasterContext",
294
- type: "bytes"
295
- }
296
- ],
297
- internalType: "struct IEntryPoint.ReturnInfo",
298
- name: "returnInfo",
299
- type: "tuple"
300
- },
301
- {
302
- components: [
303
- {
304
- internalType: "uint256",
305
- name: "stake",
306
- type: "uint256"
307
- },
308
- {
309
- internalType: "uint256",
310
- name: "unstakeDelaySec",
311
- type: "uint256"
312
- }
313
- ],
314
- internalType: "struct IStakeManager.StakeInfo",
315
- name: "senderInfo",
316
- type: "tuple"
317
- },
318
- {
319
- components: [
320
- {
321
- internalType: "uint256",
322
- name: "stake",
323
- type: "uint256"
324
- },
325
- {
326
- internalType: "uint256",
327
- name: "unstakeDelaySec",
328
- type: "uint256"
329
- }
330
- ],
331
- internalType: "struct IStakeManager.StakeInfo",
332
- name: "factoryInfo",
333
- type: "tuple"
334
- },
335
- {
336
- components: [
337
- {
338
- internalType: "uint256",
339
- name: "stake",
340
- type: "uint256"
341
- },
342
- {
343
- internalType: "uint256",
344
- name: "unstakeDelaySec",
345
- type: "uint256"
346
- }
347
- ],
348
- internalType: "struct IStakeManager.StakeInfo",
349
- name: "paymasterInfo",
350
- type: "tuple"
351
- },
352
- {
353
- components: [
354
- {
355
- internalType: "address",
356
- name: "aggregator",
357
- type: "address"
358
- },
359
- {
360
- components: [
361
- {
362
- internalType: "uint256",
363
- name: "stake",
364
- type: "uint256"
365
- },
366
- {
367
- internalType: "uint256",
368
- name: "unstakeDelaySec",
369
- type: "uint256"
370
- }
371
- ],
372
- internalType: "struct IStakeManager.StakeInfo",
373
- name: "stakeInfo",
374
- type: "tuple"
375
- }
376
- ],
377
- internalType: "struct IEntryPoint.AggregatorStakeInfo",
378
- name: "aggregatorInfo",
379
- type: "tuple"
380
- }
381
- ],
382
- internalType: "struct IEntryPointSimulations.ValidationResult",
383
- name: "",
384
- type: "tuple"
385
- }
386
- ], decodedDelegateAndError.args[1])[0];
387
- return {
388
- status: "validation",
389
- data: decodedResult
390
- };
391
- }
392
- throw new Error("Unexpected error - errorName is not ValidationResult or ValidationResultWithAggregation");
393
- }
394
- export async function simulateValidation(userOperation, queuedUserOperations, entryPoint, publicClient, entryPointSimulationsAddress) {
395
- const userOperations = [...queuedUserOperations, userOperation];
396
- const packedUserOperations = userOperations.map(uo => toPackedUserOperation(uo));
397
- const entryPointSimulationsCallData = encodeFunctionData({
398
- abi: EntryPointV07SimulationsAbi,
399
- functionName: "simulateValidationLast",
400
- args: [packedUserOperations]
401
- });
402
- const errorResult = await callPimlicoEntryPointSimulations(publicClient, entryPoint, [entryPointSimulationsCallData], entryPointSimulationsAddress);
403
- return {
404
- simulateValidationResult: getSimulateValidationResult(errorResult[0])
405
- };
406
- }
407
- //# sourceMappingURL=EntryPointSimulationsV07.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntryPointSimulationsV07.js","sourceRoot":"","sources":["../../rpc/EntryPointSimulationsV07.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,EACL,mBAAmB,EACtB,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAA;AACrE,OAAO,EACH,gBAAgB,EAChB,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,EAGhB,+BAA+B,EAElC,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEhE,MAAM,UAAU,GAA8B;IAC1C,uEAAuE;IACvE,CAAC,EAAE,eAAe;IAClB,EAAE,EAAE,+BAA+B;IACnC,EAAE,EAAE,gBAAgB;IACpB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,g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