@pimlico/alto 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contracts/EIP712.sol/EIP712.json +1 -1
- package/contracts/ERC165.sol/ERC165.json +1 -1
- package/contracts/ERC20.sol/ERC20.json +1 -1
- package/contracts/Eip7702Support.sol/Eip7702Support.json +1 -1
- package/contracts/EntryPoint.sol/EntryPoint.json +1 -1
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
- package/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
- package/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
- package/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
- package/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
- package/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
- package/contracts/Exec.sol/Exec.json +1 -1
- package/contracts/IAccount.sol/IAccount.json +1 -1
- package/contracts/IAccountExecute.sol/IAccountExecute.json +1 -1
- package/contracts/IAggregator.sol/IAggregator.json +1 -1
- package/contracts/IERC165.sol/IERC165.json +1 -1
- package/contracts/IERC5267.sol/IERC5267.json +1 -1
- package/contracts/IEntryPoint.sol/IEntryPoint.json +1 -1
- package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride08.json +1 -0
- package/contracts/IEntryPointFilterOpsOverride.sol/IEntryPointFilterOpsOverride09.json +1 -0
- package/contracts/IEntryPointSimulations.sol/IEntryPointSimulations.json +1 -1
- package/contracts/INonceManager.sol/INonceManager.json +1 -1
- package/contracts/IPaymaster.sol/IPaymaster.json +1 -1
- package/contracts/ISenderCreator.sol/ISenderCreator.json +1 -1
- package/contracts/IStakeManager.sol/IStakeManager.json +1 -1
- package/contracts/LibBytes.sol/LibBytes.json +1 -1
- package/contracts/Math.sol/Math.json +1 -1
- package/contracts/MessageHashUtils.sol/MessageHashUtils.json +1 -1
- package/contracts/NonceManager.sol/NonceManager.json +1 -1
- package/contracts/Panic.sol/Panic.json +1 -1
- package/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
- package/contracts/ReentrancyGuard.sol/ReentrancyGuard.json +1 -1
- package/contracts/ReentrancyGuardTransient.sol/ReentrancyGuardTransient.json +1 -1
- package/contracts/SafeCast.sol/SafeCast.json +1 -1
- package/contracts/SenderCreator.sol/SenderCreator.json +1 -1
- package/contracts/ShortStrings.sol/ShortStrings.json +1 -1
- package/contracts/SignedMath.sol/SignedMath.json +1 -1
- package/contracts/SimulationOverrideHelper.sol/SimulationOverrideHelper.json +1 -0
- package/contracts/StakeManager.sol/StakeManager.json +1 -1
- package/contracts/StorageSlot.sol/StorageSlot.json +1 -1
- package/contracts/Strings.sol/Strings.json +1 -1
- package/contracts/TransientSlot.sol/TransientSlot.json +1 -1
- package/contracts/UserOperation.sol/UserOperationLib.json +1 -1
- package/contracts/UserOperationLib.sol/UserOperationLib.json +1 -1
- package/contracts/account-abstraction-v9/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -0
- package/contracts/account-abstraction-v9/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -0
- package/contracts/account-abstraction-v9/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -0
- package/contracts/account-abstraction-v9/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -0
- package/contracts/build-info/{880955d5786bfdae.json → 031b289b93191224.json} +1 -1
- package/contracts/build-info/181f3522c3744403.json +1 -0
- package/contracts/build-info/a2db592afab5c9de.json +1 -0
- package/contracts/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -1
- package/contracts/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -1
- package/contracts/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -1
- package/contracts/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -1
- package/contracts/core/Eip7702Support.sol/Eip7702Support.json +1 -0
- package/contracts/core/NonceManager.sol/NonceManager.json +1 -0
- package/contracts/core/SenderCreator.sol/SenderCreator.json +1 -0
- package/contracts/core/StakeManager.sol/StakeManager.json +1 -0
- package/contracts/core/UserOperationLib.sol/UserOperationLib.json +1 -0
- package/contracts/interfaces/IAccount.sol/IAccount.json +1 -0
- package/contracts/interfaces/IAccountExecute.sol/IAccountExecute.json +1 -0
- package/contracts/interfaces/IAggregator.sol/IAggregator.json +1 -1
- package/contracts/interfaces/IEntryPoint.sol/IEntryPoint.json +1 -1
- package/contracts/interfaces/INonceManager.sol/INonceManager.json +1 -1
- package/contracts/interfaces/IPaymaster.sol/IPaymaster.json +1 -0
- package/contracts/interfaces/ISenderCreator.sol/ISenderCreator.json +1 -0
- package/contracts/interfaces/IStakeManager.sol/IStakeManager.json +1 -1
- package/contracts/overrides/Eip7702Support.sol/Eip7702Support.json +1 -0
- package/contracts/overrides/NonceManager.sol/NonceManager.json +1 -0
- package/contracts/overrides/SenderCreator.sol/SenderCreator.json +1 -0
- package/contracts/overrides/StakeManager.sol/StakeManager.json +1 -0
- package/contracts/overrides/UserOperationLib.sol/UserOperationLib.json +1 -0
- package/contracts/utils/Exec.sol/Exec.json +1 -1
- package/contracts/utils/StorageSlot.sol/StorageSlot.json +1 -0
- package/contracts/v09/EntryPoint.sol/EntryPoint.json +1 -0
- package/esm/cli/alto.js +17 -6
- package/esm/cli/alto.js.map +1 -1
- package/esm/cli/config/bundler.d.ts +459 -321
- package/esm/cli/config/bundler.js +125 -91
- package/esm/cli/config/bundler.js.map +1 -1
- package/esm/cli/config/options.d.ts +4 -1
- package/esm/cli/config/options.js +233 -106
- package/esm/cli/config/options.js.map +1 -1
- package/esm/cli/customTransport.d.ts +3 -3
- package/esm/cli/deploySimulationsContract.d.ts +1 -0
- package/esm/cli/deploySimulationsContract.js +41 -5
- package/esm/cli/deploySimulationsContract.js.map +1 -1
- package/esm/cli/handler.js +76 -80
- package/esm/cli/handler.js.map +1 -1
- package/esm/cli/multiRpcTransport.d.ts +7 -0
- package/esm/cli/multiRpcTransport.js +52 -0
- package/esm/cli/multiRpcTransport.js.map +1 -0
- package/esm/cli/setupServer.js +92 -70
- package/esm/cli/setupServer.js.map +1 -1
- package/esm/cli/shutDown.d.ts +20 -0
- package/esm/cli/shutDown.js +285 -0
- package/esm/cli/shutDown.js.map +1 -0
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride06.json +1 -1
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride07.json +1 -1
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride08.json +1 -1
- package/esm/contracts/EntryPointFilterOpsOverride.sol/EntryPointFilterOpsOverride09.json +1 -0
- package/esm/contracts/EntryPointGasEstimationOverride.sol/EntryPointGasEstimationOverride06.json +1 -1
- package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations07.json +1 -1
- package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations08.json +1 -1
- package/esm/contracts/EntryPointSimulations.sol/EntryPointSimulations09.json +1 -0
- package/esm/contracts/PimlicoSimulations.sol/PimlicoSimulations.json +1 -1
- package/esm/createConfig.d.ts +9 -2
- package/esm/createConfig.js.map +1 -1
- package/esm/executor/{userOpMonitor.d.ts → bundleManager.d.ts} +56 -37
- package/esm/executor/bundleManager.js +393 -0
- package/esm/executor/bundleManager.js.map +1 -0
- package/esm/executor/executor.d.ts +4 -3
- package/esm/executor/executor.js +47 -23
- package/esm/executor/executor.js.map +1 -1
- package/esm/executor/executorManager.d.ts +20 -15
- package/esm/executor/executorManager.js +248 -67
- package/esm/executor/executorManager.js.map +1 -1
- package/esm/executor/filterOpsAndEstimateGas.d.ts +17 -2
- package/esm/executor/filterOpsAndEstimateGas.js +100 -77
- package/esm/executor/filterOpsAndEstimateGas.js.map +1 -1
- package/esm/executor/getBundleStatus.d.ts +5 -1
- package/esm/executor/getBundleStatus.js.map +1 -1
- package/esm/executor/index.d.ts +1 -0
- package/esm/executor/index.js +1 -0
- package/esm/executor/index.js.map +1 -1
- package/esm/executor/senderManager/createMemorySenderManager.js +13 -0
- package/esm/executor/senderManager/createMemorySenderManager.js.map +1 -1
- package/esm/executor/senderManager/createRedisSenderManager.d.ts +2 -1
- package/esm/executor/senderManager/createRedisSenderManager.js +45 -26
- package/esm/executor/senderManager/createRedisSenderManager.js.map +1 -1
- package/esm/executor/senderManager/flushOnStartUp.js +7 -5
- package/esm/executor/senderManager/flushOnStartUp.js.map +1 -1
- package/esm/executor/senderManager/index.d.ts +1 -0
- package/esm/executor/senderManager/index.js +6 -2
- package/esm/executor/senderManager/index.js.map +1 -1
- package/esm/executor/senderManager/validateAndRefill.js +268 -85
- package/esm/executor/senderManager/validateAndRefill.js.map +1 -1
- package/esm/executor/utils.d.ts +8 -3
- package/esm/executor/utils.js +59 -27
- package/esm/executor/utils.js.map +1 -1
- package/esm/handlers/arbitrumGasPriceManager.d.ts +3 -2
- package/esm/handlers/arbitrumGasPriceManager.js +6 -2
- package/esm/handlers/arbitrumGasPriceManager.js.map +1 -1
- package/esm/handlers/citreaManager.d.ts +10 -0
- package/esm/handlers/citreaManager.js +17 -0
- package/esm/handlers/citreaManager.js.map +1 -0
- package/esm/handlers/eventManager.d.ts +9 -9
- package/esm/handlers/eventManager.js +59 -60
- package/esm/handlers/eventManager.js.map +1 -1
- package/esm/handlers/gasPriceManager.d.ts +17 -10
- package/esm/handlers/gasPriceManager.js +245 -99
- package/esm/handlers/gasPriceManager.js.map +1 -1
- package/esm/handlers/mantleGasPriceManager.d.ts +4 -4
- package/esm/handlers/mantleGasPriceManager.js +4 -4
- package/esm/handlers/mantleGasPriceManager.js.map +1 -1
- package/esm/handlers/optimismManager.d.ts +1 -1
- package/esm/handlers/optimismManager.js +1 -1
- package/esm/handlers/optimismManager.js.map +1 -1
- package/esm/mempool/index.d.ts +1 -1
- package/esm/mempool/index.js +1 -1
- package/esm/mempool/index.js.map +1 -1
- package/esm/mempool/mempool.d.ts +61 -22
- package/esm/mempool/mempool.js +223 -133
- package/esm/mempool/mempool.js.map +1 -1
- package/esm/mempool/reputationManager.d.ts +14 -14
- package/esm/mempool/reputationManager.js +36 -39
- package/esm/mempool/reputationManager.js.map +1 -1
- package/esm/mempool/statusManager.d.ts +20 -0
- package/esm/mempool/statusManager.js +143 -0
- package/esm/mempool/statusManager.js.map +1 -0
- package/esm/receiptCache/createMemoryReceiptCache.d.ts +3 -0
- package/esm/receiptCache/createMemoryReceiptCache.js +30 -0
- package/esm/receiptCache/createMemoryReceiptCache.js.map +1 -0
- package/esm/receiptCache/createRedisReceiptCache.d.ts +10 -0
- package/esm/receiptCache/createRedisReceiptCache.js +56 -0
- package/esm/receiptCache/createRedisReceiptCache.js.map +1 -0
- package/esm/receiptCache/index.d.ts +11 -0
- package/esm/receiptCache/index.js +21 -0
- package/esm/receiptCache/index.js.map +1 -0
- package/esm/rpc/createMethodHandler.js.map +1 -1
- package/esm/rpc/estimation/gasEstimationHandler.d.ts +2 -4
- package/esm/rpc/estimation/gasEstimationHandler.js.map +1 -1
- package/esm/rpc/estimation/gasEstimations06.d.ts +6 -7
- package/esm/rpc/estimation/gasEstimations06.js +1 -5
- package/esm/rpc/estimation/gasEstimations06.js.map +1 -1
- package/esm/rpc/estimation/gasEstimations07.d.ts +13 -41
- package/esm/rpc/estimation/gasEstimations07.js +27 -34
- package/esm/rpc/estimation/gasEstimations07.js.map +1 -1
- package/esm/{utils/preVerificationGasCalulator.d.ts → rpc/estimation/preVerificationGasCalculator.d.ts} +20 -6
- package/esm/{utils/preVerificationGasCalulator.js → rpc/estimation/preVerificationGasCalculator.js} +134 -48
- package/esm/rpc/estimation/preVerificationGasCalculator.js.map +1 -0
- package/esm/rpc/estimation/types.d.ts +4 -2
- package/esm/rpc/estimation/utils.d.ts +10 -8
- package/esm/rpc/estimation/utils.js +56 -53
- package/esm/rpc/estimation/utils.js.map +1 -1
- package/esm/rpc/methods/boost_sendUserOperation.d.ts +304 -0
- package/esm/rpc/methods/boost_sendUserOperation.js +1 -1
- package/esm/rpc/methods/boost_sendUserOperation.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_clearReputation.js +1 -1
- package/esm/rpc/methods/debug_bundler_clearReputation.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_clearState.js +1 -1
- package/esm/rpc/methods/debug_bundler_clearState.js.map +1 -1
- package/esm/rpc/methods/debug_bundler_dumpMempool.d.ts +338 -0
- package/esm/rpc/methods/debug_bundler_dumpReputation.js +1 -1
- package/esm/rpc/methods/debug_bundler_dumpReputation.js.map +1 -1
- package/esm/rpc/methods/eth_estimateUserOperationGas.d.ts +622 -14
- package/esm/rpc/methods/eth_estimateUserOperationGas.js +61 -30
- package/esm/rpc/methods/eth_estimateUserOperationGas.js.map +1 -1
- package/esm/rpc/methods/eth_getUserOperationByHash.d.ts +621 -11
- package/esm/rpc/methods/eth_getUserOperationByHash.js.map +1 -1
- package/esm/rpc/methods/eth_getUserOperationReceipt.d.ts +34 -34
- package/esm/rpc/methods/eth_getUserOperationReceipt.js +1 -1
- package/esm/rpc/methods/eth_sendUserOperation.d.ts +307 -3
- package/esm/rpc/methods/eth_sendUserOperation.js +153 -48
- package/esm/rpc/methods/eth_sendUserOperation.js.map +1 -1
- package/esm/rpc/methods/pimlico_getUserOperationStatus.js +1 -1
- package/esm/rpc/methods/pimlico_getUserOperationStatus.js.map +1 -1
- package/esm/rpc/methods/pimlico_sendUserOperationNow.d.ts +338 -34
- package/esm/rpc/methods/pimlico_sendUserOperationNow.js +26 -29
- package/esm/rpc/methods/pimlico_sendUserOperationNow.js.map +1 -1
- package/esm/rpc/methods/pimlico_simulateAssetChange.d.ts +620 -12
- package/esm/rpc/methods/pimlico_simulateAssetChange.js +14 -19
- package/esm/rpc/methods/pimlico_simulateAssetChange.js.map +1 -1
- package/esm/rpc/rpcHandler.d.ts +38 -26
- package/esm/rpc/rpcHandler.js +97 -44
- package/esm/rpc/rpcHandler.js.map +1 -1
- package/esm/rpc/server.d.ts +5 -5
- package/esm/rpc/server.js +15 -11
- package/esm/rpc/server.js.map +1 -1
- package/esm/rpc/validation/BundlerCollectorTracerV06.js +1 -1
- package/esm/rpc/validation/BundlerCollectorTracerV06.js.map +1 -1
- package/esm/rpc/validation/BundlerCollectorTracerV07.js +1 -1
- package/esm/rpc/validation/BundlerCollectorTracerV07.js.map +1 -1
- package/esm/rpc/validation/SafeValidator.d.ts +13 -14
- package/esm/rpc/validation/SafeValidator.js +24 -24
- package/esm/rpc/validation/SafeValidator.js.map +1 -1
- package/esm/rpc/validation/TracerResultParserV06.d.ts +2 -2
- package/esm/rpc/validation/TracerResultParserV06.js +11 -11
- package/esm/rpc/validation/TracerResultParserV06.js.map +1 -1
- package/esm/rpc/validation/TracerResultParserV07.d.ts +2 -2
- package/esm/rpc/validation/TracerResultParserV07.js +13 -13
- package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
- package/esm/rpc/validation/UnsafeValidator.d.ts +18 -14
- package/esm/rpc/validation/UnsafeValidator.js +76 -41
- package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
- package/esm/store/createMempoolStore.d.ts +1 -1
- package/esm/store/createMempoolStore.js +79 -140
- package/esm/store/createMempoolStore.js.map +1 -1
- package/esm/store/index.d.ts +4 -75
- package/esm/store/index.js +4 -1
- package/esm/store/index.js.map +1 -1
- package/esm/store/outstanding/index.d.ts +13 -0
- package/esm/store/outstanding/index.js +16 -0
- package/esm/store/outstanding/index.js.map +1 -0
- package/esm/store/{createMemoryOutstandingStore.d.ts → outstanding/memory.d.ts} +14 -13
- package/esm/store/outstanding/memory.js +263 -0
- package/esm/store/outstanding/memory.js.map +1 -0
- package/esm/store/outstanding/redis.d.ts +11 -0
- package/esm/store/outstanding/redis.js +229 -0
- package/esm/store/outstanding/redis.js.map +1 -0
- package/esm/store/outstanding/types.d.ts +19 -0
- package/esm/store/outstanding/types.js +2 -0
- package/esm/store/outstanding/types.js.map +1 -0
- package/esm/store/processing/index.d.ts +11 -0
- package/esm/store/processing/index.js +17 -0
- package/esm/store/processing/index.js.map +1 -0
- package/esm/store/processing/memory.d.ts +19 -0
- package/esm/store/processing/memory.js +83 -0
- package/esm/store/processing/memory.js.map +1 -0
- package/esm/store/processing/redis.d.ts +26 -0
- package/esm/store/processing/redis.js +123 -0
- package/esm/store/processing/redis.js.map +1 -0
- package/esm/store/processing/types.d.ts +12 -0
- package/esm/store/processing/types.js +2 -0
- package/esm/store/processing/types.js.map +1 -0
- package/esm/store/types.d.ts +52 -0
- package/esm/store/types.js +2 -0
- package/esm/store/types.js.map +1 -0
- package/esm/types/contracts/Multicall3.d.ts +34 -0
- package/esm/types/contracts/Multicall3.js +31 -0
- package/esm/types/contracts/Multicall3.js.map +1 -0
- package/esm/types/contracts/PimlicoSimulations.d.ts +81 -0
- package/esm/types/contracts/PimlicoSimulations.js +105 -0
- package/esm/types/contracts/PimlicoSimulations.js.map +1 -1
- package/esm/types/contracts/index.d.ts +1 -1
- package/esm/types/contracts/index.js +1 -1
- package/esm/types/contracts/index.js.map +1 -1
- package/esm/types/gasPrice.js +0 -18
- package/esm/types/gasPrice.js.map +1 -1
- package/esm/types/interfaces.d.ts +15 -10
- package/esm/types/mempool.d.ts +3 -0
- package/esm/types/schemas.d.ts +13184 -4741
- package/esm/types/schemas.js +116 -27
- package/esm/types/schemas.js.map +1 -1
- package/esm/types/utils.d.ts +2 -5
- package/esm/types/utils.js +16 -18
- package/esm/types/utils.js.map +1 -1
- package/esm/types/validation.d.ts +7646 -6912
- package/esm/types/validation.js +122 -152
- package/esm/types/validation.js.map +1 -1
- package/esm/utils/eip7702.d.ts +2 -1
- package/esm/utils/eip7702.js +14 -8
- package/esm/utils/eip7702.js.map +1 -1
- package/esm/utils/entryPointOverrides.js +18 -4
- package/esm/utils/entryPointOverrides.js.map +1 -1
- package/esm/utils/helpers.d.ts +7 -1
- package/esm/utils/helpers.js +36 -11
- package/esm/utils/helpers.js.map +1 -1
- package/esm/utils/index.d.ts +0 -1
- package/esm/utils/index.js +0 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/metrics.d.ts +4 -1
- package/esm/utils/metrics.js +34 -7
- package/esm/utils/metrics.js.map +1 -1
- package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js +8 -9
- package/esm/utils/minMaxQueue/createMemoryMinMaxQueue.js.map +1 -1
- package/esm/utils/minMaxQueue/createRedisMinMaxQueue.d.ts +24 -2
- package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js +85 -64
- package/esm/utils/minMaxQueue/createRedisMinMaxQueue.js.map +1 -1
- package/esm/utils/minMaxQueue/index.d.ts +2 -2
- package/esm/utils/minMaxQueue/index.js +4 -3
- package/esm/utils/minMaxQueue/index.js.map +1 -1
- package/esm/utils/rpc-reply.d.ts +3 -3
- package/esm/utils/rpc-reply.js.map +1 -1
- package/esm/utils/toViemStateOverrides.js +7 -7
- package/esm/utils/toViemStateOverrides.js.map +1 -1
- package/esm/utils/userop.d.ts +110 -56
- package/esm/utils/userop.js +161 -249
- package/esm/utils/userop.js.map +1 -1
- package/package.json +4 -2
- package/contracts/build-info/7710b5a048396e70.json +0 -1
- package/esm/executor/userOpMonitor.js +0 -326
- package/esm/executor/userOpMonitor.js.map +0 -1
- package/esm/executor/utilityWalletMonitor.d.ts +0 -19
- package/esm/executor/utilityWalletMonitor.js +0 -38
- package/esm/executor/utilityWalletMonitor.js.map +0 -1
- package/esm/mempool/monitoring.d.ts +0 -15
- package/esm/mempool/monitoring.js +0 -118
- package/esm/mempool/monitoring.js.map +0 -1
- package/esm/store/createMemoryOutstandingStore.js +0 -240
- package/esm/store/createMemoryOutstandingStore.js.map +0 -1
- package/esm/store/createRedisOutstandingStore.d.ts +0 -27
- package/esm/store/createRedisOutstandingStore.js +0 -344
- package/esm/store/createRedisOutstandingStore.js.map +0 -1
- package/esm/store/createRedisStore.d.ts +0 -9
- package/esm/store/createRedisStore.js +0 -131
- package/esm/store/createRedisStore.js.map +0 -1
- package/esm/store/createStore.d.ts +0 -6
- package/esm/store/createStore.js +0 -66
- package/esm/store/createStore.js.map +0 -1
- package/esm/types/contracts/CallEngine.d.ts +0 -28
- package/esm/types/contracts/CallEngine.js +0 -37
- package/esm/types/contracts/CallEngine.js.map +0 -1
- package/esm/utils/preVerificationGasCalulator.js.map +0 -1
|
@@ -5,11 +5,11 @@ export class ArbitrumManager {
|
|
|
5
5
|
l2BaseFeeQueue;
|
|
6
6
|
constructor({ config }) {
|
|
7
7
|
this.l1BaseFeeQueue = createMinMaxQueue({
|
|
8
|
-
|
|
8
|
+
queueName: "l1-base-fee-queue",
|
|
9
9
|
config
|
|
10
10
|
});
|
|
11
11
|
this.l2BaseFeeQueue = createMinMaxQueue({
|
|
12
|
-
|
|
12
|
+
queueName: "l2-base-fee-queue",
|
|
13
13
|
config
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -27,6 +27,10 @@ export class ArbitrumManager {
|
|
|
27
27
|
const maxL1BaseFee = await this.l1BaseFeeQueue.getMaxValue();
|
|
28
28
|
return maxL1BaseFee || maxUint128;
|
|
29
29
|
}
|
|
30
|
+
async getMinL2BaseFee() {
|
|
31
|
+
const minL2BaseFee = await this.l2BaseFeeQueue.getMinValue();
|
|
32
|
+
return minL2BaseFee || 1n;
|
|
33
|
+
}
|
|
30
34
|
async getMaxL2BaseFee() {
|
|
31
35
|
const maxL2BaseFee = await this.l2BaseFeeQueue.getMaxValue();
|
|
32
36
|
return maxL2BaseFee || maxUint128;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arbitrumGasPriceManager.js","sourceRoot":"","sources":["../../handlers/arbitrumGasPriceManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAEjC,OAAO,EAAoB,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE1E,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c,CAAC,WAAW,EAAE,CAAA;QAC5D,OAAO,YAAY,IAAI,UAAU,CAAA;IACrC,CAAC;CACJ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AltoConfig } from "../createConfig.js";
|
|
2
|
+
export declare class CitreaManager {
|
|
3
|
+
private readonly l1FeeRateQueue;
|
|
4
|
+
constructor({ config }: {
|
|
5
|
+
config: AltoConfig;
|
|
6
|
+
});
|
|
7
|
+
getMinL1FeeRate(): Promise<bigint>;
|
|
8
|
+
saveL1FeeRate(l1FeeRate: bigint): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=citreaManager.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createMinMaxQueue } from "../utils/minMaxQueue/index.js";
|
|
2
|
+
export class CitreaManager {
|
|
3
|
+
l1FeeRateQueue;
|
|
4
|
+
constructor({ config }) {
|
|
5
|
+
this.l1FeeRateQueue = createMinMaxQueue({
|
|
6
|
+
queueName: "citrea-l1-fee-rate-queue",
|
|
7
|
+
config
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
async getMinL1FeeRate() {
|
|
11
|
+
return (await this.l1FeeRateQueue.getMinValue()) || 1n;
|
|
12
|
+
}
|
|
13
|
+
saveL1FeeRate(l1FeeRate) {
|
|
14
|
+
this.l1FeeRateQueue.saveValue(l1FeeRate);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=citreaManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"citreaManager.js","sourceRoot":"","sources":["../../handlers/citreaManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE1E,MAAM,OAAO,aAAa;IACL,cAAc,CAAa;IAE5C,YAAY,EAAE,MAAM,EAA0B;QAC1C,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC;YACpC,SAAS,EAAE,0BAA0B;YACrC,MAAM;SACT,CAAC,CAAA;IACN,CAAC;IAEM,KAAK,CAAC,eAAe;QACxB,OAAO,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAA;IAC1D,CAAC;IAEM,aAAa,CAAC,SAAiB;QAClC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5C,CAAC;CACJ"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type { Metrics } from "../utils/index.js";
|
|
2
1
|
import type { Hex } from "viem";
|
|
3
2
|
import type { AltoConfig } from "../createConfig.js";
|
|
4
3
|
export declare class EventManager {
|
|
5
|
-
private chainId;
|
|
6
|
-
private logger;
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
|
|
4
|
+
private readonly chainId;
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly redisEventManagerQueue?;
|
|
7
|
+
private readonly eventBuffer;
|
|
8
|
+
private flushTimer?;
|
|
9
|
+
constructor({ config }: {
|
|
10
10
|
config: AltoConfig;
|
|
11
|
-
metrics: Metrics;
|
|
12
11
|
});
|
|
12
|
+
private startFlushTimer;
|
|
13
|
+
private flushEvents;
|
|
13
14
|
emitExecutionRevertedOnChain(userOpHash: Hex, transactionHash: Hex, reason: Hex, blockNumber: bigint): void;
|
|
14
15
|
emitFailedOnChain(userOpHash: Hex, transactionHash: Hex, blockNumber: bigint): void;
|
|
15
16
|
emitFrontranOnChain(userOpHash: Hex, transactionHash: Hex, blockNumber: bigint): void;
|
|
@@ -23,7 +24,6 @@ export declare class EventManager {
|
|
|
23
24
|
}): void;
|
|
24
25
|
emitDropped(userOpHash: Hex, reason?: string, aaError?: string): void;
|
|
25
26
|
emitAddedToMempool(userOpHash: Hex): void;
|
|
26
|
-
private
|
|
27
|
-
private emitWithTimeout;
|
|
27
|
+
private queueEvent;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=eventManager.d.ts.map
|
|
@@ -1,32 +1,70 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { asyncCallWithTimeout } from "../utils/index.js";
|
|
2
2
|
import Queue from "bull";
|
|
3
3
|
import Redis from "ioredis";
|
|
4
|
-
import { AsyncTimeoutError, asyncCallWithTimeout } from "../utils/asyncTimeout.js";
|
|
5
4
|
export class EventManager {
|
|
6
5
|
chainId;
|
|
7
6
|
logger;
|
|
8
|
-
metrics;
|
|
9
7
|
redisEventManagerQueue;
|
|
10
|
-
|
|
8
|
+
eventBuffer = [];
|
|
9
|
+
flushTimer;
|
|
10
|
+
constructor({ config }) {
|
|
11
11
|
this.chainId = config.chainId;
|
|
12
|
+
const flushInterval = config.redisEventsQueueFlushInterval;
|
|
12
13
|
this.logger = config.getLogger({ module: "event_manager" }, {
|
|
13
14
|
level: config.logLevel
|
|
14
15
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.logger.info(`Using redis with queue name ${
|
|
18
|
-
const redis = new Redis(config.
|
|
19
|
-
this.redisEventManagerQueue = new Queue(
|
|
16
|
+
if (config.redisEventsQueueEndpoint && config.redisEventsQueueName) {
|
|
17
|
+
const queueName = config.redisEventsQueueName;
|
|
18
|
+
this.logger.info(`Using redis with queue name ${queueName} for userOp event queue (flush interval: ${flushInterval}ms)`);
|
|
19
|
+
const redis = new Redis(config.redisEventsQueueEndpoint);
|
|
20
|
+
this.redisEventManagerQueue = new Queue(queueName, {
|
|
20
21
|
createClient: () => {
|
|
21
22
|
return redis;
|
|
23
|
+
},
|
|
24
|
+
defaultJobOptions: {
|
|
25
|
+
attempts: 3,
|
|
26
|
+
backoff: {
|
|
27
|
+
type: "fixed",
|
|
28
|
+
delay: 30000
|
|
29
|
+
},
|
|
30
|
+
removeOnComplete: true,
|
|
31
|
+
removeOnFail: true
|
|
22
32
|
}
|
|
23
33
|
});
|
|
34
|
+
this.startFlushTimer(flushInterval);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
startFlushTimer(flushInterval) {
|
|
38
|
+
// Don't start flush timer if redis is not configured.
|
|
39
|
+
if (!this.redisEventManagerQueue) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this.flushTimer = setInterval(() => {
|
|
43
|
+
this.flushEvents();
|
|
44
|
+
}, flushInterval);
|
|
45
|
+
// Allow process to exit even if interval is active.
|
|
46
|
+
if (this.flushTimer.unref) {
|
|
47
|
+
this.flushTimer.unref();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
flushEvents() {
|
|
51
|
+
if (!this.redisEventManagerQueue || this.eventBuffer.length === 0) {
|
|
24
52
|
return;
|
|
25
53
|
}
|
|
54
|
+
const eventsToFlush = this.eventBuffer.splice(0);
|
|
55
|
+
const eventCount = eventsToFlush.length;
|
|
56
|
+
// Fire and forget - don't block the timer
|
|
57
|
+
asyncCallWithTimeout(this.redisEventManagerQueue.addBulk(eventsToFlush.map((entry) => ({
|
|
58
|
+
data: entry,
|
|
59
|
+
opts: { removeOnFail: true, removeOnComplete: true }
|
|
60
|
+
}))), 500 // 500ms timeout
|
|
61
|
+
).catch((err) => {
|
|
62
|
+
this.logger.error({ err, eventCount }, "Failed to flush events to Redis");
|
|
63
|
+
});
|
|
26
64
|
}
|
|
27
65
|
// emits when the userOperation was mined onchain but reverted during the callphase
|
|
28
66
|
emitExecutionRevertedOnChain(userOpHash, transactionHash, reason, blockNumber) {
|
|
29
|
-
this.
|
|
67
|
+
this.queueEvent({
|
|
30
68
|
userOpHash,
|
|
31
69
|
event: {
|
|
32
70
|
eventType: "execution_reverted_onchain",
|
|
@@ -40,7 +78,7 @@ export class EventManager {
|
|
|
40
78
|
}
|
|
41
79
|
// emits when the userOperation was mined onchain but failed EntryPoint validation
|
|
42
80
|
emitFailedOnChain(userOpHash, transactionHash, blockNumber) {
|
|
43
|
-
this.
|
|
81
|
+
this.queueEvent({
|
|
44
82
|
userOpHash,
|
|
45
83
|
event: {
|
|
46
84
|
eventType: "failed_onchain",
|
|
@@ -53,7 +91,7 @@ export class EventManager {
|
|
|
53
91
|
}
|
|
54
92
|
// emits when the userOperation has been included onchain but bundled by a frontrunner
|
|
55
93
|
emitFrontranOnChain(userOpHash, transactionHash, blockNumber) {
|
|
56
|
-
this.
|
|
94
|
+
this.queueEvent({
|
|
57
95
|
userOpHash,
|
|
58
96
|
event: {
|
|
59
97
|
eventType: "frontran_onchain",
|
|
@@ -66,7 +104,7 @@ export class EventManager {
|
|
|
66
104
|
}
|
|
67
105
|
// emits when the userOperation is included onchain
|
|
68
106
|
emitIncludedOnChain(userOpHash, transactionHash, blockNumber) {
|
|
69
|
-
this.
|
|
107
|
+
this.queueEvent({
|
|
70
108
|
userOpHash,
|
|
71
109
|
event: {
|
|
72
110
|
eventType: "included_onchain",
|
|
@@ -79,7 +117,7 @@ export class EventManager {
|
|
|
79
117
|
}
|
|
80
118
|
// emits when the userOperation is placed in the nonce queue
|
|
81
119
|
emitQueued(userOpHash) {
|
|
82
|
-
this.
|
|
120
|
+
this.queueEvent({
|
|
83
121
|
userOpHash,
|
|
84
122
|
event: {
|
|
85
123
|
eventType: "queued"
|
|
@@ -88,7 +126,7 @@ export class EventManager {
|
|
|
88
126
|
}
|
|
89
127
|
// emits when the userOperation is first seen
|
|
90
128
|
emitReceived(userOpHash, timestamp) {
|
|
91
|
-
this.
|
|
129
|
+
this.queueEvent({
|
|
92
130
|
userOpHash,
|
|
93
131
|
event: {
|
|
94
132
|
eventType: "received"
|
|
@@ -98,7 +136,7 @@ export class EventManager {
|
|
|
98
136
|
}
|
|
99
137
|
// emits when the userOperation failed to get added to the mempool
|
|
100
138
|
emitFailedValidation(userOpHash, reason, aaError) {
|
|
101
|
-
this.
|
|
139
|
+
this.queueEvent({
|
|
102
140
|
userOpHash,
|
|
103
141
|
event: {
|
|
104
142
|
eventType: "failed_validation",
|
|
@@ -112,7 +150,7 @@ export class EventManager {
|
|
|
112
150
|
// emits when the userOperation has been submitted to the network
|
|
113
151
|
emitSubmitted({ userOpHashes, transactionHash }) {
|
|
114
152
|
for (const hash of userOpHashes) {
|
|
115
|
-
this.
|
|
153
|
+
this.queueEvent({
|
|
116
154
|
userOpHash: hash,
|
|
117
155
|
event: {
|
|
118
156
|
eventType: "submitted",
|
|
@@ -123,7 +161,7 @@ export class EventManager {
|
|
|
123
161
|
}
|
|
124
162
|
// emits when the userOperation was dropped from the internal mempool
|
|
125
163
|
emitDropped(userOpHash, reason, aaError) {
|
|
126
|
-
this.
|
|
164
|
+
this.queueEvent({
|
|
127
165
|
userOpHash,
|
|
128
166
|
event: {
|
|
129
167
|
eventType: "dropped",
|
|
@@ -136,14 +174,14 @@ export class EventManager {
|
|
|
136
174
|
}
|
|
137
175
|
// emits when the userOperation was added to the internal mempool
|
|
138
176
|
emitAddedToMempool(userOpHash) {
|
|
139
|
-
this.
|
|
177
|
+
this.queueEvent({
|
|
140
178
|
userOpHash,
|
|
141
179
|
event: {
|
|
142
180
|
eventType: "added_to_mempool"
|
|
143
181
|
}
|
|
144
182
|
});
|
|
145
183
|
}
|
|
146
|
-
|
|
184
|
+
queueEvent({ userOpHash, event, timestamp }) {
|
|
147
185
|
if (!this.redisEventManagerQueue) {
|
|
148
186
|
return;
|
|
149
187
|
}
|
|
@@ -153,46 +191,7 @@ export class EventManager {
|
|
|
153
191
|
chainId: this.chainId,
|
|
154
192
|
...event
|
|
155
193
|
};
|
|
156
|
-
this.
|
|
157
|
-
}
|
|
158
|
-
emitWithTimeout(entry, eventType) {
|
|
159
|
-
if (!this.redisEventManagerQueue) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
asyncCallWithTimeout(this.redisEventManagerQueue.add(entry, {
|
|
163
|
-
removeOnComplete: true,
|
|
164
|
-
removeOnFail: true
|
|
165
|
-
}), 500 // 500ms timeout
|
|
166
|
-
)
|
|
167
|
-
.then(() => {
|
|
168
|
-
this.metrics.emittedOpEvents
|
|
169
|
-
.labels({
|
|
170
|
-
event_type: eventType,
|
|
171
|
-
status: "success"
|
|
172
|
-
})
|
|
173
|
-
.inc();
|
|
174
|
-
})
|
|
175
|
-
.catch((err) => {
|
|
176
|
-
if (err instanceof AsyncTimeoutError) {
|
|
177
|
-
this.logger.warn({ userOpHash: entry.userOperationHash, eventType }, "Event emission timed out after 500ms");
|
|
178
|
-
this.metrics.emittedOpEvents
|
|
179
|
-
.labels({
|
|
180
|
-
event_type: eventType,
|
|
181
|
-
status: "timeout"
|
|
182
|
-
})
|
|
183
|
-
.inc();
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
this.logger.error({ err }, "Failed to send userOperation status event");
|
|
187
|
-
sentry.captureException(err);
|
|
188
|
-
this.metrics.emittedOpEvents
|
|
189
|
-
.labels({
|
|
190
|
-
event_type: eventType,
|
|
191
|
-
status: "failed"
|
|
192
|
-
})
|
|
193
|
-
.inc();
|
|
194
|
-
}
|
|
195
|
-
});
|
|
194
|
+
this.eventBuffer.push(entry);
|
|
196
195
|
}
|
|
197
196
|
}
|
|
198
197
|
//# sourceMappingURL=eventManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventManager.js","sourceRoot":"","sources":["../../handlers/eventManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eventManager.js","sourceRoot":"","sources":["../../handlers/eventManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,KAAkC,MAAM,MAAM,CAAA;AACrD,OAAO,KAAK,MAAM,SAAS,CAAA;AAW3B,MAAM,OAAO,YAAY;IACJ,OAAO,CAAQ;IACf,MAAM,CAAQ;IACd,sBAAsB,CAA0B;IAChD,WAAW,GAAmB,EAAE,CAAA;IACzC,UAAU,CAAiB;IAEnC,YAAY,EACR,MAAM,EAGT;QACG,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAA;QAC7B,MAAM,aAAa,GAAG,MAAM,CAAC,6BAA6B,CAAA;QAE1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,CAC1B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AU,EAAE,IAAI;gBAChB,KAAK,EAAE;oBACH,SAAS,EAAE,WAAW;oBACtB,eAAe;iBAClB;aACJ,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAED,qEAAqE;IACrE,WAAW,CAAC,UAAe,EAAE,MAAe,EAAE,OAAgB;QAC1D,IAAI,CAAC,UAAU,CAAC;YACZ,UAAU;YACV,KAAK,EAAE;gBACH,SAAS,EAAE,SAAS;gBACpB,IAAI,EAAE;oBACF,MAAM;oBACN,OAAO;iBACV;aACJ;SACJ,CAAC,CAAA;IACN,CAAC;IAED,iEAAiE;IACjE,kBAAkB,CAAC,UAAe;QAC9B,IAAI,CAAC,UAAU,CAAC;YACZ,UAAU;YACV,KAAK,EAAE;gBACH,SAAS,EAAE,kBAAkB;aAChC;SACJ,CAAC,CAAA;IACN,CAAC;IAEO,UAAU,CAAC,EACf,UAAU,EACV,KAAK,EACL,SAAS,EAKZ;QACG,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC/B,OAAM;QACV,CAAC;QAED,MAAM,KAAK,GAAiB;YACxB,iBAAiB,EAAE,UAAU;YAC7B,cAAc,EAAE,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE;YACvC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,GAAG,KAAK;SACX,CAAA;QAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAChC,CAAC;CACJ"}
|
|
@@ -1,31 +1,38 @@
|
|
|
1
1
|
import { type GasPriceParameters } from "../types/index.js";
|
|
2
2
|
import type { AltoConfig } from "../createConfig.js";
|
|
3
3
|
import { ArbitrumManager } from "./arbitrumGasPriceManager.js";
|
|
4
|
+
import { CitreaManager } from "./citreaManager.js";
|
|
4
5
|
import { MantleManager } from "./mantleGasPriceManager.js";
|
|
5
6
|
import { OptimismManager } from "./optimismManager.js";
|
|
6
7
|
export declare class GasPriceManager {
|
|
7
8
|
private readonly config;
|
|
8
|
-
private baseFeePerGasQueue;
|
|
9
|
-
private maxFeePerGasQueue;
|
|
10
|
-
private maxPriorityFeePerGasQueue;
|
|
11
|
-
private logger;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
private readonly baseFeePerGasQueue;
|
|
10
|
+
private readonly maxFeePerGasQueue;
|
|
11
|
+
private readonly maxPriorityFeePerGasQueue;
|
|
12
|
+
private readonly logger;
|
|
13
|
+
private readonly redisRefreshGuard;
|
|
14
|
+
readonly arbitrumManager: ArbitrumManager;
|
|
15
|
+
readonly citreaManager: CitreaManager;
|
|
16
|
+
readonly mantleManager: MantleManager;
|
|
17
|
+
readonly optimismManager: OptimismManager;
|
|
15
18
|
constructor(config: AltoConfig);
|
|
16
19
|
init(): Promise<void>;
|
|
17
|
-
private getDefaultGasFee;
|
|
18
20
|
private getPolygonGasPriceParameters;
|
|
19
21
|
private bumpTheGasPrice;
|
|
20
22
|
private getFallBackMaxPriorityFeePerGas;
|
|
21
23
|
private getLegacyTransactionGasPrice;
|
|
22
24
|
private estimateGasPrice;
|
|
25
|
+
private estimateDynamicGasPrice;
|
|
23
26
|
private innerGetGasPrice;
|
|
24
|
-
private
|
|
27
|
+
private scheduleRefresh;
|
|
28
|
+
private refreshGasPrices;
|
|
29
|
+
private tryUpdateBaseFee;
|
|
25
30
|
getBaseFee(): Promise<bigint>;
|
|
26
31
|
private tryUpdateGasPrice;
|
|
27
32
|
getGasPrice(): Promise<GasPriceParameters>;
|
|
28
|
-
tryGetNetworkGasPrice(
|
|
33
|
+
tryGetNetworkGasPrice({ forExecutor }: {
|
|
34
|
+
forExecutor: boolean;
|
|
35
|
+
}): Promise<GasPriceParameters>;
|
|
29
36
|
getMaxBaseFeePerGas(): Promise<bigint>;
|
|
30
37
|
getHighestMaxFeePerGas(): Promise<bigint>;
|
|
31
38
|
getHighestMaxPriorityFeePerGas(): Promise<bigint>;
|