Skip to content
Alchemy Logo

eth_getUserOperationByHash

POST
/{apiKey}
CUs20

Return a UserOperation based on a userOpHash.

Limitations

This method retrieves and decodes userOperations from the logs of mined transactions by querying the node. The number of blocks scanned in a single request is limited. Use blockOption to position a bounded lookup window when searching historical blocks.

The maximum number of blocks a single request may scan for the operation's UserOperationEvent depends on the chain and your plan tier. This limits the width of the scan, not the age of the operation. A blockOption may position the scan at historical blocks, provided the resulting range does not exceed this width:

ChainFreePay As You GoEnterprise
Arbitrum Mainnet, Arbitrum Sepolia, Arc Mainnet, Base Mainnet, Base Sepolia, Ethereum Mainnet, Ethereum Sepolia, OP Mainnet, OP Sepolia, Polygon PoS Amoy, Polygon PoS Mainnet, Robinhood Chain Mainnet, World Chain Mainnet, World Chain Sepolia150unlimitedunlimited
BNB Smart Chain Testnet505050
Hyperliquid Mainnet1502,0002,000
Monad Mainnet1501,0001,000
Robinhood Chain Testnet1505,0005,000

Chains not listed here use a 150-block limit on every tier.

Path Parameters

stringrequireddefaults to docs-demo

For higher throughput, create your own API key

Request

stringformat: "^0x[0-9a-fA-F]*$"required

The userOpHash of the UserOperation to retrieve.

object or stringoptional

Optional block scope for the lookup: a { fromBlock, toBlock } range (block numbers or tags) or a single block hash. Any other value is ignored, as it was before this parameter existed.

Responses

200

The matched UserOperation with inclusion metadata, or null if no operation is found.

Was this page helpful?