@pimlico/alto 0.0.19 → 0.0.21

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 (357) hide show
  1. package/contracts/EIP712.sol/EIP712.json +1 -1
  2. package/contracts/ERC165.sol/ERC165.json +1 -1
  3. package/contracts/ERC20.sol/ERC20.json +1 -1
  4. package/contracts/Eip7702Support.sol/Eip7702Support.json +1 -1
  5. package/contracts/EntryPoint.sol/EntryPoint.json +1 -1
  6. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
  7. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
  8. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
  9. package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
  10. package/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
  11. package/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
  12. package/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
  13. package/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
  14. package/contracts/Exec.sol/Exec.json +1 -1
  15. package/contracts/IAccount.sol/IAccount.json +1 -1
  16. package/contracts/IAccountExecute.sol/IAccountExecute.json +1 -1
  17. package/contracts/IAggregator.sol/IAggregator.json +1 -1
  18. package/contracts/IERC165.sol/IERC165.json +1 -1
  19. package/contracts/IERC5267.sol/IERC5267.json +1 -1
  20. package/contracts/IEntryPoint.sol/IEntryPoint.json +1 -1
  21. package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride08.json +1 -0
  22. package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride09.json +1 -0
  23. package/contracts/IEntryPointSimulations.sol/IEntryPointSimulations.json +1 -1
  24. package/contracts/INonceManager.sol/INonceManager.json +1 -1
  25. package/contracts/IPaymaster.sol/IPaymaster.json +1 -1
  26. package/contracts/ISenderCreator.sol/ISenderCreator.json +1 -1
  27. package/contracts/IStakeManager.sol/IStakeManager.json +1 -1
  28. package/contracts/LibBytes.sol/LibBytes.json +1 -1
  29. package/contracts/Math.sol/Math.json +1 -1
  30. package/contracts/MessageHashUtils.sol/MessageHashUtils.json +1 -1
  31. package/contracts/NonceManager.sol/NonceManager.json +1 -1
  32. package/contracts/Panic.sol/Panic.json +1 -1
  33. package/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
  34. package/contracts/ReentrancyGuard.sol/ReentrancyGuard.json +1 -1
  35. package/contracts/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +1 -1
  36. package/contracts/SafeCast.sol/SafeCast.json +1 -1
  37. package/contracts/SenderCreator.sol/SenderCreator.json +1 -1
  38. package/contracts/ShortStrings.sol/ShortStrings.json +1 -1
  39. package/contracts/SignedMath.sol/SignedMath.json +1 -1
  40. package/contracts/SimulationOverrideHelper.sol/SimulationOverrideHelper.json +1 -0
  41. package/contracts/StakeManager.sol/StakeManager.json +1 -1
  42. package/contracts/StorageSlot.sol/StorageSlot.json +1 -1
  43. package/contracts/Strings.sol/Strings.json +1 -1
  44. package/contracts/TransientSlot.sol/TransientSlot.json +1 -1
  45. package/contracts/UserOperation.sol/UserOperationLib.json +1 -1
  46. package/contracts/UserOperationLib.sol/UserOperationLib.json +1 -1
  47. package/contracts/account-abstraction-v9/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -0
  48. package/contracts/account-abstraction-v9/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -0
  49. package/contracts/account-abstraction-v9/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -0
  50. package/contracts/account-abstraction-v9/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -0
  51. package/contracts/build-info/{880955d5786bfdae.json → 031b289b93191224.json} +1 -1
  52. package/contracts/build-info/181f3522c3744403.json +1 -0
  53. package/contracts/build-info/a2db592afab5c9de.json +1 -0
  54. package/contracts/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -1
  55. package/contracts/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -1
  56. package/contracts/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -1
  57. package/contracts/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -1
  58. package/contracts/core/Eip7702Support.sol/Eip7702Support.json +1 -0
  59. package/contracts/core/NonceManager.sol/NonceManager.json +1 -0
  60. package/contracts/core/SenderCreator.sol/SenderCreator.json +1 -0
  61. package/contracts/core/StakeManager.sol/StakeManager.json +1 -0
  62. package/contracts/core/UserOperationLib.sol/UserOperationLib.json +1 -0
  63. package/contracts/interfaces/IAccount.sol/IAccount.json +1 -0
  64. package/contracts/interfaces/IAccountExecute.sol/IAccountExecute.json +1 -0
  65. package/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -1
  66. package/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -1
  67. package/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -1
  68. package/contracts/interfaces/IPaymaster.sol/IPaymaster.json +1 -0
  69. package/contracts/interfaces/ISenderCreator.sol/ISenderCreator.json +1 -0
  70. package/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -1
  71. package/contracts/overrides/Eip7702Support.sol/Eip7702Support.json +1 -0
  72. package/contracts/overrides/NonceManager.sol/NonceManager.json +1 -0
  73. package/contracts/overrides/SenderCreator.sol/SenderCreator.json +1 -0
  74. package/contracts/overrides/StakeManager.sol/StakeManager.json +1 -0
  75. package/contracts/overrides/UserOperationLib.sol/UserOperationLib.json +1 -0
  76. package/contracts/utils/Exec.sol/Exec.json +1 -1
  77. package/contracts/utils/StorageSlot.sol/StorageSlot.json +1 -0
  78. package/contracts/v09/EntryPoint.sol/EntryPoint.json +1 -0
  79. package/esm/cli/alto.js +17 -6
  80. package/esm/cli/alto.js.map +1 -1
  81. package/esm/cli/config/bundler.d.ts +459 -321
  82. package/esm/cli/config/bundler.js +125 -91
  83. package/esm/cli/config/bundler.js.map +1 -1
  84. package/esm/cli/config/options.d.ts +4 -1
  85. package/esm/cli/config/options.js +233 -106
  86. package/esm/cli/config/options.js.map +1 -1
  87. package/esm/cli/customTransport.d.ts +3 -3
  88. package/esm/cli/deploySimulationsContract.d.ts +1 -0
  89. package/esm/cli/deploySimulationsContract.js +41 -5
  90. package/esm/cli/deploySimulationsContract.js.map +1 -1
  91. package/esm/cli/handler.js +76 -80
  92. package/esm/cli/handler.js.map +1 -1
  93. package/esm/cli/multiRpcTransport.d.ts +7 -0
  94. package/esm/cli/multiRpcTransport.js +52 -0
  95. package/esm/cli/multiRpcTransport.js.map +1 -0
  96. package/esm/cli/setupServer.js +92 -70
  97. package/esm/cli/setupServer.js.map +1 -1
  98. package/esm/cli/shutDown.d.ts +20 -0
  99. package/esm/cli/shutDown.js +285 -0
  100. package/esm/cli/shutDown.js.map +1 -0
  101. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
  102. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
  103. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
  104. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
  105. package/esm/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
  106. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
  107. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
  108. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
  109. package/esm/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
  110. package/esm/createConfig.d.ts +9 -2
  111. package/esm/createConfig.js.map +1 -1
  112. package/esm/executor/{userOpMonitor.d.ts → bundleManager.d.ts} +56 -37
  113. package/esm/executor/bundleManager.js +393 -0
  114. package/esm/executor/bundleManager.js.map +1 -0
  115. package/esm/executor/executor.d.ts +4 -3
  116. package/esm/executor/executor.js +47 -23
  117. package/esm/executor/executor.js.map +1 -1
  118. package/esm/executor/executorManager.d.ts +20 -15
  119. package/esm/executor/executorManager.js +248 -67
  120. package/esm/executor/executorManager.js.map +1 -1
  121. package/esm/executor/filterOpsAndEstimateGas.d.ts +17 -2
  122. package/esm/executor/filterOpsAndEstimateGas.js +100 -77
  123. package/esm/executor/filterOpsAndEstimateGas.js.map +1 -1
  124. package/esm/executor/getBundleStatus.d.ts +5 -1
  125. package/esm/executor/getBundleStatus.js.map +1 -1
  126. package/esm/executor/index.d.ts +1 -0
  127. package/esm/executor/index.js +1 -0
  128. package/esm/executor/index.js.map +1 -1
  129. package/esm/executor/senderManager/createMemorySenderManager.js +13 -0
  130. package/esm/executor/senderManager/createMemorySenderManager.js.map +1 -1
  131. package/esm/executor/senderManager/createRedisSenderManager.d.ts +2 -1
  132. package/esm/executor/senderManager/createRedisSenderManager.js +45 -26
  133. package/esm/executor/senderManager/createRedisSenderManager.js.map +1 -1
  134. package/esm/executor/senderManager/flushOnStartUp.js +7 -5
  135. package/esm/executor/senderManager/flushOnStartUp.js.map +1 -1
  136. package/esm/executor/senderManager/index.d.ts +1 -0
  137. package/esm/executor/senderManager/index.js +6 -2
  138. package/esm/executor/senderManager/index.js.map +1 -1
  139. package/esm/executor/senderManager/validateAndRefill.js +268 -85
  140. package/esm/executor/senderManager/validateAndRefill.js.map +1 -1
  141. package/esm/executor/utils.d.ts +8 -3
  142. package/esm/executor/utils.js +59 -27
  143. package/esm/executor/utils.js.map +1 -1
  144. package/esm/handlers/arbitrumGasPriceManager.d.ts +3 -2
  145. package/esm/handlers/arbitrumGasPriceManager.js +6 -2
  146. package/esm/handlers/arbitrumGasPriceManager.js.map +1 -1
  147. package/esm/handlers/citreaManager.d.ts +10 -0
  148. package/esm/handlers/citreaManager.js +17 -0
  149. package/esm/handlers/citreaManager.js.map +1 -0
  150. package/esm/handlers/eventManager.d.ts +9 -9
  151. package/esm/handlers/eventManager.js +59 -60
  152. package/esm/handlers/eventManager.js.map +1 -1
  153. package/esm/handlers/gasPriceManager.d.ts +17 -10
  154. package/esm/handlers/gasPriceManager.js +245 -99
  155. package/esm/handlers/gasPriceManager.js.map +1 -1
  156. package/esm/handlers/mantleGasPriceManager.d.ts +4 -4
  157. package/esm/handlers/mantleGasPriceManager.js +4 -4
  158. package/esm/handlers/mantleGasPriceManager.js.map +1 -1
  159. package/esm/handlers/optimismManager.d.ts +1 -1
  160. package/esm/handlers/optimismManager.js +1 -1
  161. package/esm/handlers/optimismManager.js.map +1 -1
  162. package/esm/mempool/index.d.ts +1 -1
  163. package/esm/mempool/index.js +1 -1
  164. package/esm/mempool/index.js.map +1 -1
  165. package/esm/mempool/mempool.d.ts +61 -22
  166. package/esm/mempool/mempool.js +223 -133
  167. package/esm/mempool/mempool.js.map +1 -1
  168. package/esm/mempool/reputationManager.d.ts +14 -14
  169. package/esm/mempool/reputationManager.js +36 -39
  170. package/esm/mempool/reputationManager.js.map +1 -1
  171. package/esm/mempool/statusManager.d.ts +20 -0
  172. package/esm/mempool/statusManager.js +143 -0
  173. package/esm/mempool/statusManager.js.map +1 -0
  174. package/esm/receiptCache/createMemoryReceiptCache.d.ts +3 -0
  175. package/esm/receiptCache/createMemoryReceiptCache.js +30 -0
  176. package/esm/receiptCache/createMemoryReceiptCache.js.map +1 -0
  177. package/esm/receiptCache/createRedisReceiptCache.d.ts +10 -0
  178. package/esm/receiptCache/createRedisReceiptCache.js +56 -0
  179. package/esm/receiptCache/createRedisReceiptCache.js.map +1 -0
  180. package/esm/receiptCache/index.d.ts +11 -0
  181. package/esm/receiptCache/index.js +21 -0
  182. package/esm/receiptCache/index.js.map +1 -0
  183. package/esm/rpc/createMethodHandler.js.map +1 -1
  184. package/esm/rpc/estimation/gasEstimationHandler.d.ts +2 -4
  185. package/esm/rpc/estimation/gasEstimationHandler.js.map +1 -1
  186. package/esm/rpc/estimation/gasEstimations06.d.ts +6 -7
  187. package/esm/rpc/estimation/gasEstimations06.js +1 -5
  188. package/esm/rpc/estimation/gasEstimations06.js.map +1 -1
  189. package/esm/rpc/estimation/gasEstimations07.d.ts +13 -41
  190. package/esm/rpc/estimation/gasEstimations07.js +27 -34
  191. package/esm/rpc/estimation/gasEstimations07.js.map +1 -1
  192. package/esm/{utils/preVerificationGasCalulator.d.ts → rpc/estimation/preVerificationGasCalculator.d.ts} +20 -6
  193. package/esm/{utils/preVerificationGasCalulator.js → rpc/estimation/preVerificationGasCalculator.js} +134 -48
  194. package/esm/rpc/estimation/preVerificationGasCalculator.js.map +1 -0
  195. package/esm/rpc/estimation/types.d.ts +4 -2
  196. package/esm/rpc/estimation/utils.d.ts +10 -8
  197. package/esm/rpc/estimation/utils.js +56 -53
  198. package/esm/rpc/estimation/utils.js.map +1 -1
  199. package/esm/rpc/methods/boost_sendUserOperation.d.ts +304 -0
  200. package/esm/rpc/methods/boost_sendUserOperation.js +1 -1
  201. package/esm/rpc/methods/boost_sendUserOperation.js.map +1 -1
  202. package/esm/rpc/methods/debug_bundler_clearReputation.js +1 -1
  203. package/esm/rpc/methods/debug_bundler_clearReputation.js.map +1 -1
  204. package/esm/rpc/methods/debug_bundler_clearState.js +1 -1
  205. package/esm/rpc/methods/debug_bundler_clearState.js.map +1 -1
  206. package/esm/rpc/methods/debug_bundler_dumpMempool.d.ts +338 -0
  207. package/esm/rpc/methods/debug_bundler_dumpReputation.js +1 -1
  208. package/esm/rpc/methods/debug_bundler_dumpReputation.js.map +1 -1
  209. package/esm/rpc/methods/eth_estimateUserOperationGas.d.ts +622 -14
  210. package/esm/rpc/methods/eth_estimateUserOperationGas.js +61 -30
  211. package/esm/rpc/methods/eth_estimateUserOperationGas.js.map +1 -1
  212. package/esm/rpc/methods/eth_getUserOperationByHash.d.ts +621 -11
  213. package/esm/rpc/methods/eth_getUserOperationByHash.js.map +1 -1
  214. package/esm/rpc/methods/eth_getUserOperationReceipt.d.ts +34 -34
  215. package/esm/rpc/methods/eth_getUserOperationReceipt.js +1 -1
  216. package/esm/rpc/methods/eth_sendUserOperation.d.ts +307 -3
  217. package/esm/rpc/methods/eth_sendUserOperation.js +153 -48
  218. package/esm/rpc/methods/eth_sendUserOperation.js.map +1 -1
  219. package/esm/rpc/methods/pimlico_getUserOperationStatus.js +1 -1
  220. package/esm/rpc/methods/pimlico_getUserOperationStatus.js.map +1 -1
  221. package/esm/rpc/methods/pimlico_sendUserOperationNow.d.ts +338 -34
  222. package/esm/rpc/methods/pimlico_sendUserOperationNow.js +26 -29
  223. package/esm/rpc/methods/pimlico_sendUserOperationNow.js.map +1 -1
  224. package/esm/rpc/methods/pimlico_simulateAssetChange.d.ts +620 -12
  225. package/esm/rpc/methods/pimlico_simulateAssetChange.js +14 -19
  226. package/esm/rpc/methods/pimlico_simulateAssetChange.js.map +1 -1
  227. package/esm/rpc/rpcHandler.d.ts +38 -26
  228. package/esm/rpc/rpcHandler.js +97 -44
  229. package/esm/rpc/rpcHandler.js.map +1 -1
  230. package/esm/rpc/server.d.ts +5 -5
  231. package/esm/rpc/server.js +15 -11
  232. package/esm/rpc/server.js.map +1 -1
  233. package/esm/rpc/validation/BundlerCollectorTracerV06.js +1 -1
  234. package/esm/rpc/validation/BundlerCollectorTracerV06.js.map +1 -1
  235. package/esm/rpc/validation/BundlerCollectorTracerV07.js +1 -1
  236. package/esm/rpc/validation/BundlerCollectorTracerV07.js.map +1 -1
  237. package/esm/rpc/validation/SafeValidator.d.ts +13 -14
  238. package/esm/rpc/validation/SafeValidator.js +24 -24
  239. package/esm/rpc/validation/SafeValidator.js.map +1 -1
  240. package/esm/rpc/validation/TracerResultParserV06.d.ts +2 -2
  241. package/esm/rpc/validation/TracerResultParserV06.js +11 -11
  242. package/esm/rpc/validation/TracerResultParserV06.js.map +1 -1
  243. package/esm/rpc/validation/TracerResultParserV07.d.ts +2 -2
  244. package/esm/rpc/validation/TracerResultParserV07.js +13 -13
  245. package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
  246. package/esm/rpc/validation/UnsafeValidator.d.ts +18 -14
  247. package/esm/rpc/validation/UnsafeValidator.js +76 -41
  248. package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
  249. package/esm/store/createMempoolStore.d.ts +1 -1
  250. package/esm/store/createMempoolStore.js +79 -140
  251. package/esm/store/createMempoolStore.js.map +1 -1
  252. package/esm/store/index.d.ts +4 -75
  253. package/esm/store/index.js +4 -1
  254. package/esm/store/index.js.map +1 -1
  255. package/esm/store/outstanding/index.d.ts +13 -0
  256. package/esm/store/outstanding/index.js +16 -0
  257. package/esm/store/outstanding/index.js.map +1 -0
  258. package/esm/store/{createMemoryOutstandingStore.d.ts → outstanding/memory.d.ts} +14 -13
  259. package/esm/store/outstanding/memory.js +263 -0
  260. package/esm/store/outstanding/memory.js.map +1 -0
  261. package/esm/store/outstanding/redis.d.ts +11 -0
  262. package/esm/store/outstanding/redis.js +229 -0
  263. package/esm/store/outstanding/redis.js.map +1 -0
  264. package/esm/store/outstanding/types.d.ts +19 -0
  265. package/esm/store/outstanding/types.js +2 -0
  266. package/esm/store/outstanding/types.js.map +1 -0
  267. package/esm/store/processing/index.d.ts +11 -0
  268. package/esm/store/processing/index.js +17 -0
  269. package/esm/store/processing/index.js.map +1 -0
  270. package/esm/store/processing/memory.d.ts +19 -0
  271. package/esm/store/processing/memory.js +83 -0
  272. package/esm/store/processing/memory.js.map +1 -0
  273. package/esm/store/processing/redis.d.ts +26 -0
  274. package/esm/store/processing/redis.js +123 -0
  275. package/esm/store/processing/redis.js.map +1 -0
  276. package/esm/store/processing/types.d.ts +12 -0
  277. package/esm/store/processing/types.js +2 -0
  278. package/esm/store/processing/types.js.map +1 -0
  279. package/esm/store/types.d.ts +52 -0
  280. package/esm/store/types.js +2 -0
  281. package/esm/store/types.js.map +1 -0
  282. package/esm/types/contracts/Multicall3.d.ts +34 -0
  283. package/esm/types/contracts/Multicall3.js +31 -0
  284. package/esm/types/contracts/Multicall3.js.map +1 -0
  285. package/esm/types/contracts/PimlicoSimulations.d.ts +81 -0
  286. package/esm/types/contracts/PimlicoSimulations.js +105 -0
  287. package/esm/types/contracts/PimlicoSimulations.js.map +1 -1
  288. package/esm/types/contracts/index.d.ts +1 -1
  289. package/esm/types/contracts/index.js +1 -1
  290. package/esm/types/contracts/index.js.map +1 -1
  291. package/esm/types/gasPrice.js +0 -18
  292. package/esm/types/gasPrice.js.map +1 -1
  293. package/esm/types/interfaces.d.ts +15 -10
  294. package/esm/types/mempool.d.ts +3 -0
  295. package/esm/types/schemas.d.ts +13184 -4741
  296. package/esm/types/schemas.js +116 -27
  297. package/esm/types/schemas.js.map +1 -1
  298. package/esm/types/utils.d.ts +2 -5
  299. package/esm/types/utils.js +16 -18
  300. package/esm/types/utils.js.map +1 -1
  301. package/esm/types/validation.d.ts +7646 -6912
  302. package/esm/types/validation.js +122 -152
  303. package/esm/types/validation.js.map +1 -1
  304. package/esm/utils/eip7702.d.ts +2 -1
  305. package/esm/utils/eip7702.js +14 -8
  306. package/esm/utils/eip7702.js.map +1 -1
  307. package/esm/utils/entryPointOverrides.js +18 -4
  308. package/esm/utils/entryPointOverrides.js.map +1 -1
  309. package/esm/utils/helpers.d.ts +7 -1
  310. package/esm/utils/helpers.js +36 -11
  311. package/esm/utils/helpers.js.map +1 -1
  312. package/esm/utils/index.d.ts +0 -1
  313. package/esm/utils/index.js +0 -1
  314. package/esm/utils/index.js.map +1 -1
  315. package/esm/utils/metrics.d.ts +4 -1
  316. package/esm/utils/metrics.js +34 -7
  317. package/esm/utils/metrics.js.map +1 -1
  318. package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js +8 -9
  319. package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +1 -1
  320. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +24 -2
  321. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js +85 -64
  322. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js.map +1 -1
  323. package/esm/utils/minMaxQueue/index.d.ts +2 -2
  324. package/esm/utils/minMaxQueue/index.js +4 -3
  325. package/esm/utils/minMaxQueue/index.js.map +1 -1
  326. package/esm/utils/rpc-reply.d.ts +3 -3
  327. package/esm/utils/rpc-reply.js.map +1 -1
  328. package/esm/utils/toViemStateOverrides.js +7 -7
  329. package/esm/utils/toViemStateOverrides.js.map +1 -1
  330. package/esm/utils/userop.d.ts +110 -56
  331. package/esm/utils/userop.js +161 -249
  332. package/esm/utils/userop.js.map +1 -1
  333. package/package.json +4 -2
  334. package/contracts/build-info/7710b5a048396e70.json +0 -1
  335. package/esm/executor/userOpMonitor.js +0 -326
  336. package/esm/executor/userOpMonitor.js.map +0 -1
  337. package/esm/executor/utilityWalletMonitor.d.ts +0 -19
  338. package/esm/executor/utilityWalletMonitor.js +0 -38
  339. package/esm/executor/utilityWalletMonitor.js.map +0 -1
  340. package/esm/mempool/monitoring.d.ts +0 -15
  341. package/esm/mempool/monitoring.js +0 -118
  342. package/esm/mempool/monitoring.js.map +0 -1
  343. package/esm/store/createMemoryOutstandingStore.js +0 -240
  344. package/esm/store/createMemoryOutstandingStore.js.map +0 -1
  345. package/esm/store/createRedisOutstandingStore.d.ts +0 -27
  346. package/esm/store/createRedisOutstandingStore.js +0 -344
  347. package/esm/store/createRedisOutstandingStore.js.map +0 -1
  348. package/esm/store/createRedisStore.d.ts +0 -9
  349. package/esm/store/createRedisStore.js +0 -131
  350. package/esm/store/createRedisStore.js.map +0 -1
  351. package/esm/store/createStore.d.ts +0 -6
  352. package/esm/store/createStore.js +0 -66
  353. package/esm/store/createStore.js.map +0 -1
  354. package/esm/types/contracts/CallEngine.d.ts +0 -28
  355. package/esm/types/contracts/CallEngine.js +0 -37
  356. package/esm/types/contracts/CallEngine.js.map +0 -1
  357. package/esm/utils/preVerificationGasCalulator.js.map +0 -1
@@ -0,0 +1,83 @@
1
+ import { isDeployment } from "../../utils/index.js";
2
+ export class InMemoryProcessingStore {
3
+ // Use Sets for boolean membership tracking (matching Redis store)
4
+ processingUserOpsSet = new Set();
5
+ processingSenderNonceSet = new Set();
6
+ processingDeploymentSet = new Set();
7
+ processingEip7702AuthSet = new Set();
8
+ // Map for full UserOpInfo storage (for shutdown recovery)
9
+ processingUserOps = new Map();
10
+ encodeSenderNonceId(sender, nonce) {
11
+ return `${sender}:${nonce}`;
12
+ }
13
+ async addProcessing(userOpInfos) {
14
+ for (const userOpInfo of userOpInfos) {
15
+ const { userOpHash, userOp } = userOpInfo;
16
+ const isDeploymentOp = isDeployment(userOp);
17
+ const senderNonceId = this.encodeSenderNonceId(userOp.sender, userOp.nonce);
18
+ // Add to processing sets
19
+ this.processingUserOpsSet.add(userOpHash);
20
+ this.processingSenderNonceSet.add(senderNonceId);
21
+ if (isDeploymentOp) {
22
+ this.processingDeploymentSet.add(userOp.sender);
23
+ }
24
+ if (userOp.eip7702Auth) {
25
+ this.processingEip7702AuthSet.add(userOp.sender);
26
+ }
27
+ // Store full UserOpInfo for shutdown recovery
28
+ this.processingUserOps.set(userOpHash, userOpInfo);
29
+ }
30
+ }
31
+ async removeProcessing(userOpInfos) {
32
+ if (userOpInfos.length === 0)
33
+ return;
34
+ for (const userOpInfo of userOpInfos) {
35
+ const { userOpHash, userOp } = userOpInfo;
36
+ const senderNonceId = this.encodeSenderNonceId(userOp.sender, userOp.nonce);
37
+ // Remove from all sets
38
+ this.processingUserOpsSet.delete(userOpHash);
39
+ this.processingSenderNonceSet.delete(senderNonceId);
40
+ this.processingDeploymentSet.delete(userOp.sender);
41
+ if (userOp.eip7702Auth) {
42
+ this.processingEip7702AuthSet.delete(userOp.sender);
43
+ }
44
+ // Remove from Map
45
+ this.processingUserOps.delete(userOpHash);
46
+ }
47
+ }
48
+ async isProcessing(userOpHash) {
49
+ return this.processingUserOpsSet.has(userOpHash);
50
+ }
51
+ async wouldConflict(userOp) {
52
+ const isDeploymentOp = isDeployment(userOp);
53
+ const senderNonceId = this.encodeSenderNonceId(userOp.sender, userOp.nonce);
54
+ // Check deployment conflict first
55
+ if (isDeploymentOp && this.processingDeploymentSet.has(userOp.sender)) {
56
+ return "conflicting_deployment";
57
+ }
58
+ // Check EIP-7702 auth conflict
59
+ if (userOp.eip7702Auth &&
60
+ this.processingEip7702AuthSet.has(userOp.sender)) {
61
+ return "conflicting_7702_auth";
62
+ }
63
+ // Check nonce conflict
64
+ if (this.processingSenderNonceSet.has(senderNonceId)) {
65
+ return "conflicting_nonce";
66
+ }
67
+ return undefined;
68
+ }
69
+ async flush() {
70
+ // get all userOps before clearing sets
71
+ const userOpInfos = Array.from(this.processingUserOps.values());
72
+ await this.removeProcessing(userOpInfos);
73
+ return userOpInfos;
74
+ }
75
+ async clearAllProcessing() {
76
+ this.processingUserOpsSet.clear();
77
+ this.processingSenderNonceSet.clear();
78
+ this.processingDeploymentSet.clear();
79
+ this.processingEip7702AuthSet.clear();
80
+ this.processingUserOps.clear();
81
+ }
82
+ }
83
+ //# sourceMappingURL=memory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../store/processing/memory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK1C,MAAM,OAAO,uBAAuB;IAChC,kEAAkE;IACjD,oBAAoB,GAAG,IAAI,GAAG,EAAO,CAAA;IACrC,wBAAwB,GAAG,IAAI,GAAG,EAAU,CAAA;IAC5C,uBAAuB,GAAG,IAAI,GAAG,EAAW,CAAA;IAC5C,wBAAwB,GAAG,IAAI,GAAG,EAAW,CAAA;IAE9D,0DAA0D;IACzC,iBAAiB,GAAG,IAAI,GAAG,EAAmB,CAAA;IAEvD,mBAAmB,CAAC,MAAe,EAAE,KAAa;QACtD,OAAO,GAAG,MAAM,IAAI,KAAK,EAAE,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,WAAyB;QACzC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACnC,MAAM,EAAE,UA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,KAAK,CAAC,kBAAkB;QACpB,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAA;QACjC,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAA;QACrC,IAAI,CAAC,uBAAuB,CAAC,KAAK,EAAE,CAAA;QACpC,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAA;QACrC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAA;IAClC,CAAC;CACJ"}
@@ -0,0 +1,26 @@
1
+ import type { UserOpInfo, UserOperation } from "../../types/index.js";
2
+ import type { Address, Hex } from "viem";
3
+ import type { AltoConfig } from "../../createConfig.js";
4
+ import type { ConflictType } from "../types.js";
5
+ import type { ProcessingStore } from "./types.js";
6
+ export declare class RedisProcessingStore implements ProcessingStore {
7
+ private readonly redis;
8
+ private readonly processingUserOpsSet;
9
+ private readonly processingSenderNonceSet;
10
+ private readonly processingDeploymentSet;
11
+ private readonly processingEip7702AuthSet;
12
+ private readonly localStore;
13
+ private encodeSenderNonceId;
14
+ constructor({ config, entryPoint, redisEndpoint }: {
15
+ config: AltoConfig;
16
+ entryPoint: Address;
17
+ redisEndpoint: string;
18
+ });
19
+ addProcessing(userOpInfos: UserOpInfo[]): Promise<void>;
20
+ removeProcessing(userOpInfos: UserOpInfo[]): Promise<void>;
21
+ isProcessing(userOpHash: Hex): Promise<boolean>;
22
+ wouldConflict(userOp: UserOperation): Promise<ConflictType | undefined>;
23
+ flush(): Promise<UserOpInfo[]>;
24
+ clearAllProcessing(): Promise<void>;
25
+ }
26
+ //# sourceMappingURL=redis.d.ts.map
@@ -0,0 +1,123 @@
1
+ import { isDeployment } from "../../utils/index.js";
2
+ import { Redis } from "ioredis";
3
+ import { InMemoryProcessingStore } from "./memory.js";
4
+ // Hybrid Redis + In-Memory Processing Store
5
+ //
6
+ // This store uses a dual-storage approach:
7
+ // 1. Redis Sets: Shared across all Alto instances for cross-instance conflict
8
+ // detection. When multiple instances run in horizontal scaling mode, each
9
+ // instance can check if a userOp would conflict with one being processed
10
+ // by another instance.
11
+ // 2. Local In-Memory Store: Tracks only this instance's processing userOps.
12
+ // On shutdown, we flush this local store to recover userOps that were
13
+ // mid-processing and push them back to outstanding for another instance
14
+ // to pick up. We can't use Redis alone for this because we'd pull userOps
15
+ // being processed by other instances.
16
+ export class RedisProcessingStore {
17
+ redis;
18
+ // Redis Sets for conflict detection (shared across all instances)
19
+ processingUserOpsSet;
20
+ processingSenderNonceSet;
21
+ processingDeploymentSet;
22
+ processingEip7702AuthSet;
23
+ // Local store for this instance's userOps (for shutdown recovery)
24
+ localStore = new InMemoryProcessingStore();
25
+ encodeSenderNonceId(sender, nonce) {
26
+ return `${sender}:${nonce}`;
27
+ }
28
+ constructor({ config, entryPoint, redisEndpoint }) {
29
+ this.redis = new Redis(redisEndpoint);
30
+ const redisPrefix = `${config.redisKeyPrefix}:${config.chainId}:${entryPoint}:processing`;
31
+ this.processingUserOpsSet = `${redisPrefix}:userOps`;
32
+ this.processingSenderNonceSet = `${redisPrefix}:senderNonce`;
33
+ this.processingDeploymentSet = `${redisPrefix}:deployment`;
34
+ this.processingEip7702AuthSet = `${redisPrefix}:eip7702Auth`;
35
+ }
36
+ async addProcessing(userOpInfos) {
37
+ if (userOpInfos.length === 0)
38
+ return;
39
+ // Store locally for this instance's shutdown recovery
40
+ await this.localStore.addProcessing(userOpInfos);
41
+ // Store in Redis for cross-instance conflict detection
42
+ const multi = this.redis.multi();
43
+ for (const userOpInfo of userOpInfos) {
44
+ const { userOpHash, userOp } = userOpInfo;
45
+ const isDeploymentOp = isDeployment(userOp);
46
+ const senderNonceId = this.encodeSenderNonceId(userOp.sender, userOp.nonce);
47
+ multi.sadd(this.processingUserOpsSet, userOpHash);
48
+ multi.sadd(this.processingSenderNonceSet, senderNonceId);
49
+ if (isDeploymentOp) {
50
+ multi.sadd(this.processingDeploymentSet, userOp.sender);
51
+ }
52
+ if (userOp.eip7702Auth) {
53
+ multi.sadd(this.processingEip7702AuthSet, userOp.sender);
54
+ }
55
+ }
56
+ await multi.exec();
57
+ }
58
+ async removeProcessing(userOpInfos) {
59
+ if (userOpInfos.length === 0)
60
+ return;
61
+ const multi = this.redis.multi();
62
+ // Remove from local store
63
+ await this.localStore.removeProcessing(userOpInfos);
64
+ // Remove from Redis
65
+ for (const userOpInfo of userOpInfos) {
66
+ const { userOpHash, userOp } = userOpInfo;
67
+ const isDeploymentOp = isDeployment(userOp);
68
+ const senderNonceId = this.encodeSenderNonceId(userOp.sender, userOp.nonce);
69
+ multi.srem(this.processingUserOpsSet, userOpHash);
70
+ multi.srem(this.processingSenderNonceSet, senderNonceId);
71
+ if (isDeploymentOp) {
72
+ multi.srem(this.processingDeploymentSet, userOp.sender);
73
+ }
74
+ if (userOp.eip7702Auth) {
75
+ multi.srem(this.processingEip7702AuthSet, userOp.sender);
76
+ }
77
+ }
78
+ await multi.exec();
79
+ }
80
+ async isProcessing(userOpHash) {
81
+ const isMember = await this.redis.sismember(this.processingUserOpsSet, userOpHash);
82
+ return isMember === 1;
83
+ }
84
+ async wouldConflict(userOp) {
85
+ const senderNonceId = this.encodeSenderNonceId(userOp.sender, userOp.nonce);
86
+ // Use MULTI for atomic read in single round trip
87
+ const multi = this.redis.multi();
88
+ multi.sismember(this.processingDeploymentSet, userOp.sender);
89
+ multi.sismember(this.processingEip7702AuthSet, userOp.sender);
90
+ multi.sismember(this.processingSenderNonceSet, senderNonceId);
91
+ const results = await multi.exec();
92
+ if (!results)
93
+ return undefined;
94
+ const [deploymentResult, eip7702AuthResult, nonceResult] = results;
95
+ const hasDeployment = deploymentResult?.[1] === 1;
96
+ const hasEip7702Auth = eip7702AuthResult?.[1] === 1;
97
+ const hasNonce = nonceResult?.[1] === 1;
98
+ // Check deployment conflict
99
+ if (isDeployment(userOp) && hasDeployment) {
100
+ return "conflicting_deployment";
101
+ }
102
+ // Check EIP-7702 auth conflict
103
+ if (userOp.eip7702Auth && hasEip7702Auth) {
104
+ return "conflicting_7702_auth";
105
+ }
106
+ // Check nonce conflict
107
+ if (hasNonce) {
108
+ return "conflicting_nonce";
109
+ }
110
+ return undefined;
111
+ }
112
+ async flush() {
113
+ const userOpInfos = await this.localStore.flush();
114
+ // remove the local processing userOps from redis
115
+ await this.removeProcessing(userOpInfos);
116
+ return userOpInfos;
117
+ }
118
+ async clearAllProcessing() {
119
+ await this.localStore.flush();
120
+ await this.redis.del(this.processingUserOpsSet, this.processingSenderNonceSet, this.processingDeploymentSet, this.processingEip7702AuthSet);
121
+ }
122
+ }
123
+ //# sourceMappingURL=redis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis.js","sourceRoot":"","sources":["../../../store/processing/redis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAI/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAGlD,4CAA4C;AAC5C,EAAE;AACF,2CAA2C;AAC3C,8EAA8E;AAC9E,6EAA6E;AAC7E,4EAA4E;AAC5E,0BAA0B;AAC1B,4EAA4E;AAC5E,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,yCAAyC;AACzC,MAAM,OAAO,oBAAoB;IACZ,KAAK,CAAO;IAE7B,kEAAkE;IACjD,oBAAoB,CAAQ;IAC5B,wBAAwB,CAAQ;IAChC,uBAAuB,CAAQ;IAC/B,wBAAwB,CAAQ;IAEjD,kEAAkE;IACjD,UAAU,GAAG,IAAI,uBAAuB,EAAE,CAAA;IAEnD,mBAAmB,CAAC,MAAe,EAAE,KAAa;QACtD,OAAO,GAAG,MAAM,IAAI,KAAK,EAAE,CAAA;IAC/B,CAAC;IAED,YAAY,EACR,MAAM,EACN,UAAU,EACV,aAAa,EAKhB;QACG,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;QAErC,MAAM,WAAW,GAAG,GAAG,MAAM,CAAC,cA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,OAAO,SAAS,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;QAEjD,iDAAiD;QACjD,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QAExC,OAAO,WAAW,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,kBAAkB;QACpB,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;QAE7B,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAChB,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,wBAAwB,EAC7B,IAAI,CAAC,uBAAuB,EAC5B,IAAI,CAAC,wBAAwB,CAChC,CAAA;IACL,CAAC;CACJ"}
@@ -0,0 +1,12 @@
1
+ import type { UserOpInfo, UserOperation } from "../../types/index.js";
2
+ import type { Hex } from "viem";
3
+ import type { ConflictType } from "../types.js";
4
+ export interface ProcessingStore {
5
+ addProcessing(userOpInfos: UserOpInfo[]): Promise<void>;
6
+ removeProcessing(userOpInfos: UserOpInfo[]): Promise<void>;
7
+ isProcessing(userOpHash: Hex): Promise<boolean>;
8
+ wouldConflict(userOp: UserOperation): Promise<ConflictType | undefined>;
9
+ flush(): Promise<UserOpInfo[]>;
10
+ clearAllProcessing(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../store/processing/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,52 @@
1
+ import type { Address } from "abitype";
2
+ import type { HexData32, UserOpInfo, UserOperation } from "../types/schemas.js";
3
+ import type { ConflictingOutstandingType } from "./outstanding/index.js";
4
+ export type ConflictType = "conflicting_nonce" | "conflicting_deployment" | "conflicting_7702_auth";
5
+ export type StoreType = "outstanding" | "processing";
6
+ export type ValidationResult = {
7
+ valid: true;
8
+ } | {
9
+ valid: false;
10
+ reason: string;
11
+ };
12
+ export type EntryPointUserOpInfoParam = {
13
+ entryPoint: Address;
14
+ userOpInfo: UserOpInfo;
15
+ };
16
+ export type EntryPointUserOpInfosParam = {
17
+ entryPoint: Address;
18
+ userOpInfos: UserOpInfo[];
19
+ };
20
+ export type EntryPointUserOpHashParam = {
21
+ entryPoint: Address;
22
+ userOpHash: HexData32;
23
+ };
24
+ export type MempoolStore = {
25
+ popOutstanding: (entryPoint: Address, count: number) => Promise<UserOpInfo[]>;
26
+ addOutstanding: (args: EntryPointUserOpInfosParam) => Promise<void>;
27
+ removeOutstanding: (args: EntryPointUserOpHashParam) => Promise<void>;
28
+ dumpOutstanding: (entryPoint: Address) => Promise<UserOpInfo[]>;
29
+ addProcessing: (args: EntryPointUserOpInfosParam) => Promise<void>;
30
+ removeProcessing: (args: EntryPointUserOpInfosParam) => Promise<void>;
31
+ checkDuplicatesAndConflicts: (args: {
32
+ entryPoint: Address;
33
+ userOp: UserOperation;
34
+ userOpHash: HexData32;
35
+ }) => Promise<ValidationResult>;
36
+ popConflictingOustanding: (args: {
37
+ entryPoint: Address;
38
+ userOp: UserOperation;
39
+ }) => Promise<ConflictingOutstandingType>;
40
+ validateSenderLimits: (args: {
41
+ entryPoint: Address;
42
+ userOp: UserOperation;
43
+ }) => Promise<ValidationResult>;
44
+ getQueuedOutstandingUserOps: (args: {
45
+ userOp: UserOperation;
46
+ entryPoint: Address;
47
+ }) => Promise<UserOperation[]>;
48
+ clearOutstanding: (entryPoint: Address) => Promise<void>;
49
+ flushProcessing: (entryPoint: Address) => Promise<UserOpInfo[]>;
50
+ clearAllProcessing: (entryPoint: Address) => Promise<void>;
51
+ };
52
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../store/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ export declare const aggregate3ValueAbi: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly components: readonly [{
4
+ readonly name: "target";
5
+ readonly type: "address";
6
+ }, {
7
+ readonly name: "allowFailure";
8
+ readonly type: "bool";
9
+ }, {
10
+ readonly name: "value";
11
+ readonly type: "uint256";
12
+ }, {
13
+ readonly name: "callData";
14
+ readonly type: "bytes";
15
+ }];
16
+ readonly name: "calls";
17
+ readonly type: "tuple[]";
18
+ }];
19
+ readonly name: "aggregate3Value";
20
+ readonly outputs: readonly [{
21
+ readonly components: readonly [{
22
+ readonly name: "success";
23
+ readonly type: "bool";
24
+ }, {
25
+ readonly name: "returnData";
26
+ readonly type: "bytes";
27
+ }];
28
+ readonly name: "returnData";
29
+ readonly type: "tuple[]";
30
+ }];
31
+ readonly stateMutability: "payable";
32
+ readonly type: "function";
33
+ }];
34
+ //# sourceMappingURL=Multicall3.d.ts.map
@@ -0,0 +1,31 @@
1
+ // Viem's multicall3Abi only exposes the view-path aggregate3.
2
+ export const aggregate3ValueAbi = [
3
+ {
4
+ inputs: [
5
+ {
6
+ components: [
7
+ { name: "target", type: "address" },
8
+ { name: "allowFailure", type: "bool" },
9
+ { name: "value", type: "uint256" },
10
+ { name: "callData", type: "bytes" }
11
+ ],
12
+ name: "calls",
13
+ type: "tuple[]"
14
+ }
15
+ ],
16
+ name: "aggregate3Value",
17
+ outputs: [
18
+ {
19
+ components: [
20
+ { name: "success", type: "bool" },
21
+ { name: "returnData", type: "bytes" }
22
+ ],
23
+ name: "returnData",
24
+ type: "tuple[]"
25
+ }
26
+ ],
27
+ stateMutability: "payable",
28
+ type: "function"
29
+ }
30
+ ];
31
+ //# sourceMappingURL=Multicall3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Multicall3.js","sourceRoot":"","sources":["../../../types/contracts/Multicall3.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B;QACI,MAAM,EAAE;YACJ;gBACI,UAAU,EAAE;oBACR,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;oBACnC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE;oBACtC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;oBAClC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;iBACtC;gBACD,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE;YACL;gBACI,UAAU,EAAE;oBACR,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE;oBACjC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE;iBACxC;gBACD,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,SAAS;aAClB;SACJ;QACD,eAAe,EAAE,SAAS;QAC1B,IAAI,EAAE,UAAU;KACnB;CACK,CAAA"}
@@ -706,6 +706,87 @@ export declare const pimlicoSimulationsAbi: readonly [{
706
706
  }];
707
707
  }];
708
708
  readonly stateMutability: "nonpayable";
709
+ }, {
710
+ readonly type: "function";
711
+ readonly name: "filterOps09";
712
+ readonly inputs: readonly [{
713
+ readonly name: "userOps";
714
+ readonly type: "tuple[]";
715
+ readonly internalType: "struct PackedUserOperation[]";
716
+ readonly components: readonly [{
717
+ readonly name: "sender";
718
+ readonly type: "address";
719
+ readonly internalType: "address";
720
+ }, {
721
+ readonly name: "nonce";
722
+ readonly type: "uint256";
723
+ readonly internalType: "uint256";
724
+ }, {
725
+ readonly name: "initCode";
726
+ readonly type: "bytes";
727
+ readonly internalType: "bytes";
728
+ }, {
729
+ readonly name: "callData";
730
+ readonly type: "bytes";
731
+ readonly internalType: "bytes";
732
+ }, {
733
+ readonly name: "accountGasLimits";
734
+ readonly type: "bytes32";
735
+ readonly internalType: "bytes32";
736
+ }, {
737
+ readonly name: "preVerificationGas";
738
+ readonly type: "uint256";
739
+ readonly internalType: "uint256";
740
+ }, {
741
+ readonly name: "gasFees";
742
+ readonly type: "bytes32";
743
+ readonly internalType: "bytes32";
744
+ }, {
745
+ readonly name: "paymasterAndData";
746
+ readonly type: "bytes";
747
+ readonly internalType: "bytes";
748
+ }, {
749
+ readonly name: "signature";
750
+ readonly type: "bytes";
751
+ readonly internalType: "bytes";
752
+ }];
753
+ }, {
754
+ readonly name: "beneficiary";
755
+ readonly type: "address";
756
+ readonly internalType: "address payable";
757
+ }, {
758
+ readonly name: "entryPoint";
759
+ readonly type: "address";
760
+ readonly internalType: "contract IEntryPoint";
761
+ }];
762
+ readonly outputs: readonly [{
763
+ readonly name: "";
764
+ readonly type: "tuple";
765
+ readonly internalType: "struct PimlicoSimulations.FilterOpsResult";
766
+ readonly components: readonly [{
767
+ readonly name: "gasUsed";
768
+ readonly type: "uint256";
769
+ readonly internalType: "uint256";
770
+ }, {
771
+ readonly name: "balanceChange";
772
+ readonly type: "uint256";
773
+ readonly internalType: "uint256";
774
+ }, {
775
+ readonly name: "rejectedUserOps";
776
+ readonly type: "tuple[]";
777
+ readonly internalType: "struct PimlicoSimulations.RejectedUserOp[]";
778
+ readonly components: readonly [{
779
+ readonly name: "userOpHash";
780
+ readonly type: "bytes32";
781
+ readonly internalType: "bytes32";
782
+ }, {
783
+ readonly name: "revertReason";
784
+ readonly type: "bytes";
785
+ readonly internalType: "bytes";
786
+ }];
787
+ }];
788
+ }];
789
+ readonly stateMutability: "nonpayable";
709
790
  }, {
710
791
  readonly type: "function";
711
792
  readonly name: "getBalances";
@@ -911,6 +911,111 @@ export const pimlicoSimulationsAbi = [
911
911
  ],
912
912
  "stateMutability": "nonpayable"
913
913
  },
914
+ {
915
+ "type": "function",
916
+ "name": "filterOps09",
917
+ "inputs": [
918
+ {
919
+ "name": "userOps",
920
+ "type": "tuple[]",
921
+ "internalType": "struct PackedUserOperation[]",
922
+ "components": [
923
+ {
924
+ "name": "sender",
925
+ "type": "address",
926
+ "internalType": "address"
927
+ },
928
+ {
929
+ "name": "nonce",
930
+ "type": "uint256",
931
+ "internalType": "uint256"
932
+ },
933
+ {
934
+ "name": "initCode",
935
+ "type": "bytes",
936
+ "internalType": "bytes"
937
+ },
938
+ {
939
+ "name": "callData",
940
+ "type": "bytes",
941
+ "internalType": "bytes"
942
+ },
943
+ {
944
+ "name": "accountGasLimits",
945
+ "type": "bytes32",
946
+ "internalType": "bytes32"
947
+ },
948
+ {
949
+ "name": "preVerificationGas",
950
+ "type": "uint256",
951
+ "internalType": "uint256"
952
+ },
953
+ {
954
+ "name": "gasFees",
955
+ "type": "bytes32",
956
+ "internalType": "bytes32"
957
+ },
958
+ {
959
+ "name": "paymasterAndData",
960
+ "type": "bytes",
961
+ "internalType": "bytes"
962
+ },
963
+ {
964
+ "name": "signature",
965
+ "type": "bytes",
966
+ "internalType": "bytes"
967
+ }
968
+ ]
969
+ },
970
+ {
971
+ "name": "beneficiary",
972
+ "type": "address",
973
+ "internalType": "address payable"
974
+ },
975
+ {
976
+ "name": "entryPoint",
977
+ "type": "address",
978
+ "internalType": "contract IEntryPoint"
979
+ }
980
+ ],
981
+ "outputs": [
982
+ {
983
+ "name": "",
984
+ "type": "tuple",
985
+ "internalType": "struct PimlicoSimulations.FilterOpsResult",
986
+ "components": [
987
+ {
988
+ "name": "gasUsed",
989
+ "type": "uint256",
990
+ "internalType": "uint256"
991
+ },
992
+ {
993
+ "name": "balanceChange",
994
+ "type": "uint256",
995
+ "internalType": "uint256"
996
+ },
997
+ {
998
+ "name": "rejectedUserOps",
999
+ "type": "tuple[]",
1000
+ "internalType": "struct PimlicoSimulations.RejectedUserOp[]",
1001
+ "components": [
1002
+ {
1003
+ "name": "userOpHash",
1004
+ "type": "bytes32",
1005
+ "internalType": "bytes32"
1006
+ },
1007
+ {
1008
+ "name": "revertReason",
1009
+ "type": "bytes",
1010
+ "internalType": "bytes"
1011
+ }
1012
+ ]
1013
+ }
1014
+ ]
1015
+ }
1016
+ ],
1017
+ "stateMutability": "nonpayable"
1018
+ },
914
1019
  {
915
1020
  "type": "function",
916
1021
  "name": "getBalances",