For builders working with Layer 2 (L2) solutions, one challenge has consistently slowed development progress: decoding the complex data streams used for transaction settlement onto the L1 chain. This process is not only time-consuming but also requires significant technical expertise.
Struggling with manual decoding? Now you don’t need to. Introducing the Blocknative Decoding API, the one-stop shop for easy decoding of Optimism, Base, zkSync, Arbitrum, Mode, Zora, Kroma, and Blast batches. This API is a simple and powerful solution to removing the decoding challenge so you can focus on building what matters.
Why Decoding Matters
L2 scaling solutions offer faster and cheaper transactions, but they come with a trade-off. Transactions are "rolled up" and sent to the L1 chain in batches as a stream of compressed bytes. To understand the status of an individual transaction or troubleshoot errors, builders need to decode this data themselves – a laborious task.
To decode a batch today, a developer must dive into the open-source code base, find the relevant section of code, make sense of it, and re-implement it in their language. If anything changes in the code base in the future (for example, a new EIP is introduced), they must update the code manually. It’s time-consuming and complicated. No wonder discord channels are filled with developers asking “how do I decode?”:
Decoding Historic L2 Transactions
To add to the complexity, with EIP-4844 and the introduction of blobs, the data is ephemeral. If developers don’t set up the backend infrastructure and continuous storage for the blob data, they won’t be able to access it after the 4096 epoch storage window requirement.
The Blocknative Decoding API leverages our blob archive where we record and store all the blobs. This means developers don't have to determine where to get the data. Just send the transaction hash and the API takes care of the rest. It's that simple.
The Blocknative Decoding API Solution
The Blocknative Decoding API is more than just a solution; it's a significant step towards a future where developers can focus on building amazing applications, not deciphering complex data formats.
Here's what the Blocknative Decoding API offers:
- Effortless Decoding: Say goodbye to manual decoding and deciphering of bytes of data. We do all the complicated data computation and seamlessly translate it into a clear, human-readable format.
- No Expensive Storage: We store ephemeral blob data so you don’t have to. You can trust that you’ll be able to call upon any past transaction and pull up the details even after the 4096 epoch window.
- No Maintenance Headaches: No need to worry about format changes that occur. We handle all the updates behind the scenes, ensuring your API calls are always accurate.
- Focus on What Matters: Spend less time troubleshooting and more time building innovative applications.
- Enhanced Observability: Backend developers and end-users can track the status of their transactions down to the L1 at any point in the journey.
The API is simple: input the transaction hash of the batch you care about and the decoded data is returned. That’s it. And it isn’t limited to confirmed on-chain batches. You can query any batch that entered the mempool - pending and confirmed - all in real-time. And, it’s decoded whether it is calldata (type-2) or blobdata (type-3).
Do you need real-time notifications of batches in the mempool that are confirmed on-chain? Use the Blocknative Mempool API and Decoding API together.
You can easily see the Decoding API in action on Ethernow.xyz, where it is used to translate the bytes of data into human-readable format.
If you need to do additional investigation into blob data, we have you covered. Simply use the Blob Archive API to delve into historical 4844 data.
Supporting Leading L2s
The Blocknative Decoding API is currently available for transactions on Optimism, Base, zkSync, Arbitrum, Mode, Zora, Kroma, and Blast. We're committed to ongoing development, and support for additional chains is on the horizon.
The Blocknative Decoding API is a major milestone towards a more transparent and user-friendly blockchain ecosystem. We invite all builders working on L2 solutions to join us on this journey and show us what you are building.
Check out the Blocknative Documentation to integrate the decoding API into your on-chain app today.
Gas Extension
Blocknative's proven & powerful Gas API is available in a browser extension to help you quickly and accurately price transactions on 20+ chains.
Download the Extension