Docs

Engine: Parse Transaction Logs

Prithvish Baidya

We've added a new endpoint to Engine that retrieves and parses transaction logs.

What's new?

  • Get Transaction Logs Endpoint: Retrieve logs for mined transactions using a queue ID or transaction hash.
  • Automatic Log Parsing: Raw logs are parsed into structured event data by default.
  • ABI Inference: The endpoint infers the ABI for verified contracts or those with similar available sources.

Why is this important?

  • Instant Insights: Get quick information like token transfer amounts or minted NFT IDs without manual log parsing.
  • Less Boilerplate: Say goodbye to writing repetitive ABI handling and log parsing code.

How to use it

Make a GET request to the new endpoint with the following parameters:

  • chain: The chain ID or name (required)
  • queueId or transactionHash: Identifier for the mined transaction
  • parseLogs: Set to true to receive parsed event data (default: true)

For more information, you can check our API Reference.

Technical details

  • Works with verified contracts or those with inferable ABIs, can be overridden back to user provided ABI.
  • Parsing is attempted for all logs, providing structured data when possible.
  • Falls back to raw log data when parsing is not feasible.

Use cases

  • Easily retrieve information like how many ERC20 tokens were transferred in a transaction.
  • Quickly find out the tokenId of an NFT you just minted using Engine.
  • Anywhere else you've wanted to quickly access transaction logs without 100 lines of boilerplate code!

thirdweb Engine is an open-source server for your app to read, write, and deploy contracts at production scale. Self-host for free or get a cloud-hosted Engine for $99/month.


thirdweb is hiring!

The small team at thirdweb is on a mission to build the most intuitive and complete web3 platform. Our products empower over 70,000 developers each month including Shopify, AWS, Coinbase, Rarible, Animoca Brands, and InfiniGods.

See our open roles. We’d love to work with you!