Share Dialog
<100 subscribers
Have you ever tried programmatically figuring out exactly what happened in an Ethereum transaction using just a transaction hash? While it might seem simple at first, the reality can be much more complicated depending on your use case.
Simplest Scenario | Normal Scenario | |
|---|---|---|
Number of contracts | 1 wellβknown contract | Many unknown contracts & thirdβparty libraries |
Needed ABIs | 1β2 static ABIs | Dozens of ABIs, fetched dynamically, unknown in advance |
Interactions | MinimalΒ | Includes token transfers, calls to other contracts, multicalls etc |
Typical examples | Transfers of a single token | DEX swaps, NFT marketplace trade, bridge, deposits etc |
This quick comparison highlights how decoding complexity grows when you move from a singleβcontract world to the wild, multiβcontract reality of most onβchain activity.
Letβs take a closer look at why getting context about EVM transactions is hard in the first place.
When you query an RPC endpoint, you only receive raw blockchain data. Without extra contextβsuch as which smart contracts were involved or which tokens and NFTs movedβyou canβt really understand what happened. In short, RPC data alone isnβt enough to interpret a transaction.
Smart contractsβincluding tokens and NFTsβcan be surprisingly tricky. They may use proxies (contracts that delegate calls to other contracts), custom logic, or nonβstandard patterns. Some are unverified, so their ABIβthe interface you need to decode themβisnβt publicly available. Without these details, decoding becomes more challenging.
Even popular standards like ERCβ20 or ERCβ721 are not always strictly followed. Developers can tweak contracts, changing event names or function signatures, or create completely new standards. As a result, youβll encounter unusual patterns in blockchain data that donβt follow the textbook rules, yet you still need to handle them.
Existing decoding tools come with serious limitations:
Most people rely on thirdβparty APIs, which are closedβsource, so you canβt host, modify, or extend them yourself.
APIβbased services often support only a some set of chains they choose.
With all these challenges in mind, what if you donβt want to rely on a thirdβparty API and instead want to programmatically understand what happened in a transaction yourself? Hereβs what that process looks like:

Retrieve raw transaction data from Ethereum RPC nodesβlogs, receipts, and execution traces.
Handle differences between RPC nodes, which may return data in varying formats.
Locate the ABIs or function signatures for every contract involved in the transaction. Handle such things like various types of proxies, multicalls, and unverified contracts.
Using those ABIs, decode logs, calldata, and traces. Handle nested, treeβlike calldata and traces structures; you may need to fetch additional ABIs as you traverse the tree.
Detect and correctly decode token or NFT transfers, even when nonβstandard methods are used.
Extract native ETH transfers, which appear only in execution traces.
If the transaction was reverted, decode the error message.
Add caching, retries, and other optimizations to stay within rate limits, lower RPC costs, and speed up ABI lookups.
Continuously update your decoder to support new standards (e.g., Account Abstraction) and common protocol quirks.
Finally, interpret all this decoded context and present it in a meaningful way.
I ran into all of these problems myself and wanted something better than to use a closedβsource, limited thirdβparty API. So we built Loop Decoderβa TypeScript library that simplifies transaction decoding and turns any EVM transaction hash into a clear, humanβreadable format.
In the next posts, Iβll dive into how Loop Decoder works under the hood and explain why we built it on top of Effectβ―TS library.
Links:
Nastya
17 comments
Iβm stoked to share that Loopβ―Decoder - the dev library Iβm building - just made it onto the @optimism Retro Funding list! What does that mean? Loopβ―Decoder is one of 72 openβsource tools recognized for boosting developer experience and protocol security - and itβs now eligible for a retroactive grant π Iβm also kicking off a post series on why and how Iβm building it - hereβs Postβ―#1 explaining the problem it solves. https://paragraph.com/@nastyacodes/why-decoding-ethereum-transactions-is-hard?referrer=0x6C994eEF6fdbeE8BCFF9016B7CE3A53b489Ad155 https://x.com/Optimism/status/1918378918442402289
Letβs goooooo!! Congrats!!!!
thank you!
Awesome, congrats!!! πππ
gg congrats. Just remembered the onchain alerts bot repo you created helped me build a nft mint alert bot. Thanks for building cool stuff!
OMG glad to hear!
yayay congrats!
Congrats @nastya thatβs amazing news!
thank you!
FIRE SHIT LOVE IT π₯π₯π₯π₯
thanks π
Congrats!
thanks Nikolaii!
1000 $degen
wow incredible!
awesome news, well deserved!
Learn how to decode Ethereum transactions and the complex process behind it in @nastya's latest blog post. It unpacks the challenges, such as missing context and smart contract intricacies, while introducing Loop Decoderβa TypeScript library designed to simplify transaction interpretation.