Batch Decoder API
Decode Ethereum L2s batch transactions to its human-readable, JSON format.
The Blocknative Decoding API offers:
Effortless Decoding: No more manual decoding and deciphering of bytes of data. We do all the complicated computation decoding the data and seamlessly translating it into a clear, human-readable format so that you can spend less time troubleshooting and more time building.
No Expensive Storage: We store ephemeral blob data so you don’t have to. You will 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.
Enhanced Observability: Backend developers and end-users can track the status of their transactions down to the L1 at any point in the journey.
Supported Networks
The Blocknative Decoding API currently supports the following networks:
Optimism:
Optimism
Base
Mode
Zora
Kroma
Blast
Arbitrum:
Arbitrum
zksync:
ZKsync
We are committed to the ongoing development of batch decoding. Support for additional chains is on the horizon. If you would like to request support of a chain please go to the Blocknative discord.
API Endpoint
GET
https://api.ethernow.xyz/v1/batch/<tx_hash>
Input the transaction hash of a batch and the decoded data is returned. You can query any batch - pending or confirmed. The API supports decoding of calldata (type-2) and blobdata (type-3).
Query Parameters
Name | Type | Description |
---|---|---|
batchIndex | integer | For batches on the Optimism or Arbitrum network, we paginate the transaction list by frame number (Optimism network) or sequence number (Arbitrum network). |
initialStateDiffs | bool | For batches on the ZKsync network, you can choose not to receive the list of state diffs. Param default is set to true. |
Example Request
Example Response
Description of Terms
Term | Description |
---|---|
network | Options include: optimism, arbitrum or zksync |
chainId | The chain ID of the chain that posted the batch |
data | A container with either the decoded blobdata and/or decoded calldata, depending on the chain and the transaction type. Type-2 transactions only contain calldata. Type-3 transactions can contain only blobdata or both blobdata and calldata. |
blob | Decoded contents of the blobdata, specific to each chain. For example, Optimism chains have a list of frames and transactions within those frames. |
calldata | Decoded contents of the calldata specific to each chain. For example, ZKsync calldata contains data on the previous and new state of the chain. |
Last updated