@pimlico/alto 0.0.19 → 0.0.20

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 (337) 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/338795fc743ca612.json +1 -0
  52. package/contracts/build-info/44a9648cfe32a468.json +1 -0
  53. package/contracts/build-info/{880955d5786bfdae.json → 8dbf8a4ad39019b5.json} +1 -1
  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 +13 -6
  80. package/esm/cli/alto.js.map +1 -1
  81. package/esm/cli/config/bundler.d.ts +190 -148
  82. package/esm/cli/config/bundler.js +72 -83
  83. package/esm/cli/config/bundler.js.map +1 -1
  84. package/esm/cli/config/options.d.ts +2 -1
  85. package/esm/cli/config/options.js +105 -68
  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 +48 -52
  92. package/esm/cli/handler.js.map +1 -1
  93. package/esm/cli/setupServer.js +46 -47
  94. package/esm/cli/setupServer.js.map +1 -1
  95. package/esm/cli/shutDown.d.ts +20 -0
  96. package/esm/cli/shutDown.js +260 -0
  97. package/esm/cli/shutDown.js.map +1 -0
  98. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
  99. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
  100. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
  101. package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
  102. package/esm/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
  103. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
  104. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
  105. package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
  106. package/esm/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
  107. package/esm/createConfig.d.ts +9 -2
  108. package/esm/createConfig.js.map +1 -1
  109. package/esm/executor/{userOpMonitor.d.ts → bundleManager.d.ts} +38 -32
  110. package/esm/executor/{userOpMonitor.js → bundleManager.js} +127 -99
  111. package/esm/executor/bundleManager.js.map +1 -0
  112. package/esm/executor/executor.d.ts +4 -3
  113. package/esm/executor/executor.js +33 -20
  114. package/esm/executor/executor.js.map +1 -1
  115. package/esm/executor/executorManager.d.ts +17 -15
  116. package/esm/executor/executorManager.js +130 -55
  117. package/esm/executor/executorManager.js.map +1 -1
  118. package/esm/executor/filterOpsAndEstimateGas.d.ts +17 -2
  119. package/esm/executor/filterOpsAndEstimateGas.js +100 -77
  120. package/esm/executor/filterOpsAndEstimateGas.js.map +1 -1
  121. package/esm/executor/index.d.ts +1 -0
  122. package/esm/executor/index.js +1 -0
  123. package/esm/executor/index.js.map +1 -1
  124. package/esm/executor/senderManager/createMemorySenderManager.js +13 -0
  125. package/esm/executor/senderManager/createMemorySenderManager.js.map +1 -1
  126. package/esm/executor/senderManager/createRedisSenderManager.d.ts +2 -1
  127. package/esm/executor/senderManager/createRedisSenderManager.js +3 -6
  128. package/esm/executor/senderManager/createRedisSenderManager.js.map +1 -1
  129. package/esm/executor/senderManager/flushOnStartUp.js +4 -4
  130. package/esm/executor/senderManager/flushOnStartUp.js.map +1 -1
  131. package/esm/executor/senderManager/index.d.ts +1 -0
  132. package/esm/executor/senderManager/index.js +6 -2
  133. package/esm/executor/senderManager/index.js.map +1 -1
  134. package/esm/executor/senderManager/validateAndRefill.js +2 -2
  135. package/esm/executor/senderManager/validateAndRefill.js.map +1 -1
  136. package/esm/executor/utilityWalletMonitor.d.ts +4 -4
  137. package/esm/executor/utilityWalletMonitor.js +1 -1
  138. package/esm/executor/utilityWalletMonitor.js.map +1 -1
  139. package/esm/executor/utils.d.ts +7 -2
  140. package/esm/executor/utils.js +57 -26
  141. package/esm/executor/utils.js.map +1 -1
  142. package/esm/handlers/arbitrumGasPriceManager.d.ts +3 -2
  143. package/esm/handlers/arbitrumGasPriceManager.js +6 -2
  144. package/esm/handlers/arbitrumGasPriceManager.js.map +1 -1
  145. package/esm/handlers/eventManager.d.ts +9 -9
  146. package/esm/handlers/eventManager.js +59 -60
  147. package/esm/handlers/eventManager.js.map +1 -1
  148. package/esm/handlers/gasPriceManager.d.ts +8 -9
  149. package/esm/handlers/gasPriceManager.js +68 -80
  150. package/esm/handlers/gasPriceManager.js.map +1 -1
  151. package/esm/handlers/mantleGasPriceManager.d.ts +4 -4
  152. package/esm/handlers/mantleGasPriceManager.js +4 -4
  153. package/esm/handlers/mantleGasPriceManager.js.map +1 -1
  154. package/esm/handlers/optimismManager.d.ts +1 -1
  155. package/esm/handlers/optimismManager.js +1 -1
  156. package/esm/handlers/optimismManager.js.map +1 -1
  157. package/esm/mempool/index.d.ts +1 -1
  158. package/esm/mempool/index.js +1 -1
  159. package/esm/mempool/index.js.map +1 -1
  160. package/esm/mempool/mempool.d.ts +57 -22
  161. package/esm/mempool/mempool.js +180 -134
  162. package/esm/mempool/mempool.js.map +1 -1
  163. package/esm/mempool/reputationManager.d.ts +14 -14
  164. package/esm/mempool/reputationManager.js +36 -39
  165. package/esm/mempool/reputationManager.js.map +1 -1
  166. package/esm/mempool/statusManager.d.ts +20 -0
  167. package/esm/mempool/statusManager.js +143 -0
  168. package/esm/mempool/statusManager.js.map +1 -0
  169. package/esm/receiptCache/createMemoryReceiptCache.d.ts +3 -0
  170. package/esm/receiptCache/createMemoryReceiptCache.js +30 -0
  171. package/esm/receiptCache/createMemoryReceiptCache.js.map +1 -0
  172. package/esm/receiptCache/createRedisReceiptCache.d.ts +10 -0
  173. package/esm/receiptCache/createRedisReceiptCache.js +56 -0
  174. package/esm/receiptCache/createRedisReceiptCache.js.map +1 -0
  175. package/esm/receiptCache/index.d.ts +11 -0
  176. package/esm/receiptCache/index.js +21 -0
  177. package/esm/receiptCache/index.js.map +1 -0
  178. package/esm/rpc/createMethodHandler.js.map +1 -1
  179. package/esm/rpc/estimation/gasEstimationHandler.d.ts +2 -4
  180. package/esm/rpc/estimation/gasEstimationHandler.js.map +1 -1
  181. package/esm/rpc/estimation/gasEstimations06.d.ts +6 -7
  182. package/esm/rpc/estimation/gasEstimations06.js +1 -5
  183. package/esm/rpc/estimation/gasEstimations06.js.map +1 -1
  184. package/esm/rpc/estimation/gasEstimations07.d.ts +13 -41
  185. package/esm/rpc/estimation/gasEstimations07.js +27 -34
  186. package/esm/rpc/estimation/gasEstimations07.js.map +1 -1
  187. package/esm/{utils/preVerificationGasCalulator.d.ts → rpc/estimation/preVerificationGasCalculator.d.ts} +20 -6
  188. package/esm/{utils/preVerificationGasCalulator.js → rpc/estimation/preVerificationGasCalculator.js} +95 -47
  189. package/esm/rpc/estimation/preVerificationGasCalculator.js.map +1 -0
  190. package/esm/rpc/estimation/types.d.ts +4 -2
  191. package/esm/rpc/estimation/utils.d.ts +10 -8
  192. package/esm/rpc/estimation/utils.js +54 -48
  193. package/esm/rpc/estimation/utils.js.map +1 -1
  194. package/esm/rpc/methods/boost_sendUserOperation.d.ts +304 -0
  195. package/esm/rpc/methods/debug_bundler_clearReputation.js +1 -1
  196. package/esm/rpc/methods/debug_bundler_clearReputation.js.map +1 -1
  197. package/esm/rpc/methods/debug_bundler_clearState.js +1 -1
  198. package/esm/rpc/methods/debug_bundler_clearState.js.map +1 -1
  199. package/esm/rpc/methods/debug_bundler_dumpMempool.d.ts +338 -0
  200. package/esm/rpc/methods/debug_bundler_dumpReputation.js +1 -1
  201. package/esm/rpc/methods/debug_bundler_dumpReputation.js.map +1 -1
  202. package/esm/rpc/methods/eth_estimateUserOperationGas.d.ts +622 -14
  203. package/esm/rpc/methods/eth_estimateUserOperationGas.js +50 -29
  204. package/esm/rpc/methods/eth_estimateUserOperationGas.js.map +1 -1
  205. package/esm/rpc/methods/eth_getUserOperationByHash.d.ts +621 -11
  206. package/esm/rpc/methods/eth_getUserOperationByHash.js.map +1 -1
  207. package/esm/rpc/methods/eth_getUserOperationReceipt.d.ts +26 -26
  208. package/esm/rpc/methods/eth_getUserOperationReceipt.js +1 -1
  209. package/esm/rpc/methods/eth_sendUserOperation.d.ts +305 -1
  210. package/esm/rpc/methods/eth_sendUserOperation.js +132 -36
  211. package/esm/rpc/methods/eth_sendUserOperation.js.map +1 -1
  212. package/esm/rpc/methods/pimlico_getUserOperationStatus.js +1 -1
  213. package/esm/rpc/methods/pimlico_getUserOperationStatus.js.map +1 -1
  214. package/esm/rpc/methods/pimlico_sendUserOperationNow.d.ts +330 -26
  215. package/esm/rpc/methods/pimlico_sendUserOperationNow.js +15 -27
  216. package/esm/rpc/methods/pimlico_sendUserOperationNow.js.map +1 -1
  217. package/esm/rpc/methods/pimlico_simulateAssetChange.d.ts +620 -12
  218. package/esm/rpc/methods/pimlico_simulateAssetChange.js +14 -19
  219. package/esm/rpc/methods/pimlico_simulateAssetChange.js.map +1 -1
  220. package/esm/rpc/rpcHandler.d.ts +21 -22
  221. package/esm/rpc/rpcHandler.js +15 -17
  222. package/esm/rpc/rpcHandler.js.map +1 -1
  223. package/esm/rpc/server.d.ts +5 -5
  224. package/esm/rpc/server.js +15 -11
  225. package/esm/rpc/server.js.map +1 -1
  226. package/esm/rpc/validation/BundlerCollectorTracerV06.js +1 -1
  227. package/esm/rpc/validation/BundlerCollectorTracerV06.js.map +1 -1
  228. package/esm/rpc/validation/BundlerCollectorTracerV07.js +1 -1
  229. package/esm/rpc/validation/BundlerCollectorTracerV07.js.map +1 -1
  230. package/esm/rpc/validation/SafeValidator.d.ts +13 -14
  231. package/esm/rpc/validation/SafeValidator.js +24 -24
  232. package/esm/rpc/validation/SafeValidator.js.map +1 -1
  233. package/esm/rpc/validation/TracerResultParserV06.d.ts +2 -2
  234. package/esm/rpc/validation/TracerResultParserV06.js +11 -11
  235. package/esm/rpc/validation/TracerResultParserV06.js.map +1 -1
  236. package/esm/rpc/validation/TracerResultParserV07.d.ts +2 -2
  237. package/esm/rpc/validation/TracerResultParserV07.js +13 -13
  238. package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
  239. package/esm/rpc/validation/UnsafeValidator.d.ts +18 -14
  240. package/esm/rpc/validation/UnsafeValidator.js +71 -40
  241. package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
  242. package/esm/store/createMempoolStore.d.ts +1 -1
  243. package/esm/store/createMempoolStore.js +63 -139
  244. package/esm/store/createMempoolStore.js.map +1 -1
  245. package/esm/store/index.d.ts +4 -75
  246. package/esm/store/index.js +4 -1
  247. package/esm/store/index.js.map +1 -1
  248. package/esm/store/outstanding/index.d.ts +13 -0
  249. package/esm/store/outstanding/index.js +16 -0
  250. package/esm/store/outstanding/index.js.map +1 -0
  251. package/esm/store/{createMemoryOutstandingStore.d.ts → outstanding/memory.d.ts} +14 -13
  252. package/esm/store/outstanding/memory.js +263 -0
  253. package/esm/store/outstanding/memory.js.map +1 -0
  254. package/esm/store/outstanding/redis.d.ts +11 -0
  255. package/esm/store/outstanding/redis.js +229 -0
  256. package/esm/store/outstanding/redis.js.map +1 -0
  257. package/esm/store/outstanding/types.d.ts +19 -0
  258. package/esm/store/outstanding/types.js +2 -0
  259. package/esm/store/outstanding/types.js.map +1 -0
  260. package/esm/store/processing/index.d.ts +11 -0
  261. package/esm/store/processing/index.js +17 -0
  262. package/esm/store/processing/index.js.map +1 -0
  263. package/esm/store/processing/memory.d.ts +16 -0
  264. package/esm/store/processing/memory.js +58 -0
  265. package/esm/store/processing/memory.js.map +1 -0
  266. package/esm/store/processing/redis.d.ts +23 -0
  267. package/esm/store/processing/redis.js +85 -0
  268. package/esm/store/processing/redis.js.map +1 -0
  269. package/esm/store/processing/types.d.ts +10 -0
  270. package/esm/store/processing/types.js +2 -0
  271. package/esm/store/processing/types.js.map +1 -0
  272. package/esm/store/types.d.ts +50 -0
  273. package/esm/store/types.js +2 -0
  274. package/esm/store/types.js.map +1 -0
  275. package/esm/types/contracts/PimlicoSimulations.d.ts +81 -0
  276. package/esm/types/contracts/PimlicoSimulations.js +105 -0
  277. package/esm/types/contracts/PimlicoSimulations.js.map +1 -1
  278. package/esm/types/gasPrice.js +0 -18
  279. package/esm/types/gasPrice.js.map +1 -1
  280. package/esm/types/interfaces.d.ts +15 -10
  281. package/esm/types/mempool.d.ts +3 -0
  282. package/esm/types/schemas.d.ts +13174 -4732
  283. package/esm/types/schemas.js +113 -25
  284. package/esm/types/schemas.js.map +1 -1
  285. package/esm/types/utils.d.ts +2 -5
  286. package/esm/types/utils.js +16 -18
  287. package/esm/types/utils.js.map +1 -1
  288. package/esm/types/validation.d.ts +7646 -6912
  289. package/esm/types/validation.js +122 -152
  290. package/esm/types/validation.js.map +1 -1
  291. package/esm/utils/eip7702.d.ts +2 -1
  292. package/esm/utils/eip7702.js +14 -8
  293. package/esm/utils/eip7702.js.map +1 -1
  294. package/esm/utils/entryPointOverrides.js +18 -4
  295. package/esm/utils/entryPointOverrides.js.map +1 -1
  296. package/esm/utils/helpers.d.ts +2 -1
  297. package/esm/utils/helpers.js +30 -11
  298. package/esm/utils/helpers.js.map +1 -1
  299. package/esm/utils/index.d.ts +0 -1
  300. package/esm/utils/index.js +0 -1
  301. package/esm/utils/index.js.map +1 -1
  302. package/esm/utils/metrics.d.ts +2 -1
  303. package/esm/utils/metrics.js +15 -8
  304. package/esm/utils/metrics.js.map +1 -1
  305. package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js +8 -9
  306. package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +1 -1
  307. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +24 -2
  308. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js +85 -64
  309. package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js.map +1 -1
  310. package/esm/utils/minMaxQueue/index.d.ts +2 -2
  311. package/esm/utils/minMaxQueue/index.js +4 -3
  312. package/esm/utils/minMaxQueue/index.js.map +1 -1
  313. package/esm/utils/rpc-reply.d.ts +3 -3
  314. package/esm/utils/rpc-reply.js.map +1 -1
  315. package/esm/utils/toViemStateOverrides.js +7 -7
  316. package/esm/utils/toViemStateOverrides.js.map +1 -1
  317. package/esm/utils/userop.d.ts +87 -55
  318. package/esm/utils/userop.js +138 -248
  319. package/esm/utils/userop.js.map +1 -1
  320. package/package.json +4 -2
  321. package/contracts/build-info/7710b5a048396e70.json +0 -1
  322. package/esm/executor/userOpMonitor.js.map +0 -1
  323. package/esm/mempool/monitoring.d.ts +0 -15
  324. package/esm/mempool/monitoring.js +0 -118
  325. package/esm/mempool/monitoring.js.map +0 -1
  326. package/esm/store/createMemoryOutstandingStore.js +0 -240
  327. package/esm/store/createMemoryOutstandingStore.js.map +0 -1
  328. package/esm/store/createRedisOutstandingStore.d.ts +0 -27
  329. package/esm/store/createRedisOutstandingStore.js +0 -344
  330. package/esm/store/createRedisOutstandingStore.js.map +0 -1
  331. package/esm/store/createRedisStore.d.ts +0 -9
  332. package/esm/store/createRedisStore.js +0 -131
  333. package/esm/store/createRedisStore.js.map +0 -1
  334. package/esm/store/createStore.d.ts +0 -6
  335. package/esm/store/createStore.js +0 -66
  336. package/esm/store/createStore.js.map +0 -1
  337. package/esm/utils/preVerificationGasCalulator.js.map +0 -1
@@ -5,13 +5,20 @@ import type { CamelCasedProperties } from "./cli/parseArgs.js";
5
5
  export type AltoConfig = Readonly<CamelCasedProperties<IOptions>> & {
6
6
  getLogger: <ChildCustomLevels extends string = never>(bindings: Bindings, options?: ChildLoggerOptions<ChildCustomLevels>) => Logger<ChildCustomLevels>;
7
7
  readonly publicClient: PublicClient<Transport, Chain>;
8
- readonly walletClient: WalletClient<Transport, Chain>;
8
+ readonly walletClients: {
9
+ readonly private?: WalletClient<Transport, Chain>;
10
+ readonly public: WalletClient<Transport, Chain>;
11
+ };
9
12
  readonly chainId: number;
10
13
  readonly utilityWalletAddress: Address;
11
14
  };
12
15
  export declare function createConfig(config: CamelCasedProperties<IOptions> & {
13
16
  logger: Logger;
14
17
  publicClient: PublicClient<Transport, Chain>;
15
- walletClient: WalletClient<Transport, Chain>;
18
+ walletClients: {
19
+ private?: WalletClient<Transport, Chain>;
20
+ public: WalletClient<Transport, Chain>;
21
+ };
22
+ enableCors: boolean;
16
23
  }): AltoConfig;
17
24
  //# sourceMappingURL=createConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createConfig.js","sourceRoot":"","sources":["../createConfig.ts"],"names":[],"mappings":"AAsBA,MAAM,UAAU,YAAY,CACxB,MAIC;IAED,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;IAElC,OAAO;QACH,GAAG,IAAI;QACP,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;QACrC,oBAAoB,EAChB,MAAM,CAAC,iBAAiB,EAAE,OAAO;YACjC,4CAA4C;QAChD,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC;KACpE,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"createConfig.js","sourceRoot":"","sources":["../createConfig.ts"],"names":[],"mappings":"AAyBA,MAAM,UAAU,YAAY,CACxB,MAQC;IAED,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;IAElC,OAAO;QACH,GAAG,IAAI;QACP,OAAO,EAAE,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;QACrC,oBAAoB,EAChB,MAAM,CAAC,iBAAiB,EAAE,OAAO;YACjC,4CAA4C;QAChD,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC;KACpE,CAAA;AACL,CAAC"}
@@ -1,38 +1,40 @@
1
- import type { SenderManager } from "./index.js";
2
- import type { EventManager } from "../handlers/index.js";
3
- import type { InterfaceReputationManager, Mempool, Monitor } from "../mempool/index.js";
1
+ import { type SenderManager } from "./index.js";
2
+ import type { EventManager, GasPriceManager } from "../handlers/index.js";
3
+ import type { InterfaceReputationManager, Mempool, StatusManager } from "../mempool/index.js";
4
4
  import type { HexData32, SubmittedBundleInfo, UserOpInfo } from "../types/index.js";
5
- import type { Metrics } from "../utils/index.js";
6
- import { type Block } from "viem";
5
+ import { type Metrics } from "../utils/index.js";
6
+ import { type Address, type Block, type Hex } from "viem";
7
7
  import type { AltoConfig } from "../createConfig.js";
8
8
  import { type BundleStatus } from "./getBundleStatus.js";
9
- export declare class UserOpMonitor {
10
- private reputationManager;
11
- private config;
12
- private mempool;
13
- private monitor;
14
- private logger;
15
- private metrics;
16
- private eventManager;
17
- private senderManager;
9
+ export declare class BundleManager {
10
+ private readonly reputationManager;
11
+ private readonly config;
12
+ private readonly mempool;
13
+ private readonly statusManager;
14
+ private readonly logger;
15
+ private readonly metrics;
16
+ private readonly eventManager;
17
+ private readonly senderManager;
18
18
  private cachedLatestBlock;
19
- private pendingBundles;
20
- private receiptCache;
21
- private readonly receiptTtl;
22
- constructor({ config, mempool, monitor, metrics, reputationManager, eventManager, senderManager }: {
19
+ private readonly receiptCache;
20
+ private readonly gasPriceManager;
21
+ private readonly pendingBundles;
22
+ constructor({ config, mempool, statusManager, metrics, reputationManager, eventManager, senderManager, gasPriceManager }: {
23
23
  config: AltoConfig;
24
24
  mempool: Mempool;
25
- monitor: Monitor;
25
+ statusManager: StatusManager;
26
26
  metrics: Metrics;
27
27
  reputationManager: InterfaceReputationManager;
28
28
  eventManager: EventManager;
29
29
  senderManager: SenderManager;
30
+ gasPriceManager: GasPriceManager;
30
31
  });
31
32
  getPendingBundles(): SubmittedBundleInfo[];
32
- getReceipts(pendingBundles: SubmittedBundleInfo[]): Promise<BundleStatus[]>;
33
- processIncludedBundle({ submittedBundle, bundleReceipt }: {
33
+ getBundleStatuses(pendingBundles: SubmittedBundleInfo[]): Promise<BundleStatus[]>;
34
+ processIncludedBundle({ submittedBundle, bundleReceipt, blockReceivedTimestamp }: {
34
35
  submittedBundle: SubmittedBundleInfo;
35
36
  bundleReceipt: BundleStatus<"included">;
37
+ blockReceivedTimestamp: number;
36
38
  }): Promise<void>;
37
39
  /**
38
40
  * The reasons for reverted bundles are:
@@ -41,20 +43,24 @@ export declare class UserOpMonitor {
41
43
  * 3. partial bundle was reverted -> filter out reverted userOps and resubmit
42
44
  * 4. full bundle was reverted -> cancel bundle -> need to wait for one more block to see if the userOp was frontrun
43
45
  */
44
- processRevertedBundle({ submittedBundle, bundleReceipt, block }: {
46
+ processRevertedBundle({ submittedBundle, blockReceivedTimestamp, bundleReceipt, block }: {
45
47
  submittedBundle: SubmittedBundleInfo;
48
+ blockReceivedTimestamp: number;
46
49
  bundleReceipt: BundleStatus<"reverted">;
47
- block: Block;
50
+ block?: Block;
48
51
  }): Promise<void>;
49
52
  trackBundle(submittedBundle: SubmittedBundleInfo): void;
50
53
  getLatestBlockWithCache(): Promise<bigint>;
51
- private cacheReceipt;
52
- private getCachedReceipt;
53
- private pruneReceiptCache;
54
54
  private freeSubmittedBundle;
55
55
  stopTrackingBundle(submittedBundle: SubmittedBundleInfo): void;
56
- private processIncludedUserOp;
57
- checkFrontrun(userOpInfo: UserOpInfo, blockWaitCount?: number): Promise<boolean>;
56
+ private processIncludedUserOps;
57
+ getUserOpStatus({ userOpInfo, entryPoint, bundlerTxs, blockReceivedTimestamp, blockWaitCount }: {
58
+ userOpInfo: UserOpInfo;
59
+ entryPoint: Address;
60
+ bundlerTxs: Hex[];
61
+ blockReceivedTimestamp: number;
62
+ blockWaitCount?: number;
63
+ }): Promise<"not_found" | "included" | "frontran">;
58
64
  getUserOpReceipt(userOpHash: HexData32): Promise<{
59
65
  sender: `0x${string}`;
60
66
  userOpHash: `0x${string}`;
@@ -66,9 +72,9 @@ export declare class UserOpMonitor {
66
72
  logs: {
67
73
  address: `0x${string}`;
68
74
  data: `0x${string}`;
75
+ transactionHash: `0x${string}`;
69
76
  logIndex: bigint;
70
77
  transactionIndex: bigint;
71
- transactionHash: `0x${string}`;
72
78
  blockHash: `0x${string}`;
73
79
  blockNumber: bigint;
74
80
  topics: `0x${string}`[];
@@ -77,9 +83,9 @@ export declare class UserOpMonitor {
77
83
  to: `0x${string}` | null;
78
84
  gasUsed: bigint;
79
85
  status: bigint | null;
86
+ transactionHash: `0x${string}`;
80
87
  contractAddress: `0x${string}` | null;
81
88
  transactionIndex: bigint;
82
- transactionHash: `0x${string}`;
83
89
  blockHash: `0x${string}`;
84
90
  blockNumber: bigint;
85
91
  from: `0x${string}`;
@@ -87,9 +93,9 @@ export declare class UserOpMonitor {
87
93
  logs: {
88
94
  address: `0x${string}`;
89
95
  data: `0x${string}`;
96
+ transactionHash: `0x${string}`;
90
97
  logIndex: bigint;
91
98
  transactionIndex: bigint;
92
- transactionHash: `0x${string}`;
93
99
  blockHash: `0x${string}`;
94
100
  blockNumber: bigint;
95
101
  topics: `0x${string}`[];
@@ -102,4 +108,4 @@ export declare class UserOpMonitor {
102
108
  } | null>;
103
109
  private checkAccountDeployment;
104
110
  }
105
- //# sourceMappingURL=userOpMonitor.d.ts.map
111
+ //# sourceMappingURL=bundleManager.d.ts.map
@@ -1,38 +1,43 @@
1
+ import { getUserOpHashes } from "./index.js";
2
+ import { createReceiptCache } from "../receiptCache/index.js";
1
3
  import { parseUserOpReceipt } from "../utils/index.js";
2
4
  import { TransactionReceiptNotFoundError, decodeEventLog, getAbiItem, getAddress } from "viem";
3
5
  import { entryPoint07Abi } from "viem/account-abstraction";
4
6
  import { filterOpsAndEstimateGas } from "./filterOpsAndEstimateGas.js";
5
7
  import { getBundleStatus } from "./getBundleStatus.js";
6
- export class UserOpMonitor {
8
+ export class BundleManager {
7
9
  reputationManager;
8
10
  config;
9
11
  mempool;
10
- monitor;
12
+ statusManager;
11
13
  logger;
12
14
  metrics;
13
15
  eventManager;
14
16
  senderManager;
15
17
  cachedLatestBlock;
18
+ receiptCache;
19
+ gasPriceManager;
16
20
  pendingBundles = new Map();
17
- receiptCache = new Map();
18
- receiptTtl = 5 * 60 * 1000; // 5 minutes
19
- constructor({ config, mempool, monitor, metrics, reputationManager, eventManager, senderManager }) {
21
+ constructor({ config, mempool, statusManager, metrics, reputationManager, eventManager, senderManager, gasPriceManager }) {
20
22
  this.reputationManager = reputationManager;
21
23
  this.config = config;
22
24
  this.mempool = mempool;
23
- this.monitor = monitor;
25
+ this.statusManager = statusManager;
24
26
  this.metrics = metrics;
25
27
  this.eventManager = eventManager;
26
28
  this.senderManager = senderManager;
27
29
  this.cachedLatestBlock = null;
28
- this.logger = config.getLogger({ module: "userop_monitor" }, {
30
+ this.gasPriceManager = gasPriceManager;
31
+ this.logger = config.getLogger({ module: "userop_status_manager" }, {
29
32
  level: config.executorLogLevel || config.logLevel
30
33
  });
34
+ // Initialize receipt cache
35
+ this.receiptCache = createReceiptCache(config, config.receiptCacheTtl);
31
36
  }
32
37
  getPendingBundles() {
33
38
  return Array.from(this.pendingBundles.values());
34
39
  }
35
- getReceipts(pendingBundles) {
40
+ getBundleStatuses(pendingBundles) {
36
41
  return Promise.all(pendingBundles.map((bundle) => {
37
42
  return getBundleStatus({
38
43
  submittedBundle: bundle,
@@ -41,28 +46,24 @@ export class UserOpMonitor {
41
46
  });
42
47
  }));
43
48
  }
44
- async processIncludedBundle({ submittedBundle, bundleReceipt }) {
49
+ async processIncludedBundle({ submittedBundle, bundleReceipt, blockReceivedTimestamp }) {
45
50
  const { bundle } = submittedBundle;
46
51
  const { userOps, entryPoint } = bundle;
47
52
  const { transactionHash, blockNumber, userOpReceipts } = bundleReceipt;
48
53
  // Cleanup bundle
49
54
  await this.freeSubmittedBundle(submittedBundle);
50
- // Log metric
51
- this.metrics.userOpsOnChain
52
- .labels({ status: "included" })
53
- .inc(userOps.length);
54
- // Process each userOp
55
- // rest of the code is non-blocking
55
+ // Process all userOps in parallel (non-blocking)
56
+ // The IIFE returns immediately, allowing the caller to continue
56
57
  return (async () => {
57
- for (const userOpInfo of userOps) {
58
- const userOpReceipt = userOpReceipts[userOpInfo.userOpHash];
59
- if (!userOpReceipt) {
60
- throw new Error("userOpReceipt is undefined");
61
- }
62
- // Cache the receipt
63
- this.cacheReceipt(userOpInfo.userOpHash, userOpReceipt);
64
- await this.processIncludedUserOp(userOpInfo, userOpReceipt, transactionHash, blockNumber, entryPoint);
65
- }
58
+ const userOpsBatch = userOps.map((userOpInfo) => ({
59
+ userOpInfo,
60
+ userOpReceipt: userOpReceipts[userOpInfo.userOpHash]
61
+ }));
62
+ // Batch cache receipts
63
+ const receipts = Object.values(userOpReceipts);
64
+ await this.receiptCache.cache(receipts);
65
+ // Batch process userOps
66
+ await this.processIncludedUserOps(userOpsBatch, transactionHash, blockNumber, entryPoint, blockReceivedTimestamp);
66
67
  })();
67
68
  }
68
69
  /**
@@ -72,18 +73,24 @@ export class UserOpMonitor {
72
73
  * 3. partial bundle was reverted -> filter out reverted userOps and resubmit
73
74
  * 4. full bundle was reverted -> cancel bundle -> need to wait for one more block to see if the userOp was frontrun
74
75
  */
75
- async processRevertedBundle({ submittedBundle, bundleReceipt, block }) {
76
+ async processRevertedBundle({ submittedBundle, blockReceivedTimestamp, bundleReceipt, block }) {
76
77
  const { bundle } = submittedBundle;
77
78
  const { blockNumber, transactionHash } = bundleReceipt;
79
+ this.logger.info({ transactionHash, userOpHashes: getUserOpHashes(bundle.userOps) }, "Processing reverted bundle");
78
80
  await this.freeSubmittedBundle(submittedBundle);
81
+ const networkBaseFee = this.config.legacyTransactions
82
+ ? 0n
83
+ : (block?.baseFeePerGas ??
84
+ (await this.gasPriceManager.getBaseFee()));
79
85
  // make rest of the code non-blocking
80
86
  return (async () => {
81
87
  // Find userOps that can be resubmitted
82
88
  const filterOpsResult = await filterOpsAndEstimateGas({
89
+ checkEip7702AuthNonces: true, // Check if any userOps reverted onchain due to invalid EIP-7702 auth nonce.
83
90
  userOpBundle: bundle,
84
91
  config: this.config,
85
92
  logger: this.logger,
86
- networkBaseFee: block.baseFeePerGas || 0n
93
+ networkBaseFee
87
94
  });
88
95
  // Resubmit any userOps that we can recover
89
96
  if (filterOpsResult.status === "success") {
@@ -97,24 +104,35 @@ export class UserOpMonitor {
97
104
  const { rejectedUserOps } = filterOpsResult;
98
105
  // Fire and forget
99
106
  // Check if any rejected userOps were frontruns, if not mark as reverted onchain.
100
- rejectedUserOps.map(async (userOpInfo) => {
101
- const wasFrontrun = await this.checkFrontrun(userOpInfo);
102
- if (!wasFrontrun) {
103
- const { userOpHash } = userOpInfo;
104
- await this.monitor.setUserOpStatus(userOpHash, {
105
- status: "failed",
106
- transactionHash
107
+ for (const userOpInfo of rejectedUserOps) {
108
+ ;
109
+ (async () => {
110
+ const status = await this.getUserOpStatus({
111
+ userOpInfo,
112
+ entryPoint: submittedBundle.bundle.entryPoint,
113
+ bundlerTxs: [
114
+ submittedBundle.transactionHash,
115
+ ...submittedBundle.previousTransactionHashes
116
+ ],
117
+ blockReceivedTimestamp
107
118
  });
108
- this.eventManager.emitFailedOnChain(userOpHash, transactionHash, blockNumber);
109
- this.logger.info({
110
- userOpHash,
111
- transactionHash
112
- }, "user op failed onchain");
113
- this.metrics.userOpsOnChain
114
- .labels({ status: "reverted" })
115
- .inc(1);
116
- }
117
- });
119
+ if (status === "not_found") {
120
+ const { userOpHash } = userOpInfo;
121
+ await this.statusManager.set([userOpHash], {
122
+ status: "failed",
123
+ transactionHash
124
+ });
125
+ this.eventManager.emitFailedOnChain(userOpHash, transactionHash, blockNumber);
126
+ this.logger.info({
127
+ userOpHash,
128
+ transactionHash
129
+ }, "user op failed onchain");
130
+ this.metrics.userOpsOnChain
131
+ .labels({ status: "reverted" })
132
+ .inc(1);
133
+ }
134
+ })();
135
+ }
118
136
  })();
119
137
  }
120
138
  trackBundle(submittedBundle) {
@@ -131,70 +149,65 @@ export class UserOpMonitor {
131
149
  this.cachedLatestBlock = { value: latestBlock, timestamp: now };
132
150
  return latestBlock;
133
151
  }
134
- cacheReceipt(userOpHash, receipt) {
135
- this.pruneReceiptCache();
136
- this.receiptCache.set(userOpHash, {
137
- receipt,
138
- timestamp: Date.now()
139
- });
140
- }
141
- getCachedReceipt(userOpHash) {
142
- const cached = this.receiptCache.get(userOpHash);
143
- if (!cached) {
144
- return undefined;
145
- }
146
- return cached.receipt;
147
- }
148
- pruneReceiptCache() {
149
- const now = Date.now();
150
- const expiredEntries = Array.from(this.receiptCache.entries()).filter(([_, cached]) => now - cached.timestamp > this.receiptTtl);
151
- for (const [userOpHash] of expiredEntries) {
152
- this.receiptCache.delete(userOpHash);
153
- }
154
- }
155
152
  // Free executors and remove userOps from mempool.
156
153
  async freeSubmittedBundle(submittedBundle) {
157
154
  const { executor, bundle } = submittedBundle;
158
155
  const { userOps, entryPoint } = bundle;
159
156
  this.stopTrackingBundle(submittedBundle);
160
157
  await this.senderManager.markWalletProcessed(executor);
161
- await this.mempool.removeSubmittedUserOps({ entryPoint, userOps });
158
+ await this.mempool.removeProcessing({ entryPoint, userOps });
162
159
  }
163
160
  // Stop tracking bundle in event resubmit fails
164
161
  stopTrackingBundle(submittedBundle) {
165
162
  this.pendingBundles.delete(submittedBundle.uid);
166
163
  }
167
- async processIncludedUserOp(userOpInfo, userOpReceipt, transactionHash, blockNumber, entryPoint) {
168
- const { userOpHash, userOp, submissionAttempts, addedToMempool } = userOpInfo;
169
- this.logger.info({ userOpHash, transactionHash }, "user op included");
170
- // Update status
171
- await this.monitor.setUserOpStatus(userOpHash, {
164
+ async processIncludedUserOps(userOpsBatch, transactionHash, blockNumber, entryPoint, blockReceivedTimestamp) {
165
+ // Update all statuses in one batch
166
+ await this.statusManager.set(userOpsBatch.map(({ userOpInfo }) => userOpInfo.userOpHash), {
172
167
  status: "included",
173
168
  transactionHash
174
169
  });
175
- // Emit appropriate event
176
- if (userOpReceipt.success) {
177
- this.eventManager.emitIncludedOnChain(userOpHash, transactionHash, blockNumber);
178
- }
179
- else {
180
- this.eventManager.emitExecutionRevertedOnChain(userOpHash, transactionHash, userOpReceipt.reason || "0x", blockNumber);
170
+ // Process each userOp
171
+ for (const { userOpInfo, userOpReceipt } of userOpsBatch) {
172
+ const { userOpHash, userOp, submissionAttempts, addedToMempool } = userOpInfo;
173
+ const inclusionTimeMs = blockReceivedTimestamp - addedToMempool;
174
+ this.logger.info({ userOpHash, transactionHash, inclusionTimeMs }, "user op included");
175
+ // Log metric
176
+ this.metrics.userOpsOnChain.labels({ status: "included" }).inc();
177
+ // Emit appropriate event
178
+ if (userOpReceipt.success) {
179
+ this.eventManager.emitIncludedOnChain(userOpHash, transactionHash, blockNumber);
180
+ }
181
+ else {
182
+ this.eventManager.emitExecutionRevertedOnChain(userOpHash, transactionHash, userOpReceipt.reason || "0x", blockNumber);
183
+ }
184
+ // Track metrics
185
+ this.metrics.userOpInclusionDuration.observe(inclusionTimeMs / 1000);
186
+ this.metrics.userOpsSubmissionAttempts.observe(submissionAttempts);
187
+ // Update reputation
188
+ const accountDeployed = this.checkAccountDeployment(userOpReceipt, userOp.sender);
189
+ this.reputationManager.updateUserOpIncludedStatus(userOp, entryPoint, accountDeployed);
181
190
  }
182
- // Track metrics
183
- this.metrics.userOpInclusionDuration.observe((Date.now() - addedToMempool) / 1000);
184
- this.metrics.userOpsSubmissionAttempts.observe(submissionAttempts);
185
- // Update reputation
186
- const accountDeployed = this.checkAccountDeployment(userOpReceipt, userOp.sender);
187
- this.reputationManager.updateUserOpIncludedStatus(userOp, entryPoint, accountDeployed);
188
191
  }
189
- async checkFrontrun(userOpInfo, blockWaitCount = 0) {
192
+ async getUserOpStatus({ userOpInfo, entryPoint, bundlerTxs, blockReceivedTimestamp, blockWaitCount = 0 }) {
190
193
  const { userOpHash } = userOpInfo;
191
194
  // Try to find userOp onchain
192
195
  try {
193
196
  const userOpReceipt = await this.getUserOpReceipt(userOpHash);
197
+ if (userOpReceipt &&
198
+ bundlerTxs.includes(userOpReceipt.receipt.transactionHash)) {
199
+ const { receipt } = userOpReceipt;
200
+ const { blockNumber, transactionHash } = receipt;
201
+ // Cache the receipt
202
+ await this.receiptCache.cache([userOpReceipt]);
203
+ await this.processIncludedUserOps([{ userOpInfo, userOpReceipt }], transactionHash, blockNumber, entryPoint, blockReceivedTimestamp);
204
+ // userOp was bundled by this bundler
205
+ return "included";
206
+ }
194
207
  if (userOpReceipt) {
195
208
  const transactionHash = userOpReceipt.receipt.transactionHash;
196
209
  const blockNumber = userOpReceipt.receipt.blockNumber;
197
- await this.monitor.setUserOpStatus(userOpHash, {
210
+ await this.statusManager.set([userOpHash], {
198
211
  status: "included",
199
212
  transactionHash
200
213
  });
@@ -202,31 +215,37 @@ export class UserOpMonitor {
202
215
  this.logger.info({
203
216
  userOpHash
204
217
  }, "user op frontrun onchain");
205
- this.metrics.userOpsOnChain
206
- .labels({ status: "frontran" })
207
- .inc(1);
208
- return true;
218
+ // Update metrics
219
+ this.metrics.userOpsOnChain.labels({ status: "frontran" }).inc();
220
+ // userOp was bundled by another bundler
221
+ return "frontran";
209
222
  }
210
223
  if (blockWaitCount >= this.config.maxBlockWaitCount) {
211
- return false;
224
+ return "not_found";
212
225
  }
213
226
  return new Promise((resolve) => {
214
227
  setTimeout(() => {
215
- resolve(this.checkFrontrun(userOpInfo, blockWaitCount + 1));
228
+ resolve(this.getUserOpStatus({
229
+ userOpInfo,
230
+ entryPoint,
231
+ bundlerTxs,
232
+ blockReceivedTimestamp,
233
+ blockWaitCount: blockWaitCount + 1
234
+ }));
216
235
  }, this.config.publicClient.chain.blockTime ?? 1_000);
217
236
  });
218
237
  }
219
- catch (error) {
238
+ catch (err) {
220
239
  this.logger.error({
221
- userOpHash,
222
- error
240
+ err,
241
+ userOpHash
223
242
  }, "Error checking frontrun status");
224
- return false;
243
+ return "not_found";
225
244
  }
226
245
  }
227
246
  async getUserOpReceipt(userOpHash) {
228
247
  // Check cache first
229
- const cached = this.getCachedReceipt(userOpHash);
248
+ const cached = await this.receiptCache.get(userOpHash);
230
249
  if (cached) {
231
250
  return cached;
232
251
  }
@@ -272,7 +291,8 @@ export class UserOpMonitor {
272
291
  return null;
273
292
  }
274
293
  const getTransactionReceipt = async (txHash) => {
275
- while (true) {
294
+ const maxRetries = 16;
295
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
276
296
  try {
277
297
  const publicClient = this.config.publicClient;
278
298
  const transactionReceipt = await publicClient.getTransactionReceipt({
@@ -294,16 +314,24 @@ export class UserOpMonitor {
294
314
  }
295
315
  catch (e) {
296
316
  if (e instanceof TransactionReceiptNotFoundError) {
297
- continue;
317
+ if (attempt < maxRetries - 1) {
318
+ // Wait a bit before trying again
319
+ await new Promise((resolve) => setTimeout(resolve, this.config.blockTime / 4));
320
+ continue;
321
+ }
322
+ // Max retries reached, likely a reorg
323
+ throw new Error(`Transaction receipt not found after ${maxRetries} attempts for tx ${txHash}`);
298
324
  }
299
325
  throw e;
300
326
  }
301
327
  }
328
+ // Should never reach here due to the throw in the catch block
329
+ throw new Error(`Failed to get transaction receipt for ${txHash}`);
302
330
  };
303
331
  const receipt = await getTransactionReceipt(txHash);
304
332
  const userOpReceipt = parseUserOpReceipt(userOpHash, receipt);
305
333
  // Cache the receipt before returning
306
- this.cacheReceipt(userOpHash, userOpReceipt);
334
+ await this.receiptCache.cache([userOpReceipt]);
307
335
  return userOpReceipt;
308
336
  }
309
337
  checkAccountDeployment(userOpReceipt, sender) {
@@ -323,4 +351,4 @@ export class UserOpMonitor {
323
351
  });
324
352
  }
325
353
  }
326
- //# sourceMappingURL=userOpMonitor.js.map
354
+ //# sourceMappingURL=bundleManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundleManager.js","sourceRoot":"","sources":["../../executor/bundleManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAOpE,OAAO,EAAqB,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAO1E,OAAO,EAA6B,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAC3E,OAAO,EAMH,+BAA+B,EAC/B,cAAc,EACd,UAAU,EACV,UAAU,EACb,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAqB,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEtE,MAAM,OAAO,aAAa;IACL,iBAAiB,CAA4B;IAC7C,MAAM,CAAY;IAClB,OAAO,CAAS;IAChB,aAAa,CAAe;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AAC,YAAY,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,CAAA;QAE9C,OAAO,aAAa,CAAA;IACxB,CAAC;IAEO,sBAAsB,CAC1B,aAAkB,EAClB,MAAe;QAEf,OAAO,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE;YAChD,IAAI,CAAC;gBACD,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC;oBAC5B,GAAG,EAAE,eAAe;oBACpB,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,SAAS,EAAE,iBAAiB;oBAC5B,MAAM,EAAE,GAAG,CAAC,MAAyB;iBACxC,CAAC,CAAA;gBACF,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,MAAM,CAAA;YAC7C,CAAC;YAAC,MAAM,CAAC;gBACL,OAAO,KAAK,CAAA;YAChB,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC;CACJ"}
@@ -1,8 +1,7 @@
1
1
  import type { EventManager } from "../handlers/index.js";
2
2
  import type { Address, BundleResult, GasPriceParameters, UserOpInfo, UserOperationBundle } from "../types/index.js";
3
3
  import type { Logger } from "../utils/index.js";
4
- import { type Account } from "viem";
5
- import type { SignedAuthorizationList } from "viem";
4
+ import { type Account, type SignedAuthorizationList } from "viem";
6
5
  import type { AltoConfig } from "../createConfig.js";
7
6
  type HandleOpsTxParams = {
8
7
  gas: bigint;
@@ -43,9 +42,11 @@ export declare class Executor {
43
42
  totalBeneficiaryFees: bigint;
44
43
  bundleGasUsed: bigint;
45
44
  }): GasPriceParameters;
46
- sendHandleOpsTransaction({ txParam, gasOpts }: {
45
+ sendHandleOpsTransaction({ txParam, gasOpts, childLogger, submissionAttempts }: {
47
46
  txParam: HandleOpsTxParams;
48
47
  gasOpts: HandleOpsGasParams;
48
+ childLogger: Logger;
49
+ submissionAttempts: number;
49
50
  }): Promise<`0x${string}`>;
50
51
  bundle({ executor, userOpBundle, networkGasPrice, networkBaseFee, nonce }: {
51
52
  executor: Account;