@pimlico/alto 0.0.3 → 0.0.5

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 (247) hide show
  1. package/esm/cli/alto.js +0 -4
  2. package/esm/cli/alto.js.map +1 -1
  3. package/esm/cli/config/bundler.d.ts +2302 -22
  4. package/esm/cli/config/bundler.js +32 -4
  5. package/esm/cli/config/bundler.js.map +1 -1
  6. package/esm/cli/config/options.js +59 -4
  7. package/esm/cli/config/options.js.map +1 -1
  8. package/esm/cli/customTransport.js +5 -1
  9. package/esm/cli/customTransport.js.map +1 -1
  10. package/esm/cli/handler.js +39 -4
  11. package/esm/cli/handler.js.map +1 -1
  12. package/esm/cli/instrumentation.js +2 -2
  13. package/esm/cli/instrumentation.js.map +1 -1
  14. package/esm/cli/setupServer.d.ts +2 -1
  15. package/esm/cli/setupServer.js +51 -27
  16. package/esm/cli/setupServer.js.map +1 -1
  17. package/esm/executor/executor.d.ts +7 -14
  18. package/esm/executor/executor.js +139 -128
  19. package/esm/executor/executor.js.map +1 -1
  20. package/esm/executor/executorManager.d.ts +58 -4
  21. package/esm/executor/executorManager.js +206 -52
  22. package/esm/executor/executorManager.js.map +1 -1
  23. package/esm/executor/senderManager.d.ts +2 -1
  24. package/esm/executor/senderManager.js +3 -0
  25. package/esm/executor/senderManager.js.map +1 -1
  26. package/esm/executor/utilityWalletMonitor.d.ts +15 -0
  27. package/esm/executor/utilityWalletMonitor.js +38 -0
  28. package/esm/executor/utilityWalletMonitor.js.map +1 -0
  29. package/esm/executor/utils.d.ts +1 -2
  30. package/esm/executor/utils.js +49 -38
  31. package/esm/executor/utils.js.map +1 -1
  32. package/esm/handlers/compressionHandler.js.map +1 -0
  33. package/esm/handlers/eventManager.d.ts +21 -0
  34. package/esm/handlers/eventManager.js +166 -0
  35. package/esm/handlers/eventManager.js.map +1 -0
  36. package/{lib/utils → esm/handlers}/gasPriceManager.d.ts +19 -5
  37. package/esm/{utils → handlers}/gasPriceManager.js +58 -13
  38. package/esm/handlers/gasPriceManager.js.map +1 -0
  39. package/esm/handlers/index.d.ts +4 -0
  40. package/esm/handlers/index.js +4 -0
  41. package/esm/handlers/index.js.map +1 -0
  42. package/esm/mempool/index.d.ts +0 -1
  43. package/esm/mempool/index.js +0 -1
  44. package/esm/mempool/index.js.map +1 -1
  45. package/esm/mempool/mempool.d.ts +4 -2
  46. package/esm/mempool/mempool.js +70 -26
  47. package/esm/mempool/mempool.js.map +1 -1
  48. package/esm/mempool/reputationManager.js +7 -3
  49. package/esm/mempool/reputationManager.js.map +1 -1
  50. package/esm/rpc/EntryPointSimulationsV07.d.ts +7 -3
  51. package/esm/rpc/EntryPointSimulationsV07.js +12 -9
  52. package/esm/rpc/EntryPointSimulationsV07.js.map +1 -1
  53. package/esm/rpc/gasEstimation.d.ts +3 -3
  54. package/esm/rpc/gasEstimation.js +23 -14
  55. package/esm/rpc/gasEstimation.js.map +1 -1
  56. package/esm/rpc/nonceQueuer.d.ts +4 -1
  57. package/esm/rpc/nonceQueuer.js +9 -3
  58. package/esm/rpc/nonceQueuer.js.map +1 -1
  59. package/esm/rpc/rpcHandler.d.ts +53 -3
  60. package/esm/rpc/rpcHandler.js +150 -238
  61. package/esm/rpc/rpcHandler.js.map +1 -1
  62. package/esm/rpc/server.d.ts +2 -1
  63. package/esm/rpc/server.js +10 -1
  64. package/esm/rpc/server.js.map +1 -1
  65. package/esm/rpc/validation/SafeValidator.d.ts +5 -8
  66. package/esm/rpc/validation/SafeValidator.js +51 -208
  67. package/esm/rpc/validation/SafeValidator.js.map +1 -1
  68. package/esm/rpc/validation/TracerResultParserV07.js +6 -2
  69. package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
  70. package/esm/rpc/validation/UnsafeValidator.d.ts +7 -3
  71. package/esm/rpc/validation/UnsafeValidator.js +52 -48
  72. package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
  73. package/esm/rpc/validation/tracer.js +1 -0
  74. package/esm/rpc/validation/tracer.js.map +1 -1
  75. package/esm/types/contracts/EntryPointSimulations.d.ts +0 -1
  76. package/esm/types/contracts/EntryPointSimulations.js +1941 -2
  77. package/esm/types/contracts/EntryPointSimulations.js.map +1 -1
  78. package/esm/types/contracts/PimlicoEntryPointSimulations.d.ts +1 -1
  79. package/esm/types/contracts/PimlicoEntryPointSimulations.js +1 -1
  80. package/esm/types/contracts/PimlicoEntryPointSimulations.js.map +1 -1
  81. package/esm/types/schemas.d.ts +1029 -333
  82. package/esm/types/schemas.js +94 -20
  83. package/esm/types/schemas.js.map +1 -1
  84. package/esm/types/utils.d.ts +1 -1
  85. package/esm/types/validation.js +7 -2
  86. package/esm/types/validation.js.map +1 -1
  87. package/esm/utils/bigInt.d.ts +1 -0
  88. package/esm/utils/bigInt.js +4 -0
  89. package/esm/utils/bigInt.js.map +1 -1
  90. package/esm/utils/helpers.d.ts +1 -0
  91. package/esm/utils/helpers.js +6 -0
  92. package/esm/utils/helpers.js.map +1 -1
  93. package/esm/utils/index.d.ts +0 -3
  94. package/esm/utils/index.js +0 -3
  95. package/esm/utils/index.js.map +1 -1
  96. package/esm/utils/metrics.d.ts +4 -0
  97. package/esm/utils/metrics.js +29 -1
  98. package/esm/utils/metrics.js.map +1 -1
  99. package/esm/utils/rpc-reply.d.ts +1 -1
  100. package/esm/utils/rpc-reply.js +2 -1
  101. package/esm/utils/rpc-reply.js.map +1 -1
  102. package/esm/utils/userop.d.ts +66 -6
  103. package/esm/utils/userop.js +182 -95
  104. package/esm/utils/userop.js.map +1 -1
  105. package/esm/utils/validation.d.ts +1 -1
  106. package/esm/utils/validation.js +9 -13
  107. package/esm/utils/validation.js.map +1 -1
  108. package/lib/cli/alto.js +0 -4
  109. package/lib/cli/alto.js.map +1 -1
  110. package/lib/cli/config/bundler.d.ts +2302 -22
  111. package/lib/cli/config/bundler.js +31 -3
  112. package/lib/cli/config/bundler.js.map +1 -1
  113. package/lib/cli/config/options.js +59 -4
  114. package/lib/cli/config/options.js.map +1 -1
  115. package/lib/cli/customTransport.js +5 -1
  116. package/lib/cli/customTransport.js.map +1 -1
  117. package/lib/cli/handler.js +38 -3
  118. package/lib/cli/handler.js.map +1 -1
  119. package/lib/cli/instrumentation.js +2 -2
  120. package/lib/cli/instrumentation.js.map +1 -1
  121. package/lib/cli/setupServer.d.ts +2 -1
  122. package/lib/cli/setupServer.js +52 -28
  123. package/lib/cli/setupServer.js.map +1 -1
  124. package/lib/executor/executor.d.ts +7 -14
  125. package/lib/executor/executor.js +138 -128
  126. package/lib/executor/executor.js.map +1 -1
  127. package/lib/executor/executorManager.d.ts +58 -4
  128. package/lib/executor/executorManager.js +204 -50
  129. package/lib/executor/executorManager.js.map +1 -1
  130. package/lib/executor/senderManager.d.ts +2 -1
  131. package/lib/executor/senderManager.js +3 -0
  132. package/lib/executor/senderManager.js.map +1 -1
  133. package/lib/executor/utilityWalletMonitor.d.ts +15 -0
  134. package/lib/executor/utilityWalletMonitor.js +42 -0
  135. package/lib/executor/utilityWalletMonitor.js.map +1 -0
  136. package/lib/executor/utils.d.ts +1 -2
  137. package/lib/executor/utils.js +48 -37
  138. package/lib/executor/utils.js.map +1 -1
  139. package/lib/handlers/compressionHandler.js.map +1 -0
  140. package/lib/handlers/eventManager.d.ts +21 -0
  141. package/lib/handlers/eventManager.js +196 -0
  142. package/lib/handlers/eventManager.js.map +1 -0
  143. package/{esm/utils → lib/handlers}/gasPriceManager.d.ts +19 -5
  144. package/lib/{utils → handlers}/gasPriceManager.js +58 -13
  145. package/lib/handlers/gasPriceManager.js.map +1 -0
  146. package/lib/handlers/index.d.ts +4 -0
  147. package/lib/handlers/index.js +20 -0
  148. package/lib/handlers/index.js.map +1 -0
  149. package/lib/mempool/index.d.ts +0 -1
  150. package/lib/mempool/index.js +0 -1
  151. package/lib/mempool/index.js.map +1 -1
  152. package/lib/mempool/mempool.d.ts +4 -2
  153. package/lib/mempool/mempool.js +70 -26
  154. package/lib/mempool/mempool.js.map +1 -1
  155. package/lib/mempool/reputationManager.js +7 -3
  156. package/lib/mempool/reputationManager.js.map +1 -1
  157. package/lib/rpc/EntryPointSimulationsV07.d.ts +7 -3
  158. package/lib/rpc/EntryPointSimulationsV07.js +13 -9
  159. package/lib/rpc/EntryPointSimulationsV07.js.map +1 -1
  160. package/lib/rpc/gasEstimation.d.ts +3 -3
  161. package/lib/rpc/gasEstimation.js +23 -14
  162. package/lib/rpc/gasEstimation.js.map +1 -1
  163. package/lib/rpc/nonceQueuer.d.ts +4 -1
  164. package/lib/rpc/nonceQueuer.js +9 -3
  165. package/lib/rpc/nonceQueuer.js.map +1 -1
  166. package/lib/rpc/rpcHandler.d.ts +53 -3
  167. package/lib/rpc/rpcHandler.js +147 -258
  168. package/lib/rpc/rpcHandler.js.map +1 -1
  169. package/lib/rpc/server.d.ts +2 -1
  170. package/lib/rpc/server.js +10 -1
  171. package/lib/rpc/server.js.map +1 -1
  172. package/lib/rpc/validation/SafeValidator.d.ts +5 -8
  173. package/lib/rpc/validation/SafeValidator.js +50 -207
  174. package/lib/rpc/validation/SafeValidator.js.map +1 -1
  175. package/lib/rpc/validation/TracerResultParserV07.js +6 -2
  176. package/lib/rpc/validation/TracerResultParserV07.js.map +1 -1
  177. package/lib/rpc/validation/UnsafeValidator.d.ts +7 -3
  178. package/lib/rpc/validation/UnsafeValidator.js +52 -48
  179. package/lib/rpc/validation/UnsafeValidator.js.map +1 -1
  180. package/lib/rpc/validation/tracer.js +1 -0
  181. package/lib/rpc/validation/tracer.js.map +1 -1
  182. package/lib/types/contracts/EntryPointSimulations.d.ts +0 -1
  183. package/lib/types/contracts/EntryPointSimulations.js +1942 -3
  184. package/lib/types/contracts/EntryPointSimulations.js.map +1 -1
  185. package/lib/types/contracts/PimlicoEntryPointSimulations.d.ts +1 -1
  186. package/lib/types/contracts/PimlicoEntryPointSimulations.js +2 -2
  187. package/lib/types/contracts/PimlicoEntryPointSimulations.js.map +1 -1
  188. package/lib/types/schemas.d.ts +1029 -333
  189. package/lib/types/schemas.js +93 -19
  190. package/lib/types/schemas.js.map +1 -1
  191. package/lib/types/utils.d.ts +1 -1
  192. package/lib/types/validation.js +7 -2
  193. package/lib/types/validation.js.map +1 -1
  194. package/lib/utils/bigInt.d.ts +1 -0
  195. package/lib/utils/bigInt.js +6 -1
  196. package/lib/utils/bigInt.js.map +1 -1
  197. package/lib/utils/helpers.d.ts +1 -0
  198. package/lib/utils/helpers.js +8 -1
  199. package/lib/utils/helpers.js.map +1 -1
  200. package/lib/utils/index.d.ts +0 -3
  201. package/lib/utils/index.js +0 -3
  202. package/lib/utils/index.js.map +1 -1
  203. package/lib/utils/metrics.d.ts +4 -0
  204. package/lib/utils/metrics.js +29 -1
  205. package/lib/utils/metrics.js.map +1 -1
  206. package/lib/utils/rpc-reply.d.ts +1 -1
  207. package/lib/utils/rpc-reply.js +2 -1
  208. package/lib/utils/rpc-reply.js.map +1 -1
  209. package/lib/utils/userop.d.ts +66 -6
  210. package/lib/utils/userop.js +184 -95
  211. package/lib/utils/userop.js.map +1 -1
  212. package/lib/utils/validation.d.ts +1 -1
  213. package/lib/utils/validation.js +9 -36
  214. package/lib/utils/validation.js.map +1 -1
  215. package/package.json +16 -14
  216. package/esm/executor/test/utils.d.ts +0 -13
  217. package/esm/executor/test/utils.js +0 -75
  218. package/esm/executor/test/utils.js.map +0 -1
  219. package/esm/mempool/nullMempool.d.ts +0 -15
  220. package/esm/mempool/nullMempool.js +0 -36
  221. package/esm/mempool/nullMempool.js.map +0 -1
  222. package/esm/types/test/validationTestErrors.d.ts +0 -3
  223. package/esm/types/test/validationTestErrors.js +0 -229
  224. package/esm/types/test/validationTestErrors.js.map +0 -1
  225. package/esm/utils/compressionHandler.js.map +0 -1
  226. package/esm/utils/gasPriceManager.js.map +0 -1
  227. package/esm/utils/test.d.ts +0 -17
  228. package/esm/utils/test.js +0 -130
  229. package/esm/utils/test.js.map +0 -1
  230. package/lib/executor/test/utils.d.ts +0 -13
  231. package/lib/executor/test/utils.js +0 -81
  232. package/lib/executor/test/utils.js.map +0 -1
  233. package/lib/mempool/nullMempool.d.ts +0 -15
  234. package/lib/mempool/nullMempool.js +0 -40
  235. package/lib/mempool/nullMempool.js.map +0 -1
  236. package/lib/types/test/validationTestErrors.d.ts +0 -3
  237. package/lib/types/test/validationTestErrors.js +0 -232
  238. package/lib/types/test/validationTestErrors.js.map +0 -1
  239. package/lib/utils/compressionHandler.js.map +0 -1
  240. package/lib/utils/gasPriceManager.js.map +0 -1
  241. package/lib/utils/test.d.ts +0 -17
  242. package/lib/utils/test.js +0 -161
  243. package/lib/utils/test.js.map +0 -1
  244. /package/esm/{utils → handlers}/compressionHandler.d.ts +0 -0
  245. /package/esm/{utils → handlers}/compressionHandler.js +0 -0
  246. /package/lib/{utils → handlers}/compressionHandler.d.ts +0 -0
  247. /package/lib/{utils → handlers}/compressionHandler.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"setupServer.js","sourceRoot":"","sources":["../../cli/setupServer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EACH,aAAa,EACb,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EAEpB,MAAM,eAAe,CAAA;AACtB,OAAO,EACH,WAAW,EACX,UAAU,EACV,aAAa,EACb,MAAM,EACN,eAAe,EAClB,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAKhD,MAAM,oBAAoB,GAAG,CAAC,EAC1B,MAAM,EACN,UAAU,EACV,MAAM,EAKT,EAA8B,EAAE;IAC7B,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1B,OAAO,IAAI,iBAAiB,CACxB,MAAM,EACN,UAAU,CAAC,WAAW,EACtB,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,EACtC,MAAM,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,EAC9C,MAAM,CAAC,KAAK,CACR,EAAE,MAAM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AAE,CAAC;QACxD,QAAQ,CAAC,sBAAsB,EAAE,CAAA;IACrC,CAAC;IAED,UAAU,CAAC,IAAI,CACX,eAAe,aAAa,CAAC,OAAO,CAAC,MAAM,mBAAmB,CACjE,CAAA;IAED,MAAM,MAAM,GAAG,SAAS,CAAC;QACrB,WAAW;QACX,UAAU;QACV,MAAM;QACN,QAAQ;QACR,OAAO;KACV,CAAC,CAAA;IAEF,MAAM,CAAC,KAAK,EAAE,CAAA;IAEd,MAAM,gBAAgB,GAAG,KAAK,EAAE,MAAc,EAAE,EAAE;QAC9C,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,0BAA0B,CAAC,CAAA;QAEpD,MAAM,MAAM,CAAC,IAAI,EAAE,CAAA;QACnB,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAEjC,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,MAAM,CAAA;QACpD,MAAM,SAAS,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,MAAM,CAAA;QACnD,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,CAAA;QAClD,UAAU,CAAC,IAAI,CACX,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,EACtC,iCAAiC,CACpC,CAAA;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACnB,CAAC,CAAA;IAED,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAA;IACtC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAA;AAC3C,CAAC,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import type { SenderManager } from "./index.js";
2
2
  import type { InterfaceReputationManager } from "../mempool/index.js";
3
- import { type Address, type BundleResult, type CompressedUserOperation, type HexData32, type TransactionInfo, type UserOperation } from "../types/index.js";
4
- import type { GasPriceManager, Logger, Metrics } from "../utils/index.js";
5
- import { type CompressionHandler } from "../utils/index.js";
3
+ import { type TransactionInfo, type Address, type UserOperation, type BundleResult, type CompressedUserOperation } from "../types/index.js";
4
+ import type { Logger, Metrics } from "../utils/index.js";
5
+ import type { GasPriceManager, CompressionHandler, EventManager } from "../handlers/index.js";
6
6
  import { Mutex } from "async-mutex";
7
7
  import { type Account, type Chain, type PublicClient, type Transport, type WalletClient } from "viem";
8
8
  export interface GasEstimateResult {
@@ -18,15 +18,6 @@ export type ReplaceTransactionResult = {
18
18
  } | {
19
19
  status: "failed";
20
20
  };
21
- export declare class NullExecutor {
22
- bundle(_entryPoint: Address, _ops: UserOperation[]): Promise<BundleResult[]>;
23
- bundleCompressed(_entryPoint: Address, _compressedOps: CompressedUserOperation[]): Promise<BundleResult[]>;
24
- replaceTransaction(_entryPoint: Address, _transactionInfo: TransactionInfo): Promise<ReplaceTransactionResult>;
25
- replaceOps(_opHashes: HexData32[]): Promise<void>;
26
- cancelOps(_entryPoint: Address, _ops: UserOperation[]): Promise<void>;
27
- markWalletProcessed(_executor: Account): Promise<void>;
28
- flushStuckTransactions(): Promise<void>;
29
- }
30
21
  export declare class Executor {
31
22
  publicClient: PublicClient;
32
23
  walletClient: WalletClient<Transport, Chain, Account | undefined>;
@@ -41,9 +32,11 @@ export declare class Executor {
41
32
  reputationManager: InterfaceReputationManager;
42
33
  compressionHandler: CompressionHandler | null;
43
34
  gasPriceManager: GasPriceManager;
44
- disableBlockTagSupport: boolean;
35
+ blockTagSupport: boolean;
45
36
  mutex: Mutex;
46
- constructor(publicClient: PublicClient, walletClient: WalletClient<Transport, Chain, Account | undefined>, senderManager: SenderManager, reputationManager: InterfaceReputationManager, entryPoints: Address[], logger: Logger, metrics: Metrics, compressionHandler: CompressionHandler | null, gasPriceManager: GasPriceManager, simulateTransaction?: boolean, legacyTransactions?: boolean, fixedGasLimitForEstimation?: bigint, disableBlockTagSupport?: boolean, localGasLimitCalculation?: boolean);
37
+ eventManager: EventManager;
38
+ noProfitBundling: boolean;
39
+ constructor(publicClient: PublicClient, walletClient: WalletClient<Transport, Chain, Account | undefined>, senderManager: SenderManager, reputationManager: InterfaceReputationManager, entryPoints: Address[], logger: Logger, metrics: Metrics, compressionHandler: CompressionHandler | null, gasPriceManager: GasPriceManager, eventManager: EventManager, simulateTransaction?: boolean, legacyTransactions?: boolean, fixedGasLimitForEstimation?: bigint, blockTagSupport?: boolean, localGasLimitCalculation?: boolean, noProfitBundling?: boolean);
47
40
  getCompressionHandler(): CompressionHandler;
48
41
  cancelOps(_entryPoint: Address, _ops: UserOperation[]): Promise<void>;
49
42
  markWalletProcessed(executor: Account): Promise<void>;
@@ -1,32 +1,10 @@
1
- import { EntryPointV06Abi, EntryPointV07Abi, deriveUserOperation } from "../types/index.js";
2
- import { getUserOperationHash, isVersion06, maxBigInt, parseViemError, toPackedUserOperation } from "../utils/index.js";
1
+ import { deriveUserOperation, EntryPointV06Abi, EntryPointV07Abi } from "../types/index.js";
2
+ import { getRequiredPrefund, getUserOperationHash, isVersion06, maxBigInt, parseViemError, toPackedUserOperation } from "../utils/index.js";
3
+ // biome-ignore lint/style/noNamespaceImport: explicitly make it clear when sentry is used
3
4
  import * as sentry from "@sentry/node";
4
5
  import { Mutex } from "async-mutex";
5
6
  import { FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooLowError, NonceTooLowError, encodeFunctionData, getContract } from "viem";
6
7
  import { createCompressedCalldata, filterOpsAndEstimateGas, flushStuckTransaction, simulatedOpsToResults } from "./utils.js";
7
- export class NullExecutor {
8
- bundle(_entryPoint, _ops) {
9
- return Promise.resolve([]);
10
- }
11
- bundleCompressed(_entryPoint, _compressedOps) {
12
- return Promise.resolve([]);
13
- }
14
- replaceTransaction(_entryPoint, _transactionInfo) {
15
- return Promise.resolve({ status: "failed" });
16
- }
17
- replaceOps(_opHashes) {
18
- return Promise.resolve();
19
- }
20
- cancelOps(_entryPoint, _ops) {
21
- return Promise.resolve();
22
- }
23
- markWalletProcessed(_executor) {
24
- return Promise.resolve();
25
- }
26
- flushStuckTransactions() {
27
- return Promise.resolve();
28
- }
29
- }
30
8
  export class Executor {
31
9
  // private unWatch: WatchBlocksReturnType | undefined
32
10
  publicClient;
@@ -42,9 +20,11 @@ export class Executor {
42
20
  reputationManager;
43
21
  compressionHandler;
44
22
  gasPriceManager;
45
- disableBlockTagSupport;
23
+ blockTagSupport;
46
24
  mutex;
47
- constructor(publicClient, walletClient, senderManager, reputationManager, entryPoints, logger, metrics, compressionHandler, gasPriceManager, simulateTransaction = false, legacyTransactions = false, fixedGasLimitForEstimation, disableBlockTagSupport = false, localGasLimitCalculation = false) {
25
+ eventManager;
26
+ noProfitBundling; // if true, bundle such that all beneficiary fees go towards tx gasFees
27
+ constructor(publicClient, walletClient, senderManager, reputationManager, entryPoints, logger, metrics, compressionHandler, gasPriceManager, eventManager, simulateTransaction = false, legacyTransactions = false, fixedGasLimitForEstimation, blockTagSupport = true, localGasLimitCalculation = false, noProfitBundling = false) {
48
28
  this.publicClient = publicClient;
49
29
  this.walletClient = walletClient;
50
30
  this.senderManager = senderManager;
@@ -57,8 +37,10 @@ export class Executor {
57
37
  this.localGasLimitCalculation = localGasLimitCalculation;
58
38
  this.compressionHandler = compressionHandler;
59
39
  this.gasPriceManager = gasPriceManager;
60
- this.disableBlockTagSupport = disableBlockTagSupport;
40
+ this.eventManager = eventManager;
41
+ this.blockTagSupport = blockTagSupport;
61
42
  this.entryPoints = entryPoints;
43
+ this.noProfitBundling = noProfitBundling;
62
44
  this.mutex = new Mutex();
63
45
  }
64
46
  getCompressionHandler() {
@@ -125,27 +107,27 @@ export class Executor {
125
107
  type: "compressed"
126
108
  };
127
109
  }
128
- const result = await filterOpsAndEstimateGas(transactionInfo.entryPoint, callContext, transactionInfo.executor, opsWithHashes, newRequest.nonce, newRequest.maxFeePerGas, newRequest.maxPriorityFeePerGas, this.disableBlockTagSupport ? undefined : "latest", this.legacyTransactions, this.fixedGasLimitForEstimation, this.reputationManager, this.logger);
110
+ let { simulatedOps, gasLimit } = await filterOpsAndEstimateGas(transactionInfo.entryPoint, callContext, transactionInfo.executor, opsWithHashes, newRequest.nonce, newRequest.maxFeePerGas, newRequest.maxPriorityFeePerGas, this.blockTagSupport ? "latest" : undefined, this.legacyTransactions, this.fixedGasLimitForEstimation, this.reputationManager, this.logger);
129
111
  const childLogger = this.logger.child({
130
112
  transactionHash: transactionInfo.transactionHash,
131
113
  executor: transactionInfo.executor.address
132
114
  });
133
- if (result.simulatedOps.length === 0) {
115
+ if (simulatedOps.length === 0) {
134
116
  childLogger.warn("no ops to bundle");
135
117
  this.markWalletProcessed(transactionInfo.executor);
136
118
  return { status: "failed" };
137
119
  }
138
- if (result.simulatedOps.every((op) => op.reason === "AA25 invalid account nonce" ||
120
+ if (simulatedOps.every((op) => op.reason === "AA25 invalid account nonce" ||
139
121
  op.reason === "AA10 sender already constructed")) {
140
- childLogger.trace({ reasons: result.simulatedOps.map((sop) => sop.reason) }, "all ops failed simulation with nonce error");
122
+ childLogger.trace({ reasons: simulatedOps.map((sop) => sop.reason) }, "all ops failed simulation with nonce error");
141
123
  return { status: "potentially_already_included" };
142
124
  }
143
- if (result.simulatedOps.every((op) => op.reason !== undefined)) {
125
+ if (simulatedOps.every((op) => op.reason !== undefined)) {
144
126
  childLogger.warn("all ops failed simulation");
145
127
  this.markWalletProcessed(transactionInfo.executor);
146
128
  return { status: "failed" };
147
129
  }
148
- const opsToBundle = result.simulatedOps
130
+ const opsToBundle = simulatedOps
149
131
  .filter((op) => op.reason === undefined)
150
132
  .map((op) => {
151
133
  const opInfo = transactionInfo.userOperationInfos.find((info) => info.userOperationHash === op.owh.userOperationHash);
@@ -154,15 +136,29 @@ export class Executor {
154
136
  }
155
137
  return opInfo;
156
138
  });
157
- newRequest.gas = this.localGasLimitCalculation
158
- ? opsToBundle.reduce((acc, opInfo) => {
139
+ if (this.localGasLimitCalculation) {
140
+ gasLimit = opsToBundle.reduce((acc, opInfo) => {
159
141
  const userOperation = deriveUserOperation(opInfo.mempoolUserOperation);
160
142
  return (acc +
161
143
  userOperation.preVerificationGas +
162
144
  3n * userOperation.verificationGasLimit +
163
145
  userOperation.callGasLimit);
164
- }, 0n)
165
- : result.gasLimit;
146
+ }, 0n);
147
+ }
148
+ // https://github.com/eth-infinitism/account-abstraction/blob/fa61290d37d079e928d92d53a122efcc63822214/contracts/core/EntryPoint.sol#L236
149
+ let innerHandleOpFloor = 0n;
150
+ for (const owh of opsToBundle) {
151
+ const op = deriveUserOperation(owh.mempoolUserOperation);
152
+ innerHandleOpFloor +=
153
+ op.callGasLimit + op.verificationGasLimit + 5000n;
154
+ }
155
+ if (gasLimit < innerHandleOpFloor) {
156
+ gasLimit += innerHandleOpFloor;
157
+ }
158
+ // sometimes the estimation rounds down, adding a fixed constant accounts for this
159
+ gasLimit += 10000n;
160
+ // ensures that we don't submit again with too low of a gas value
161
+ newRequest.gas = maxBigInt(newRequest.gas, gasLimit);
166
162
  // update calldata to include only ops that pass simulation
167
163
  if (transactionInfo.transactionType === "default") {
168
164
  const isUserOpVersion06 = opsWithHashes.reduce((acc, op) => {
@@ -214,6 +210,12 @@ export class Executor {
214
210
  accessList: undefined
215
211
  }
216
212
  : newRequest);
213
+ opsToBundle.map((opToBundle) => {
214
+ const op = deriveUserOperation(opToBundle.mempoolUserOperation);
215
+ const chainId = this.publicClient.chain?.id;
216
+ const opHash = getUserOperationHash(op, opToBundle.entryPoint, chainId);
217
+ this.eventManager.emitSubmitted(opHash, txHash);
218
+ });
217
219
  const newTxInfo = {
218
220
  ...transactionInfo,
219
221
  transactionRequest: newRequest,
@@ -263,17 +265,15 @@ export class Executor {
263
265
  }
264
266
  }
265
267
  async flushStuckTransactions() {
268
+ const allWallets = new Set(this.senderManager.wallets);
269
+ const utilityWallet = this.senderManager.utilityAccount;
270
+ if (utilityWallet) {
271
+ allWallets.add(utilityWallet);
272
+ }
273
+ const wallets = Array.from(allWallets);
266
274
  const gasPrice = await this.gasPriceManager.getGasPrice();
267
- const wallets = this.senderManager.utilityAccount
268
- ? Array.from(new Set([
269
- ...this.senderManager.wallets,
270
- this.senderManager.utilityAccount
271
- ]))
272
- : Array.from(new Set(this.senderManager.wallets));
273
- const promises = wallets.map(async (wallet) => {
274
- for (const entryPoint of this.entryPoints) {
275
- await flushStuckTransaction(this.publicClient, this.walletClient, wallet, gasPrice.maxFeePerGas * 5n, this.logger, entryPoint);
276
- }
275
+ const promises = wallets.map((wallet) => {
276
+ flushStuckTransaction(this.publicClient, this.walletClient, wallet, gasPrice.maxFeePerGas * 5n, this.logger);
277
277
  });
278
278
  await Promise.all(promises);
279
279
  }
@@ -316,33 +316,17 @@ export class Executor {
316
316
  ep,
317
317
  type: "default"
318
318
  };
319
- let { gasLimit, simulatedOps, resubmitAllOps } = await filterOpsAndEstimateGas(entryPoint, callContext, wallet, opsWithHashes, nonce, gasPriceParameters.maxFeePerGas, gasPriceParameters.maxPriorityFeePerGas, this.disableBlockTagSupport ? undefined : "pending", this.legacyTransactions, this.fixedGasLimitForEstimation, this.reputationManager, childLogger);
320
- gasLimit += 10000n;
321
- if (resubmitAllOps) {
322
- this.markWalletProcessed(wallet);
323
- return opsWithHashes.map((owh) => {
324
- const bundleResult = {
325
- status: "resubmit",
326
- info: {
327
- entryPoint,
328
- userOpHash: owh.userOperationHash,
329
- userOperation: owh.mempoolUserOperation,
330
- reason: FeeCapTooLowError.name
331
- }
332
- };
333
- return bundleResult;
334
- });
335
- }
319
+ let { gasLimit, simulatedOps } = await filterOpsAndEstimateGas(entryPoint, callContext, wallet, opsWithHashes, nonce, gasPriceParameters.maxFeePerGas, gasPriceParameters.maxPriorityFeePerGas, this.blockTagSupport ? "pending" : undefined, this.legacyTransactions, this.fixedGasLimitForEstimation, this.reputationManager, childLogger);
336
320
  if (simulatedOps.length === 0) {
337
321
  childLogger.error("gas limit simulation encountered unexpected failure");
338
322
  this.markWalletProcessed(wallet);
339
- return opsWithHashes.map((owh) => {
323
+ return opsWithHashes.map(({ userOperationHash, mempoolUserOperation }) => {
340
324
  return {
341
325
  status: "failure",
342
326
  error: {
343
327
  entryPoint,
344
- userOpHash: owh.userOperationHash,
345
- userOperation: owh.mempoolUserOperation,
328
+ userOpHash: userOperationHash,
329
+ userOperation: mempoolUserOperation,
346
330
  reason: "INTERNAL FAILURE"
347
331
  }
348
332
  };
@@ -351,14 +335,14 @@ export class Executor {
351
335
  if (simulatedOps.every((op) => op.reason !== undefined)) {
352
336
  childLogger.warn("all ops failed simulation");
353
337
  this.markWalletProcessed(wallet);
354
- return simulatedOps.map((op) => {
338
+ return simulatedOps.map(({ reason, owh }) => {
355
339
  return {
356
340
  status: "failure",
357
341
  error: {
358
342
  entryPoint,
359
- userOpHash: op.owh.userOperationHash,
360
- userOperation: op.owh.mempoolUserOperation,
361
- reason: op.reason
343
+ userOpHash: owh.userOperationHash,
344
+ userOperation: owh.mempoolUserOperation,
345
+ reason: reason
362
346
  }
363
347
  };
364
348
  });
@@ -370,36 +354,52 @@ export class Executor {
370
354
  userOperations: opsWithHashToBundle.map((owh) => owh.userOperationHash),
371
355
  entryPoint
372
356
  });
373
- childLogger.trace({ gasLimit }, "got gas limit");
374
- let txHash;
357
+ // https://github.com/eth-infinitism/account-abstraction/blob/fa61290d37d079e928d92d53a122efcc63822214/contracts/core/EntryPoint.sol#L236
358
+ let innerHandleOpFloor = 0n;
359
+ let totalBeneficiaryFees = 0n;
360
+ for (const owh of opsWithHashToBundle) {
361
+ const op = deriveUserOperation(owh.mempoolUserOperation);
362
+ innerHandleOpFloor +=
363
+ op.callGasLimit + op.verificationGasLimit + 5000n;
364
+ totalBeneficiaryFees += getRequiredPrefund(op);
365
+ }
366
+ if (gasLimit < innerHandleOpFloor) {
367
+ gasLimit += innerHandleOpFloor;
368
+ }
369
+ // sometimes the estimation rounds down, adding a fixed constant accounts for this
370
+ gasLimit += 10000n;
371
+ childLogger.debug({ gasLimit }, "got gas limit");
372
+ let transactionHash;
375
373
  try {
376
- const gasOptions = this.legacyTransactions
377
- ? {
378
- gasPrice: gasPriceParameters.maxFeePerGas
379
- }
374
+ const isLegacyTransaction = this.legacyTransactions;
375
+ const gasOptions = isLegacyTransaction
376
+ ? { gasPrice: gasPriceParameters.maxFeePerGas }
380
377
  : {
381
378
  maxFeePerGas: gasPriceParameters.maxFeePerGas,
382
379
  maxPriorityFeePerGas: gasPriceParameters.maxPriorityFeePerGas
383
380
  };
384
- txHash = isUserOpVersion06
385
- ? await ep.write.handleOps([
386
- opsWithHashToBundle.map((owh) => owh.mempoolUserOperation),
387
- wallet.address
388
- ], {
389
- account: wallet,
390
- gas: gasLimit,
391
- nonce: nonce,
392
- ...gasOptions
393
- })
394
- : await ep.write.handleOps([
395
- opsWithHashToBundle.map((owh) => toPackedUserOperation(owh.mempoolUserOperation)),
396
- wallet.address
397
- ], {
398
- account: wallet,
399
- gas: gasLimit,
400
- nonce: nonce,
401
- ...gasOptions
402
- });
381
+ if (this.noProfitBundling) {
382
+ const gasPrice = totalBeneficiaryFees / gasLimit;
383
+ if (isLegacyTransaction) {
384
+ gasOptions.gasPrice = gasPrice;
385
+ }
386
+ else {
387
+ gasOptions.maxFeePerGas = maxBigInt(gasPrice, gasOptions.maxFeePerGas || 0n);
388
+ }
389
+ }
390
+ const opts = {
391
+ account: wallet,
392
+ gas: gasLimit,
393
+ nonce: nonce,
394
+ ...gasOptions
395
+ };
396
+ const userOps = opsWithHashToBundle.map((owh) => isUserOpVersion06
397
+ ? owh.mempoolUserOperation
398
+ : toPackedUserOperation(owh.mempoolUserOperation));
399
+ transactionHash = await ep.write.handleOps([userOps, wallet.address], opts);
400
+ opsWithHashToBundle.map(({ userOperationHash }) => {
401
+ this.eventManager.emitSubmitted(userOperationHash, transactionHash);
402
+ });
403
403
  }
404
404
  catch (err) {
405
405
  const e = parseViemError(err);
@@ -418,6 +418,23 @@ export class Executor {
418
418
  };
419
419
  });
420
420
  }
421
+ if (e?.details
422
+ .toLowerCase()
423
+ .includes("replacement transaction underpriced")) {
424
+ childLogger.error({ error: e }, "replacement transaction underpriced");
425
+ this.markWalletProcessed(wallet);
426
+ return opsWithHashToBundle.map((owh) => {
427
+ return {
428
+ status: "resubmit",
429
+ info: {
430
+ entryPoint,
431
+ userOpHash: owh.userOperationHash,
432
+ userOperation: owh.mempoolUserOperation,
433
+ reason: "replacement transaction underpriced"
434
+ }
435
+ };
436
+ });
437
+ }
421
438
  sentry.captureException(err);
422
439
  childLogger.error({ error: JSON.stringify(err) }, "error submitting bundle transaction");
423
440
  this.markWalletProcessed(wallet);
@@ -446,7 +463,7 @@ export class Executor {
446
463
  entryPoint,
447
464
  isVersion06: isUserOpVersion06,
448
465
  transactionType: "default",
449
- transactionHash: txHash,
466
+ transactionHash: transactionHash,
450
467
  previousTransactionHashes: [],
451
468
  transactionRequest: {
452
469
  account: wallet,
@@ -486,7 +503,7 @@ export class Executor {
486
503
  ...transactionInfo.transactionRequest,
487
504
  abi: undefined
488
505
  },
489
- txHash,
506
+ txHash: transactionHash,
490
507
  opHashes: opsWithHashToBundle.map((owh) => owh.userOperationHash)
491
508
  }, "submitted bundle transaction");
492
509
  return userOperationResults;
@@ -512,36 +529,23 @@ export class Executor {
512
529
  perOpInflatorId: compressionHandler.perOpInflatorId,
513
530
  type: "compressed"
514
531
  };
515
- let { gasLimit, simulatedOps, resubmitAllOps } = await filterOpsAndEstimateGas(entryPoint, callContext, wallet, compressedOps.map((compressedOp) => {
532
+ let { gasLimit, simulatedOps } = await filterOpsAndEstimateGas(entryPoint, callContext, wallet, compressedOps.map((compressedOp) => {
516
533
  return {
517
534
  mempoolUserOperation: compressedOp,
518
535
  userOperationHash: getUserOperationHash(compressedOp.inflatedOp, entryPoint, this.walletClient.chain.id)
519
536
  };
520
- }), nonce, gasPriceParameters.maxFeePerGas, gasPriceParameters.maxPriorityFeePerGas, this.disableBlockTagSupport ? undefined : "pending", this.legacyTransactions, this.fixedGasLimitForEstimation, this.reputationManager, childLogger);
537
+ }), nonce, gasPriceParameters.maxFeePerGas, gasPriceParameters.maxPriorityFeePerGas, this.blockTagSupport ? "pending" : undefined, this.legacyTransactions, this.fixedGasLimitForEstimation, this.reputationManager, childLogger);
521
538
  gasLimit += 10000n;
522
- if (resubmitAllOps) {
523
- this.markWalletProcessed(wallet);
524
- return compressedOps.map((compressedOp) => {
525
- return {
526
- status: "resubmit",
527
- info: {
528
- entryPoint,
529
- userOpHash: getUserOperationHash(compressedOp.inflatedOp, entryPoint, this.walletClient.chain.id),
530
- userOperation: compressedOp,
531
- reason: FeeCapTooLowError.name
532
- }
533
- };
534
- });
535
- }
536
539
  if (simulatedOps.length === 0) {
537
540
  childLogger.warn("no ops to bundle");
538
541
  this.markWalletProcessed(wallet);
539
542
  return compressedOps.map((compressedOp) => {
543
+ const userOpHash = getUserOperationHash(compressedOp.inflatedOp, entryPoint, this.walletClient.chain.id);
540
544
  return {
541
545
  status: "failure",
542
546
  error: {
543
547
  entryPoint,
544
- userOpHash: getUserOperationHash(compressedOp.inflatedOp, entryPoint, this.walletClient.chain.id),
548
+ userOpHash,
545
549
  userOperation: compressedOp,
546
550
  reason: "INTERNAL FAILURE"
547
551
  }
@@ -552,14 +556,14 @@ export class Executor {
552
556
  if (simulatedOps.some((simulatedOp) => simulatedOp.reason !== undefined)) {
553
557
  childLogger.warn("some ops failed simulation");
554
558
  this.markWalletProcessed(wallet);
555
- return simulatedOps.map((simulatedOp) => {
559
+ return simulatedOps.map(({ reason, owh }) => {
556
560
  return {
557
561
  status: "failure",
558
562
  error: {
559
563
  entryPoint,
560
- userOpHash: simulatedOp.owh.userOperationHash,
561
- userOperation: simulatedOp.owh.mempoolUserOperation,
562
- reason: simulatedOp.reason
564
+ userOpHash: owh.userOperationHash,
565
+ userOperation: owh.mempoolUserOperation,
566
+ reason: reason
563
567
  }
564
568
  };
565
569
  });
@@ -567,7 +571,7 @@ export class Executor {
567
571
  const opsToBundle = simulatedOps
568
572
  .filter((simulatedOp) => simulatedOp.reason === undefined)
569
573
  .map((simulatedOp) => simulatedOp.owh);
570
- let txHash;
574
+ let transactionHash;
571
575
  try {
572
576
  const gasOptions = this.legacyTransactions
573
577
  ? {
@@ -577,27 +581,34 @@ export class Executor {
577
581
  maxFeePerGas: gasPriceParameters.maxFeePerGas,
578
582
  maxPriorityFeePerGas: gasPriceParameters.maxPriorityFeePerGas
579
583
  };
584
+ const compressedOpsToBundle = opsToBundle.map(({ mempoolUserOperation }) => {
585
+ const compressedOp = mempoolUserOperation;
586
+ return compressedOp;
587
+ });
580
588
  // need to use sendTransaction to target BundleBulker's fallback
581
- txHash = await this.walletClient.sendTransaction({
589
+ transactionHash = await this.walletClient.sendTransaction({
582
590
  account: wallet,
583
591
  to: compressionHandler.bundleBulkerAddress,
584
- data: createCompressedCalldata(compressedOps, compressionHandler.perOpInflatorId),
592
+ data: createCompressedCalldata(compressedOpsToBundle, compressionHandler.perOpInflatorId),
585
593
  gas: gasLimit,
586
594
  nonce: nonce,
587
595
  ...gasOptions
588
596
  });
597
+ opsToBundle.map(({ userOperationHash }) => {
598
+ this.eventManager.emitSubmitted(userOperationHash, transactionHash);
599
+ });
589
600
  }
590
601
  catch (err) {
591
602
  sentry.captureException(err);
592
603
  childLogger.error({ error: JSON.stringify(err) }, "error submitting bundle transaction");
593
604
  this.markWalletProcessed(wallet);
594
- return opsToBundle.map((op) => {
605
+ return opsToBundle.map(({ userOperationHash, mempoolUserOperation }) => {
595
606
  return {
596
607
  status: "failure",
597
608
  error: {
598
609
  entryPoint,
599
- userOpHash: op.userOperationHash,
600
- userOperation: op.mempoolUserOperation,
610
+ userOpHash: userOperationHash,
611
+ userOperation: mempoolUserOperation,
601
612
  reason: "INTERNAL FAILURE"
602
613
  }
603
614
  };
@@ -616,7 +627,7 @@ export class Executor {
616
627
  entryPoint,
617
628
  isVersion06: true, //TODO: compressed bundles are always v06
618
629
  transactionType: "compressed",
619
- transactionHash: txHash,
630
+ transactionHash,
620
631
  previousTransactionHashes: [],
621
632
  transactionRequest: {
622
633
  to: compressionHandler.bundleBulkerAddress,
@@ -636,7 +647,7 @@ export class Executor {
636
647
  };
637
648
  const userOperationResults = simulatedOpsToResults(simulatedOps, transactionInfo);
638
649
  childLogger.info({
639
- txHash,
650
+ txHash: transactionHash,
640
651
  opHashes: opsToBundle.map((owh) => owh.userOperationHash)
641
652
  }, "submitted bundle transaction");
642
653
  return userOperationResults;