@pimlico/alto 0.0.18 → 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 -0
- package/contracts/ERC165.sol/ERC165.json +1 -0
- package/contracts/ERC20.sol/ERC20.json +1 -0
- package/contracts/Eip7702Support.sol/Eip7702Support.json +1 -0
- package/contracts/EntryPoint.sol/EntryPoint.json +1 -0
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -0
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -0
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -0
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
- package/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -0
- package/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -0
- package/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -0
- package/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
- package/contracts/Exec.sol/Exec.json +1 -0
- package/contracts/IAccount.sol/IAccount.json +1 -0
- package/contracts/IAccountExecute.sol/IAccountExecute.json +1 -0
- package/contracts/IAggregator.sol/IAggregator.json +1 -0
- package/contracts/IERC165.sol/IERC165.json +1 -0
- package/contracts/IERC5267.sol/IERC5267.json +1 -0
- package/contracts/IEntryPoint.sol/IEntryPoint.json +1 -0
- package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride08.json +1 -0
- package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride09.json +1 -0
- package/contracts/IEntryPointSimulations.sol/IEntryPointSimulations.json +1 -0
- package/contracts/INonceManager.sol/INonceManager.json +1 -0
- package/contracts/IPaymaster.sol/IPaymaster.json +1 -0
- package/contracts/ISenderCreator.sol/ISenderCreator.json +1 -0
- package/contracts/IStakeManager.sol/IStakeManager.json +1 -0
- package/contracts/LibBytes.sol/LibBytes.json +1 -0
- package/contracts/Math.sol/Math.json +1 -0
- package/contracts/MessageHashUtils.sol/MessageHashUtils.json +1 -0
- package/contracts/NonceManager.sol/NonceManager.json +1 -0
- package/contracts/Panic.sol/Panic.json +1 -0
- package/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -0
- package/contracts/ReentrancyGuard.sol/ReentrancyGuard.json +1 -0
- package/contracts/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +1 -0
- package/contracts/SafeCast.sol/SafeCast.json +1 -0
- package/contracts/SenderCreator.sol/SenderCreator.json +1 -0
- package/contracts/ShortStrings.sol/ShortStrings.json +1 -0
- package/contracts/SignedMath.sol/SignedMath.json +1 -0
- package/contracts/SimulationOverrideHelper.sol/SimulationOverrideHelper.json +1 -0
- package/contracts/StakeManager.sol/StakeManager.json +1 -0
- package/contracts/StorageSlot.sol/StorageSlot.json +1 -0
- package/contracts/Strings.sol/Strings.json +1 -0
- package/contracts/TransientSlot.sol/TransientSlot.json +1 -0
- package/contracts/UserOperation.sol/UserOperationLib.json +1 -0
- package/contracts/UserOperationLib.sol/UserOperationLib.json +1 -0
- 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/8dbf8a4ad39019b5.json +1 -0
- package/contracts/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -0
- package/contracts/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -0
- package/contracts/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -0
- package/contracts/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -0
- 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 -0
- package/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -0
- package/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -0
- 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 -0
- 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 -0
- package/contracts/utils/StorageSlot.sol/StorageSlot.json +1 -0
- package/contracts/v09/EntryPoint.sol/EntryPoint.json +1 -0
- package/esm/cli/alto.js +16 -7
- package/esm/cli/alto.js.map +1 -1
- package/esm/cli/config/bundler.d.ts +690 -540
- package/esm/cli/config/bundler.js +101 -66
- package/esm/cli/config/bundler.js.map +1 -1
- package/esm/cli/config/options.d.ts +2 -1
- package/esm/cli/config/options.js +207 -59
- package/esm/cli/config/options.js.map +1 -1
- package/esm/cli/customTransport.d.ts +3 -3
- package/esm/cli/customTransport.js +4 -3
- package/esm/cli/customTransport.js.map +1 -1
- package/esm/cli/deploySimulationsContract.d.ts +5 -2
- package/esm/cli/deploySimulationsContract.js +108 -40
- package/esm/cli/deploySimulationsContract.js.map +1 -1
- package/esm/cli/handler.js +94 -22
- package/esm/cli/handler.js.map +1 -1
- package/esm/cli/instrumentation.js +7 -1
- package/esm/cli/instrumentation.js.map +1 -1
- package/esm/cli/parseArgs.js.map +1 -1
- package/esm/cli/setupServer.js +63 -63
- 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 -0
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -0
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -0
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
- package/esm/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -0
- package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -0
- package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -0
- package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
- package/esm/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -0
- package/esm/createConfig.d.ts +12 -4
- package/esm/createConfig.js +2 -0
- package/esm/createConfig.js.map +1 -1
- package/esm/executor/bundleManager.d.ts +111 -0
- package/esm/executor/bundleManager.js +354 -0
- package/esm/executor/bundleManager.js.map +1 -0
- package/esm/executor/executor.d.ts +18 -23
- package/esm/executor/executor.js +183 -119
- package/esm/executor/executor.js.map +1 -1
- package/esm/executor/executorManager.d.ts +39 -88
- package/esm/executor/executorManager.js +325 -550
- package/esm/executor/executorManager.js.map +1 -1
- package/esm/executor/filterOpsAndEstimateGas.d.ts +39 -0
- package/esm/executor/filterOpsAndEstimateGas.js +280 -0
- package/esm/executor/filterOpsAndEstimateGas.js.map +1 -0
- package/esm/executor/getBundleStatus.d.ts +25 -0
- package/esm/executor/getBundleStatus.js +35 -0
- package/esm/executor/getBundleStatus.js.map +1 -0
- 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.d.ts +3 -3
- package/esm/executor/senderManager/createMemorySenderManager.js +14 -1
- package/esm/executor/senderManager/createMemorySenderManager.js.map +1 -1
- package/esm/executor/senderManager/createRedisSenderManager.d.ts +5 -4
- package/esm/executor/senderManager/createRedisSenderManager.js +4 -7
- package/esm/executor/senderManager/createRedisSenderManager.js.map +1 -1
- package/esm/executor/senderManager/flushOnStartUp.d.ts +3 -3
- package/esm/executor/senderManager/flushOnStartUp.js +4 -4
- package/esm/executor/senderManager/flushOnStartUp.js.map +1 -1
- package/esm/executor/senderManager/index.d.ts +4 -3
- package/esm/executor/senderManager/index.js +6 -2
- package/esm/executor/senderManager/index.js.map +1 -1
- package/esm/executor/senderManager/validateAndRefill.d.ts +4 -4
- package/esm/executor/senderManager/validateAndRefill.js +3 -3
- package/esm/executor/senderManager/validateAndRefill.js.map +1 -1
- package/esm/executor/utilityWalletMonitor.d.ts +5 -5
- package/esm/executor/utilityWalletMonitor.js +1 -1
- package/esm/executor/utilityWalletMonitor.js.map +1 -1
- package/esm/executor/utils.d.ts +14 -6
- package/esm/executor/utils.js +68 -37
- package/esm/executor/utils.js.map +1 -1
- package/esm/handlers/arbitrumGasPriceManager.d.ts +4 -3
- package/esm/handlers/arbitrumGasPriceManager.js +9 -5
- package/esm/handlers/arbitrumGasPriceManager.js.map +1 -1
- package/esm/handlers/eventManager.d.ts +19 -18
- package/esm/handlers/eventManager.js +81 -61
- package/esm/handlers/eventManager.js.map +1 -1
- package/esm/handlers/gasPriceManager.d.ts +12 -10
- package/esm/handlers/gasPriceManager.js +79 -125
- package/esm/handlers/gasPriceManager.js.map +1 -1
- package/esm/handlers/mantleGasPriceManager.d.ts +5 -5
- package/esm/handlers/mantleGasPriceManager.js +4 -4
- package/esm/handlers/mantleGasPriceManager.js.map +1 -1
- package/esm/handlers/optimismManager.d.ts +2 -2
- 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 +71 -33
- package/esm/mempool/mempool.js +231 -155
- package/esm/mempool/mempool.js.map +1 -1
- package/esm/mempool/reputationManager.d.ts +36 -36
- package/esm/mempool/reputationManager.js +93 -97
- 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.d.ts +2 -2
- package/esm/rpc/createMethodHandler.js.map +1 -1
- package/esm/rpc/estimation/gasEstimationHandler.d.ts +15 -16
- package/esm/rpc/estimation/gasEstimationHandler.js +24 -24
- package/esm/rpc/estimation/gasEstimationHandler.js.map +1 -1
- package/esm/rpc/estimation/gasEstimations06.d.ts +18 -0
- package/esm/rpc/estimation/gasEstimations06.js +45 -0
- package/esm/rpc/estimation/gasEstimations06.js.map +1 -0
- package/esm/rpc/estimation/gasEstimations07.d.ts +63 -0
- package/esm/rpc/estimation/gasEstimations07.js +384 -0
- package/esm/rpc/estimation/gasEstimations07.js.map +1 -0
- package/esm/rpc/estimation/preVerificationGasCalculator.d.ts +56 -0
- package/esm/rpc/estimation/preVerificationGasCalculator.js +467 -0
- package/esm/rpc/estimation/preVerificationGasCalculator.js.map +1 -0
- package/esm/rpc/estimation/types.d.ts +25 -111
- package/esm/rpc/estimation/types.js +5 -121
- package/esm/rpc/estimation/types.js.map +1 -1
- package/esm/rpc/estimation/utils.d.ts +69 -0
- package/esm/rpc/estimation/utils.js +240 -0
- package/esm/rpc/estimation/utils.js.map +1 -0
- package/{lib/rpc/methods/pimlico_sendUserOperationNow.d.ts → esm/rpc/methods/boost_sendUserOperation.d.ts} +299 -385
- package/esm/rpc/methods/boost_sendUserOperation.js +57 -0
- package/esm/rpc/methods/boost_sendUserOperation.js.map +1 -0
- package/esm/rpc/methods/debug_bundler_clearReputation.js +2 -2
- package/esm/rpc/methods/debug_bundler_clearReputation.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_clearState.js +2 -2
- 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_dumpMempool.js +1 -1
- package/esm/rpc/methods/debug_bundler_dumpMempool.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_dumpReputation.js +2 -2
- package/esm/rpc/methods/debug_bundler_dumpReputation.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_getStakeStatus.js +1 -2
- package/esm/rpc/methods/debug_bundler_getStakeStatus.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_sendBundleNow.js +10 -2
- package/esm/rpc/methods/debug_bundler_sendBundleNow.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_setBundlingMode.js +1 -1
- package/esm/rpc/methods/debug_bundler_setBundlingMode.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_setReputation.js +1 -1
- package/esm/rpc/methods/debug_bundler_setReputation.js.map +1 -1
- package/esm/rpc/methods/eth_chainId.js +1 -1
- package/esm/rpc/methods/eth_chainId.js.map +1 -1
- package/esm/rpc/methods/eth_estimateUserOperationGas.d.ts +910 -301
- package/esm/rpc/methods/eth_estimateUserOperationGas.js +228 -12
- 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 +8 -8
- 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 +10 -4
- package/esm/rpc/methods/eth_getUserOperationReceipt.js.map +1 -1
- package/esm/rpc/methods/eth_sendUserOperation.d.ts +319 -2
- package/esm/rpc/methods/eth_sendUserOperation.js +223 -20
- package/esm/rpc/methods/eth_sendUserOperation.js.map +1 -1
- package/esm/rpc/methods/eth_supportedEntryPoints.js +1 -1
- package/esm/rpc/methods/eth_supportedEntryPoints.js.map +1 -1
- package/esm/rpc/methods/index.js +11 -6
- package/esm/rpc/methods/index.js.map +1 -1
- package/esm/rpc/methods/pimlico_getUserOperationGasPrice.js +1 -1
- package/esm/rpc/methods/pimlico_getUserOperationGasPrice.js.map +1 -1
- package/esm/rpc/methods/pimlico_getUserOperationStatus.d.ts +6 -6
- package/esm/rpc/methods/pimlico_getUserOperationStatus.js +3 -3
- 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 +27 -24
- package/esm/rpc/methods/pimlico_sendUserOperationNow.js.map +1 -1
- package/{lib/rpc/methods/eth_estimateUserOperationGas.d.ts → esm/rpc/methods/pimlico_simulateAssetChange.d.ts} +891 -333
- package/esm/rpc/methods/pimlico_simulateAssetChange.js +113 -0
- package/esm/rpc/methods/pimlico_simulateAssetChange.js.map +1 -0
- package/esm/rpc/rpcHandler.d.ts +30 -54
- package/esm/rpc/rpcHandler.js +137 -315
- 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 +2 -2
- 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 +20 -22
- package/esm/rpc/validation/SafeValidator.js +87 -100
- package/esm/rpc/validation/SafeValidator.js.map +1 -1
- package/esm/rpc/validation/TracerResultParserV06.d.ts +3 -3
- package/esm/rpc/validation/TracerResultParserV06.js +19 -19
- package/esm/rpc/validation/TracerResultParserV06.js.map +1 -1
- package/esm/rpc/validation/TracerResultParserV07.d.ts +3 -3
- package/esm/rpc/validation/TracerResultParserV07.js +25 -25
- package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
- package/esm/rpc/validation/UnsafeValidator.d.ts +32 -33
- package/esm/rpc/validation/UnsafeValidator.js +117 -101
- package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
- package/esm/rpc/validation/tracer.d.ts +1 -1
- package/esm/store/createMempoolStore.d.ts +3 -3
- package/esm/store/createMempoolStore.js +100 -113
- package/esm/store/createMempoolStore.js.map +1 -1
- package/esm/store/index.d.ts +4 -80
- 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/outstanding/memory.d.ts +29 -0
- 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 +1661 -0
- package/esm/types/contracts/{EntryPointSimulationsV7.js → PimlicoSimulations.js} +1104 -1788
- package/esm/types/contracts/PimlicoSimulations.js.map +1 -0
- package/esm/types/contracts/index.d.ts +1 -3
- package/esm/types/contracts/index.js +1 -3
- 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 +26 -26
- package/esm/types/mempool.d.ts +14 -28
- package/esm/types/mempool.js +1 -7
- package/esm/types/mempool.js.map +1 -1
- package/esm/types/schemas.d.ts +26347 -10767
- package/esm/types/schemas.js +202 -38
- 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 +9447 -8727
- package/esm/types/validation.js +123 -161
- package/esm/types/validation.js.map +1 -1
- package/esm/utils/asyncTimeout.d.ts +5 -0
- package/esm/utils/asyncTimeout.js +23 -0
- package/esm/utils/asyncTimeout.js.map +1 -0
- package/esm/utils/bigInt.d.ts +9 -0
- package/esm/utils/bigInt.js +19 -2
- package/esm/utils/bigInt.js.map +1 -1
- package/esm/utils/eip7702.d.ts +4 -3
- package/esm/utils/eip7702.js +16 -7
- package/esm/utils/eip7702.js.map +1 -1
- package/esm/utils/entryPointOverrides.d.ts +12 -0
- package/esm/utils/entryPointOverrides.js +71 -0
- package/esm/utils/entryPointOverrides.js.map +1 -0
- package/esm/utils/helpers.d.ts +5 -3
- package/esm/utils/helpers.js +36 -13
- package/esm/utils/helpers.js.map +1 -1
- package/esm/utils/index.d.ts +2 -2
- package/esm/utils/index.js +1 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/metrics.d.ts +11 -9
- package/esm/utils/metrics.js +44 -25
- package/esm/utils/metrics.js.map +1 -1
- package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.d.ts +2 -2
- package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js +2 -2
- package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +1 -1
- package/esm/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +26 -4
- package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js +111 -71
- package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js.map +1 -1
- package/esm/utils/minMaxQueue/index.d.ts +3 -3
- 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.d.ts +4 -0
- package/esm/utils/toViemStateOverrides.js +44 -0
- package/esm/utils/toViemStateOverrides.js.map +1 -0
- package/esm/utils/userop.d.ts +89 -87
- package/esm/utils/userop.js +207 -439
- package/esm/utils/userop.js.map +1 -1
- package/package.json +12 -7
- package/esm/executor/fastlane.d.ts +0 -9
- package/esm/executor/fastlane.js +0 -37
- package/esm/executor/fastlane.js.map +0 -1
- package/esm/executor/filterOpsAndEStimateGas.d.ts +0 -29
- package/esm/executor/filterOpsAndEStimateGas.js +0 -198
- package/esm/executor/filterOpsAndEStimateGas.js.map +0 -1
- package/esm/mempool/monitoring.d.ts +0 -14
- package/esm/mempool/monitoring.js +0 -97
- package/esm/mempool/monitoring.js.map +0 -1
- package/esm/rpc/estimation/gasEstimationsV06.d.ts +0 -19
- package/esm/rpc/estimation/gasEstimationsV06.js +0 -144
- package/esm/rpc/estimation/gasEstimationsV06.js.map +0 -1
- package/esm/rpc/estimation/gasEstimationsV07.d.ts +0 -101
- package/esm/rpc/estimation/gasEstimationsV07.js +0 -721
- package/esm/rpc/estimation/gasEstimationsV07.js.map +0 -1
- package/esm/store/createMemoryOutstandingStore.d.ts +0 -28
- package/esm/store/createMemoryOutstandingStore.js +0 -231
- 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/EntryPointSimulationsV6.d.ts +0 -34
- package/esm/types/contracts/EntryPointSimulationsV6.js +0 -48
- package/esm/types/contracts/EntryPointSimulationsV6.js.map +0 -1
- package/esm/types/contracts/EntryPointSimulationsV7.d.ts +0 -2193
- package/esm/types/contracts/EntryPointSimulationsV7.js.map +0 -1
- package/esm/types/contracts/PimlicoEntryPointSimulations.d.ts +0 -26
- package/esm/types/contracts/PimlicoEntryPointSimulations.js +0 -38
- package/esm/types/contracts/PimlicoEntryPointSimulations.js.map +0 -1
- package/esm/utils/validation.d.ts +0 -76
- package/esm/utils/validation.js +0 -484
- package/esm/utils/validation.js.map +0 -1
- package/lib/cli/alto.d.ts +0 -7
- package/lib/cli/alto.js +0 -141
- package/lib/cli/alto.js.map +0 -1
- package/lib/cli/config/bundler.d.ts +0 -2836
- package/lib/cli/config/bundler.js +0 -222
- package/lib/cli/config/bundler.js.map +0 -1
- package/lib/cli/config/index.d.ts +0 -3
- package/lib/cli/config/index.js +0 -19
- package/lib/cli/config/index.js.map +0 -1
- package/lib/cli/config/options.d.ts +0 -13
- package/lib/cli/config/options.js +0 -553
- package/lib/cli/config/options.js.map +0 -1
- package/lib/cli/customTransport.d.ts +0 -14
- package/lib/cli/customTransport.js +0 -94
- package/lib/cli/customTransport.js.map +0 -1
- package/lib/cli/deploySimulationsContract.d.ts +0 -13
- package/lib/cli/deploySimulationsContract.js +0 -112
- package/lib/cli/deploySimulationsContract.js.map +0 -1
- package/lib/cli/handler.d.ts +0 -3
- package/lib/cli/handler.js +0 -157
- package/lib/cli/handler.js.map +0 -1
- package/lib/cli/index.d.ts +0 -4
- package/lib/cli/index.js +0 -20
- package/lib/cli/index.js.map +0 -1
- package/lib/cli/instrumentation.d.ts +0 -2
- package/lib/cli/instrumentation.js +0 -47
- package/lib/cli/instrumentation.js.map +0 -1
- package/lib/cli/parseArgs.d.ts +0 -8
- package/lib/cli/parseArgs.js +0 -25
- package/lib/cli/parseArgs.js.map +0 -1
- package/lib/cli/setupServer.d.ts +0 -13
- package/lib/cli/setupServer.js +0 -266
- package/lib/cli/setupServer.js.map +0 -1
- package/lib/cli/util.d.ts +0 -22
- package/lib/cli/util.js +0 -34
- package/lib/cli/util.js.map +0 -1
- package/lib/createConfig.d.ts +0 -16
- package/lib/createConfig.js +0 -13
- package/lib/createConfig.js.map +0 -1
- package/lib/executor/executor.d.ts +0 -65
- package/lib/executor/executor.js +0 -285
- package/lib/executor/executor.js.map +0 -1
- package/lib/executor/executorManager.d.ts +0 -107
- package/lib/executor/executorManager.js +0 -682
- package/lib/executor/executorManager.js.map +0 -1
- package/lib/executor/fastlane.d.ts +0 -9
- package/lib/executor/fastlane.js +0 -41
- package/lib/executor/fastlane.js.map +0 -1
- package/lib/executor/filterOpsAndEStimateGas.d.ts +0 -29
- package/lib/executor/filterOpsAndEStimateGas.js +0 -225
- package/lib/executor/filterOpsAndEStimateGas.js.map +0 -1
- package/lib/executor/index.d.ts +0 -5
- package/lib/executor/index.js +0 -21
- package/lib/executor/index.js.map +0 -1
- package/lib/executor/senderManager/createMemorySenderManager.d.ts +0 -8
- package/lib/executor/senderManager/createMemorySenderManager.js +0 -45
- package/lib/executor/senderManager/createMemorySenderManager.js.map +0 -1
- package/lib/executor/senderManager/createRedisSenderManager.d.ts +0 -8
- package/lib/executor/senderManager/createRedisSenderManager.js +0 -85
- package/lib/executor/senderManager/createRedisSenderManager.js.map +0 -1
- package/lib/executor/senderManager/flushOnStartUp.d.ts +0 -9
- package/lib/executor/senderManager/flushOnStartUp.js +0 -37
- package/lib/executor/senderManager/flushOnStartUp.js.map +0 -1
- package/lib/executor/senderManager/index.d.ts +0 -15
- package/lib/executor/senderManager/index.js +0 -25
- package/lib/executor/senderManager/index.js.map +0 -1
- package/lib/executor/senderManager/validateAndRefill.d.ts +0 -11
- package/lib/executor/senderManager/validateAndRefill.js +0 -115
- package/lib/executor/senderManager/validateAndRefill.js.map +0 -1
- package/lib/executor/utilityWalletMonitor.d.ts +0 -19
- package/lib/executor/utilityWalletMonitor.js +0 -42
- package/lib/executor/utilityWalletMonitor.js.map +0 -1
- package/lib/executor/utils.d.ts +0 -31
- package/lib/executor/utils.js +0 -170
- package/lib/executor/utils.js.map +0 -1
- package/lib/handlers/arbitrumGasPriceManager.d.ts +0 -14
- package/lib/handlers/arbitrumGasPriceManager.js +0 -39
- package/lib/handlers/arbitrumGasPriceManager.js.map +0 -1
- package/lib/handlers/eventManager.d.ts +0 -28
- package/lib/handlers/eventManager.js +0 -207
- package/lib/handlers/eventManager.js.map +0 -1
- package/lib/handlers/gasPriceManager.d.ts +0 -36
- package/lib/handlers/gasPriceManager.js +0 -423
- package/lib/handlers/gasPriceManager.js.map +0 -1
- package/lib/handlers/index.d.ts +0 -3
- package/lib/handlers/index.js +0 -19
- package/lib/handlers/index.js.map +0 -1
- package/lib/handlers/mantleGasPriceManager.d.ts +0 -23
- package/lib/handlers/mantleGasPriceManager.js +0 -44
- package/lib/handlers/mantleGasPriceManager.js.map +0 -1
- package/lib/handlers/optimismManager.d.ts +0 -10
- package/lib/handlers/optimismManager.js +0 -21
- package/lib/handlers/optimismManager.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -4
- package/lib/index.js.map +0 -1
- package/lib/mempool/index.d.ts +0 -4
- package/lib/mempool/index.js +0 -20
- package/lib/mempool/index.js.map +0 -1
- package/lib/mempool/mempool.d.ts +0 -191
- package/lib/mempool/mempool.js +0 -498
- package/lib/mempool/mempool.js.map +0 -1
- package/lib/mempool/monitoring.d.ts +0 -14
- package/lib/mempool/monitoring.js +0 -101
- package/lib/mempool/monitoring.js.map +0 -1
- package/lib/mempool/reputationManager.d.ts +0 -121
- package/lib/mempool/reputationManager.js +0 -472
- package/lib/mempool/reputationManager.js.map +0 -1
- package/lib/rpc/createMethodHandler.d.ts +0 -31
- package/lib/rpc/createMethodHandler.js +0 -34
- package/lib/rpc/createMethodHandler.js.map +0 -1
- package/lib/rpc/estimation/gasEstimationHandler.d.ts +0 -30
- package/lib/rpc/estimation/gasEstimationHandler.js +0 -50
- package/lib/rpc/estimation/gasEstimationHandler.js.map +0 -1
- package/lib/rpc/estimation/gasEstimationsV06.d.ts +0 -19
- package/lib/rpc/estimation/gasEstimationsV06.js +0 -148
- package/lib/rpc/estimation/gasEstimationsV06.js.map +0 -1
- package/lib/rpc/estimation/gasEstimationsV07.d.ts +0 -101
- package/lib/rpc/estimation/gasEstimationsV07.js +0 -727
- package/lib/rpc/estimation/gasEstimationsV07.js.map +0 -1
- package/lib/rpc/estimation/types.d.ts +0 -120
- package/lib/rpc/estimation/types.js +0 -125
- package/lib/rpc/estimation/types.js.map +0 -1
- package/lib/rpc/index.d.ts +0 -4
- package/lib/rpc/index.js +0 -20
- package/lib/rpc/index.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_clearReputation.d.ts +0 -22
- package/lib/rpc/methods/debug_bundler_clearReputation.js +0 -15
- package/lib/rpc/methods/debug_bundler_clearReputation.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_clearState.d.ts +0 -22
- package/lib/rpc/methods/debug_bundler_clearState.js +0 -16
- package/lib/rpc/methods/debug_bundler_clearState.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_dumpMempool.d.ts +0 -973
- package/lib/rpc/methods/debug_bundler_dumpMempool.js +0 -16
- package/lib/rpc/methods/debug_bundler_dumpMempool.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_dumpReputation.d.ts +0 -57
- package/lib/rpc/methods/debug_bundler_dumpReputation.js +0 -16
- package/lib/rpc/methods/debug_bundler_dumpReputation.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_getStakeStatus.d.ts +0 -79
- package/lib/rpc/methods/debug_bundler_getStakeStatus.js +0 -25
- package/lib/rpc/methods/debug_bundler_getStakeStatus.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_sendBundleNow.d.ts +0 -22
- package/lib/rpc/methods/debug_bundler_sendBundleNow.js +0 -15
- package/lib/rpc/methods/debug_bundler_sendBundleNow.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_setBundlingMode.d.ts +0 -22
- package/lib/rpc/methods/debug_bundler_setBundlingMode.js +0 -16
- package/lib/rpc/methods/debug_bundler_setBundlingMode.js.map +0 -1
- package/lib/rpc/methods/debug_bundler_setReputation.d.ts +0 -46
- package/lib/rpc/methods/debug_bundler_setReputation.js +0 -16
- package/lib/rpc/methods/debug_bundler_setReputation.js.map +0 -1
- package/lib/rpc/methods/eth_chainId.d.ts +0 -22
- package/lib/rpc/methods/eth_chainId.js +0 -13
- package/lib/rpc/methods/eth_chainId.js.map +0 -1
- package/lib/rpc/methods/eth_estimateUserOperationGas.js +0 -26
- package/lib/rpc/methods/eth_estimateUserOperationGas.js.map +0 -1
- package/lib/rpc/methods/eth_getUserOperationByHash.d.ts +0 -1775
- package/lib/rpc/methods/eth_getUserOperationByHash.js +0 -101
- package/lib/rpc/methods/eth_getUserOperationByHash.js.map +0 -1
- package/lib/rpc/methods/eth_getUserOperationReceipt.d.ts +0 -412
- package/lib/rpc/methods/eth_getUserOperationReceipt.js +0 -14
- package/lib/rpc/methods/eth_getUserOperationReceipt.js.map +0 -1
- package/lib/rpc/methods/eth_sendUserOperation.d.ts +0 -878
- package/lib/rpc/methods/eth_sendUserOperation.js +0 -44
- package/lib/rpc/methods/eth_sendUserOperation.js.map +0 -1
- package/lib/rpc/methods/eth_supportedEntryPoints.d.ts +0 -22
- package/lib/rpc/methods/eth_supportedEntryPoints.js +0 -13
- package/lib/rpc/methods/eth_supportedEntryPoints.js.map +0 -1
- package/lib/rpc/methods/index.d.ts +0 -3
- package/lib/rpc/methods/index.js +0 -44
- package/lib/rpc/methods/index.js.map +0 -1
- package/lib/rpc/methods/pimlico_getUserOperationGasPrice.d.ts +0 -131
- package/lib/rpc/methods/pimlico_getUserOperationGasPrice.js +0 -33
- package/lib/rpc/methods/pimlico_getUserOperationGasPrice.js.map +0 -1
- package/lib/rpc/methods/pimlico_getUserOperationStatus.d.ts +0 -43
- package/lib/rpc/methods/pimlico_getUserOperationStatus.js +0 -14
- package/lib/rpc/methods/pimlico_getUserOperationStatus.js.map +0 -1
- package/lib/rpc/methods/pimlico_sendUserOperationNow.js +0 -53
- package/lib/rpc/methods/pimlico_sendUserOperationNow.js.map +0 -1
- package/lib/rpc/rpcHandler.d.ts +0 -75
- package/lib/rpc/rpcHandler.js +0 -408
- package/lib/rpc/rpcHandler.js.map +0 -1
- package/lib/rpc/server.d.ts +0 -26
- package/lib/rpc/server.js +0 -283
- package/lib/rpc/server.js.map +0 -1
- package/lib/rpc/validation/BundlerCollectorTracerV06.d.ts +0 -102
- package/lib/rpc/validation/BundlerCollectorTracerV06.js +0 -262
- package/lib/rpc/validation/BundlerCollectorTracerV06.js.map +0 -1
- package/lib/rpc/validation/BundlerCollectorTracerV07.d.ts +0 -102
- package/lib/rpc/validation/BundlerCollectorTracerV07.js +0 -261
- package/lib/rpc/validation/BundlerCollectorTracerV07.js.map +0 -1
- package/lib/rpc/validation/SafeValidator.d.ts +0 -52
- package/lib/rpc/validation/SafeValidator.js +0 -350
- package/lib/rpc/validation/SafeValidator.js.map +0 -1
- package/lib/rpc/validation/TracerResultParserV06.d.ts +0 -13
- package/lib/rpc/validation/TracerResultParserV06.js +0 -582
- package/lib/rpc/validation/TracerResultParserV06.js.map +0 -1
- package/lib/rpc/validation/TracerResultParserV07.d.ts +0 -33
- package/lib/rpc/validation/TracerResultParserV07.js +0 -599
- package/lib/rpc/validation/TracerResultParserV07.js.map +0 -1
- package/lib/rpc/validation/UnsafeValidator.d.ts +0 -98
- package/lib/rpc/validation/UnsafeValidator.js +0 -326
- package/lib/rpc/validation/UnsafeValidator.js.map +0 -1
- package/lib/rpc/validation/index.d.ts +0 -3
- package/lib/rpc/validation/index.js +0 -19
- package/lib/rpc/validation/index.js.map +0 -1
- package/lib/rpc/validation/tracer.d.ts +0 -125
- package/lib/rpc/validation/tracer.js +0 -112
- package/lib/rpc/validation/tracer.js.map +0 -1
- package/lib/store/createMemoryOutstandingStore.d.ts +0 -28
- package/lib/store/createMemoryOutstandingStore.js +0 -236
- package/lib/store/createMemoryOutstandingStore.js.map +0 -1
- package/lib/store/createMempoolStore.d.ts +0 -8
- package/lib/store/createMempoolStore.js +0 -199
- package/lib/store/createMempoolStore.js.map +0 -1
- package/lib/store/createRedisOutstandingStore.d.ts +0 -27
- package/lib/store/createRedisOutstandingStore.js +0 -349
- package/lib/store/createRedisOutstandingStore.js.map +0 -1
- package/lib/store/createRedisStore.d.ts +0 -9
- package/lib/store/createRedisStore.js +0 -138
- package/lib/store/createRedisStore.js.map +0 -1
- package/lib/store/createStore.d.ts +0 -6
- package/lib/store/createStore.js +0 -70
- package/lib/store/createStore.js.map +0 -1
- package/lib/store/index.d.ts +0 -81
- package/lib/store/index.js +0 -6
- package/lib/store/index.js.map +0 -1
- package/lib/types/contracts/ArbitrumL1FeeAbi.d.ts +0 -32
- package/lib/types/contracts/ArbitrumL1FeeAbi.js +0 -45
- package/lib/types/contracts/ArbitrumL1FeeAbi.js.map +0 -1
- package/lib/types/contracts/CallEngine.d.ts +0 -28
- package/lib/types/contracts/CallEngine.js +0 -40
- package/lib/types/contracts/CallEngine.js.map +0 -1
- package/lib/types/contracts/CodeHashGetter.d.ts +0 -37
- package/lib/types/contracts/CodeHashGetter.js +0 -48
- package/lib/types/contracts/CodeHashGetter.js.map +0 -1
- package/lib/types/contracts/EntryPoint.d.ts +0 -1789
- package/lib/types/contracts/EntryPoint.js +0 -2307
- package/lib/types/contracts/EntryPoint.js.map +0 -1
- package/lib/types/contracts/EntryPointSimulationsV6.d.ts +0 -34
- package/lib/types/contracts/EntryPointSimulationsV6.js +0 -51
- package/lib/types/contracts/EntryPointSimulationsV6.js.map +0 -1
- package/lib/types/contracts/EntryPointSimulationsV7.d.ts +0 -2193
- package/lib/types/contracts/EntryPointSimulationsV7.js +0 -2828
- package/lib/types/contracts/EntryPointSimulationsV7.js.map +0 -1
- package/lib/types/contracts/IAccountExecute.d.ts +0 -53
- package/lib/types/contracts/IAccountExecute.js +0 -71
- package/lib/types/contracts/IAccountExecute.js.map +0 -1
- package/lib/types/contracts/IPaymaster.d.ts +0 -3
- package/lib/types/contracts/IPaymaster.js +0 -120
- package/lib/types/contracts/IPaymaster.js.map +0 -1
- package/lib/types/contracts/MantleBvmGasPriceOracle.d.ts +0 -219
- package/lib/types/contracts/MantleBvmGasPriceOracle.js +0 -180
- package/lib/types/contracts/MantleBvmGasPriceOracle.js.map +0 -1
- package/lib/types/contracts/OpL1FeeAbi.d.ts +0 -114
- package/lib/types/contracts/OpL1FeeAbi.js +0 -77
- package/lib/types/contracts/OpL1FeeAbi.js.map +0 -1
- package/lib/types/contracts/PimlicoEntryPointSimulations.d.ts +0 -26
- package/lib/types/contracts/PimlicoEntryPointSimulations.js +0 -41
- package/lib/types/contracts/PimlicoEntryPointSimulations.js.map +0 -1
- package/lib/types/contracts/SenderCreator.d.ts +0 -4
- package/lib/types/contracts/SenderCreator.js +0 -26
- package/lib/types/contracts/SenderCreator.js.map +0 -1
- package/lib/types/contracts/SimpleAccountFactory.d.ts +0 -57
- package/lib/types/contracts/SimpleAccountFactory.js +0 -79
- package/lib/types/contracts/SimpleAccountFactory.js.map +0 -1
- package/lib/types/contracts/TestOpcodesAccount.d.ts +0 -4
- package/lib/types/contracts/TestOpcodesAccount.js +0 -284
- package/lib/types/contracts/TestOpcodesAccount.js.map +0 -1
- package/lib/types/contracts/TestOpcodesAccountFactory.d.ts +0 -4
- package/lib/types/contracts/TestOpcodesAccountFactory.js +0 -26
- package/lib/types/contracts/TestOpcodesAccountFactory.js.map +0 -1
- package/lib/types/contracts/TestStorageAccount.d.ts +0 -4
- package/lib/types/contracts/TestStorageAccount.js +0 -316
- package/lib/types/contracts/TestStorageAccount.js.map +0 -1
- package/lib/types/contracts/index.d.ts +0 -17
- package/lib/types/contracts/index.js +0 -33
- package/lib/types/contracts/index.js.map +0 -1
- package/lib/types/gasPrice.d.ts +0 -110
- package/lib/types/gasPrice.js +0 -55
- package/lib/types/gasPrice.js.map +0 -1
- package/lib/types/index.d.ts +0 -11
- package/lib/types/index.js +0 -27
- package/lib/types/index.js.map +0 -1
- package/lib/types/interfaces.d.ts +0 -59
- package/lib/types/interfaces.js +0 -3
- package/lib/types/interfaces.js.map +0 -1
- package/lib/types/mempool.d.ts +0 -60
- package/lib/types/mempool.js +0 -11
- package/lib/types/mempool.js.map +0 -1
- package/lib/types/schemas.d.ts +0 -20779
- package/lib/types/schemas.js +0 -638
- package/lib/types/schemas.js.map +0 -1
- package/lib/types/utils.d.ts +0 -25
- package/lib/types/utils.js +0 -35
- package/lib/types/utils.js.map +0 -1
- package/lib/types/validation.d.ts +0 -14327
- package/lib/types/validation.js +0 -312
- package/lib/types/validation.js.map +0 -1
- package/lib/utils/bigInt.d.ts +0 -4
- package/lib/utils/bigInt.js +0 -19
- package/lib/utils/bigInt.js.map +0 -1
- package/lib/utils/eip7702.d.ts +0 -4
- package/lib/utils/eip7702.js +0 -21
- package/lib/utils/eip7702.js.map +0 -1
- package/lib/utils/fastify-rpc-decorators.d.ts +0 -19
- package/lib/utils/fastify-rpc-decorators.js +0 -23
- package/lib/utils/fastify-rpc-decorators.js.map +0 -1
- package/lib/utils/helpers.d.ts +0 -15
- package/lib/utils/helpers.js +0 -59
- package/lib/utils/helpers.js.map +0 -1
- package/lib/utils/index.d.ts +0 -8
- package/lib/utils/index.js +0 -23
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/logger.d.ts +0 -6
- package/lib/utils/logger.js +0 -85
- package/lib/utils/logger.js.map +0 -1
- package/lib/utils/metrics.d.ts +0 -28
- package/lib/utils/metrics.js +0 -192
- package/lib/utils/metrics.js.map +0 -1
- package/lib/utils/minMaxQueue/createMemoryMinMaxQueue.d.ts +0 -6
- package/lib/utils/minMaxQueue/createMemoryMinMaxQueue.js +0 -57
- package/lib/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +0 -1
- package/lib/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +0 -7
- package/lib/utils/minMaxQueue/createRedisMinMaxQueue.js +0 -105
- package/lib/utils/minMaxQueue/createRedisMinMaxQueue.js.map +0 -1
- package/lib/utils/minMaxQueue/index.d.ts +0 -12
- package/lib/utils/minMaxQueue/index.js +0 -16
- package/lib/utils/minMaxQueue/index.js.map +0 -1
- package/lib/utils/rpc-reply.d.ts +0 -16
- package/lib/utils/rpc-reply.js +0 -41
- package/lib/utils/rpc-reply.js.map +0 -1
- package/lib/utils/userop.d.ts +0 -138
- package/lib/utils/userop.js +0 -620
- package/lib/utils/userop.js.map +0 -1
- package/lib/utils/validation.d.ts +0 -76
- package/lib/utils/validation.js +0 -500
- package/lib/utils/validation.js.map +0 -1
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { http, concat, createWalletClient, getContractAddress, keccak256 } from "viem";
|
|
2
|
+
import entrypointSimulationsJsonV7 from "../contracts/EntryPointSimulations.sol/EntryPointSimulations07.json" with {
|
|
3
|
+
type: "json"
|
|
4
|
+
};
|
|
5
|
+
import entrypointSimulationsJsonV8 from "../contracts/EntryPointSimulations.sol/EntryPointSimulations08.json" with {
|
|
6
|
+
type: "json"
|
|
7
|
+
};
|
|
8
|
+
import entrypointSimulationsJsonV9 from "../contracts/EntryPointSimulations.sol/EntryPointSimulations09.json" with {
|
|
9
|
+
type: "json"
|
|
10
|
+
};
|
|
11
|
+
import pimlicoSimulationsJson from "../contracts/PimlicoSimulations.sol/PimlicoSimulations.json" with {
|
|
12
|
+
type: "json"
|
|
13
|
+
};
|
|
14
|
+
export const DETERMINISTIC_DEPLOYER_TRANSACTION = "0xf8a58V85174876e80V830186aV8V80b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600V81602V82378035828234f58015156039578182fd5b8V82525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222";
|
|
3
15
|
const isContractDeployed = async ({ publicClient, address }) => {
|
|
4
16
|
const code = await publicClient.getCode({
|
|
5
17
|
address
|
|
@@ -7,46 +19,57 @@ const isContractDeployed = async ({ publicClient, address }) => {
|
|
|
7
19
|
return code !== undefined && code !== "0x";
|
|
8
20
|
};
|
|
9
21
|
export const deploySimulationsContract = async ({ logger, args, publicClient }) => {
|
|
10
|
-
const
|
|
22
|
+
const utilityPrivateKey = args.utilityPrivateKey;
|
|
23
|
+
if (!utilityPrivateKey) {
|
|
24
|
+
throw new Error("Cannot deploy entryPoint simulations without utility-private-key");
|
|
25
|
+
}
|
|
26
|
+
const salt = keccak256(utilityPrivateKey.address);
|
|
27
|
+
const pimlicoSimulations = getContractAddress({
|
|
28
|
+
opcode: "CREATE2",
|
|
29
|
+
bytecode: pimlicoSimulationsJson.bytecode.object,
|
|
30
|
+
salt,
|
|
31
|
+
from: args.deterministicDeployerAddress
|
|
32
|
+
});
|
|
33
|
+
const epSimulationsV7 = getContractAddress({
|
|
34
|
+
opcode: "CREATE2",
|
|
35
|
+
bytecode: entrypointSimulationsJsonV7.bytecode.object,
|
|
36
|
+
salt,
|
|
37
|
+
from: args.deterministicDeployerAddress
|
|
38
|
+
});
|
|
39
|
+
const epSimulationsV8 = getContractAddress({
|
|
11
40
|
opcode: "CREATE2",
|
|
12
|
-
bytecode:
|
|
13
|
-
salt
|
|
41
|
+
bytecode: entrypointSimulationsJsonV8.bytecode.object,
|
|
42
|
+
salt,
|
|
14
43
|
from: args.deterministicDeployerAddress
|
|
15
44
|
});
|
|
16
|
-
const
|
|
45
|
+
const epSimulationsV9 = getContractAddress({
|
|
17
46
|
opcode: "CREATE2",
|
|
18
|
-
bytecode:
|
|
19
|
-
salt
|
|
47
|
+
bytecode: entrypointSimulationsJsonV9.bytecode.object,
|
|
48
|
+
salt,
|
|
20
49
|
from: args.deterministicDeployerAddress
|
|
21
50
|
});
|
|
22
|
-
const [
|
|
23
|
-
isContractDeployed({ publicClient, address:
|
|
24
|
-
isContractDeployed({ publicClient, address:
|
|
51
|
+
const [isPimlicoDeployed, isDeployedV7, isDeployedV8, isDeployedV9, isDeterministicDeployerDeployed] = await Promise.all([
|
|
52
|
+
isContractDeployed({ publicClient, address: pimlicoSimulations }),
|
|
53
|
+
isContractDeployed({ publicClient, address: epSimulationsV7 }),
|
|
54
|
+
isContractDeployed({ publicClient, address: epSimulationsV8 }),
|
|
55
|
+
isContractDeployed({ publicClient, address: epSimulationsV9 }),
|
|
25
56
|
isContractDeployed({
|
|
26
57
|
publicClient,
|
|
27
58
|
address: args.deterministicDeployerAddress
|
|
28
59
|
})
|
|
29
60
|
]);
|
|
30
|
-
if (
|
|
61
|
+
if (isDeployedV7 &&
|
|
62
|
+
isDeployedV8 &&
|
|
63
|
+
isDeployedV9 &&
|
|
64
|
+
isPimlicoDeployed &&
|
|
65
|
+
isDeterministicDeployerDeployed) {
|
|
31
66
|
return {
|
|
32
|
-
|
|
33
|
-
|
|
67
|
+
pimlicoSimulationContract: pimlicoSimulations,
|
|
68
|
+
entrypointSimulationContractV7: epSimulationsV7,
|
|
69
|
+
entrypointSimulationContractV8: epSimulationsV8,
|
|
70
|
+
entrypointSimulationContractV9: epSimulationsV9
|
|
34
71
|
};
|
|
35
72
|
}
|
|
36
|
-
const utilityPrivateKey = args.utilityPrivateKey;
|
|
37
|
-
if (!utilityPrivateKey) {
|
|
38
|
-
throw new Error("Cannot deploy entryPoint simulations without utility-private-key");
|
|
39
|
-
}
|
|
40
|
-
// if (args.entrypointSimulationContract) {
|
|
41
|
-
// if (
|
|
42
|
-
// await isContractDeployed({
|
|
43
|
-
// publicClient,
|
|
44
|
-
// address: args.entrypointSimulationContract
|
|
45
|
-
// })
|
|
46
|
-
// ) {
|
|
47
|
-
// return args.entrypointSimulationContract
|
|
48
|
-
// }
|
|
49
|
-
// }
|
|
50
73
|
const walletClient = createWalletClient({
|
|
51
74
|
transport: http(args.rpcUrl),
|
|
52
75
|
account: utilityPrivateKey
|
|
@@ -59,27 +82,45 @@ export const deploySimulationsContract = async ({ logger, args, publicClient })
|
|
|
59
82
|
hash: deterministicDeployHash
|
|
60
83
|
});
|
|
61
84
|
}
|
|
62
|
-
if (!
|
|
85
|
+
if (!isPimlicoDeployed) {
|
|
86
|
+
try {
|
|
87
|
+
const deployHash = await walletClient.sendTransaction({
|
|
88
|
+
chain: publicClient.chain,
|
|
89
|
+
to: args.deterministicDeployerAddress,
|
|
90
|
+
data: concat([
|
|
91
|
+
salt,
|
|
92
|
+
pimlicoSimulationsJson.bytecode.object
|
|
93
|
+
])
|
|
94
|
+
});
|
|
95
|
+
await publicClient.waitForTransactionReceipt({
|
|
96
|
+
hash: deployHash
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
logger.error("Failed to deploy PimlicoSimulations contract");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (!isDeployedV7) {
|
|
63
104
|
const deployHash = await walletClient.sendTransaction({
|
|
64
105
|
chain: publicClient.chain,
|
|
65
106
|
to: args.deterministicDeployerAddress,
|
|
66
107
|
data: concat([
|
|
67
|
-
|
|
68
|
-
|
|
108
|
+
salt,
|
|
109
|
+
entrypointSimulationsJsonV7.bytecode.object
|
|
69
110
|
])
|
|
70
111
|
});
|
|
71
112
|
await publicClient.waitForTransactionReceipt({
|
|
72
113
|
hash: deployHash
|
|
73
114
|
});
|
|
74
115
|
}
|
|
75
|
-
if (!
|
|
116
|
+
if (!isDeployedV8) {
|
|
76
117
|
try {
|
|
77
118
|
const deployHash = await walletClient.sendTransaction({
|
|
78
119
|
chain: publicClient.chain,
|
|
79
120
|
to: args.deterministicDeployerAddress,
|
|
80
121
|
data: concat([
|
|
81
|
-
|
|
82
|
-
|
|
122
|
+
salt,
|
|
123
|
+
entrypointSimulationsJsonV8.bytecode.object
|
|
83
124
|
])
|
|
84
125
|
});
|
|
85
126
|
await publicClient.waitForTransactionReceipt({
|
|
@@ -90,17 +131,44 @@ export const deploySimulationsContract = async ({ logger, args, publicClient })
|
|
|
90
131
|
logger.error("Failed to deploy simulationsContract V8");
|
|
91
132
|
}
|
|
92
133
|
}
|
|
134
|
+
if (!isDeployedV9) {
|
|
135
|
+
try {
|
|
136
|
+
const deployHash = await walletClient.sendTransaction({
|
|
137
|
+
chain: publicClient.chain,
|
|
138
|
+
to: args.deterministicDeployerAddress,
|
|
139
|
+
data: concat([
|
|
140
|
+
salt,
|
|
141
|
+
entrypointSimulationsJsonV9.bytecode.object
|
|
142
|
+
])
|
|
143
|
+
});
|
|
144
|
+
await publicClient.waitForTransactionReceipt({
|
|
145
|
+
hash: deployHash
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
logger.error("Failed to deploy simulationsContract V9");
|
|
150
|
+
}
|
|
151
|
+
}
|
|
93
152
|
const deployStatus = await Promise.all([
|
|
94
|
-
isContractDeployed({ publicClient, address:
|
|
95
|
-
isContractDeployed({ publicClient, address:
|
|
153
|
+
isContractDeployed({ publicClient, address: pimlicoSimulations }),
|
|
154
|
+
isContractDeployed({ publicClient, address: epSimulationsV7 }),
|
|
155
|
+
isContractDeployed({ publicClient, address: epSimulationsV8 }),
|
|
156
|
+
isContractDeployed({ publicClient, address: epSimulationsV9 })
|
|
96
157
|
]);
|
|
97
|
-
|
|
98
|
-
|
|
158
|
+
// EntryPointSimulationsV8 is optional as not all chains support cancun.
|
|
159
|
+
if (!deployStatus[2]) {
|
|
160
|
+
logger.error("Failed to deploy simulationsContract 0.7");
|
|
161
|
+
}
|
|
162
|
+
// EntryPointSimulationsV8 is optional as not all chains support cancun.
|
|
163
|
+
if (!deployStatus[3]) {
|
|
164
|
+
logger.error("Failed to deploy simulationsContract 0.9");
|
|
99
165
|
}
|
|
100
166
|
if (deployStatus[0]) {
|
|
101
167
|
return {
|
|
102
|
-
entrypointSimulationContractV7:
|
|
103
|
-
entrypointSimulationContractV8:
|
|
168
|
+
entrypointSimulationContractV7: epSimulationsV7,
|
|
169
|
+
entrypointSimulationContractV8: epSimulationsV8,
|
|
170
|
+
entrypointSimulationContractV9: epSimulationsV9,
|
|
171
|
+
pimlicoSimulationContract: pimlicoSimulations
|
|
104
172
|
};
|
|
105
173
|
}
|
|
106
174
|
throw new Error("Failed to deploy simulationsContract");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploySimulationsContract.js","sourceRoot":"","sources":["../../cli/deploySimulationsContract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploySimulationsContract.js","sourceRoot":"","sources":["../../cli/deploySimulationsContract.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,IAAI,EAKJ,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACZ,MAAM,MAAM,CAAA;AACb,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;IAC1G,IAAI,EAAE,MAAM;CACf,CAAA;AACD,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;IAC1G,IAAI,EAAE,MAAM;CACf,CA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AwE;IACxE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QACnB,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QAClB,OAAO;YACH,8BAA8B,EAAE,eAAe;YAC/C,8BAA8B,EAAE,eAAe;YAC/C,8BAA8B,EAAE,eAAe;YAC/C,yBAAyB,EAAE,kBAAkB;SAChD,CAAA;IACL,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;AAC3D,CAAC,CAAA"}
|
package/esm/cli/handler.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { GasPriceManager } from "../handlers/index.js";
|
|
2
2
|
import { createMetrics, initDebugLogger, initProductionLogger } from "../utils/index.js";
|
|
3
3
|
import { Registry } from "prom-client";
|
|
4
|
-
import { createPublicClient, createWalletClient,
|
|
5
|
-
import
|
|
6
|
-
import { setupServer } from "./setupServer.js";
|
|
4
|
+
import { createPublicClient, createWalletClient, fallback, formatEther, publicActions } from "viem";
|
|
5
|
+
import * as chains from "viem/chains";
|
|
7
6
|
import { createConfig } from "../createConfig.js";
|
|
8
|
-
import { parseArgs } from "./parseArgs.js";
|
|
9
|
-
import { deploySimulationsContract } from "./deploySimulationsContract.js";
|
|
10
7
|
import { getSenderManager } from "../executor/senderManager/index.js";
|
|
11
8
|
import { UtilityWalletMonitor } from "../executor/utilityWalletMonitor.js";
|
|
9
|
+
import { customTransport } from "./customTransport.js";
|
|
10
|
+
import { deploySimulationsContract } from "./deploySimulationsContract.js";
|
|
11
|
+
import { parseArgs } from "./parseArgs.js";
|
|
12
|
+
import { setupServer } from "./setupServer.js";
|
|
12
13
|
const preFlightChecks = async (config) => {
|
|
14
|
+
// Check horizontal scaling configuration
|
|
15
|
+
if (config.enableHorizontalScaling && !config.redisEndpoint) {
|
|
16
|
+
throw new Error("Horizontal scaling is enabled but redis-endpoint is not configured.");
|
|
17
|
+
}
|
|
18
|
+
// Check Redis receipt cache configuration
|
|
19
|
+
if (config.enableRedisReceiptCache && !config.redisEndpoint) {
|
|
20
|
+
throw new Error("Redis receipt cache is enabled but redis-endpoint is not configured.");
|
|
21
|
+
}
|
|
13
22
|
for (const entrypoint of config.entrypoints) {
|
|
14
23
|
const entryPointCode = await config.publicClient.getCode({
|
|
15
24
|
address: entrypoint
|
|
@@ -18,13 +27,22 @@ const preFlightChecks = async (config) => {
|
|
|
18
27
|
throw new Error(`entry point ${entrypoint} does not exist`);
|
|
19
28
|
}
|
|
20
29
|
}
|
|
30
|
+
if (config.pimlicoSimulationContract) {
|
|
31
|
+
const address = config.pimlicoSimulationContract;
|
|
32
|
+
const code = await config.publicClient.getCode({
|
|
33
|
+
address: address
|
|
34
|
+
});
|
|
35
|
+
if (code === undefined || code === "0x") {
|
|
36
|
+
throw new Error(`PimlicoSimulations contract ${address} does not exist`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
21
39
|
if (config.entrypointSimulationContractV7) {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
address
|
|
40
|
+
const address = config.entrypointSimulationContractV7;
|
|
41
|
+
const code = await config.publicClient.getCode({
|
|
42
|
+
address
|
|
25
43
|
});
|
|
26
|
-
if (
|
|
27
|
-
throw new Error(`EntryPointSimulationsV7 contract ${
|
|
44
|
+
if (code === undefined || code === "0x") {
|
|
45
|
+
throw new Error(`EntryPointSimulationsV7 contract ${address} does not exist`);
|
|
28
46
|
}
|
|
29
47
|
}
|
|
30
48
|
// if (config.entrypointSimulationContractV8) {
|
|
@@ -38,6 +56,17 @@ const preFlightChecks = async (config) => {
|
|
|
38
56
|
// )
|
|
39
57
|
// }
|
|
40
58
|
// }
|
|
59
|
+
// if (config.entrypointSimulationContractV9) {
|
|
60
|
+
// const simulations = config.entrypointSimulationContractV9
|
|
61
|
+
// const simulationsCode = await config.publicClient.getCode({
|
|
62
|
+
// address: simulations
|
|
63
|
+
// })
|
|
64
|
+
// if (simulationsCode === undefined || simulationsCode === "0x") {
|
|
65
|
+
// throw new Error(
|
|
66
|
+
// `EntryPointSimulationsV9 contract ${simulations} does not exist`
|
|
67
|
+
// )
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
41
70
|
if (config.refillHelperContract) {
|
|
42
71
|
const refillHelper = config.refillHelperContract;
|
|
43
72
|
const refillHelperCode = await config.publicClient.getCode({
|
|
@@ -48,8 +77,24 @@ const preFlightChecks = async (config) => {
|
|
|
48
77
|
}
|
|
49
78
|
}
|
|
50
79
|
};
|
|
80
|
+
const getViemChain = ({ chainId, args }) => {
|
|
81
|
+
for (const chain of Object.values(chains)) {
|
|
82
|
+
if (chain.id === chainId) {
|
|
83
|
+
return {
|
|
84
|
+
...chain,
|
|
85
|
+
blockTime: chain.blockTime ?? args.blockTime,
|
|
86
|
+
rpcUrls: {
|
|
87
|
+
default: { http: [args.rpcUrl] },
|
|
88
|
+
public: { http: [args.rpcUrl] }
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
};
|
|
51
95
|
export async function bundlerHandler(args_) {
|
|
52
96
|
const args = parseArgs(args_);
|
|
97
|
+
const enableCors = args.enableCors;
|
|
53
98
|
const logger = args.json
|
|
54
99
|
? initProductionLogger(args.logLevel)
|
|
55
100
|
: initDebugLogger(args.logLevel);
|
|
@@ -64,7 +109,9 @@ export async function bundlerHandler(args_) {
|
|
|
64
109
|
return await client.getChainId();
|
|
65
110
|
};
|
|
66
111
|
const chainId = await getChainId();
|
|
67
|
-
|
|
112
|
+
// let us assume that the block time is at least 2x the polling interval
|
|
113
|
+
const viemChain = getViemChain({ chainId, args });
|
|
114
|
+
const chain = viemChain ?? {
|
|
68
115
|
id: chainId,
|
|
69
116
|
name: "chain-name", // isn't important, never used
|
|
70
117
|
nativeCurrency: {
|
|
@@ -72,10 +119,12 @@ export async function bundlerHandler(args_) {
|
|
|
72
119
|
symbol: "ETH",
|
|
73
120
|
decimals: 18
|
|
74
121
|
},
|
|
122
|
+
blockTime: args.blockTime,
|
|
75
123
|
rpcUrls: {
|
|
76
124
|
default: { http: [args.rpcUrl] },
|
|
77
125
|
public: { http: [args.rpcUrl] }
|
|
78
|
-
}
|
|
126
|
+
},
|
|
127
|
+
experimental_preconfirmationTime: args.flashblocksPreconfirmationTime
|
|
79
128
|
};
|
|
80
129
|
let publicClient = createPublicClient({
|
|
81
130
|
transport: customTransport(args.rpcUrl, {
|
|
@@ -83,6 +132,7 @@ export async function bundlerHandler(args_) {
|
|
|
83
132
|
level: args.publicClientLogLevel || args.logLevel
|
|
84
133
|
})
|
|
85
134
|
}),
|
|
135
|
+
pollingInterval: args.blockTime / 4,
|
|
86
136
|
chain
|
|
87
137
|
});
|
|
88
138
|
// Some permissioned chains require a whitelisted address to make deployments.
|
|
@@ -101,15 +151,21 @@ export async function bundlerHandler(args_) {
|
|
|
101
151
|
const createWalletTransport = (url) => customTransport(url, {
|
|
102
152
|
logger: logger.child({ module: "wallet_client" }, { level: args.walletClientLogLevel || args.logLevel })
|
|
103
153
|
});
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
?
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
154
|
+
const walletClients = {
|
|
155
|
+
private: args.sendTransactionRpcUrl
|
|
156
|
+
? createWalletClient({
|
|
157
|
+
transport: fallback([
|
|
158
|
+
createWalletTransport(args.sendTransactionRpcUrl),
|
|
159
|
+
createWalletTransport(args.rpcUrl)
|
|
160
|
+
], { rank: false }),
|
|
161
|
+
chain
|
|
162
|
+
})
|
|
163
|
+
: undefined,
|
|
164
|
+
public: createWalletClient({
|
|
165
|
+
transport: createWalletTransport(args.rpcUrl),
|
|
166
|
+
chain
|
|
167
|
+
})
|
|
168
|
+
};
|
|
113
169
|
// if flag is set, use utility wallet to deploy the simulations contract
|
|
114
170
|
if (args.deploySimulationsContract) {
|
|
115
171
|
const deployedContracts = await deploySimulationsContract({
|
|
@@ -121,8 +177,24 @@ export async function bundlerHandler(args_) {
|
|
|
121
177
|
deployedContracts.entrypointSimulationContractV7;
|
|
122
178
|
args.entrypointSimulationContractV8 =
|
|
123
179
|
deployedContracts.entrypointSimulationContractV8;
|
|
180
|
+
args.entrypointSimulationContractV9 =
|
|
181
|
+
deployedContracts.entrypointSimulationContractV9;
|
|
182
|
+
args.pimlicoSimulationContract =
|
|
183
|
+
deployedContracts.pimlicoSimulationContract;
|
|
184
|
+
logger.info({
|
|
185
|
+
entrypointSimulationContractV7: deployedContracts.entrypointSimulationContractV7,
|
|
186
|
+
entrypointSimulationContractV8: deployedContracts.entrypointSimulationContractV8,
|
|
187
|
+
entrypointSimulationContractV9: deployedContracts.entrypointSimulationContractV9,
|
|
188
|
+
pimlicoSimulationContract: deployedContracts.pimlicoSimulationContract
|
|
189
|
+
}, "Contracts used for simulation");
|
|
124
190
|
}
|
|
125
|
-
const config = createConfig({
|
|
191
|
+
const config = createConfig({
|
|
192
|
+
...args,
|
|
193
|
+
logger,
|
|
194
|
+
publicClient,
|
|
195
|
+
walletClients,
|
|
196
|
+
enableCors
|
|
197
|
+
});
|
|
126
198
|
const gasPriceManager = new GasPriceManager(config);
|
|
127
199
|
await gasPriceManager.init();
|
|
128
200
|
const registry = new Registry();
|
package/esm/cli/handler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../cli/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EACH,aAAa,EACb,eAAe,EACf,oBAAoB,EACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../cli/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eA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IAED,OAAO,CAAC,yBAAyB,CAAC,GAAG,CACjC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,CAClE,CAAA;IAED,MAAM,WAAW,CAAC;QACd,MAAM;QACN,QAAQ;QACR,OAAO;QACP,aAAa;QACb,eAAe;KAClB,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import module from "node:module";
|
|
1
2
|
import { SpanKind } from "@opentelemetry/api";
|
|
2
3
|
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
|
|
3
4
|
import { FastifyInstrumentation } from "@opentelemetry/instrumentation-fastify";
|
|
4
5
|
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
5
6
|
import { PinoInstrumentation } from "@opentelemetry/instrumentation-pino";
|
|
6
7
|
import { UndiciInstrumentation } from "@opentelemetry/instrumentation-undici";
|
|
7
|
-
import { ViemInstrumentation } from "@pimlico/opentelemetry-instrumentation-viem";
|
|
8
8
|
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
9
9
|
import { ParentBasedSampler, SamplingDecision } from "@opentelemetry/sdk-trace-base";
|
|
10
10
|
import { SemanticAttributes } from "@opentelemetry/semantic-conventions";
|
|
11
|
+
import { ViemInstrumentation } from "@pimlico/opentelemetry-instrumentation-viem";
|
|
12
|
+
import { createAddHookMessageChannel } from "import-in-the-middle";
|
|
13
|
+
const { registerOptions, waitForAllMessagesAcknowledged } = createAddHookMessageChannel();
|
|
14
|
+
// @ts-ignore — @types/node needs to be updated first
|
|
15
|
+
module.register("import-in-the-middle/hook.mjs", import.meta.url, registerOptions);
|
|
11
16
|
class CustomSampler {
|
|
12
17
|
shouldSample(_context, _traceId, _spanName, spanKind, attributes) {
|
|
13
18
|
const ignoredRoutes = ["/metrics", "/health"];
|
|
@@ -42,4 +47,5 @@ const sdk = new NodeSDK({
|
|
|
42
47
|
sampler: new ParentBasedSampler({ root: new CustomSampler() })
|
|
43
48
|
});
|
|
44
49
|
sdk.start();
|
|
50
|
+
await waitForAllMessagesAcknowledged();
|
|
45
51
|
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../cli/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../cli/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAiC,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EACH,kBAAkB,EAElB,gBAAgB,EACnB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAA;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AAC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AE,EAAE,CAAC;CACjE,CAAC,CAAA;AAEF,GAAG,CAAC,KAAK,EAAE,CAAA;AACX,MAAM,8BAA8B,EAAE,CAAA"}
|
package/esm/cli/parseArgs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseArgs.js","sourceRoot":"","sources":["../../cli/parseArgs.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"parseArgs.js","sourceRoot":"","sources":["../../cli/parseArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAanD,SAAS,WAAW,CAAC,GAAW;IAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAC5C,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CACxD,CAAA;AACL,CAAC;AAED,SAAS,sBAAsB,CAC3B,GAAM;IAEN,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAC1B,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QACT,MAAM,YAAY,GAAG,WAAW,CAC5B,GAAG,CAC2B,CACjC;QAAC,GAAW,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,GAAc,CAAC,CAAA;QAEjD,OAAO,GAAG,CAAA;IACd,CAAC,EACD,EAA6B,CAChC,CAAA;AACL,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CACrB,IAAmB,EACW,EAAE;IAChC,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAChD,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACnB,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACzC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAC/C,CAAC,CAAA"}
|