@pimlico/alto 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/{880955d5786bfdae.json → 031b289b93191224.json} +1 -1
- package/contracts/build-info/181f3522c3744403.json +1 -0
- package/contracts/build-info/a2db592afab5c9de.json +1 -0
- 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 +17 -6
- package/esm/cli/alto.js.map +1 -1
- package/esm/cli/config/bundler.d.ts +459 -321
- package/esm/cli/config/bundler.js +125 -91
- package/esm/cli/config/bundler.js.map +1 -1
- package/esm/cli/config/options.d.ts +4 -1
- package/esm/cli/config/options.js +233 -106
- 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 +76 -80
- package/esm/cli/handler.js.map +1 -1
- package/esm/cli/multiRpcTransport.d.ts +7 -0
- package/esm/cli/multiRpcTransport.js +52 -0
- package/esm/cli/multiRpcTransport.js.map +1 -0
- package/esm/cli/setupServer.js +92 -70
- package/esm/cli/setupServer.js.map +1 -1
- package/esm/cli/shutDown.d.ts +20 -0
- package/esm/cli/shutDown.js +285 -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} +56 -37
- package/esm/executor/bundleManager.js +393 -0
- package/esm/executor/bundleManager.js.map +1 -0
- package/esm/executor/executor.d.ts +4 -3
- package/esm/executor/executor.js +47 -23
- package/esm/executor/executor.js.map +1 -1
- package/esm/executor/executorManager.d.ts +20 -15
- package/esm/executor/executorManager.js +248 -67
- 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/getBundleStatus.d.ts +5 -1
- package/esm/executor/getBundleStatus.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 +45 -26
- package/esm/executor/senderManager/createRedisSenderManager.js.map +1 -1
- package/esm/executor/senderManager/flushOnStartUp.js +7 -5
- 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 +268 -85
- package/esm/executor/senderManager/validateAndRefill.js.map +1 -1
- package/esm/executor/utils.d.ts +8 -3
- package/esm/executor/utils.js +59 -27
- 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/citreaManager.d.ts +10 -0
- package/esm/handlers/citreaManager.js +17 -0
- package/esm/handlers/citreaManager.js.map +1 -0
- 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 +17 -10
- package/esm/handlers/gasPriceManager.js +245 -99
- 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 +61 -22
- package/esm/mempool/mempool.js +223 -133
- 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} +134 -48
- 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 +56 -53
- package/esm/rpc/estimation/utils.js.map +1 -1
- package/esm/rpc/methods/boost_sendUserOperation.d.ts +304 -0
- package/esm/rpc/methods/boost_sendUserOperation.js +1 -1
- package/esm/rpc/methods/boost_sendUserOperation.js.map +1 -1
- 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 +61 -30
- 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 +34 -34
- package/esm/rpc/methods/eth_getUserOperationReceipt.js +1 -1
- package/esm/rpc/methods/eth_sendUserOperation.d.ts +307 -3
- package/esm/rpc/methods/eth_sendUserOperation.js +153 -48
- 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 +338 -34
- package/esm/rpc/methods/pimlico_sendUserOperationNow.js +26 -29
- 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 +38 -26
- package/esm/rpc/rpcHandler.js +97 -44
- 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 +76 -41
- package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
- package/esm/store/createMempoolStore.d.ts +1 -1
- package/esm/store/createMempoolStore.js +79 -140
- 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 +19 -0
- package/esm/store/processing/memory.js +83 -0
- package/esm/store/processing/memory.js.map +1 -0
- package/esm/store/processing/redis.d.ts +26 -0
- package/esm/store/processing/redis.js +123 -0
- package/esm/store/processing/redis.js.map +1 -0
- package/esm/store/processing/types.d.ts +12 -0
- package/esm/store/processing/types.js +2 -0
- package/esm/store/processing/types.js.map +1 -0
- package/esm/store/types.d.ts +52 -0
- package/esm/store/types.js +2 -0
- package/esm/store/types.js.map +1 -0
- package/esm/types/contracts/Multicall3.d.ts +34 -0
- package/esm/types/contracts/Multicall3.js +31 -0
- package/esm/types/contracts/Multicall3.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/contracts/index.d.ts +1 -1
- package/esm/types/contracts/index.js +1 -1
- package/esm/types/contracts/index.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 +13184 -4741
- package/esm/types/schemas.js +116 -27
- 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 +7 -1
- package/esm/utils/helpers.js +36 -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 +4 -1
- package/esm/utils/metrics.js +34 -7
- 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 +110 -56
- package/esm/utils/userop.js +161 -249
- 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 +0 -326
- package/esm/executor/userOpMonitor.js.map +0 -1
- package/esm/executor/utilityWalletMonitor.d.ts +0 -19
- package/esm/executor/utilityWalletMonitor.js +0 -38
- package/esm/executor/utilityWalletMonitor.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/types/contracts/CallEngine.d.ts +0 -28
- package/esm/types/contracts/CallEngine.js +0 -37
- package/esm/types/contracts/CallEngine.js.map +0 -1
- package/esm/utils/preVerificationGasCalulator.js.map +0 -1
package/esm/executor/executor.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsonStringifyWithBigint, maxBigInt, minBigInt, roundUpBigInt, scaleBigI
|
|
|
2
2
|
import * as sentry from "@sentry/node";
|
|
3
3
|
import { BaseError, ContractFunctionExecutionError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooLowError, NonceTooHighError, NonceTooLowError, TransactionExecutionError } from "viem";
|
|
4
4
|
import { filterOpsAndEstimateGas } from "./filterOpsAndEstimateGas.js";
|
|
5
|
-
import { encodeHandleOpsCalldata,
|
|
5
|
+
import { encodeHandleOpsCalldata, getAuthorizationListFromUserOps, getUserOpHashes, isTransactionUnderpricedError } from "./utils.js";
|
|
6
6
|
export class Executor {
|
|
7
7
|
config;
|
|
8
8
|
logger;
|
|
@@ -15,7 +15,16 @@ export class Executor {
|
|
|
15
15
|
this.eventManager = eventManager;
|
|
16
16
|
}
|
|
17
17
|
getBundleGasPrice({ bundle, networkGasPrice, networkBaseFee, totalBeneficiaryFees, bundleGasUsed }) {
|
|
18
|
-
const { bundlerInitialCommission, resubmitMultiplierCeiling, legacyTransactions, chainType,
|
|
18
|
+
const { bundlerInitialCommission, resubmitMultiplierCeiling, legacyTransactions, chainType, arbitrumBaseFeeMultiplier, skipLocalGasCalculations } = this.config;
|
|
19
|
+
// If skipLocalGasCalculations is enabled, use network gas price directly.
|
|
20
|
+
// On chains where bundleGasUsed is underestimated, local calculations
|
|
21
|
+
// inflate the break-even gas price resulting in bundles at a loss.
|
|
22
|
+
if (skipLocalGasCalculations) {
|
|
23
|
+
return {
|
|
24
|
+
maxFeePerGas: networkGasPrice.maxFeePerGas,
|
|
25
|
+
maxPriorityFeePerGas: networkGasPrice.maxPriorityFeePerGas
|
|
26
|
+
};
|
|
27
|
+
}
|
|
19
28
|
// Arbtirum's sequencer orders based on first come first serve.
|
|
20
29
|
// Because of this, maxFee/maxPriorityFee is ignored and the bundler *always* pays the network's baseFee.
|
|
21
30
|
// The bundler need to set a large enough gasBid to account for network baseFee fluctuations.
|
|
@@ -23,8 +32,8 @@ export class Executor {
|
|
|
23
32
|
if (chainType === "arbitrum") {
|
|
24
33
|
const scaledBaseFee = scaleBigIntByPercent(networkBaseFee, 100n + 20n * BigInt(bundle.submissionAttempts));
|
|
25
34
|
return {
|
|
26
|
-
maxFeePerGas: scaledBaseFee
|
|
27
|
-
maxPriorityFeePerGas: scaledBaseFee
|
|
35
|
+
maxFeePerGas: scaleBigIntByPercent(scaledBaseFee, arbitrumBaseFeeMultiplier),
|
|
36
|
+
maxPriorityFeePerGas: scaleBigIntByPercent(scaledBaseFee, arbitrumBaseFeeMultiplier)
|
|
28
37
|
};
|
|
29
38
|
}
|
|
30
39
|
// Increase network gas price for resubmissions to improve tx inclusion
|
|
@@ -63,8 +72,14 @@ export class Executor {
|
|
|
63
72
|
maxPriorityFeePerGas: networkMaxPriorityFeePerGas
|
|
64
73
|
};
|
|
65
74
|
}
|
|
66
|
-
async sendHandleOpsTransaction({ txParam, gasOpts }) {
|
|
67
|
-
const {
|
|
75
|
+
async sendHandleOpsTransaction({ txParam, gasOpts, childLogger, submissionAttempts }) {
|
|
76
|
+
const { sendHandleOpsRetryCount, transactionUnderpricedMultiplier, walletClients, publicClient, privateEndpointSubmissionAttempts } = this.config;
|
|
77
|
+
// Use private wallet for configured number of attempts if available, then switch to public
|
|
78
|
+
const usePrivateEndpoint = walletClients.private &&
|
|
79
|
+
submissionAttempts < privateEndpointSubmissionAttempts;
|
|
80
|
+
const walletClient = usePrivateEndpoint
|
|
81
|
+
? walletClients.private
|
|
82
|
+
: walletClients.public;
|
|
68
83
|
const { entryPoint, userOps, account, gas, nonce } = txParam;
|
|
69
84
|
const handleOpsCalldata = encodeHandleOpsCalldata({
|
|
70
85
|
userOps: userOps.map(({ userOp }) => userOp),
|
|
@@ -75,12 +90,14 @@ export class Executor {
|
|
|
75
90
|
data: handleOpsCalldata,
|
|
76
91
|
from: account.address,
|
|
77
92
|
chain: publicClient.chain,
|
|
93
|
+
// Providing chainId lets viem skip its eth_fillTransaction and
|
|
94
|
+
// eth_chainId round-trips before eth_sendRawTransaction.
|
|
95
|
+
chainId: this.config.chainId,
|
|
78
96
|
gas,
|
|
79
97
|
account,
|
|
80
98
|
nonce,
|
|
81
99
|
...gasOpts
|
|
82
100
|
};
|
|
83
|
-
request.gas = scaleBigIntByPercent(request.gas, executorGasMultiplier);
|
|
84
101
|
let attempts = 0;
|
|
85
102
|
let transactionHash;
|
|
86
103
|
const maxAttempts = sendHandleOpsRetryCount;
|
|
@@ -93,12 +110,22 @@ export class Executor {
|
|
|
93
110
|
multiple: this.config.gasLimitRoundingMultiple
|
|
94
111
|
});
|
|
95
112
|
transactionHash = await walletClient.sendTransaction(request);
|
|
113
|
+
childLogger.info({
|
|
114
|
+
transactionRequest: {
|
|
115
|
+
executor: request.account.address,
|
|
116
|
+
maxFeePerGas: request.maxFeePerGas,
|
|
117
|
+
maxPriorityFeePerGas: request.maxPriorityFeePerGas,
|
|
118
|
+
nonce: request.nonce
|
|
119
|
+
},
|
|
120
|
+
txHash: transactionHash,
|
|
121
|
+
isPrivate: usePrivateEndpoint
|
|
122
|
+
}, "submitted bundle transaction");
|
|
96
123
|
break;
|
|
97
124
|
}
|
|
98
125
|
catch (e) {
|
|
99
126
|
if (e instanceof BaseError) {
|
|
100
127
|
if (isTransactionUnderpricedError(e)) {
|
|
101
|
-
|
|
128
|
+
childLogger.warn("Transaction underpriced, retrying");
|
|
102
129
|
request.nonce = await publicClient.getTransactionCount({
|
|
103
130
|
address: account.address,
|
|
104
131
|
blockTag: "latest"
|
|
@@ -115,7 +142,7 @@ export class Executor {
|
|
|
115
142
|
}
|
|
116
143
|
}
|
|
117
144
|
if (e instanceof FeeCapTooLowError) {
|
|
118
|
-
|
|
145
|
+
childLogger.warn("max fee < basefee, retrying");
|
|
119
146
|
if (request.gasPrice) {
|
|
120
147
|
request.gasPrice = scaleBigIntByPercent(request.gasPrice, 125n);
|
|
121
148
|
}
|
|
@@ -130,21 +157,21 @@ export class Executor {
|
|
|
130
157
|
if (error instanceof TransactionExecutionError) {
|
|
131
158
|
const cause = error.cause;
|
|
132
159
|
if (cause instanceof NonceTooLowError) {
|
|
133
|
-
|
|
160
|
+
childLogger.warn("Nonce too low, retrying");
|
|
134
161
|
request.nonce = await publicClient.getTransactionCount({
|
|
135
162
|
address: request.from,
|
|
136
163
|
blockTag: "latest"
|
|
137
164
|
});
|
|
138
165
|
}
|
|
139
166
|
if (cause instanceof NonceTooHighError) {
|
|
140
|
-
|
|
167
|
+
childLogger.warn("Nonce too high, retrying");
|
|
141
168
|
request.nonce = await publicClient.getTransactionCount({
|
|
142
169
|
address: request.from,
|
|
143
170
|
blockTag: "latest"
|
|
144
171
|
});
|
|
145
172
|
}
|
|
146
173
|
if (cause instanceof IntrinsicGasTooLowError) {
|
|
147
|
-
|
|
174
|
+
childLogger.warn("Intrinsic gas too low, retrying");
|
|
148
175
|
request.gas = scaleBigIntByPercent(request.gas, 150n);
|
|
149
176
|
}
|
|
150
177
|
}
|
|
@@ -162,13 +189,13 @@ export class Executor {
|
|
|
162
189
|
}
|
|
163
190
|
async bundle({ executor, userOpBundle, networkGasPrice, networkBaseFee, nonce }) {
|
|
164
191
|
const { entryPoint, userOps } = userOpBundle;
|
|
165
|
-
const isReplacementTx = userOpBundle.submissionAttempts > 0;
|
|
166
192
|
let childLogger = this.logger.child({
|
|
167
|
-
|
|
193
|
+
submissionAttempts: userOpBundle.submissionAttempts,
|
|
168
194
|
userOperations: getUserOpHashes(userOps),
|
|
169
195
|
entryPoint
|
|
170
196
|
});
|
|
171
197
|
const filterOpsResult = await filterOpsAndEstimateGas({
|
|
198
|
+
checkEip7702AuthNonces: false, // Ignore EIP-7702 auth nonce check to save latency.
|
|
172
199
|
networkBaseFee,
|
|
173
200
|
userOpBundle,
|
|
174
201
|
config: this.config,
|
|
@@ -195,8 +222,8 @@ export class Executor {
|
|
|
195
222
|
const { userOpsToBundle, rejectedUserOps, bundleGasUsed, bundleGasLimit, totalBeneficiaryFees } = filterOpsResult;
|
|
196
223
|
// Update child logger with userOperations being sent for bundling.
|
|
197
224
|
childLogger = this.logger.child({
|
|
198
|
-
|
|
199
|
-
|
|
225
|
+
userOps: getUserOpHashes(userOpsToBundle),
|
|
226
|
+
submissionAttempts: userOpBundle.submissionAttempts,
|
|
200
227
|
entryPoint
|
|
201
228
|
});
|
|
202
229
|
const { maxFeePerGas, maxPriorityFeePerGas } = this.getBundleGasPrice({
|
|
@@ -209,7 +236,7 @@ export class Executor {
|
|
|
209
236
|
let transactionHash;
|
|
210
237
|
try {
|
|
211
238
|
const isLegacyTransaction = this.config.legacyTransactions;
|
|
212
|
-
const authorizationList =
|
|
239
|
+
const authorizationList = getAuthorizationListFromUserOps(userOpsToBundle.map(({ userOp }) => userOp));
|
|
213
240
|
let gasOpts;
|
|
214
241
|
if (isLegacyTransaction) {
|
|
215
242
|
gasOpts = {
|
|
@@ -240,7 +267,9 @@ export class Executor {
|
|
|
240
267
|
userOps: userOpsToBundle,
|
|
241
268
|
entryPoint
|
|
242
269
|
},
|
|
243
|
-
|
|
270
|
+
childLogger,
|
|
271
|
+
gasOpts,
|
|
272
|
+
submissionAttempts: userOpBundle.submissionAttempts
|
|
244
273
|
});
|
|
245
274
|
this.eventManager.emitSubmitted({
|
|
246
275
|
userOpHashes: getUserOpHashes(userOpsToBundle),
|
|
@@ -298,11 +327,6 @@ export class Executor {
|
|
|
298
327
|
nonce
|
|
299
328
|
}
|
|
300
329
|
};
|
|
301
|
-
childLogger.info({
|
|
302
|
-
transactionRequest: bundleResult.transactionRequest,
|
|
303
|
-
txHash: transactionHash,
|
|
304
|
-
opHashes: getUserOpHashes(userOpsBundled)
|
|
305
|
-
}, "submitted bundle transaction");
|
|
306
330
|
return bundleResult;
|
|
307
331
|
}
|
|
308
332
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../executor/executor.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,uBAAuB,EACvB,SAAS,EACT,SAAS,EACT,aAAa,EACb,oBAAoB,EACvB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,EAEH,SAAS,EACT,8BAA8B,EAC9B,iBAAiB,EAEjB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../executor/executor.ts"],"names":[],"mappings":"AAUA,OAAO,EACH,uBAAuB,EACvB,SAAS,EACT,SAAS,EACT,aAAa,EACb,oBAAoB,EACvB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,EAEH,SAAS,EACT,8BAA8B,EAC9B,iBAAiB,EAEjB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAGhB,yBAAyB,EAC5B,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EACH,uBAAuB,EACvB,+BAA+B,EAC/B,eAAe,EACf,6BAA6B,EAChC,MAAM,SAAS,CAAA;AA+BhB,MAAM,OAAO,QAAQ;IACjB,MAAM,CAAY;IAClB,MAAM,CAAQ;IACd,YAAY,CAAc;IAE1B,YAAY,EACR,MAAM,EACN,YAAY,EAIf;QACG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,SAA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EAAE,KAAK;oBACd,MAAM,EAAE,oBAAoB;oBAC5B,eAAe;oBACf,cAAc,EAAE,eAAe;iBAClC,CAAA;YACL,CAAC;YAED,WAAW,CAAC,KAAK,CACb;gBACI,GAAG,EAAE,uBAAuB,CAAC,GAAG,CAAC;aACpC,EACD,qCAAqC,CACxC,CAAA;YAED,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,eAAe;gBACvB,eAAe;gBACf,cAAc,EAAE,eAAe;aAClC,CAAA;QACL,CAAC;QAED,MAAM,cAAc,GAAG,eAAe,CAAA;QAEtC,MAAM,YAAY,GAAiB;YAC/B,OAAO,EAAE,IAAI;YACb,cAAc;YACd,eAAe;YACf,eAAe;YACf,kBAAkB,EAAE;gBAChB,YAAY;gBACZ,oBAAoB;gBACpB,KAAK;aACR;SACJ,CAAA;QAED,OAAO,YAAY,CAAA;IACvB,CAAC;CACJ"}
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
import type { GasPriceManager } from "../handlers/index.js";
|
|
2
2
|
import type { Mempool } from "../mempool/index.js";
|
|
3
|
-
import type { BundlingMode, SubmittedBundleInfo, UserOperationBundle } from "../types/index.js";
|
|
4
|
-
import type { GasPriceParameters } from "../types/index.js";
|
|
3
|
+
import type { BundlingMode, GasPriceParameters, SubmittedBundleInfo, UserOperationBundle } from "../types/index.js";
|
|
5
4
|
import { type Metrics } from "../utils/index.js";
|
|
6
5
|
import type { Hex } from "viem";
|
|
7
6
|
import type { AltoConfig } from "../createConfig.js";
|
|
7
|
+
import type { BundleManager } from "./bundleManager.js";
|
|
8
8
|
import type { Executor } from "./executor.js";
|
|
9
9
|
import type { SenderManager } from "./senderManager/index.js";
|
|
10
|
-
import type { UserOpMonitor } from "./userOpMonitor.js";
|
|
11
10
|
export declare class ExecutorManager {
|
|
12
|
-
private senderManager;
|
|
13
|
-
private config;
|
|
14
|
-
private executor;
|
|
15
|
-
private mempool;
|
|
16
|
-
private logger;
|
|
17
|
-
private metrics;
|
|
18
|
-
private gasPriceManager;
|
|
11
|
+
private readonly senderManager;
|
|
12
|
+
private readonly config;
|
|
13
|
+
private readonly executor;
|
|
14
|
+
private readonly mempool;
|
|
15
|
+
private readonly logger;
|
|
16
|
+
private readonly metrics;
|
|
17
|
+
private readonly gasPriceManager;
|
|
18
|
+
private readonly bundleManager;
|
|
19
19
|
private opsCount;
|
|
20
20
|
private bundlingMode;
|
|
21
|
-
private userOpMonitor;
|
|
22
21
|
private unWatch;
|
|
22
|
+
private redisBlockCache;
|
|
23
23
|
private currentlyHandlingBlock;
|
|
24
|
-
|
|
24
|
+
private currentlyHandlingBlockNumber;
|
|
25
|
+
constructor({ config, executor, mempool, metrics, gasPriceManager, senderManager, bundleManager }: {
|
|
25
26
|
config: AltoConfig;
|
|
26
27
|
executor: Executor;
|
|
27
28
|
mempool: Mempool;
|
|
28
29
|
metrics: Metrics;
|
|
29
30
|
gasPriceManager: GasPriceManager;
|
|
30
31
|
senderManager: SenderManager;
|
|
31
|
-
|
|
32
|
+
bundleManager: BundleManager;
|
|
32
33
|
});
|
|
34
|
+
start(): void;
|
|
33
35
|
setBundlingMode(bundleMode: BundlingMode): Promise<void>;
|
|
34
36
|
autoScalingBundling(): Promise<void>;
|
|
37
|
+
private pollBlockWithRedis;
|
|
35
38
|
startWatchingBlocks(): void;
|
|
36
39
|
getBaseFee(): Promise<bigint>;
|
|
37
40
|
sendBundleToExecutor(userOpBundle: UserOperationBundle): Promise<Hex | undefined>;
|
|
38
41
|
stopWatchingBlocks(): void;
|
|
39
42
|
private handleBlock;
|
|
40
|
-
potentiallyResubmitBundle({ submittedBundle, networkGasPrice, networkBaseFee }: {
|
|
43
|
+
potentiallyResubmitBundle({ blockReceivedTimestamp, submittedBundle, networkGasPrice, networkBaseFee }: {
|
|
44
|
+
blockReceivedTimestamp: number;
|
|
41
45
|
submittedBundle: SubmittedBundleInfo;
|
|
42
46
|
networkGasPrice: {
|
|
43
47
|
maxFeePerGas: bigint;
|
|
@@ -46,7 +50,8 @@ export declare class ExecutorManager {
|
|
|
46
50
|
networkBaseFee: bigint;
|
|
47
51
|
}): void;
|
|
48
52
|
cancelBundle(submittedBundle: SubmittedBundleInfo): Promise<void>;
|
|
49
|
-
|
|
53
|
+
replaceBundle({ blockReceivedTimestamp, submittedBundle, networkGasPrice, networkBaseFee, reason }: {
|
|
54
|
+
blockReceivedTimestamp: number;
|
|
50
55
|
submittedBundle: SubmittedBundleInfo;
|
|
51
56
|
networkGasPrice: GasPriceParameters;
|
|
52
57
|
networkBaseFee: bigint;
|