@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
@@ -5,6 +5,9 @@ import entrypointSimulationsJsonV7 from "../contracts/EntryPointSimulations.sol/
5
5
  import entrypointSimulationsJsonV8 from "../contracts/EntryPointSimulations.sol/EntryPointSimulations08.json" with {
6
6
  type: "json"
7
7
  };
8
+ import entrypointSimulationsJsonV9 from "../contracts/EntryPointSimulations.sol/EntryPointSimulations09.json" with {
9
+ type: "json"
10
+ };
8
11
  import pimlicoSimulationsJson from "../contracts/PimlicoSimulations.sol/PimlicoSimulations.json" with {
9
12
  type: "json"
10
13
  };
@@ -39,10 +42,17 @@ export const deploySimulationsContract = async ({ logger, args, publicClient })
39
42
  salt,
40
43
  from: args.deterministicDeployerAddress
41
44
  });
42
- const [isPimlicoDeployed, isDeployedV7, isDeployedV8, isDeterministicDeployerDeployed] = await Promise.all([
45
+ const epSimulationsV9 = getContractAddress({
46
+ opcode: "CREATE2",
47
+ bytecode: entrypointSimulationsJsonV9.bytecode.object,
48
+ salt,
49
+ from: args.deterministicDeployerAddress
50
+ });
51
+ const [isPimlicoDeployed, isDeployedV7, isDeployedV8, isDeployedV9, isDeterministicDeployerDeployed] = await Promise.all([
43
52
  isContractDeployed({ publicClient, address: pimlicoSimulations }),
44
53
  isContractDeployed({ publicClient, address: epSimulationsV7 }),
45
54
  isContractDeployed({ publicClient, address: epSimulationsV8 }),
55
+ isContractDeployed({ publicClient, address: epSimulationsV9 }),
46
56
  isContractDeployed({
47
57
  publicClient,
48
58
  address: args.deterministicDeployerAddress
@@ -50,12 +60,14 @@ export const deploySimulationsContract = async ({ logger, args, publicClient })
50
60
  ]);
51
61
  if (isDeployedV7 &&
52
62
  isDeployedV8 &&
63
+ isDeployedV9 &&
53
64
  isPimlicoDeployed &&
54
65
  isDeterministicDeployerDeployed) {
55
66
  return {
56
67
  pimlicoSimulationContract: pimlicoSimulations,
57
68
  entrypointSimulationContractV7: epSimulationsV7,
58
- entrypointSimulationContractV8: epSimulationsV8
69
+ entrypointSimulationContractV8: epSimulationsV8,
70
+ entrypointSimulationContractV9: epSimulationsV9
59
71
  };
60
72
  }
61
73
  const walletClient = createWalletClient({
@@ -119,19 +131,43 @@ export const deploySimulationsContract = async ({ logger, args, publicClient })
119
131
  logger.error("Failed to deploy simulationsContract V8");
120
132
  }
121
133
  }
134
+ if (!isDeployedV9) {
135
+ try {
136
+ const deployHash = await walletClient.sendTransaction({
137
+ chain: publicClient.chain,
138
+ to: args.deterministicDeployerAddress,
139
+ data: concat([
140
+ salt,
141
+ entrypointSimulationsJsonV9.bytecode.object
142
+ ])
143
+ });
144
+ await publicClient.waitForTransactionReceipt({
145
+ hash: deployHash
146
+ });
147
+ }
148
+ catch {
149
+ logger.error("Failed to deploy simulationsContract V9");
150
+ }
151
+ }
122
152
  const deployStatus = await Promise.all([
123
153
  isContractDeployed({ publicClient, address: pimlicoSimulations }),
124
154
  isContractDeployed({ publicClient, address: epSimulationsV7 }),
125
- isContractDeployed({ publicClient, address: epSimulationsV8 })
155
+ isContractDeployed({ publicClient, address: epSimulationsV8 }),
156
+ isContractDeployed({ publicClient, address: epSimulationsV9 })
126
157
  ]);
127
158
  // EntryPointSimulationsV8 is optional as not all chains support cancun.
128
- if (!deployStatus[1]) {
129
- logger.error("Failed to deploy simulationsContract V8");
159
+ if (!deployStatus[2]) {
160
+ logger.error("Failed to deploy simulationsContract 0.7");
161
+ }
162
+ // EntryPointSimulationsV8 is optional as not all chains support cancun.
163
+ if (!deployStatus[3]) {
164
+ logger.error("Failed to deploy simulationsContract 0.9");
130
165
  }
131
166
  if (deployStatus[0]) {
132
167
  return {
133
168
  entrypointSimulationContractV7: epSimulationsV7,
134
169
  entrypointSimulationContractV8: epSimulationsV8,
170
+ entrypointSimulationContractV9: epSimulationsV9,
135
171
  pimlicoSimulationContract: pimlicoSimulations
136
172
  };
137
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deploySimulationsContract.js","sourceRoot":"","sources":["../../cli/deploySimulationsContract.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,IAAI,EAKJ,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACZ,MAAM,MAAM,CAAA;AACb,OAAO,2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,8BAA8B,EAAE,eAAe;YAC/C,yBAAyB,EAAE,kBAAkB;SAChD,CAAA;IACL,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;AAC3D,CAAC,CAAA"}
@@ -1,16 +1,24 @@
1
1
  import { GasPriceManager } from "../handlers/index.js";
2
- import { createMetrics, initDebugLogger, initProductionLogger } from "../utils/index.js";
2
+ import { createMetrics, formatNativeBalance, initDebugLogger, initProductionLogger } from "../utils/index.js";
3
3
  import { Registry } from "prom-client";
4
- import { createPublicClient, createWalletClient, fallback, formatEther, publicActions } from "viem";
4
+ import { createPublicClient, createWalletClient, fallback, publicActions } from "viem";
5
5
  import * as chains from "viem/chains";
6
6
  import { createConfig } from "../createConfig.js";
7
7
  import { getSenderManager } from "../executor/senderManager/index.js";
8
- import { UtilityWalletMonitor } from "../executor/utilityWalletMonitor.js";
9
8
  import { customTransport } from "./customTransport.js";
10
9
  import { deploySimulationsContract } from "./deploySimulationsContract.js";
10
+ import { multiRpcTransport } from "./multiRpcTransport.js";
11
11
  import { parseArgs } from "./parseArgs.js";
12
12
  import { setupServer } from "./setupServer.js";
13
13
  const preFlightChecks = async (config) => {
14
+ // Check horizontal scaling configuration
15
+ if (config.enableHorizontalScaling && !config.redisEndpoint) {
16
+ throw new Error("Horizontal scaling is enabled but redis-endpoint is not configured.");
17
+ }
18
+ // Check Redis receipt cache configuration
19
+ if (config.enableRedisReceiptCache && !config.redisEndpoint) {
20
+ throw new Error("Redis receipt cache is enabled but redis-endpoint is not configured.");
21
+ }
14
22
  for (const entrypoint of config.entrypoints) {
15
23
  const entryPointCode = await config.publicClient.getCode({
16
24
  address: entrypoint
@@ -48,15 +56,17 @@ const preFlightChecks = async (config) => {
48
56
  // )
49
57
  // }
50
58
  // }
51
- if (config.refillHelperContract) {
52
- const refillHelper = config.refillHelperContract;
53
- const refillHelperCode = await config.publicClient.getCode({
54
- address: refillHelper
55
- });
56
- if (refillHelperCode === undefined || refillHelperCode === "0x") {
57
- throw new Error(`RefillHelper contract ${refillHelper} does not exist`);
58
- }
59
- }
59
+ // if (config.entrypointSimulationContractV9) {
60
+ // const simulations = config.entrypointSimulationContractV9
61
+ // const simulationsCode = await config.publicClient.getCode({
62
+ // address: simulations
63
+ // })
64
+ // if (simulationsCode === undefined || simulationsCode === "0x") {
65
+ // throw new Error(
66
+ // `EntryPointSimulationsV9 contract ${simulations} does not exist`
67
+ // )
68
+ // }
69
+ // }
60
70
  };
61
71
  const getViemChain = ({ chainId, args }) => {
62
72
  for (const chain of Object.values(chains)) {
@@ -75,6 +85,7 @@ const getViemChain = ({ chainId, args }) => {
75
85
  };
76
86
  export async function bundlerHandler(args_) {
77
87
  const args = parseArgs(args_);
88
+ const enableCors = args.enableCors;
78
89
  const logger = args.json
79
90
  ? initProductionLogger(args.logLevel)
80
91
  : initDebugLogger(args.logLevel);
@@ -103,7 +114,8 @@ export async function bundlerHandler(args_) {
103
114
  rpcUrls: {
104
115
  default: { http: [args.rpcUrl] },
105
116
  public: { http: [args.rpcUrl] }
106
- }
117
+ },
118
+ experimental_preconfirmationTime: args.flashblocksPreconfirmationTime
107
119
  };
108
120
  let publicClient = createPublicClient({
109
121
  transport: customTransport(args.rpcUrl, {
@@ -111,74 +123,50 @@ export async function bundlerHandler(args_) {
111
123
  level: args.publicClientLogLevel || args.logLevel
112
124
  })
113
125
  }),
114
- pollingInterval: args.blockTime / 2,
126
+ pollingInterval: args.blockPollingInterval ?? args.blockTime / 2,
115
127
  chain
116
128
  });
117
- // When Flashblocks support is enabled, override the relevant public actions
118
- // to always query against the "pending" block tag as per
119
- // https://docs.base.org/chain/flashblocks/apps
120
- if (args.flashblocksEnabled) {
121
- publicClient = publicClient
122
- .extend((client) => ({
123
- // @ts-ignore
124
- async getBlock(args) {
125
- if (args?.blockHash !== undefined ||
126
- args?.blockNumber !== undefined) {
127
- return await client.getBlock(args);
128
- }
129
- return await client.getBlock({
130
- blockTag: "pending"
131
- });
132
- },
133
- async getBalance(args) {
134
- if (args.blockNumber !== undefined) {
135
- return await client.getBalance(args);
136
- }
137
- return await client.getBalance({
138
- address: args.address,
139
- blockNumber: undefined,
140
- blockTag: "pending"
141
- });
142
- },
143
- async getTransactionCount(args) {
144
- if (args.blockNumber !== undefined) {
145
- return await client.getTransactionCount(args);
146
- }
147
- return await client.getTransactionCount({
148
- address: args.address,
149
- blockNumber: undefined,
150
- blockTag: "pending"
151
- });
152
- }
153
- }))
154
- // @ts-ignore
155
- .extend(publicActions);
156
- }
157
129
  // Some permissioned chains require a whitelisted address to make deployments.
158
130
  // In order for simulations to work, we need to make our eth_call's from a whitelisted address.
159
131
  if (args.ethCallSenderAddress) {
160
132
  const whitelistedSender = args.ethCallSenderAddress;
161
- publicClient = publicClient
162
- .extend((client) => ({
133
+ const withEthCallSender = (client) => ({
163
134
  async call(args) {
164
- args.account = whitelistedSender;
165
- return await client.call(args);
135
+ return await client.call({
136
+ ...args,
137
+ account: whitelistedSender
138
+ });
166
139
  }
167
- }))
168
- .extend(publicActions);
140
+ });
141
+ publicClient = publicClient
142
+ .extend(withEthCallSender)
143
+ .extend(publicActions)
144
+ .extend(withEthCallSender);
169
145
  }
170
146
  const createWalletTransport = (url) => customTransport(url, {
171
147
  logger: logger.child({ module: "wallet_client" }, { level: args.walletClientLogLevel || args.logLevel })
172
148
  });
173
- const walletClient = createWalletClient({
174
- transport: args.sendTransactionRpcUrl
175
- ? fallback([
176
- createWalletTransport(args.sendTransactionRpcUrl),
177
- createWalletTransport(args.rpcUrl)
178
- ], { rank: false })
179
- : createWalletTransport(args.rpcUrl),
180
- chain
181
- });
149
+ const walletClients = {
150
+ private: args.sendTransactionRpcUrl
151
+ ? createWalletClient({
152
+ transport: fallback([
153
+ multiRpcTransport(args.sendTransactionRpcUrl, {
154
+ chainId,
155
+ logger: logger.child({ module: "wallet_client" }, {
156
+ level: args.walletClientLogLevel ||
157
+ args.logLevel
158
+ })
159
+ }),
160
+ createWalletTransport(args.rpcUrl)
161
+ ], { rank: false }),
162
+ chain
163
+ })
164
+ : undefined,
165
+ public: createWalletClient({
166
+ transport: createWalletTransport(args.rpcUrl),
167
+ chain
168
+ })
169
+ };
182
170
  // if flag is set, use utility wallet to deploy the simulations contract
183
171
  if (args.deploySimulationsContract) {
184
172
  const deployedContracts = await deploySimulationsContract({
@@ -190,15 +178,24 @@ export async function bundlerHandler(args_) {
190
178
  deployedContracts.entrypointSimulationContractV7;
191
179
  args.entrypointSimulationContractV8 =
192
180
  deployedContracts.entrypointSimulationContractV8;
181
+ args.entrypointSimulationContractV9 =
182
+ deployedContracts.entrypointSimulationContractV9;
193
183
  args.pimlicoSimulationContract =
194
184
  deployedContracts.pimlicoSimulationContract;
195
185
  logger.info({
196
186
  entrypointSimulationContractV7: deployedContracts.entrypointSimulationContractV7,
197
187
  entrypointSimulationContractV8: deployedContracts.entrypointSimulationContractV8,
188
+ entrypointSimulationContractV9: deployedContracts.entrypointSimulationContractV9,
198
189
  pimlicoSimulationContract: deployedContracts.pimlicoSimulationContract
199
190
  }, "Contracts used for simulation");
200
191
  }
201
- const config = createConfig({ ...args, logger, publicClient, walletClient });
192
+ const config = createConfig({
193
+ ...args,
194
+ logger,
195
+ publicClient,
196
+ walletClients,
197
+ enableCors
198
+ });
202
199
  const gasPriceManager = new GasPriceManager(config);
203
200
  await gasPriceManager.init();
204
201
  const registry = new Registry();
@@ -208,16 +205,15 @@ export async function bundlerHandler(args_) {
208
205
  config,
209
206
  metrics
210
207
  });
211
- const utilityWalletAddress = config.utilityPrivateKey?.address;
212
- if (utilityWalletAddress && config.utilityWalletMonitor) {
213
- const utilityWalletMonitor = new UtilityWalletMonitor({
214
- config,
215
- metrics,
216
- utilityWalletAddress
217
- });
218
- await utilityWalletMonitor.start();
219
- }
220
- metrics.executorWalletsMinBalance.set(Number.parseFloat(formatEther(config.minExecutorBalance || 0n)));
208
+ metrics.executorWalletsMinBalance.set(formatNativeBalance({
209
+ value: config.minExecutorBalance || 0n,
210
+ config
211
+ }));
212
+ const numExecutors = senderManager.getAllWallets().length;
213
+ metrics.executorWalletsRequiredBalance.set(formatNativeBalance({
214
+ value: (config.minExecutorBalance || 0n) * BigInt(numExecutors),
215
+ config
216
+ }));
221
217
  await setupServer({
222
218
  config,
223
219
  registry,
@@ -1 +1 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../cli/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EACH,aAAa,EACb,eAAe,EACf,oBAAoB,EACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAMH,kBAAkB,EAClB,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,aAAa,EAChB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAmB,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,eAAe,GAAG,KAAK,EAAE,MAAkB,EAAiB,EAAE;IAChE,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,cAAc,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC;YACrD,OAAO,EAAE,UAAU;SACtB,CAAC,CAAA;QACF,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,eAAe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../utils/index.js";
2
+ import { type HttpTransportConfig, type Transport } from "viem";
3
+ export declare function multiRpcTransport(urls: string[], config: HttpTransportConfig & {
4
+ logger: Logger;
5
+ chainId: number;
6
+ }): Transport;
7
+ //# sourceMappingURL=multiRpcTransport.d.ts.map
@@ -0,0 +1,52 @@
1
+ import { createTransport, numberToHex } from "viem";
2
+ import { customTransport } from "./customTransport.js";
3
+ // Fans out every request to all urls in parallel, resolving with the first
4
+ // successful response and rejecting only if every endpoint fails. Fanning out
5
+ // non-send methods too keeps a lagging or method-restricted endpoint (e.g. a
6
+ // sequencer that only accepts eth_sendRawTransaction) from stalling requests.
7
+ // eth_chainId is answered locally: viem calls it before every sendTransaction
8
+ // and some endpoints don't allow it.
9
+ export function multiRpcTransport(urls, config) {
10
+ const { key = "multiRpc", name = "Multi RPC JSON-RPC", logger, chainId } = config;
11
+ return ({ chain, retryCount, timeout }) => {
12
+ const transports = urls.map((url) => customTransport(url, {
13
+ ...config,
14
+ logger: logger.child({ sendTransactionRpcUrl: url })
15
+ })({ chain, retryCount: 0, timeout }));
16
+ return createTransport({
17
+ key,
18
+ name,
19
+ request: (async ({ method, params }) => {
20
+ if (method === "eth_chainId") {
21
+ return numberToHex(chainId);
22
+ }
23
+ const sends = transports.map((transport, index) => {
24
+ const send = transport.request({ method, params });
25
+ // Handle every rejection eagerly so an endpoint failing
26
+ // after another already succeeded can never become an
27
+ // unhandled rejection.
28
+ send.catch((err) => {
29
+ logger.warn({ err, url: urls[index], method }, "multi rpc endpoint request failed");
30
+ });
31
+ return send;
32
+ });
33
+ try {
34
+ return await Promise.any(sends);
35
+ }
36
+ catch (err) {
37
+ // Rethrow the first endpoint's error instead of the
38
+ // AggregateError so viem's error classification (nonce
39
+ // too low, underpriced, ...) keeps working.
40
+ if (err instanceof AggregateError) {
41
+ throw err.errors[0];
42
+ }
43
+ throw err;
44
+ }
45
+ }),
46
+ retryCount: config.retryCount ?? retryCount,
47
+ timeout,
48
+ type: "http"
49
+ });
50
+ };
51
+ }
52
+ //# sourceMappingURL=multiRpcTransport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiRpcTransport.js","sourceRoot":"","sources":["../../cli/multiRpcTransport.ts"],"names":[],"mappings":"AACA,OAAO,EAIH,eAAe,EACf,WAAW,EACd,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,qCAAqC;AACrC,MAAM,UAAU,iBAAiB,CAC7B,IAAc,EACd,MAAiE;IAEjE,MAAM,EACF,GAAG,GAAG,UAAU,EAChB,IAAI,GAAG,oBAAoB,EAC3B,MAAM,EACN,OAAO,EACV,GAAG,MAAM,CAAA;IAEV,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE;QACtC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAChC,eAAe,CAAC,GAAG,EAAE;YACjB,GAAG,MAAM;YACT,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC;SACvD,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CACxC,CAAA;QAED,OAAO,eAAe,CAAC;YACnB,GAAG;YACH,IAAI;YACJ,OAAO,EAAE,CAAC,KAAK,EAAE,EACb,MAAM,EACN,MAAM,EAIT,EAAE,EAAE;gBACD,IAAI,MAAM,KAAK,aAAa,EAAE,CAAC;oBAC3B,OAAO,WAAW,CAAC,OAAO,CAAC,CAAA;gBAC/B,CAAC;gBAED,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE;oBAC9C,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,E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