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