Docs

eth_getTransactionByHash - Optimism RPC Method

Retrieve transaction details by hash on Optimism. Essential for L2 builders, DeFi developers, and teams launching Superchain-compatible apps tracking transactions on the heart of the Superchain powering 60%+ of Ethereum L2 transactions with $6B+ TVL.

Returns the information about a transaction by transaction hash on Optimism.

Why Optimism? Build on the heart of the Superchain powering 60%+ of Ethereum L2 transactions with $6B+ TVL with OP Stack modularity, Superchain interoperability, 17M+ daily transactions across 33 chains, and 20% of tokens for public goods.

Use Cases

The eth_getTransactionByHash method is essential for:

  • Transaction tracking - Get details of pending or confirmed transactions
  • Payment verification - Verify transaction parameters
  • Debugging - Analyze transaction data for cross-chain DeFi, Superchain-interoperable dApps, and public goods funding recipients
  • Block explorers - Display transaction information

Code Examples

Error Handling

Error CodeMessageDescription
-32602Invalid paramsInvalid transaction hash format