@pimlico/alto 0.0.0-main.20250428T212302 → 0.0.0-main.20250429T114818

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 (384) hide show
  1. package/contracts/EIP712.sol/EIP712.json +1 -0
  2. package/contracts/ERC165.sol/ERC165.json +1 -0
  3. package/contracts/Eip7702Support.sol/Eip7702Support.json +1 -0
  4. package/contracts/EntryPoint.sol/EntryPoint.json +1 -0
  5. package/contracts/EntryPointCodeOverride.sol/EntryPointCodeOverride.json +1 -0
  6. package/contracts/EntryPointSimulations.sol/EntryPointSimulations.json +1 -0
  7. package/contracts/Exec.sol/Exec.json +1 -0
  8. package/contracts/IAccount.sol/IAccount.json +1 -0
  9. package/contracts/IAccountExecute.sol/IAccountExecute.json +1 -0
  10. package/contracts/IAggregator.sol/IAggregator.json +1 -0
  11. package/contracts/IERC165.sol/IERC165.json +1 -0
  12. package/contracts/IERC5267.sol/IERC5267.json +1 -0
  13. package/contracts/IEntryPoint.sol/IEntryPoint.json +1 -0
  14. package/contracts/IEntryPointSimulations.sol/IEntryPointSimulations.json +1 -0
  15. package/contracts/INonceManager.sol/INonceManager.json +1 -0
  16. package/contracts/IPaymaster.sol/IPaymaster.json +1 -0
  17. package/contracts/ISenderCreator.sol/ISenderCreator.json +1 -0
  18. package/contracts/IStakeManager.sol/IStakeManager.json +1 -0
  19. package/contracts/Math.sol/Math.json +1 -0
  20. package/contracts/MessageHashUtils.sol/MessageHashUtils.json +1 -0
  21. package/contracts/NonceManager.sol/NonceManager.json +1 -0
  22. package/contracts/Panic.sol/Panic.json +1 -0
  23. package/contracts/PimlicoEntryPointSimulationsV7.sol/PimlicoEntryPointSimulationsV7.json +1 -0
  24. package/contracts/PimlicoEntryPointSimulationsV8.sol/PimlicoEntryPointSimulationsV8.json +1 -0
  25. package/contracts/ReentrancyGuard.sol/ReentrancyGuard.json +1 -0
  26. package/contracts/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +1 -0
  27. package/contracts/SafeCast.sol/SafeCast.json +1 -0
  28. package/contracts/SenderCreator.sol/SenderCreator.json +1 -0
  29. package/contracts/ShortStrings.sol/ShortStrings.json +1 -0
  30. package/contracts/SignedMath.sol/SignedMath.json +1 -0
  31. package/contracts/StakeManager.sol/StakeManager.json +1 -0
  32. package/contracts/StorageSlot.sol/StorageSlot.json +1 -0
  33. package/contracts/Strings.sol/Strings.json +1 -0
  34. package/contracts/TransientSlot.sol/TransientSlot.json +1 -0
  35. package/contracts/UserOperation.sol/UserOperationLib.json +1 -0
  36. package/contracts/UserOperationLib.sol/UserOperationLib.json +1 -0
  37. package/contracts/build-info/0c52dc19c74a9a932ddddcca463ce398.json +1 -0
  38. package/contracts/build-info/a1d9af887789a0ade8ffbc8b045f0780.json +1 -0
  39. package/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -0
  40. package/esm/cli/deploySimulationsContract.js +14 -5
  41. package/esm/cli/deploySimulationsContract.js.map +1 -1
  42. package/package.json +2 -1
  43. package/lib/cli/alto.d.ts +0 -7
  44. package/lib/cli/alto.js +0 -141
  45. package/lib/cli/alto.js.map +0 -1
  46. package/lib/cli/config/bundler.d.ts +0 -2872
  47. package/lib/cli/config/bundler.js +0 -242
  48. package/lib/cli/config/bundler.js.map +0 -1
  49. package/lib/cli/config/index.d.ts +0 -3
  50. package/lib/cli/config/index.js +0 -19
  51. package/lib/cli/config/index.js.map +0 -1
  52. package/lib/cli/config/options.d.ts +0 -13
  53. package/lib/cli/config/options.js +0 -587
  54. package/lib/cli/config/options.js.map +0 -1
  55. package/lib/cli/customTransport.d.ts +0 -14
  56. package/lib/cli/customTransport.js +0 -94
  57. package/lib/cli/customTransport.js.map +0 -1
  58. package/lib/cli/deploySimulationsContract.d.ts +0 -13
  59. package/lib/cli/deploySimulationsContract.js +0 -100
  60. package/lib/cli/deploySimulationsContract.js.map +0 -1
  61. package/lib/cli/handler.d.ts +0 -3
  62. package/lib/cli/handler.js +0 -157
  63. package/lib/cli/handler.js.map +0 -1
  64. package/lib/cli/index.d.ts +0 -4
  65. package/lib/cli/index.js +0 -20
  66. package/lib/cli/index.js.map +0 -1
  67. package/lib/cli/instrumentation.d.ts +0 -2
  68. package/lib/cli/instrumentation.js +0 -47
  69. package/lib/cli/instrumentation.js.map +0 -1
  70. package/lib/cli/parseArgs.d.ts +0 -8
  71. package/lib/cli/parseArgs.js +0 -25
  72. package/lib/cli/parseArgs.js.map +0 -1
  73. package/lib/cli/setupServer.d.ts +0 -13
  74. package/lib/cli/setupServer.js +0 -266
  75. package/lib/cli/setupServer.js.map +0 -1
  76. package/lib/cli/util.d.ts +0 -22
  77. package/lib/cli/util.js +0 -34
  78. package/lib/cli/util.js.map +0 -1
  79. package/lib/createConfig.d.ts +0 -16
  80. package/lib/createConfig.js +0 -13
  81. package/lib/createConfig.js.map +0 -1
  82. package/lib/executor/executor.d.ts +0 -65
  83. package/lib/executor/executor.js +0 -301
  84. package/lib/executor/executor.js.map +0 -1
  85. package/lib/executor/executorManager.d.ts +0 -108
  86. package/lib/executor/executorManager.js +0 -702
  87. package/lib/executor/executorManager.js.map +0 -1
  88. package/lib/executor/fastlane.d.ts +0 -9
  89. package/lib/executor/fastlane.js +0 -41
  90. package/lib/executor/fastlane.js.map +0 -1
  91. package/lib/executor/filterOpsAndEStimateGas.d.ts +0 -29
  92. package/lib/executor/filterOpsAndEStimateGas.js +0 -225
  93. package/lib/executor/filterOpsAndEStimateGas.js.map +0 -1
  94. package/lib/executor/index.d.ts +0 -5
  95. package/lib/executor/index.js +0 -21
  96. package/lib/executor/index.js.map +0 -1
  97. package/lib/executor/senderManager/createMemorySenderManager.d.ts +0 -8
  98. package/lib/executor/senderManager/createMemorySenderManager.js +0 -45
  99. package/lib/executor/senderManager/createMemorySenderManager.js.map +0 -1
  100. package/lib/executor/senderManager/createRedisSenderManager.d.ts +0 -8
  101. package/lib/executor/senderManager/createRedisSenderManager.js +0 -85
  102. package/lib/executor/senderManager/createRedisSenderManager.js.map +0 -1
  103. package/lib/executor/senderManager/flushOnStartUp.d.ts +0 -9
  104. package/lib/executor/senderManager/flushOnStartUp.js +0 -37
  105. package/lib/executor/senderManager/flushOnStartUp.js.map +0 -1
  106. package/lib/executor/senderManager/index.d.ts +0 -15
  107. package/lib/executor/senderManager/index.js +0 -25
  108. package/lib/executor/senderManager/index.js.map +0 -1
  109. package/lib/executor/senderManager/validateAndRefill.d.ts +0 -11
  110. package/lib/executor/senderManager/validateAndRefill.js +0 -115
  111. package/lib/executor/senderManager/validateAndRefill.js.map +0 -1
  112. package/lib/executor/utilityWalletMonitor.d.ts +0 -19
  113. package/lib/executor/utilityWalletMonitor.js +0 -42
  114. package/lib/executor/utilityWalletMonitor.js.map +0 -1
  115. package/lib/executor/utils.d.ts +0 -34
  116. package/lib/executor/utils.js +0 -167
  117. package/lib/executor/utils.js.map +0 -1
  118. package/lib/handlers/arbitrumGasPriceManager.d.ts +0 -14
  119. package/lib/handlers/arbitrumGasPriceManager.js +0 -39
  120. package/lib/handlers/arbitrumGasPriceManager.js.map +0 -1
  121. package/lib/handlers/eventManager.d.ts +0 -29
  122. package/lib/handlers/eventManager.js +0 -225
  123. package/lib/handlers/eventManager.js.map +0 -1
  124. package/lib/handlers/gasPriceManager.d.ts +0 -36
  125. package/lib/handlers/gasPriceManager.js +0 -391
  126. package/lib/handlers/gasPriceManager.js.map +0 -1
  127. package/lib/handlers/index.d.ts +0 -3
  128. package/lib/handlers/index.js +0 -19
  129. package/lib/handlers/index.js.map +0 -1
  130. package/lib/handlers/mantleGasPriceManager.d.ts +0 -23
  131. package/lib/handlers/mantleGasPriceManager.js +0 -44
  132. package/lib/handlers/mantleGasPriceManager.js.map +0 -1
  133. package/lib/handlers/optimismManager.d.ts +0 -10
  134. package/lib/handlers/optimismManager.js +0 -21
  135. package/lib/handlers/optimismManager.js.map +0 -1
  136. package/lib/index.d.ts +0 -2
  137. package/lib/index.js +0 -4
  138. package/lib/index.js.map +0 -1
  139. package/lib/mempool/index.d.ts +0 -4
  140. package/lib/mempool/index.js +0 -20
  141. package/lib/mempool/index.js.map +0 -1
  142. package/lib/mempool/mempool.d.ts +0 -191
  143. package/lib/mempool/mempool.js +0 -499
  144. package/lib/mempool/mempool.js.map +0 -1
  145. package/lib/mempool/monitoring.d.ts +0 -14
  146. package/lib/mempool/monitoring.js +0 -101
  147. package/lib/mempool/monitoring.js.map +0 -1
  148. package/lib/mempool/reputationManager.d.ts +0 -121
  149. package/lib/mempool/reputationManager.js +0 -472
  150. package/lib/mempool/reputationManager.js.map +0 -1
  151. package/lib/rpc/createMethodHandler.d.ts +0 -31
  152. package/lib/rpc/createMethodHandler.js +0 -34
  153. package/lib/rpc/createMethodHandler.js.map +0 -1
  154. package/lib/rpc/estimation/gasEstimationHandler.d.ts +0 -30
  155. package/lib/rpc/estimation/gasEstimationHandler.js +0 -50
  156. package/lib/rpc/estimation/gasEstimationHandler.js.map +0 -1
  157. package/lib/rpc/estimation/gasEstimationsV06.d.ts +0 -19
  158. package/lib/rpc/estimation/gasEstimationsV06.js +0 -148
  159. package/lib/rpc/estimation/gasEstimationsV06.js.map +0 -1
  160. package/lib/rpc/estimation/gasEstimationsV07.d.ts +0 -101
  161. package/lib/rpc/estimation/gasEstimationsV07.js +0 -727
  162. package/lib/rpc/estimation/gasEstimationsV07.js.map +0 -1
  163. package/lib/rpc/estimation/types.d.ts +0 -120
  164. package/lib/rpc/estimation/types.js +0 -125
  165. package/lib/rpc/estimation/types.js.map +0 -1
  166. package/lib/rpc/index.d.ts +0 -4
  167. package/lib/rpc/index.js +0 -20
  168. package/lib/rpc/index.js.map +0 -1
  169. package/lib/rpc/methods/debug_bundler_clearReputation.d.ts +0 -22
  170. package/lib/rpc/methods/debug_bundler_clearReputation.js +0 -15
  171. package/lib/rpc/methods/debug_bundler_clearReputation.js.map +0 -1
  172. package/lib/rpc/methods/debug_bundler_clearState.d.ts +0 -22
  173. package/lib/rpc/methods/debug_bundler_clearState.js +0 -16
  174. package/lib/rpc/methods/debug_bundler_clearState.js.map +0 -1
  175. package/lib/rpc/methods/debug_bundler_dumpMempool.d.ts +0 -973
  176. package/lib/rpc/methods/debug_bundler_dumpMempool.js +0 -16
  177. package/lib/rpc/methods/debug_bundler_dumpMempool.js.map +0 -1
  178. package/lib/rpc/methods/debug_bundler_dumpReputation.d.ts +0 -57
  179. package/lib/rpc/methods/debug_bundler_dumpReputation.js +0 -16
  180. package/lib/rpc/methods/debug_bundler_dumpReputation.js.map +0 -1
  181. package/lib/rpc/methods/debug_bundler_getStakeStatus.d.ts +0 -79
  182. package/lib/rpc/methods/debug_bundler_getStakeStatus.js +0 -25
  183. package/lib/rpc/methods/debug_bundler_getStakeStatus.js.map +0 -1
  184. package/lib/rpc/methods/debug_bundler_sendBundleNow.d.ts +0 -22
  185. package/lib/rpc/methods/debug_bundler_sendBundleNow.js +0 -15
  186. package/lib/rpc/methods/debug_bundler_sendBundleNow.js.map +0 -1
  187. package/lib/rpc/methods/debug_bundler_setBundlingMode.d.ts +0 -22
  188. package/lib/rpc/methods/debug_bundler_setBundlingMode.js +0 -16
  189. package/lib/rpc/methods/debug_bundler_setBundlingMode.js.map +0 -1
  190. package/lib/rpc/methods/debug_bundler_setReputation.d.ts +0 -46
  191. package/lib/rpc/methods/debug_bundler_setReputation.js +0 -16
  192. package/lib/rpc/methods/debug_bundler_setReputation.js.map +0 -1
  193. package/lib/rpc/methods/eth_chainId.d.ts +0 -22
  194. package/lib/rpc/methods/eth_chainId.js +0 -13
  195. package/lib/rpc/methods/eth_chainId.js.map +0 -1
  196. package/lib/rpc/methods/eth_estimateUserOperationGas.d.ts +0 -1891
  197. package/lib/rpc/methods/eth_estimateUserOperationGas.js +0 -26
  198. package/lib/rpc/methods/eth_estimateUserOperationGas.js.map +0 -1
  199. package/lib/rpc/methods/eth_getUserOperationByHash.d.ts +0 -1775
  200. package/lib/rpc/methods/eth_getUserOperationByHash.js +0 -101
  201. package/lib/rpc/methods/eth_getUserOperationByHash.js.map +0 -1
  202. package/lib/rpc/methods/eth_getUserOperationReceipt.d.ts +0 -412
  203. package/lib/rpc/methods/eth_getUserOperationReceipt.js +0 -14
  204. package/lib/rpc/methods/eth_getUserOperationReceipt.js.map +0 -1
  205. package/lib/rpc/methods/eth_sendUserOperation.d.ts +0 -878
  206. package/lib/rpc/methods/eth_sendUserOperation.js +0 -44
  207. package/lib/rpc/methods/eth_sendUserOperation.js.map +0 -1
  208. package/lib/rpc/methods/eth_supportedEntryPoints.d.ts +0 -22
  209. package/lib/rpc/methods/eth_supportedEntryPoints.js +0 -13
  210. package/lib/rpc/methods/eth_supportedEntryPoints.js.map +0 -1
  211. package/lib/rpc/methods/index.d.ts +0 -3
  212. package/lib/rpc/methods/index.js +0 -44
  213. package/lib/rpc/methods/index.js.map +0 -1
  214. package/lib/rpc/methods/pimlico_getUserOperationGasPrice.d.ts +0 -131
  215. package/lib/rpc/methods/pimlico_getUserOperationGasPrice.js +0 -33
  216. package/lib/rpc/methods/pimlico_getUserOperationGasPrice.js.map +0 -1
  217. package/lib/rpc/methods/pimlico_getUserOperationStatus.d.ts +0 -43
  218. package/lib/rpc/methods/pimlico_getUserOperationStatus.js +0 -14
  219. package/lib/rpc/methods/pimlico_getUserOperationStatus.js.map +0 -1
  220. package/lib/rpc/methods/pimlico_sendUserOperationNow.d.ts +0 -1268
  221. package/lib/rpc/methods/pimlico_sendUserOperationNow.js +0 -55
  222. package/lib/rpc/methods/pimlico_sendUserOperationNow.js.map +0 -1
  223. package/lib/rpc/rpcHandler.d.ts +0 -75
  224. package/lib/rpc/rpcHandler.js +0 -391
  225. package/lib/rpc/rpcHandler.js.map +0 -1
  226. package/lib/rpc/server.d.ts +0 -26
  227. package/lib/rpc/server.js +0 -283
  228. package/lib/rpc/server.js.map +0 -1
  229. package/lib/rpc/validation/BundlerCollectorTracerV06.d.ts +0 -102
  230. package/lib/rpc/validation/BundlerCollectorTracerV06.js +0 -262
  231. package/lib/rpc/validation/BundlerCollectorTracerV06.js.map +0 -1
  232. package/lib/rpc/validation/BundlerCollectorTracerV07.d.ts +0 -102
  233. package/lib/rpc/validation/BundlerCollectorTracerV07.js +0 -261
  234. package/lib/rpc/validation/BundlerCollectorTracerV07.js.map +0 -1
  235. package/lib/rpc/validation/SafeValidator.d.ts +0 -51
  236. package/lib/rpc/validation/SafeValidator.js +0 -327
  237. package/lib/rpc/validation/SafeValidator.js.map +0 -1
  238. package/lib/rpc/validation/TracerResultParserV06.d.ts +0 -13
  239. package/lib/rpc/validation/TracerResultParserV06.js +0 -582
  240. package/lib/rpc/validation/TracerResultParserV06.js.map +0 -1
  241. package/lib/rpc/validation/TracerResultParserV07.d.ts +0 -33
  242. package/lib/rpc/validation/TracerResultParserV07.js +0 -599
  243. package/lib/rpc/validation/TracerResultParserV07.js.map +0 -1
  244. package/lib/rpc/validation/UnsafeValidator.d.ts +0 -97
  245. package/lib/rpc/validation/UnsafeValidator.js +0 -303
  246. package/lib/rpc/validation/UnsafeValidator.js.map +0 -1
  247. package/lib/rpc/validation/index.d.ts +0 -3
  248. package/lib/rpc/validation/index.js +0 -19
  249. package/lib/rpc/validation/index.js.map +0 -1
  250. package/lib/rpc/validation/tracer.d.ts +0 -125
  251. package/lib/rpc/validation/tracer.js +0 -112
  252. package/lib/rpc/validation/tracer.js.map +0 -1
  253. package/lib/store/createMemoryOutstandingStore.d.ts +0 -28
  254. package/lib/store/createMemoryOutstandingStore.js +0 -236
  255. package/lib/store/createMemoryOutstandingStore.js.map +0 -1
  256. package/lib/store/createMempoolStore.d.ts +0 -8
  257. package/lib/store/createMempoolStore.js +0 -199
  258. package/lib/store/createMempoolStore.js.map +0 -1
  259. package/lib/store/createRedisOutstandingStore.d.ts +0 -27
  260. package/lib/store/createRedisOutstandingStore.js +0 -349
  261. package/lib/store/createRedisOutstandingStore.js.map +0 -1
  262. package/lib/store/createRedisStore.d.ts +0 -9
  263. package/lib/store/createRedisStore.js +0 -138
  264. package/lib/store/createRedisStore.js.map +0 -1
  265. package/lib/store/createStore.d.ts +0 -6
  266. package/lib/store/createStore.js +0 -70
  267. package/lib/store/createStore.js.map +0 -1
  268. package/lib/store/index.d.ts +0 -81
  269. package/lib/store/index.js +0 -6
  270. package/lib/store/index.js.map +0 -1
  271. package/lib/types/contracts/ArbitrumL1FeeAbi.d.ts +0 -32
  272. package/lib/types/contracts/ArbitrumL1FeeAbi.js +0 -45
  273. package/lib/types/contracts/ArbitrumL1FeeAbi.js.map +0 -1
  274. package/lib/types/contracts/CallEngine.d.ts +0 -28
  275. package/lib/types/contracts/CallEngine.js +0 -40
  276. package/lib/types/contracts/CallEngine.js.map +0 -1
  277. package/lib/types/contracts/CodeHashGetter.d.ts +0 -37
  278. package/lib/types/contracts/CodeHashGetter.js +0 -48
  279. package/lib/types/contracts/CodeHashGetter.js.map +0 -1
  280. package/lib/types/contracts/EntryPoint.d.ts +0 -1789
  281. package/lib/types/contracts/EntryPoint.js +0 -2307
  282. package/lib/types/contracts/EntryPoint.js.map +0 -1
  283. package/lib/types/contracts/EntryPointSimulationsV6.d.ts +0 -34
  284. package/lib/types/contracts/EntryPointSimulationsV6.js +0 -51
  285. package/lib/types/contracts/EntryPointSimulationsV6.js.map +0 -1
  286. package/lib/types/contracts/EntryPointSimulationsV7.d.ts +0 -2076
  287. package/lib/types/contracts/EntryPointSimulationsV7.js +0 -2678
  288. package/lib/types/contracts/EntryPointSimulationsV7.js.map +0 -1
  289. package/lib/types/contracts/IAccountExecute.d.ts +0 -53
  290. package/lib/types/contracts/IAccountExecute.js +0 -71
  291. package/lib/types/contracts/IAccountExecute.js.map +0 -1
  292. package/lib/types/contracts/IPaymaster.d.ts +0 -3
  293. package/lib/types/contracts/IPaymaster.js +0 -120
  294. package/lib/types/contracts/IPaymaster.js.map +0 -1
  295. package/lib/types/contracts/MantleBvmGasPriceOracle.d.ts +0 -219
  296. package/lib/types/contracts/MantleBvmGasPriceOracle.js +0 -180
  297. package/lib/types/contracts/MantleBvmGasPriceOracle.js.map +0 -1
  298. package/lib/types/contracts/OpL1FeeAbi.d.ts +0 -114
  299. package/lib/types/contracts/OpL1FeeAbi.js +0 -77
  300. package/lib/types/contracts/OpL1FeeAbi.js.map +0 -1
  301. package/lib/types/contracts/PimlicoEntryPointSimulations.d.ts +0 -25
  302. package/lib/types/contracts/PimlicoEntryPointSimulations.js +0 -42
  303. package/lib/types/contracts/PimlicoEntryPointSimulations.js.map +0 -1
  304. package/lib/types/contracts/SenderCreator.d.ts +0 -4
  305. package/lib/types/contracts/SenderCreator.js +0 -26
  306. package/lib/types/contracts/SenderCreator.js.map +0 -1
  307. package/lib/types/contracts/SimpleAccountFactory.d.ts +0 -57
  308. package/lib/types/contracts/SimpleAccountFactory.js +0 -79
  309. package/lib/types/contracts/SimpleAccountFactory.js.map +0 -1
  310. package/lib/types/contracts/TestOpcodesAccount.d.ts +0 -4
  311. package/lib/types/contracts/TestOpcodesAccount.js +0 -284
  312. package/lib/types/contracts/TestOpcodesAccount.js.map +0 -1
  313. package/lib/types/contracts/TestOpcodesAccountFactory.d.ts +0 -4
  314. package/lib/types/contracts/TestOpcodesAccountFactory.js +0 -26
  315. package/lib/types/contracts/TestOpcodesAccountFactory.js.map +0 -1
  316. package/lib/types/contracts/TestStorageAccount.d.ts +0 -4
  317. package/lib/types/contracts/TestStorageAccount.js +0 -316
  318. package/lib/types/contracts/TestStorageAccount.js.map +0 -1
  319. package/lib/types/contracts/index.d.ts +0 -17
  320. package/lib/types/contracts/index.js +0 -33
  321. package/lib/types/contracts/index.js.map +0 -1
  322. package/lib/types/gasPrice.d.ts +0 -110
  323. package/lib/types/gasPrice.js +0 -55
  324. package/lib/types/gasPrice.js.map +0 -1
  325. package/lib/types/index.d.ts +0 -11
  326. package/lib/types/index.js +0 -27
  327. package/lib/types/index.js.map +0 -1
  328. package/lib/types/interfaces.d.ts +0 -58
  329. package/lib/types/interfaces.js +0 -3
  330. package/lib/types/interfaces.js.map +0 -1
  331. package/lib/types/mempool.d.ts +0 -60
  332. package/lib/types/mempool.js +0 -11
  333. package/lib/types/mempool.js.map +0 -1
  334. package/lib/types/schemas.d.ts +0 -20785
  335. package/lib/types/schemas.js +0 -679
  336. package/lib/types/schemas.js.map +0 -1
  337. package/lib/types/utils.d.ts +0 -25
  338. package/lib/types/utils.js +0 -35
  339. package/lib/types/utils.js.map +0 -1
  340. package/lib/types/validation.d.ts +0 -14327
  341. package/lib/types/validation.js +0 -312
  342. package/lib/types/validation.js.map +0 -1
  343. package/lib/utils/asyncTimeout.d.ts +0 -5
  344. package/lib/utils/asyncTimeout.js +0 -51
  345. package/lib/utils/asyncTimeout.js.map +0 -1
  346. package/lib/utils/bigInt.d.ts +0 -8
  347. package/lib/utils/bigInt.js +0 -24
  348. package/lib/utils/bigInt.js.map +0 -1
  349. package/lib/utils/eip7702.d.ts +0 -4
  350. package/lib/utils/eip7702.js +0 -21
  351. package/lib/utils/eip7702.js.map +0 -1
  352. package/lib/utils/fastify-rpc-decorators.d.ts +0 -19
  353. package/lib/utils/fastify-rpc-decorators.js +0 -23
  354. package/lib/utils/fastify-rpc-decorators.js.map +0 -1
  355. package/lib/utils/helpers.d.ts +0 -15
  356. package/lib/utils/helpers.js +0 -59
  357. package/lib/utils/helpers.js.map +0 -1
  358. package/lib/utils/index.d.ts +0 -9
  359. package/lib/utils/index.js +0 -24
  360. package/lib/utils/index.js.map +0 -1
  361. package/lib/utils/logger.d.ts +0 -6
  362. package/lib/utils/logger.js +0 -85
  363. package/lib/utils/logger.js.map +0 -1
  364. package/lib/utils/metrics.d.ts +0 -29
  365. package/lib/utils/metrics.js +0 -199
  366. package/lib/utils/metrics.js.map +0 -1
  367. package/lib/utils/minMaxQueue/createMemoryMinMaxQueue.d.ts +0 -6
  368. package/lib/utils/minMaxQueue/createMemoryMinMaxQueue.js +0 -57
  369. package/lib/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +0 -1
  370. package/lib/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +0 -7
  371. package/lib/utils/minMaxQueue/createRedisMinMaxQueue.js +0 -105
  372. package/lib/utils/minMaxQueue/createRedisMinMaxQueue.js.map +0 -1
  373. package/lib/utils/minMaxQueue/index.d.ts +0 -12
  374. package/lib/utils/minMaxQueue/index.js +0 -16
  375. package/lib/utils/minMaxQueue/index.js.map +0 -1
  376. package/lib/utils/rpc-reply.d.ts +0 -16
  377. package/lib/utils/rpc-reply.js +0 -41
  378. package/lib/utils/rpc-reply.js.map +0 -1
  379. package/lib/utils/userop.d.ts +0 -138
  380. package/lib/utils/userop.js +0 -620
  381. package/lib/utils/userop.js.map +0 -1
  382. package/lib/utils/validation.d.ts +0 -76
  383. package/lib/utils/validation.js +0 -491
  384. package/lib/utils/validation.js.map +0 -1
@@ -1,76 +0,0 @@
1
- import type { GasPriceManager } from "../handlers/index.js";
2
- import { type Address, type PackedUserOperation, type UserOperation, type UserOperationV06 } from "../types/index.js";
3
- import { type Chain, ContractFunctionRevertedError, EstimateGasExecutionError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooLowError, NonceTooLowError, type PublicClient, type Transport, InternalRpcError } from "viem";
4
- import type { AltoConfig } from "../createConfig.js";
5
- export interface GasOverheads {
6
- /**
7
- * fixed overhead for entire handleOp bundle.
8
- */
9
- fixed: number;
10
- /**
11
- * per userOp overhead, added on top of the above fixed per-bundle.
12
- */
13
- perUserOp: number;
14
- /**
15
- * overhead for userOp word (32 bytes) block
16
- */
17
- perUserOpWord: number;
18
- /**
19
- * zero byte cost, for calldata gas cost calculations
20
- */
21
- zeroByte: number;
22
- /**
23
- * non-zero byte cost, for calldata gas cost calculations
24
- */
25
- nonZeroByte: number;
26
- /**
27
- * expected bundle size, to split per-bundle overhead between all ops.
28
- */
29
- bundleSize: number;
30
- /**
31
- * expected length of the userOp signature.
32
- */
33
- sigSize: number;
34
- }
35
- export declare const DefaultGasOverheads: GasOverheads;
36
- /**
37
- * pack the userOperation
38
- * @param op
39
- * "false" to pack entire UserOp, for calculating the calldata cost of putting it on-chain.
40
- */
41
- export declare function packUserOpV06(op: UserOperationV06): `0x${string}`;
42
- export declare function removeZeroBytesFromUserOp<T extends UserOperation>(userOpearation: T): T extends UserOperationV06 ? UserOperationV06 : PackedUserOperation;
43
- export declare function packUserOpV07(op: PackedUserOperation): `0x${string}`;
44
- export declare function calcPreVerificationGas({ config, userOperation, entryPoint, gasPriceManager, validate, overheads }: {
45
- config: AltoConfig;
46
- userOperation: UserOperation;
47
- entryPoint: Address;
48
- gasPriceManager: GasPriceManager;
49
- validate: boolean;
50
- overheads?: GasOverheads;
51
- }): Promise<bigint>;
52
- export declare function calcVerificationGasAndCallGasLimit(userOperation: UserOperation, executionResult: {
53
- preOpGas: bigint;
54
- paid: bigint;
55
- }, gasLimits?: {
56
- callGasLimit?: bigint;
57
- verificationGasLimit?: bigint;
58
- paymasterVerificationGasLimit?: bigint;
59
- }): {
60
- verificationGasLimit: bigint;
61
- callGasLimit: bigint;
62
- paymasterVerificationGasLimit: bigint;
63
- };
64
- /**
65
- * calculate the preVerificationGas of the given UserOperation
66
- * preVerificationGas (by definition) is the cost overhead that can't be calculated on-chain.
67
- * it is based on parameters that are defined by the Ethereum protocol for external transactions.
68
- * @param userOp filled userOp to calculate. The only possible missing fields can be the signature and preVerificationGas itself
69
- * @param overheads gas overheads to use, to override the default values
70
- */
71
- export declare function calcDefaultPreVerificationGas(userOperation: UserOperation, overheads?: Partial<GasOverheads>): bigint;
72
- export declare function calcMantlePreVerificationGas(publicClient: PublicClient<Transport, Chain>, op: UserOperation, entryPoint: Address, staticFee: bigint, gasPriceManager: GasPriceManager, verify?: boolean): Promise<bigint>;
73
- export declare function calcOptimismPreVerificationGas(publicClient: PublicClient<Transport, Chain>, op: UserOperation, entryPoint: Address, staticFee: bigint, gasPriceManager: GasPriceManager, validate: boolean): Promise<bigint>;
74
- export declare function calcArbitrumPreVerificationGas(publicClient: PublicClient<Transport, Chain | undefined>, op: UserOperation, entryPoint: Address, staticFee: bigint, gasPriceManager: GasPriceManager, validate: boolean): Promise<bigint>;
75
- export declare function parseViemError(err: unknown): NonceTooLowError | FeeCapTooLowError | InsufficientFundsError | IntrinsicGasTooLowError | ContractFunctionRevertedError | EstimateGasExecutionError | InternalRpcError | undefined;
76
- //# sourceMappingURL=validation.d.ts.map
@@ -1,491 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseViemError = exports.calcArbitrumPreVerificationGas = exports.calcOptimismPreVerificationGas = exports.calcMantlePreVerificationGas = exports.calcDefaultPreVerificationGas = exports.calcVerificationGasAndCallGasLimit = exports.calcPreVerificationGas = exports.packUserOpV07 = exports.removeZeroBytesFromUserOp = exports.packUserOpV06 = exports.DefaultGasOverheads = void 0;
7
- const types_1 = require("../types/index.js");
8
- const viem_1 = require("viem");
9
- const bigInt_1 = require("./bigInt.js");
10
- const userop_1 = require("./userop.js");
11
- const ArbitrumL1FeeAbi_1 = require("../types/contracts/ArbitrumL1FeeAbi.js");
12
- const crypto_1 = __importDefault(require("crypto"));
13
- exports.DefaultGasOverheads = {
14
- fixed: 21000,
15
- perUserOp: 18300,
16
- perUserOpWord: 4,
17
- zeroByte: 4,
18
- nonZeroByte: 16,
19
- bundleSize: 1,
20
- sigSize: 65
21
- };
22
- /**
23
- * pack the userOperation
24
- * @param op
25
- * "false" to pack entire UserOp, for calculating the calldata cost of putting it on-chain.
26
- */
27
- function packUserOpV06(op) {
28
- return (0, viem_1.encodeAbiParameters)([
29
- {
30
- internalType: "address",
31
- name: "sender",
32
- type: "address"
33
- },
34
- {
35
- internalType: "uint256",
36
- name: "nonce",
37
- type: "uint256"
38
- },
39
- {
40
- internalType: "bytes",
41
- name: "initCode",
42
- type: "bytes"
43
- },
44
- {
45
- internalType: "bytes",
46
- name: "callData",
47
- type: "bytes"
48
- },
49
- {
50
- internalType: "uint256",
51
- name: "callGasLimit",
52
- type: "uint256"
53
- },
54
- {
55
- internalType: "uint256",
56
- name: "verificationGasLimit",
57
- type: "uint256"
58
- },
59
- {
60
- internalType: "uint256",
61
- name: "preVerificationGas",
62
- type: "uint256"
63
- },
64
- {
65
- internalType: "uint256",
66
- name: "maxFeePerGas",
67
- type: "uint256"
68
- },
69
- {
70
- internalType: "uint256",
71
- name: "maxPriorityFeePerGas",
72
- type: "uint256"
73
- },
74
- {
75
- internalType: "bytes",
76
- name: "paymasterAndData",
77
- type: "bytes"
78
- },
79
- {
80
- internalType: "bytes",
81
- name: "signature",
82
- type: "bytes"
83
- }
84
- ], [
85
- op.sender,
86
- BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
87
- op.initCode,
88
- op.callData,
89
- BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
90
- BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
91
- BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
92
- BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
93
- BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"),
94
- (0, viem_1.bytesToHex)(new Uint8Array(op.paymasterAndData.length).fill(255)),
95
- (0, viem_1.bytesToHex)(new Uint8Array(op.signature.length).fill(255))
96
- ]);
97
- }
98
- exports.packUserOpV06 = packUserOpV06;
99
- function removeZeroBytesFromUserOp(userOpearation) {
100
- if ((0, userop_1.isVersion06)(userOpearation)) {
101
- return {
102
- sender: userOpearation.sender,
103
- nonce: userOpearation.nonce,
104
- initCode: userOpearation.initCode,
105
- callData: userOpearation.callData,
106
- callGasLimit: viem_1.maxUint256,
107
- verificationGasLimit: viem_1.maxUint256,
108
- preVerificationGas: viem_1.maxUint256,
109
- maxFeePerGas: viem_1.maxUint256,
110
- maxPriorityFeePerGas: viem_1.maxUint256,
111
- paymasterAndData: (0, viem_1.bytesToHex)(new Uint8Array(userOpearation.paymasterAndData.length).fill(255)),
112
- signature: (0, viem_1.bytesToHex)(new Uint8Array(userOpearation.signature.length).fill(255))
113
- };
114
- }
115
- const packedUserOperation = (0, userop_1.toPackedUserOperation)(userOpearation);
116
- return {
117
- sender: packedUserOperation.sender,
118
- nonce: viem_1.maxUint256,
119
- initCode: packedUserOperation.initCode,
120
- callData: packedUserOperation.callData,
121
- accountGasLimits: (0, viem_1.toHex)(viem_1.maxUint256),
122
- preVerificationGas: viem_1.maxUint256,
123
- gasFees: (0, viem_1.toHex)(viem_1.maxUint256),
124
- paymasterAndData: (0, viem_1.bytesToHex)(new Uint8Array(packedUserOperation.paymasterAndData.length).fill(255)),
125
- signature: (0, viem_1.bytesToHex)(new Uint8Array(packedUserOperation.signature.length).fill(255))
126
- };
127
- }
128
- exports.removeZeroBytesFromUserOp = removeZeroBytesFromUserOp;
129
- function packUserOpV07(op) {
130
- return (0, viem_1.encodeAbiParameters)([
131
- {
132
- internalType: "address",
133
- name: "sender",
134
- type: "address"
135
- },
136
- {
137
- internalType: "uint256",
138
- name: "nonce",
139
- type: "uint256"
140
- },
141
- {
142
- internalType: "bytes",
143
- name: "initCode",
144
- type: "bytes"
145
- },
146
- {
147
- internalType: "bytes",
148
- name: "callData",
149
- type: "bytes"
150
- },
151
- {
152
- internalType: "uint256",
153
- name: "accountGasLimits",
154
- type: "bytes32"
155
- },
156
- {
157
- internalType: "uint256",
158
- name: "preVerificationGas",
159
- type: "uint256"
160
- },
161
- {
162
- internalType: "uint256",
163
- name: "gasFees",
164
- type: "bytes32"
165
- },
166
- {
167
- internalType: "bytes",
168
- name: "paymasterAndData",
169
- type: "bytes"
170
- },
171
- {
172
- internalType: "bytes",
173
- name: "signature",
174
- type: "bytes"
175
- }
176
- ], [
177
- op.sender,
178
- op.nonce, // need non zero bytes to get better estimations for preVerificationGas
179
- op.initCode,
180
- op.callData,
181
- op.accountGasLimits, // need non zero bytes to get better estimations for preVerificationGas
182
- op.preVerificationGas, // need non zero bytes to get better estimations for preVerificationGas
183
- op.gasFees, // need non zero bytes to get better estimations for preVerificationGas
184
- op.paymasterAndData,
185
- op.signature
186
- ]);
187
- }
188
- exports.packUserOpV07 = packUserOpV07;
189
- async function calcPreVerificationGas({ config, userOperation, entryPoint, gasPriceManager, validate, overheads }) {
190
- let preVerificationGas = calcDefaultPreVerificationGas(userOperation, overheads);
191
- switch (config.chainType) {
192
- case "op-stack":
193
- return await calcOptimismPreVerificationGas(config.publicClient, userOperation, entryPoint, preVerificationGas, gasPriceManager, validate);
194
- case "arbitrum":
195
- return await calcArbitrumPreVerificationGas(config.publicClient, userOperation, entryPoint, preVerificationGas, gasPriceManager, validate);
196
- case "mantle":
197
- return await calcMantlePreVerificationGas(config.publicClient, userOperation, entryPoint, preVerificationGas, gasPriceManager, validate);
198
- default:
199
- return preVerificationGas;
200
- }
201
- }
202
- exports.calcPreVerificationGas = calcPreVerificationGas;
203
- function calcVerificationGasAndCallGasLimit(userOperation, executionResult, gasLimits) {
204
- const verificationGasLimit = gasLimits?.verificationGasLimit ??
205
- (0, bigInt_1.scaleBigIntByPercent)(executionResult.preOpGas - userOperation.preVerificationGas, 150n);
206
- const calculatedCallGasLimit = gasLimits?.callGasLimit ??
207
- executionResult.paid / userOperation.maxFeePerGas -
208
- executionResult.preOpGas;
209
- let callGasLimit = (0, bigInt_1.maxBigInt)(calculatedCallGasLimit, 9000n);
210
- if ((0, userop_1.isVersion06)(userOperation)) {
211
- callGasLimit += 21000n + 50000n;
212
- }
213
- return {
214
- verificationGasLimit,
215
- callGasLimit,
216
- paymasterVerificationGasLimit: gasLimits?.paymasterVerificationGasLimit ?? 0n
217
- };
218
- }
219
- exports.calcVerificationGasAndCallGasLimit = calcVerificationGasAndCallGasLimit;
220
- /**
221
- * calculate the preVerificationGas of the given UserOperation
222
- * preVerificationGas (by definition) is the cost overhead that can't be calculated on-chain.
223
- * it is based on parameters that are defined by the Ethereum protocol for external transactions.
224
- * @param userOp filled userOp to calculate. The only possible missing fields can be the signature and preVerificationGas itself
225
- * @param overheads gas overheads to use, to override the default values
226
- */
227
- function calcDefaultPreVerificationGas(userOperation, overheads) {
228
- const ov = { ...exports.DefaultGasOverheads, ...(overheads ?? {}) };
229
- const p = removeZeroBytesFromUserOp(userOperation);
230
- let packed;
231
- if ((0, userop_1.isVersion06)(userOperation)) {
232
- packed = (0, viem_1.toBytes)(packUserOpV06(p));
233
- }
234
- else {
235
- packed = (0, viem_1.toBytes)(packUserOpV07(p));
236
- }
237
- const lengthInWord = (packed.length + 31) / 32;
238
- const callDataCost = packed
239
- .map((x) => (x === 0 ? ov.zeroByte : ov.nonZeroByte))
240
- .reduce((sum, x) => sum + x);
241
- const authorizationCost = userOperation.eip7702Auth
242
- ? 37500 // overhead for PER_EMPTY_ACCOUNT_COST + PER_AUTH_BASE_COST
243
- : 0;
244
- const ret = Math.round(authorizationCost +
245
- callDataCost +
246
- ov.fixed / ov.bundleSize +
247
- ov.perUserOp +
248
- ov.perUserOpWord * lengthInWord);
249
- return BigInt(ret);
250
- }
251
- exports.calcDefaultPreVerificationGas = calcDefaultPreVerificationGas;
252
- // Returns back the bytes for the handleOps call
253
- function getHandleOpsCallData(op, entryPoint) {
254
- if ((0, userop_1.isVersion07)(op)) {
255
- return (0, viem_1.encodeFunctionData)({
256
- abi: types_1.EntryPointV07Abi,
257
- functionName: "handleOps",
258
- args: [[removeZeroBytesFromUserOp(op)], entryPoint]
259
- });
260
- }
261
- return (0, viem_1.encodeFunctionData)({
262
- abi: types_1.EntryPointV06Abi,
263
- functionName: "handleOps",
264
- args: [[removeZeroBytesFromUserOp(op)], entryPoint]
265
- });
266
- }
267
- async function calcMantlePreVerificationGas(publicClient, op, entryPoint, staticFee, gasPriceManager, verify) {
268
- const data = getHandleOpsCallData(op, entryPoint);
269
- const serializedTx = (0, viem_1.serializeTransaction)({
270
- to: entryPoint,
271
- chainId: publicClient.chain.id,
272
- nonce: 999999,
273
- gasLimit: viem_1.maxUint64,
274
- gasPrice: viem_1.maxUint64,
275
- data
276
- }, {
277
- r: "0x123451234512345123451234512345123451234512345123451234512345",
278
- s: "0x123451234512345123451234512345123451234512345123451234512345",
279
- v: 28n
280
- });
281
- let tokenRatio;
282
- let scalar;
283
- let rollupDataGasAndOverhead;
284
- let l1GasPrice;
285
- const mantleManager = gasPriceManager.mantleManager;
286
- if (verify) {
287
- const minValues = await mantleManager.getMinMantleOracleValues();
288
- tokenRatio = minValues.minTokenRatio;
289
- scalar = minValues.minScalar;
290
- rollupDataGasAndOverhead = minValues.minRollupDataGasAndOverhead;
291
- l1GasPrice = minValues.minL1GasPrice;
292
- }
293
- else {
294
- ;
295
- [tokenRatio, scalar, rollupDataGasAndOverhead, l1GasPrice] =
296
- await Promise.all([
297
- publicClient.readContract({
298
- address: "0x420000000000000000000000000000000000000F",
299
- abi: types_1.MantleBvmGasPriceOracleAbi,
300
- functionName: "tokenRatio"
301
- }),
302
- publicClient.readContract({
303
- address: "0x420000000000000000000000000000000000000F",
304
- abi: types_1.MantleBvmGasPriceOracleAbi,
305
- functionName: "scalar"
306
- }),
307
- publicClient.readContract({
308
- address: "0x420000000000000000000000000000000000000F",
309
- abi: types_1.MantleBvmGasPriceOracleAbi,
310
- functionName: "getL1GasUsed",
311
- args: [serializedTx]
312
- }),
313
- publicClient.readContract({
314
- address: "0x420000000000000000000000000000000000000F",
315
- abi: types_1.MantleBvmGasPriceOracleAbi,
316
- functionName: "l1BaseFee"
317
- })
318
- ]);
319
- mantleManager.saveMantleOracleValues({
320
- tokenRatio,
321
- scalar,
322
- rollupDataGasAndOverhead,
323
- l1GasPrice
324
- });
325
- }
326
- const mantleL1RollUpFeeDivisionFactor = 1000000n;
327
- const l1RollupFee = (rollupDataGasAndOverhead * l1GasPrice * tokenRatio * scalar) /
328
- mantleL1RollUpFeeDivisionFactor;
329
- const maxFeePerGas = await (verify
330
- ? gasPriceManager.getHighestMaxFeePerGas()
331
- : gasPriceManager.getGasPrice().then((res) => res.maxFeePerGas));
332
- const l2MaxFee = BigInt(maxFeePerGas);
333
- return staticFee + l1RollupFee / l2MaxFee;
334
- }
335
- exports.calcMantlePreVerificationGas = calcMantlePreVerificationGas;
336
- function getOpStackHandleOpsCallData(op, entryPoint, verify) {
337
- let modifiedOp = {
338
- ...op
339
- };
340
- // Only randomize signature during estimations.
341
- if (!verify) {
342
- const randomizeBytes = (length) => (0, viem_1.toHex)(crypto_1.default.randomBytes(length).toString("hex"));
343
- const sigLength = (0, viem_1.size)(op.signature);
344
- let newSignature;
345
- if (sigLength < 65) {
346
- // For short signatures, randomize the entire thing
347
- newSignature = randomizeBytes(sigLength);
348
- }
349
- else {
350
- // For longer signatures, only randomize the last 65 bytes
351
- const originalPart = (0, viem_1.slice)(op.signature, 0, sigLength - 65);
352
- const randomPart = randomizeBytes(65);
353
- newSignature = (0, viem_1.concat)([originalPart, randomPart]);
354
- }
355
- modifiedOp = {
356
- ...op,
357
- signature: newSignature
358
- };
359
- }
360
- if ((0, userop_1.isVersion07)(modifiedOp)) {
361
- return (0, viem_1.encodeFunctionData)({
362
- abi: types_1.EntryPointV07Abi,
363
- functionName: "handleOps",
364
- args: [[(0, userop_1.toPackedUserOperation)(modifiedOp)], entryPoint]
365
- });
366
- }
367
- return (0, viem_1.encodeFunctionData)({
368
- abi: types_1.EntryPointV06Abi,
369
- functionName: "handleOps",
370
- args: [[modifiedOp], entryPoint]
371
- });
372
- }
373
- async function calcOptimismPreVerificationGas(publicClient, op, entryPoint, staticFee, gasPriceManager, validate) {
374
- const data = getOpStackHandleOpsCallData(op, entryPoint, validate);
375
- const serializedTx = (0, viem_1.serializeTransaction)({
376
- to: entryPoint,
377
- chainId: publicClient.chain.id,
378
- maxFeePerGas: (0, viem_1.parseGwei)("120"),
379
- maxPriorityFeePerGas: (0, viem_1.parseGwei)("120"),
380
- gas: 10000000n,
381
- data
382
- }, {
383
- r: "0x123451234512345123451234512345123451234512345123451234512345",
384
- s: "0x123451234512345123451234512345123451234512345123451234512345",
385
- yParity: 1
386
- });
387
- const opGasPriceOracle = (0, viem_1.getContract)({
388
- abi: types_1.OpL1FeeAbi,
389
- address: "0x420000000000000000000000000000000000000F",
390
- client: {
391
- public: publicClient
392
- }
393
- });
394
- const [l1Fee, baseFeePerGas] = await Promise.all([
395
- validate
396
- ? gasPriceManager.optimismManager.getMinL1Fee()
397
- : opGasPriceOracle.read.getL1Fee([serializedTx]),
398
- validate
399
- ? gasPriceManager.getMaxBaseFeePerGas()
400
- : gasPriceManager.getBaseFee()
401
- ]);
402
- let l2MaxFee;
403
- let l2PriorityFee;
404
- if (validate) {
405
- l2MaxFee = await gasPriceManager.getHighestMaxFeePerGas();
406
- l2PriorityFee =
407
- baseFeePerGas +
408
- (await gasPriceManager.getHighestMaxPriorityFeePerGas());
409
- }
410
- else {
411
- const gasPrices = await gasPriceManager.getGasPrice();
412
- l2MaxFee = gasPrices.maxFeePerGas;
413
- l2PriorityFee = baseFeePerGas + gasPrices.maxPriorityFeePerGas;
414
- }
415
- const l2price = (0, bigInt_1.minBigInt)(l2MaxFee, l2PriorityFee);
416
- return staticFee + l1Fee / l2price;
417
- }
418
- exports.calcOptimismPreVerificationGas = calcOptimismPreVerificationGas;
419
- async function calcArbitrumPreVerificationGas(publicClient, op, entryPoint, staticFee, gasPriceManager, validate) {
420
- const data = getHandleOpsCallData(op, entryPoint);
421
- const precompileAddress = "0x00000000000000000000000000000000000000C8";
422
- const serializedTx = (0, viem_1.serializeTransaction)({
423
- to: entryPoint,
424
- chainId: publicClient.chain?.id ?? 10,
425
- nonce: 999999,
426
- gasLimit: viem_1.maxUint64,
427
- gasPrice: viem_1.maxUint64,
428
- data
429
- }, {
430
- r: "0x123451234512345123451234512345123451234512345123451234512345",
431
- s: "0x123451234512345123451234512345123451234512345123451234512345",
432
- v: 28n
433
- });
434
- const arbGasPriceOracle = (0, viem_1.getContract)({
435
- abi: ArbitrumL1FeeAbi_1.ArbitrumL1FeeAbi,
436
- address: precompileAddress,
437
- client: {
438
- public: publicClient
439
- }
440
- });
441
- const { result } = await arbGasPriceOracle.simulate.gasEstimateL1Component([
442
- entryPoint,
443
- false,
444
- serializedTx
445
- ]);
446
- let [gasForL1, l2BaseFee, l1BaseFeeEstimate] = result;
447
- const arbitrumManager = gasPriceManager.arbitrumManager;
448
- arbitrumManager.saveL1BaseFee(l1BaseFeeEstimate);
449
- arbitrumManager.saveL2BaseFee(l2BaseFee);
450
- if (validate) {
451
- const [maxL1Fee, minL1Fee, maxL2Fee] = await Promise.all([
452
- l1BaseFeeEstimate || arbitrumManager.getMaxL1BaseFee(),
453
- arbitrumManager.getMinL1BaseFee(),
454
- arbitrumManager.getMaxL2BaseFee()
455
- ]);
456
- gasForL1 = (gasForL1 * l2BaseFee * minL1Fee) / (maxL1Fee * maxL2Fee);
457
- }
458
- return staticFee + gasForL1;
459
- }
460
- exports.calcArbitrumPreVerificationGas = calcArbitrumPreVerificationGas;
461
- function parseViemError(err) {
462
- if (err instanceof viem_1.ContractFunctionExecutionError ||
463
- err instanceof viem_1.TransactionExecutionError) {
464
- const e = err.cause;
465
- if (e instanceof viem_1.NonceTooLowError) {
466
- return e;
467
- }
468
- if (e instanceof viem_1.FeeCapTooLowError) {
469
- return e;
470
- }
471
- if (e instanceof viem_1.InsufficientFundsError) {
472
- return e;
473
- }
474
- if (e instanceof viem_1.IntrinsicGasTooLowError) {
475
- return e;
476
- }
477
- if (e instanceof viem_1.ContractFunctionRevertedError) {
478
- return e;
479
- }
480
- if (e instanceof viem_1.EstimateGasExecutionError) {
481
- return e;
482
- }
483
- if (e instanceof viem_1.InternalRpcError) {
484
- return e;
485
- }
486
- return;
487
- }
488
- return;
489
- }
490
- exports.parseViemError = parseViemError;
491
- //# sourceMappingURL=validation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../utils/validation.ts"],"names":[],"mappings":";;;;;;AACA,uCAUoB;AACpB,+BA0Ba;AACb,qCAAqE;AACrE,qCAA0E;AAE1E,0EAAsE;AACtE,oDAA2B;AAyCd,QAAA,mBAAmB,GAAiB;IAC7C,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,EAAE;CACd,CAAA;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,EAAoB;IAC9C,OAAO,IAAA,0BAAmB,EACtB;QACI;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,OAAO;YACrB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO;SAChB;QACD;YACI,YAAY,EAAE,OAAO;YACrB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO;SAChB;QACD;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,SAAS;SAClB;QACD;YACI,YAAY,EAAE,OAAO;YACrB,IAA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