@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
package/esm/types/validation.js
CHANGED
|
@@ -5,45 +5,37 @@ import { EntryPointV06Abi } from "./contracts/index.js";
|
|
|
5
5
|
import { addressSchema } from "./schemas.js";
|
|
6
6
|
// hexnum regex
|
|
7
7
|
const hexPattern = /^0x[0-9a-f]*$/;
|
|
8
|
-
|
|
8
|
+
const signatureValidationFailedSchema = z
|
|
9
9
|
.tuple([addressSchema])
|
|
10
10
|
.transform((val) => {
|
|
11
11
|
return { aggregator: val[0] };
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
const signatureValidationFailedErrorSchema = z.object({
|
|
14
14
|
args: signatureValidationFailedSchema,
|
|
15
15
|
errorName: z.literal("SignatureValidationFailed")
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
.tuple([addressSchema])
|
|
19
|
-
.transform((val) => {
|
|
17
|
+
const senderAddressResultSchema = z.tuple([addressSchema]).transform((val) => {
|
|
20
18
|
return {
|
|
21
19
|
sender: val[0]
|
|
22
20
|
};
|
|
23
21
|
});
|
|
24
|
-
|
|
22
|
+
const senderAddressResultErrorSchema = z.object({
|
|
25
23
|
args: senderAddressResultSchema,
|
|
26
24
|
errorName: z.literal("SenderAddressResult")
|
|
27
25
|
});
|
|
28
|
-
|
|
29
|
-
.tuple([z.bigint(), z.string()])
|
|
30
|
-
.transform((val) => {
|
|
26
|
+
const failedOpSchema = z.tuple([z.bigint(), z.string()]).transform((val) => {
|
|
31
27
|
return { opIndex: val[0], reason: val[1] };
|
|
32
28
|
});
|
|
33
|
-
|
|
29
|
+
const failedOpErrorSchema = z.object({
|
|
34
30
|
args: failedOpSchema,
|
|
35
31
|
errorName: z.literal("FailedOp")
|
|
36
32
|
});
|
|
37
|
-
|
|
33
|
+
const failedOpWithRevertSchema = z
|
|
38
34
|
.tuple([z.bigint(), z.string(), z.string()])
|
|
39
35
|
.transform((val) => {
|
|
40
36
|
return { opIndex: val[0], reason: val[1], inner: val[2] };
|
|
41
37
|
});
|
|
42
|
-
|
|
43
|
-
args: failedOpWithRevertSchema,
|
|
44
|
-
errorName: z.literal("FailedOpWithRevert")
|
|
45
|
-
});
|
|
46
|
-
export const executionResultSchemaV06 = z
|
|
38
|
+
const executionResultSchema06 = z
|
|
47
39
|
.tuple([
|
|
48
40
|
z.bigint(),
|
|
49
41
|
z.bigint(),
|
|
@@ -62,7 +54,7 @@ export const executionResultSchemaV06 = z
|
|
|
62
54
|
targetResult: val[5]
|
|
63
55
|
};
|
|
64
56
|
});
|
|
65
|
-
|
|
57
|
+
const executionResultSchema07 = z
|
|
66
58
|
.tuple([
|
|
67
59
|
z.bigint(),
|
|
68
60
|
z.bigint(),
|
|
@@ -77,7 +69,7 @@ export const executionResultSchemaV07 = z
|
|
|
77
69
|
return {
|
|
78
70
|
preOpGas: val[0],
|
|
79
71
|
paid: val[1],
|
|
80
|
-
|
|
72
|
+
accountValidationData: val[2],
|
|
81
73
|
paymasterValidationData: val[3],
|
|
82
74
|
paymasterVerificationGasLimit: val[4],
|
|
83
75
|
paymasterPostOpGasLimit: val[5],
|
|
@@ -86,18 +78,10 @@ export const executionResultSchemaV07 = z
|
|
|
86
78
|
};
|
|
87
79
|
});
|
|
88
80
|
export const executionResultSchema = z.union([
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
executionResultSchema06,
|
|
82
|
+
executionResultSchema07
|
|
91
83
|
]);
|
|
92
|
-
|
|
93
|
-
gasUsed: z.bigint(),
|
|
94
|
-
success: z.boolean(),
|
|
95
|
-
returnData: z
|
|
96
|
-
.string()
|
|
97
|
-
.regex(hexPattern)
|
|
98
|
-
.transform((val) => val)
|
|
99
|
-
});
|
|
100
|
-
export const executionResultErrorSchema = z.object({
|
|
84
|
+
const executionResultErrorSchema = z.object({
|
|
101
85
|
args: executionResultSchema,
|
|
102
86
|
errorName: z.literal("ExecutionResult")
|
|
103
87
|
});
|
|
@@ -106,143 +90,121 @@ const stakeInfoSchema = z.object({
|
|
|
106
90
|
stake: z.bigint(),
|
|
107
91
|
unstakeDelaySec: z.bigint()
|
|
108
92
|
});
|
|
109
|
-
|
|
110
|
-
.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
93
|
+
const validationResultSchema06 = z
|
|
94
|
+
.union([
|
|
95
|
+
// Without aggregation - 4 element tuple
|
|
96
|
+
z.tuple([
|
|
97
|
+
z.object({
|
|
98
|
+
preOpGas: z.bigint(),
|
|
99
|
+
prefund: z.bigint(),
|
|
100
|
+
sigFailed: z.boolean(),
|
|
101
|
+
validAfter: z.number(),
|
|
102
|
+
validUntil: z.number(),
|
|
103
|
+
paymasterContext: z
|
|
104
|
+
.string()
|
|
105
|
+
.regex(hexPattern)
|
|
106
|
+
.transform((val) => val)
|
|
107
|
+
}),
|
|
108
|
+
stakeInfoSchema,
|
|
109
|
+
stakeInfoSchema.optional(),
|
|
110
|
+
stakeInfoSchema.optional()
|
|
111
|
+
]),
|
|
112
|
+
// With aggregation - 5 element tuple
|
|
113
|
+
z.tuple([
|
|
114
|
+
z.object({
|
|
115
|
+
preOpGas: z.bigint(),
|
|
116
|
+
prefund: z.bigint(),
|
|
117
|
+
sigFailed: z.boolean(),
|
|
118
|
+
validAfter: z.number(),
|
|
119
|
+
validUntil: z.number(),
|
|
120
|
+
paymasterContext: z
|
|
121
|
+
.string()
|
|
122
|
+
.regex(hexPattern)
|
|
123
|
+
.transform((val) => val)
|
|
124
|
+
}),
|
|
125
|
+
stakeInfoSchema,
|
|
126
|
+
stakeInfoSchema.optional(),
|
|
127
|
+
stakeInfoSchema.optional(),
|
|
128
|
+
z.object({
|
|
129
|
+
aggregator: addressSchema,
|
|
130
|
+
stakeInfo: stakeInfoSchema
|
|
131
|
+
})
|
|
132
|
+
])
|
|
125
133
|
])
|
|
126
|
-
.transform((val) => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
z.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
134
|
+
.transform((val) => ({
|
|
135
|
+
returnInfo: val[0],
|
|
136
|
+
senderInfo: val[1],
|
|
137
|
+
factoryInfo: val[2],
|
|
138
|
+
paymasterInfo: val[3],
|
|
139
|
+
aggregatorInfo: val[4]
|
|
140
|
+
}));
|
|
141
|
+
const validationResultSchema07 = z
|
|
142
|
+
.union([
|
|
143
|
+
// Without aggregation - 4 element tuple
|
|
144
|
+
z.tuple([
|
|
145
|
+
z.object({
|
|
146
|
+
preOpGas: z.bigint(),
|
|
147
|
+
prefund: z.bigint(),
|
|
148
|
+
accountValidationData: z.bigint(),
|
|
149
|
+
paymasterValidationData: z.bigint(),
|
|
150
|
+
accountSigFailed: z.boolean().optional(),
|
|
151
|
+
paymasterSigFailed: z.boolean().optional(),
|
|
152
|
+
validAfter: z.number().optional(),
|
|
153
|
+
validUntil: z.number().optional(),
|
|
154
|
+
paymasterContext: z
|
|
155
|
+
.string()
|
|
156
|
+
.regex(hexPattern)
|
|
157
|
+
.transform((val) => val)
|
|
158
|
+
}),
|
|
159
|
+
stakeInfoSchema,
|
|
160
|
+
stakeInfoSchema.optional(),
|
|
161
|
+
stakeInfoSchema.optional()
|
|
162
|
+
]),
|
|
163
|
+
// With aggregation - 5 element tuple
|
|
164
|
+
z.tuple([
|
|
165
|
+
z.object({
|
|
166
|
+
preOpGas: z.bigint(),
|
|
167
|
+
prefund: z.bigint(),
|
|
168
|
+
accountValidationData: z.bigint(),
|
|
169
|
+
paymasterValidationData: z.bigint(),
|
|
170
|
+
accountSigFailed: z.boolean().optional(),
|
|
171
|
+
paymasterSigFailed: z.boolean().optional(),
|
|
172
|
+
validAfter: z.number().optional(),
|
|
173
|
+
validUntil: z.number().optional(),
|
|
174
|
+
paymasterContext: z
|
|
175
|
+
.string()
|
|
176
|
+
.regex(hexPattern)
|
|
177
|
+
.transform((val) => val)
|
|
178
|
+
}),
|
|
179
|
+
stakeInfoSchema,
|
|
180
|
+
stakeInfoSchema.optional(),
|
|
181
|
+
stakeInfoSchema.optional(),
|
|
182
|
+
z.object({
|
|
183
|
+
aggregator: addressSchema,
|
|
184
|
+
stakeInfo: stakeInfoSchema
|
|
185
|
+
})
|
|
186
|
+
])
|
|
153
187
|
])
|
|
154
|
-
.transform((val) => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
188
|
+
.transform((val) => ({
|
|
189
|
+
returnInfo: val[0],
|
|
190
|
+
senderInfo: val[1],
|
|
191
|
+
factoryInfo: val[2],
|
|
192
|
+
paymasterInfo: val[3],
|
|
193
|
+
aggregatorInfo: val[4]
|
|
194
|
+
}));
|
|
162
195
|
export const validationResultSchema = z.union([
|
|
163
|
-
|
|
164
|
-
|
|
196
|
+
validationResultSchema06,
|
|
197
|
+
validationResultSchema07
|
|
165
198
|
]);
|
|
166
|
-
|
|
199
|
+
const validationResultErrorSchema = z.object({
|
|
167
200
|
args: validationResultSchema,
|
|
168
201
|
errorName: z.literal("ValidationResult")
|
|
169
202
|
});
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
z.object({
|
|
173
|
-
preOpGas: z.bigint(),
|
|
174
|
-
prefund: z.bigint(),
|
|
175
|
-
sigFailed: z.boolean(),
|
|
176
|
-
validAfter: z.number(),
|
|
177
|
-
validUntil: z.number(),
|
|
178
|
-
paymasterContext: z
|
|
179
|
-
.string()
|
|
180
|
-
.regex(hexPattern)
|
|
181
|
-
.transform((val) => val)
|
|
182
|
-
}),
|
|
183
|
-
stakeInfoSchema,
|
|
184
|
-
stakeInfoSchema.optional(),
|
|
185
|
-
stakeInfoSchema.optional(),
|
|
186
|
-
z
|
|
187
|
-
.object({
|
|
188
|
-
aggregator: addressSchema,
|
|
189
|
-
stakeInfo: stakeInfoSchema
|
|
190
|
-
})
|
|
191
|
-
.optional()
|
|
192
|
-
])
|
|
193
|
-
.transform((val) => {
|
|
194
|
-
return {
|
|
195
|
-
returnInfo: val[0],
|
|
196
|
-
senderInfo: val[1],
|
|
197
|
-
factoryInfo: val[2],
|
|
198
|
-
paymasterInfo: val[3],
|
|
199
|
-
aggregatorInfo: val[4]
|
|
200
|
-
};
|
|
201
|
-
});
|
|
202
|
-
export const validationResultWithAggregationSchemaV07 = z
|
|
203
|
-
.tuple([
|
|
204
|
-
z.object({
|
|
205
|
-
preOpGas: z.bigint(),
|
|
206
|
-
prefund: z.bigint(),
|
|
207
|
-
accountValidationData: z.bigint(),
|
|
208
|
-
paymasterValidationData: z.bigint(),
|
|
209
|
-
accountSigFailed: z.boolean().optional(),
|
|
210
|
-
paymasterSigFailed: z.boolean().optional(),
|
|
211
|
-
validAfter: z.number().optional(),
|
|
212
|
-
validUntil: z.number().optional(),
|
|
213
|
-
paymasterContext: z
|
|
214
|
-
.string()
|
|
215
|
-
.regex(hexPattern)
|
|
216
|
-
.transform((val) => val)
|
|
217
|
-
}),
|
|
218
|
-
stakeInfoSchema,
|
|
219
|
-
stakeInfoSchema.optional(),
|
|
220
|
-
stakeInfoSchema.optional(),
|
|
221
|
-
z
|
|
222
|
-
.object({
|
|
223
|
-
aggregator: addressSchema,
|
|
224
|
-
stakeInfo: stakeInfoSchema
|
|
225
|
-
})
|
|
226
|
-
.optional()
|
|
227
|
-
])
|
|
228
|
-
.transform((val) => {
|
|
229
|
-
return {
|
|
230
|
-
returnInfo: val[0],
|
|
231
|
-
senderInfo: val[1],
|
|
232
|
-
factoryInfo: val[2],
|
|
233
|
-
paymasterInfo: val[3],
|
|
234
|
-
aggregatorInfo: val[4]
|
|
235
|
-
};
|
|
236
|
-
});
|
|
237
|
-
export const validationResultWithAggregationSchema = z.union([
|
|
238
|
-
validationResultWithAggregationSchemaV06,
|
|
239
|
-
validationResultWithAggregationSchemaV07
|
|
240
|
-
]);
|
|
241
|
-
export const validationResultWithAggregationErrorSchema = z.object({
|
|
242
|
-
args: validationResultWithAggregationSchema,
|
|
203
|
+
const validationResultWithAggregationErrorSchema = z.object({
|
|
204
|
+
args: validationResultSchema,
|
|
243
205
|
errorName: z.literal("ValidationResultWithAggregation")
|
|
244
206
|
});
|
|
245
|
-
|
|
207
|
+
const entryPointErrorsSchema = z.discriminatedUnion("errorName", [
|
|
246
208
|
validationResultErrorSchema,
|
|
247
209
|
executionResultErrorSchema,
|
|
248
210
|
failedOpErrorSchema,
|
|
@@ -250,11 +212,11 @@ export const entryPointErrorsSchema = z.discriminatedUnion("errorName", [
|
|
|
250
212
|
signatureValidationFailedErrorSchema,
|
|
251
213
|
validationResultWithAggregationErrorSchema
|
|
252
214
|
]);
|
|
253
|
-
|
|
215
|
+
const errorCauseSchema = z.object({
|
|
254
216
|
name: z.literal("ContractFunctionRevertedError"),
|
|
255
217
|
data: entryPointErrorsSchema
|
|
256
218
|
});
|
|
257
|
-
|
|
219
|
+
const vmExecutionError = z.object({
|
|
258
220
|
name: z.literal("CallExecutionError"),
|
|
259
221
|
cause: z.object({
|
|
260
222
|
name: z.literal("RpcRequestError"),
|
|
@@ -278,7 +240,7 @@ export const vmExecutionError = z.object({
|
|
|
278
240
|
})
|
|
279
241
|
})
|
|
280
242
|
});
|
|
281
|
-
export const
|
|
243
|
+
export const entryPointExecutionErrorSchema06 = z
|
|
282
244
|
.object({
|
|
283
245
|
name: z.literal("ContractFunctionExecutionError"),
|
|
284
246
|
cause: z.discriminatedUnion("name", [
|
|
@@ -292,7 +254,7 @@ export const entryPointExecutionErrorSchemaV06 = z
|
|
|
292
254
|
}
|
|
293
255
|
return val.cause.data;
|
|
294
256
|
});
|
|
295
|
-
export const
|
|
257
|
+
export const entryPointExecutionErrorSchema07 = z
|
|
296
258
|
.object({
|
|
297
259
|
name: z.literal("ContractFunctionExecutionError"),
|
|
298
260
|
cause: z.discriminatedUnion("name", [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../types/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAA;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAgB,aAAa,EAAE,MAAM,WAAW,CAAA;AAgBvD,eAAe;AACf,MAAM,UAAU,GAAG,eAAe,CAAA;AAElC,MAAM
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../types/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAA;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAgB,aAAa,EAAE,MAAM,WAAW,CAAA;AAgBvD,eAAe;AACf,MAAM,UAAU,GAAG,eAAe,CAAA;AAElC,MAAM,+BAA+B,GAAG,CAAC;KACpC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC;KACtB,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;IACf,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;AACjC,CAAC,CAAC,CAAA;AAEN,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,+BAA+B;IACrC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;CACpD,CAAC,CAAA;AAEF,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;IACzE,OA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,CAAC,kBAAkB,CAAC,MAAM,EAAE;QAChC,gBAAgB;QAChB,gBAAgB;KACnB,CAAC;CACL,CAAC;KACD,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;IACf,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;QAC1C,OAAO,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAA;IACrC,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA;AACzB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as opentelemetry from "@opentelemetry/api";
|
|
2
|
+
export class AsyncTimeoutError extends Error {
|
|
3
|
+
constructor() {
|
|
4
|
+
super("Operation timed out");
|
|
5
|
+
this.name = "AsyncTimeoutError";
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export const asyncCallWithTimeout = async (asyncPromise, timeLimit) => {
|
|
9
|
+
let timeoutHandle;
|
|
10
|
+
const timeoutPromise = new Promise((_resolve, reject) => {
|
|
11
|
+
timeoutHandle = setTimeout(() => reject(new AsyncTimeoutError()), timeLimit);
|
|
12
|
+
});
|
|
13
|
+
return Promise.race([asyncPromise, timeoutPromise])
|
|
14
|
+
.then((result) => {
|
|
15
|
+
clearTimeout(timeoutHandle);
|
|
16
|
+
return result;
|
|
17
|
+
})
|
|
18
|
+
.catch((error) => {
|
|
19
|
+
opentelemetry.trace.getActiveSpan()?.recordException(error);
|
|
20
|
+
throw error;
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=asyncTimeout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asyncTimeout.js","sourceRoot":"","sources":["../../utils/asyncTimeout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAEnD,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACxC;QACI,KAAK,CAAC,qBAAqB,CAAC,CAAA;QAC5B,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAA;IACnC,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EACrC,YAAwB,EACxB,SAAiB,EACP,EAAE;IACZ,IAAI,aAA4C,CAAA;IAEhD,MAAM,cAAc,GAAG,IAAI,OAAO,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;QACpD,aAAa,GAAG,UAAU,CACtB,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,iBAAiB,EAAE,CAAC,EACrC,SAAS,CACZ,CAAA;IACL,CAAC,CAAC,CAAA;IAEF,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;SAC9C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACb,YAAY,CAAC,aAAa,CAAC,CAAA;QAC3B,OAAO,MAAW,CAAA;IACtB,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACb,aAAa,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,eAAe,CAAC,KAAK,CAAC,CAAA;QAC3D,MAAM,KAAK,CAAA;IACf,CAAC,CAAC,CAAA;AACV,CAAC,CAAA"}
|
package/esm/utils/bigInt.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export declare const minBigInt: (a: bigint, b: bigint) => bigint;
|
|
2
2
|
export declare const maxBigInt: (a: bigint, b: bigint) => bigint;
|
|
3
3
|
export declare const scaleBigIntByPercent: (value: bigint, percent: bigint) => bigint;
|
|
4
|
+
export declare const unscaleBigIntByPercent: (value: bigint, percent: bigint) => bigint;
|
|
5
|
+
export declare const roundUpBigInt: ({ value, multiple }: {
|
|
6
|
+
value: bigint;
|
|
7
|
+
multiple: bigint;
|
|
8
|
+
}) => bigint;
|
|
9
|
+
export declare const randomBigInt: ({ lower, upper }: {
|
|
10
|
+
lower?: bigint | undefined;
|
|
11
|
+
upper: bigint;
|
|
12
|
+
}) => bigint;
|
|
4
13
|
//# sourceMappingURL=bigInt.d.ts.map
|
package/esm/utils/bigInt.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
///
|
|
1
|
+
/// Returns the smaller of two BigInts.
|
|
2
2
|
export const minBigInt = (a, b) => {
|
|
3
3
|
return a < b ? a : b;
|
|
4
4
|
};
|
|
5
|
-
/// Returns the
|
|
5
|
+
/// Returns the larger of two BigInts.
|
|
6
6
|
export const maxBigInt = (a, b) => {
|
|
7
7
|
return a > b ? a : b;
|
|
8
8
|
};
|
|
@@ -10,4 +10,21 @@ export const maxBigInt = (a, b) => {
|
|
|
10
10
|
export const scaleBigIntByPercent = (value, percent) => {
|
|
11
11
|
return (value * percent) / 100n;
|
|
12
12
|
};
|
|
13
|
+
/// Unscale a BigInt by a certain percentage (inverse of scaleBigIntByPercent).
|
|
14
|
+
export const unscaleBigIntByPercent = (value, percent) => {
|
|
15
|
+
return (value * 100n) / percent;
|
|
16
|
+
};
|
|
17
|
+
export const roundUpBigInt = ({ value, multiple }) => {
|
|
18
|
+
const remainder = value % multiple;
|
|
19
|
+
return remainder === 0n ? value : value + (multiple - remainder);
|
|
20
|
+
};
|
|
21
|
+
/// Returns a random BigInt between lower and upper bounds (inclusive).
|
|
22
|
+
export const randomBigInt = ({ lower = 0n, upper }) => {
|
|
23
|
+
if (lower > upper) {
|
|
24
|
+
throw new Error("Lower bound must be less than or equal to upper bound");
|
|
25
|
+
}
|
|
26
|
+
const range = upper - lower + 1n;
|
|
27
|
+
const random = BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER));
|
|
28
|
+
return lower + (random % range);
|
|
29
|
+
};
|
|
13
30
|
//# sourceMappingURL=bigInt.js.map
|
package/esm/utils/bigInt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigInt.js","sourceRoot":"","sources":["../../utils/bigInt.ts"],"names":[],"mappings":"AAAA,uCA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E,CAAC,CAAA;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EACzB,KAAK,GAAG,EAAE,EACV,KAAK,EAC2B,EAAU,EAAE;IAC5C,IAAI,KAAK,GAAG,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,EAAE,CAAA;IAChC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAE1E,OAAO,KAAK,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;AACnC,CAAC,CAAA"}
|
package/esm/utils/eip7702.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { StateOverride } from "viem";
|
|
2
|
-
import { UserOperation } from "../types/schemas.js";
|
|
3
|
-
export declare const
|
|
1
|
+
import { type Address, type StateOverride } from "viem";
|
|
2
|
+
import type { UserOperation } from "../types/schemas.js";
|
|
3
|
+
export declare const getEip7702AuthAddress: (eip7702Auth: NonNullable<UserOperation["eip7702Auth"]>) => Address;
|
|
4
|
+
export declare const getEip7702DelegationOverrides: (userOps: UserOperation[]) => StateOverride | undefined;
|
|
4
5
|
//# sourceMappingURL=eip7702.d.ts.map
|
package/esm/utils/eip7702.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { concat } from "viem";
|
|
2
|
+
export const getEip7702AuthAddress = (eip7702Auth) => {
|
|
3
|
+
return "address" in eip7702Auth
|
|
4
|
+
? eip7702Auth.address
|
|
5
|
+
: eip7702Auth.contractAddress;
|
|
6
|
+
};
|
|
2
7
|
export const getEip7702DelegationOverrides = (userOps) => {
|
|
3
|
-
|
|
8
|
+
// Use Map to deduplicate by sender address
|
|
9
|
+
const overrideMap = new Map();
|
|
4
10
|
for (const userOp of userOps) {
|
|
5
11
|
if (userOp.eip7702Auth) {
|
|
6
|
-
const delegate =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
const delegate = getEip7702AuthAddress(userOp.eip7702Auth);
|
|
13
|
+
const code = concat(["0xef0100", delegate]);
|
|
14
|
+
// Only add if not already present, or update if present
|
|
15
|
+
overrideMap.set(userOp.sender, {
|
|
10
16
|
address: userOp.sender,
|
|
11
|
-
code
|
|
17
|
+
code
|
|
12
18
|
});
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
|
-
|
|
21
|
+
if (overrideMap.size === 0) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return Array.from(overrideMap.values());
|
|
16
25
|
};
|
|
17
26
|
//# sourceMappingURL=eip7702.js.map
|
package/esm/utils/eip7702.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eip7702.js","sourceRoot":"","sources":["../../utils/eip7702.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"eip7702.js","sourceRoot":"","sources":["../../utils/eip7702.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,MAAM,EAAE,MAAM,MAAM,CAAA;AAG/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,WAAsD,EAC/C,EAAE;IACT,OAAO,SAAS,IAAI,WAAW;QAC3B,CAAC,CAAC,WAAW,CAAC,OAAO;QACrB,CAAC,CAAC,WAAW,CAAC,eAAe,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,OAAwB,EACC,EAAE;IAC3B,2CAA2C;IAC3C,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkC,CAAA;IAE7D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC3B,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,MAAM,QAAQ,GAAG,qBAAqB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;YAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAA;YAE3C,wDAAwD;YACxD,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC3B,OAAO,EAAE,MAAM,CAAC,MAAM;gBACtB,IAAI;aACP,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,SAAS,CAAA;IACpB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAA;AAC3C,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Address, type StateOverride } from "viem";
|
|
2
|
+
import type { EntryPointVersion } from "viem/account-abstraction";
|
|
3
|
+
export declare const getSenderCreatorOverride: (entryPoint: Address) => {
|
|
4
|
+
slot: `0x${string}`;
|
|
5
|
+
value: `0x${string}`;
|
|
6
|
+
};
|
|
7
|
+
export declare const getFilterOpsStateOverride: ({ version, entryPoint, baseFeePerGas }: {
|
|
8
|
+
version: EntryPointVersion;
|
|
9
|
+
entryPoint: Address;
|
|
10
|
+
baseFeePerGas: bigint;
|
|
11
|
+
}) => StateOverride;
|
|
12
|
+
//# sourceMappingURL=entryPointOverrides.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { getCreateAddress, keccak256, pad, toHex } from "viem";
|
|
2
|
+
import entryPointOverride06 from "../contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json" with {
|
|
3
|
+
type: "json"
|
|
4
|
+
};
|
|
5
|
+
import entryPointOverride07 from "../contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json" with {
|
|
6
|
+
type: "json"
|
|
7
|
+
};
|
|
8
|
+
import entryPointOverride08 from "../contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json" with {
|
|
9
|
+
type: "json"
|
|
10
|
+
};
|
|
11
|
+
import entryPointOverride09 from "../contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json" with {
|
|
12
|
+
type: "json"
|
|
13
|
+
};
|
|
14
|
+
export const getSenderCreatorOverride = (entryPoint) => {
|
|
15
|
+
const slot = keccak256(toHex("SENDER_CREATOR"));
|
|
16
|
+
const value = pad(getCreateAddress({
|
|
17
|
+
from: entryPoint,
|
|
18
|
+
nonce: 1n
|
|
19
|
+
}), { size: 32 });
|
|
20
|
+
return {
|
|
21
|
+
slot,
|
|
22
|
+
value
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export const getFilterOpsStateOverride = ({ version, entryPoint, baseFeePerGas }) => {
|
|
26
|
+
const senderCreatorOverride = getSenderCreatorOverride(entryPoint);
|
|
27
|
+
const baseFeeSlot = keccak256(toHex("BLOCK_BASE_FEE_PER_GAS"));
|
|
28
|
+
const baseFeeValue = toHex(baseFeePerGas, { size: 32 });
|
|
29
|
+
// Get current timestamp in seconds (block.timestamp is in seconds)
|
|
30
|
+
const timestampSlot = keccak256(toHex("BLOCK_TIMESTAMP"));
|
|
31
|
+
const timestampValue = toHex(Math.floor(Date.now() / 1000), { size: 32 });
|
|
32
|
+
let code;
|
|
33
|
+
switch (version) {
|
|
34
|
+
case "0.9": {
|
|
35
|
+
code = entryPointOverride09.deployedBytecode.object;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
case "0.8": {
|
|
39
|
+
code = entryPointOverride08.deployedBytecode.object;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
case "0.7": {
|
|
43
|
+
code = entryPointOverride07.deployedBytecode.object;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
default: {
|
|
47
|
+
code = entryPointOverride06.deployedBytecode.object;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
address: entryPoint,
|
|
53
|
+
code,
|
|
54
|
+
stateDiff: [
|
|
55
|
+
{
|
|
56
|
+
slot: senderCreatorOverride.slot,
|
|
57
|
+
value: senderCreatorOverride.value
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
slot: baseFeeSlot,
|
|
61
|
+
value: baseFeeValue
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
slot: timestampSlot,
|
|
65
|
+
value: timestampValue
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
];
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=entryPointOverrides.js.map
|