Docs
Supported ChainszkSync EraJSON-RPC APITransaction Methods

eth_getTransactionReceipt - zkSync RPC Method

Get transaction receipt with status and logs on zkSync Era. Essential for verifying transaction execution for RWA tokenization ($1.9B, 25% market share), hyperchain deployment via ZK Stack, and cross-chain DeFi.

Returns the receipt of a transaction by transaction hash on zkSync Era. Receipt is only available for mined transactions.

Why zkSync? Build on Matter Labs' flagship zkEVM powering the Elastic Network of interoperable hyperchains with ZK Stack modular framework, hyperchain interoperability, native account abstraction, and $1.9B in tokenized real-world assets.

Use Cases

The eth_getTransactionReceipt method is essential for:

  • Transaction confirmation - Verify transaction was mined successfully
  • Gas analysis - Check actual gas used vs estimated
  • Event parsing - Read emitted events from logs
  • Status verification - Confirm success/failure for RWA tokenization ($1.9B, 25% market share), hyperchain deployment via ZK Stack, and cross-chain DeFi

Request Parameters

Request
transactionHashDATA

32-byte transaction hash

Response Body

Response
statusQUANTITY

1 (success) or 0 (failure)

transactionHashDATA

Transaction hash

blockHashDATA

Block hash

blockNumberQUANTITY

Block number

gasUsedQUANTITY

Gas used by this transaction

cumulativeGasUsedQUANTITY

Total gas used in block up to this tx

logsArray

Array of log objects

contractAddressDATA

Created contract address (if deployment)

Code Examples

Bash
curl -X POST https://api-zksync-era-mainnet-full.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionReceipt",
    "params": ["0xc4c7231ab3f1d8feaaf4e2b9933696e37095d0af84cb6cc70f48493b38f3a731"],
    "id": 1
  }'
JavaScript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-zksync-era-mainnet-full.n.dwellir.com/YOUR_API_KEY');

const txHash = '0xc4c7231ab3f1d8feaaf4e2b9933696e37095d0af84cb6cc70f48493b38f3a731';
const receipt = await provider.getTransactionReceipt(txHash);

if (receipt) {
  console.log('Status:', receipt.status === 1 ? 'Success' : 'Failed');
  console.log('Gas Used:', receipt.gasUsed.toString());
  console.log('Block:', receipt.blockNumber);
  console.log('Logs:', receipt.logs.length);

  // Parse specific events
  for (const log of receipt.logs) {
    console.log('Event from:', log.address);
  }
}
Python
from web3 import Web3

w3 = Web3(Web3.HTTPProvider('https://api-zksync-era-mainnet-full.n.dwellir.com/YOUR_API_KEY'))

tx_hash = '0xc4c7231ab3f1d8feaaf4e2b9933696e37095d0af84cb6cc70f48493b38f3a731'
receipt = w3.eth.get_transaction_receipt(tx_hash)

if receipt:
    status = 'Success' if receipt['status'] == 1 else 'Failed'
    print(f'Status: {status}')
    print(f'Gas Used: {receipt["gasUsed"]}')
    print(f'Block: {receipt["blockNumber"]}')
    print(f'Logs: {len(receipt["logs"])}')
Go
package main

import (
    "context"
    "fmt"
    "log"

    "github.com/ethereum/go-ethereum/common"
    "github.com/ethereum/go-ethereum/ethclient"
)

func main() {
    client, err := ethclient.Dial("https://api-zksync-era-mainnet-full.n.dwellir.com/YOUR_API_KEY")
    if err != nil {
        log.Fatal(err)
    }

    txHash := common.HexToHash("0xc4c7231ab3f1d8feaaf4e2b9933696e37095d0af84cb6cc70f48493b38f3a731")
    receipt, err := client.TransactionReceipt(context.Background(), txHash)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Status: %d\n", receipt.Status)
    fmt.Printf("Gas Used: %d\n", receipt.GasUsed)
    fmt.Printf("Logs: %d\n", len(receipt.Logs))
}

Error Handling

Error CodeMessageDescription
-32602Invalid paramsInvalid transaction hash

Note: Returns null if transaction is not yet mined.