Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Guides

How to Track Transaction Processing Status

A technical guide for developers on monitoring blockchain transaction lifecycle, from pending to confirmed or failed, with practical code examples.
Chainscore © 2026
introduction
BLOCKCHAIN FUNDAMENTALS

Introduction to Transaction Status Tracking

Learn how to monitor the lifecycle of a blockchain transaction from submission to finality, a critical skill for developers building reliable Web3 applications.

When you submit a transaction to a blockchain network, it enters a multi-stage lifecycle before being permanently recorded. Understanding this flow—from pending to confirmed to finalized—is essential for building user-friendly dApps. Key statuses include pending (in the mempool), confirmed (included in a block), and finalized (irreversible). On networks like Ethereum, a transaction is considered safe after a certain number of block confirmations, while proof-of-stake chains like Solana or Avalanche have specific finality mechanisms. Tracking these states programmatically allows your application to provide accurate user feedback and trigger subsequent logic.

Developers primarily track statuses by querying a node's RPC API using the transaction hash (txHash). Common methods include eth_getTransactionReceipt for Ethereum-compatible chains or getTransaction for Solana. The receipt contains crucial data like the status (1 for success, 0 for failure), blockNumber, and gasUsed. For real-time monitoring, you can subscribe to new blocks and check if your transaction is included using WebSocket connections. It's important to handle edge cases: transactions can be dropped from the mempool, replaced with higher fees, or fail execution due to revert errors within a smart contract.

Here's a basic JavaScript example using ethers.js to poll for a transaction receipt:

javascript
const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
async function trackTx(txHash) {
  const receipt = await provider.waitForTransaction(txHash);
  if (receipt.status === 1) {
    console.log(`Transaction succeeded in block ${receipt.blockNumber}`);
  } else {
    console.log('Transaction failed');
  }
}

The waitForTransaction helper polls until the transaction is mined. For more granular control, you can manually poll provider.getTransactionReceipt(txHash).

Beyond basic confirmation, advanced tracking involves monitoring for transaction finality. On Ethereum post-Merge, this means waiting for checkpoint finalization, which can be tracked via the eth_getBlockByNumber RPC with the finalized tag. On high-throughput chains, you must also account for chain reorganizations; a transaction in a block that gets orphaned is not valid. Services like Chainscore provide enhanced APIs that abstract this complexity, offering reliable webhooks for status updates (e.g., MINED, DROPPED, FINALIZED) without the need to manage node connections or polling logic directly.

Effective status tracking directly impacts user experience. Best practices include: implementing progressive UI updates (e.g., 'Submitted' → 'Confirming' → 'Success'), setting reasonable timeout thresholds for pending transactions, and logging all status changes for debugging. Always verify the transaction success by checking the receipt status field, not just its presence in a block, as a transaction can be included but fail execution. By mastering these techniques, you ensure your dApp responds accurately to on-chain activity, building trust and reliability for your users.

prerequisites
ESSENTIAL FOUNDATIONS

Prerequisites for Tracking Transactions

Before you can effectively monitor transaction status, you need to establish the correct technical setup and understand the core concepts of blockchain state.

The first prerequisite is access to a reliable RPC endpoint for the target blockchain. This is your gateway to querying the network's state. For Ethereum mainnet, you can use public providers like Alchemy, Infura, or a QuickNode, or run your own node with clients like Geth or Erigon. The endpoint must support the specific JSON-RPC methods required for transaction queries, primarily eth_getTransactionReceipt and eth_getTransactionByHash. For production applications, using a dedicated, rate-limited endpoint is critical to avoid service interruptions.

You must understand the transaction lifecycle and its key identifiers. Every transaction is initiated with a unique transaction hash (txid), a 64-character hexadecimal string that serves as its immutable fingerprint. After submission, it enters the mempool. Upon successful inclusion in a block, it receives a block number and block hash. The transaction receipt, obtained after mining, contains the final status (status: 0x1 for success, 0x0 for failure), gasUsed, and any emitted event logs. Tracking involves polling for these state changes.

Your application needs a method to securely store and reference transaction hashes. This is often done by persisting the hash in a database alongside a user identifier and a timestamp after broadcasting the transaction. For wallet applications, this might be in local storage or indexed by a user's public address. Without a persistent record of the hash, you cannot query its status later. Implement a retry logic with exponential backoff for your RPC calls to handle temporary network latency or provider issues.

Familiarity with concurrency and asynchronous programming is necessary to build a non-blocking tracker. You will be making multiple network requests, potentially for dozens of transactions. In JavaScript/TypeScript, this involves using async/await with Promise.allSettled() for batch queries. In Python, use asyncio and aiohttp. A naive synchronous loop will quickly become a performance bottleneck. Structure your code to separate the polling logic from the core application flow to maintain responsiveness.

Finally, consider the idempotency and error handling of your tracking system. Networks can reorg, causing a transaction's block confirmation to change. Your tracker should handle this by re-fetching the receipt if a block hash becomes unstable. Plan for edge cases: a transaction might stay in the mempool indefinitely (requiring a replacement), or an RPC call might return null for a long time before the transaction is eventually mined or dropped. Logging each state transition is essential for debugging these scenarios.

transaction-lifecycle
THE TRANSACTION LIFECYCLE

How to Track Transaction Processing Status

Learn how to monitor the status of your blockchain transactions from submission to finality using RPC calls, explorers, and event listeners.

After broadcasting a transaction, you receive a transaction hash (txHash). This 64-character hexadecimal string is your unique identifier for tracking. The transaction enters the mempool, a network-wide pool of pending transactions. Here, nodes and validators select transactions to include in the next block based on gas price and other factors. You can query the pending state using an Ethereum RPC call like eth_getTransactionByHash with the pending block parameter to see if it's still waiting.

Once a validator includes your transaction in a block, its status becomes executed. You can confirm this by calling eth_getTransactionReceipt with your txHash. A successful receipt contains key details: the blockNumber where it was mined, cumulative gasUsed, and the status field (1 for success, 0 for failure). For EVM chains, a status of 0 indicates the transaction was reverted, often due to an error in contract logic or insufficient gas. Always check this field; a mined transaction is not necessarily a successful one.

Finality is the point where a transaction is irreversible. This varies by chain. On Ethereum post-merge, transactions reach finality after two checkpoint blocks (~12 minutes). For near-instant confirmation, you can monitor the confirmations field, which counts how many blocks have been added since the transaction's block. Services like the Etherscan API provide a convenient wrapper for this data. A transaction with 12+ confirmations on Ethereum Mainnet is generally considered secure.

For real-time tracking in applications, use WebSocket subscriptions via wss RPC endpoints. Subscribe to new block headers with eth_subscribe('newHeads') and filter for your transaction's block. Alternatively, listen for specific contract events emitted by your transaction using eth_subscribe('logs', { address: contractAddress }). This programmatic approach is essential for dApps that need to update UI states or trigger subsequent actions upon transaction completion.

Common issues include stuck transactions (due to low gas) and replaced transactions. If a transaction is pending for too long, you can speed it up by issuing a new transaction with the same nonce and a higher gas price. To track replacement, monitor the original nonce; when it's finally mined, check which transaction hash was used. Tools like the Chainscore Transaction Status API aggregate this data across multiple chains, providing a unified interface to check status, confirmations, and failure reasons.

ethereum-evm-examples
DEVELOPER GUIDE

How to Track Transaction Processing Status on Ethereum and EVM Chains

Learn the methods and tools for monitoring transaction lifecycle, from pending to confirmed, across Ethereum and compatible networks.

When you broadcast a transaction to an Ethereum or EVM-compatible network, it enters a multi-stage lifecycle. Initially, it's pending in the mempool, awaiting inclusion in a block by a miner or validator. Once included, its status becomes confirmed. However, for high-value transactions, it's crucial to wait for multiple confirmations—additional blocks built on top of the one containing your transaction—to reduce the risk of a chain reorganization or reorg. The number of confirmations needed depends on the chain's finality mechanism and your security tolerance.

You can track a transaction programmatically using an RPC provider like Infura, Alchemy, or a public node. The core method is eth_getTransactionReceipt, which returns the transaction outcome, including status (0x1 for success, 0x0 for failure), gas used, and logs. For pending transactions, poll this method until a result is returned. Alternatively, use eth_getTransactionByHash to check if a transaction is known to the network, though it won't show execution status. Here's a basic JavaScript example using ethers.js:

javascript
const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
async function checkStatus(txHash) {
  const receipt = await provider.getTransactionReceipt(txHash);
  if (receipt) {
    console.log(`Confirmed. Status: ${receipt.status === 1 ? 'Success' : 'Failed'}`);
  } else {
    console.log('Transaction pending or not found.');
  }
}

For real-time monitoring without constant polling, subscribe to events via WebSocket connections using eth_subscribe. You can listen for newHeads to track new blocks and check if your transaction is included, or directly for pending transactions. Services like Chainscore provide enhanced APIs that abstract this complexity, offering reliable webhooks for transaction lifecycle events and detailed analytics on gas and confirmation times. This is critical for dApps that need to update user interfaces automatically upon transaction finality.

Understanding transaction failure states is essential. A transaction can fail due to reversion (e.g., a failed require() statement in a smart contract), insufficient gas, or being replaced by a higher gas price transaction. The receipt's status field and the presence of revert reason data in the logs (using error formats like EIP-838) help diagnose failures. Always estimate gas and simulate transactions using eth_call or eth_estimateGas before broadcasting to catch potential reverts.

On networks with instant finality, like BNB Smart Chain or Polygon PoS, confirmations are faster, but reorgs of 1-2 blocks are still possible. On Ethereum post-Merge, with Proof-of-Stake, a transaction is considered probabilistically final after a few blocks and absolutely final after checkpoint epochs. For cross-chain transactions via bridges, you must track the transaction on both the source and destination chains, often relying on the bridge's API or indexer for completion status.

solana-examples
DEVELOPER GUIDE

How to Track Transaction Processing Status on Solana

Learn the methods and tools for monitoring transaction finality, from initial submission to confirmed status, on the Solana blockchain.

On Solana, a transaction progresses through distinct statuses: processed, confirmed, and finalized. A processed status means the transaction has been seen by a validator. Confirmed status indicates the transaction has been included in a block that has achieved a supermajority of votes, making reversion highly unlikely. Finalized status is the strongest guarantee, meaning the block containing your transaction is now immutable and cannot be forked away. Understanding these states is critical for building responsive applications that react appropriately to on-chain events.

The primary method for tracking a transaction is by its signature. After sending a transaction, you receive a signature (a unique identifier). You can poll the RPC endpoint getSignatureStatuses to check its progress. For real-time monitoring without polling, you can subscribe to updates via a WebSocket connection using signatureSubscribe. This pushes notifications to your client when the transaction's status changes, which is more efficient for high-throughput applications. The Solana Web3.js library provides convenient wrappers for these RPC methods.

Here is a basic example using the @solana/web3.js library to check a transaction status by signature:

javascript
const web3 = require('@solana/web3.js');
const connection = new web3.Connection(web3.clusterApiUrl('devnet'));
const signature = 'your_transaction_signature_here';

async function checkStatus() {
  const status = await connection.getSignatureStatus(signature);
  console.log('Transaction status:', status.value);
  // Status contains `confirmationStatus` which can be 'processed', 'confirmed', or 'finalized'.
}

This code connects to the Solana Devnet and fetches the latest status object for a given transaction signature.

For production applications, you must handle edge cases and errors. A transaction can fail with an error during simulation or execution. Always check the err field in the status response. If a transaction is dropped (not included in any block), the getSignatureStatus call may return null. Implementing a timeout logic is essential; if a transaction isn't confirmed within a reasonable timeframe (e.g., 30-60 seconds), you should consider it failed and potentially allow the user to retry. The recent Solana version 1.18 introduced a maxRetries parameter for sendTransaction to help with this.

Advanced tracking involves monitoring for specific on-chain outcomes, not just finality. After a transaction is finalized, you often need to parse its logs or inspect the resulting account state changes. Use the getTransaction method to fetch the complete transaction details, including its meta data which contains execution logs, pre/post balances, and inner instructions. This is necessary for confirming that a specific program instruction, like a token swap or NFT mint, executed successfully and had the intended effect on the ledger.

ETHEREUM RPC METHODS

RPC Method Comparison for Transaction Status Tracking

Comparison of primary JSON-RPC methods for monitoring transaction lifecycle on Ethereum and EVM-compatible chains.

Method / Featureeth_getTransactionReceipteth_getTransactionByHasheth_getBlockByNumber

Primary Use Case

Final confirmation & outcome

Initial broadcast & pending state

Block-level inspection

Returns Gas Used

Returns Logs (Events)

Returns Block Confirmations

Status Field (success/fail)

"0x1" (success) or "0x0" (fail)

null (until mined)

null (for transaction data)

Effective for Pending Tx

Latency After Block Mined

< 1 sec

1-3 sec

< 1 sec

Recommended Polling Interval

Every 3-5 sec until mined, then once

Every 1-2 sec while pending

Every 12 sec (per new block)

monitoring-tools
DEVELOPER GUIDE

Transaction Monitoring Tools and Libraries

Monitor blockchain transaction status, confirmations, and failures programmatically using these essential tools and libraries.

TRANSACTION STATUS

Common Issues and Troubleshooting

Resolve common issues with tracking blockchain transactions, from pending states to finality. This guide covers Ethereum, Solana, and other major networks.

A transaction remains pending when it's broadcast to the network but not yet included in a block. Common causes include:

  • Insufficient gas fee: On networks like Ethereum, your gas price (e.g., 50 Gwei) may be below the current network demand. Use a block explorer's gas tracker to set an appropriate fee.
  • Nonce issue: If a prior transaction with a lower nonce is stuck, all subsequent transactions will be queued. You may need to replace or cancel the stuck transaction.
  • Network congestion: During peak times (e.g., NFT mints, airdrops), block space is limited, causing delays.

To resolve: For EVM chains, you can often speed up the transaction by re-broadcasting it with a higher gas price and the same nonce via your wallet. On Solana, check for blockhash expiration and simply re-sign and send the transaction.

best-practices
PRODUCTION MONITORING

How to Track Transaction Processing Status

Reliable transaction status tracking is critical for user experience and system integrity. This guide covers methods for monitoring pending, confirmed, and failed transactions across different blockchain networks.

Tracking a transaction begins with the transaction hash (txid), a unique identifier returned when a transaction is broadcast. You can monitor its status by querying a node's RPC endpoint using methods like eth_getTransactionReceipt for EVM chains or by checking block explorers via their public APIs. For pending transactions, use eth_getTransactionByHash to check the mempool status. Always implement exponential backoff for polling to avoid rate limits and reduce server load while waiting for confirmations.

Understanding the transaction lifecycle is key. A transaction moves from pending (in the mempool) to confirmed (included in a block) to finalized (considered irreversible, which varies by chain). For Ethereum, use the receipt's status field (0 for failure, 1 for success). For Solana, check the confirmationStatus and err field. For finality on networks like Polygon PoS or Arbitrum, you may need to wait for checkpoint submissions to Ethereum, which can take ~10 minutes.

Implement robust error handling by monitoring for specific revert reasons and gas-related failures. When eth_getTransactionReceipt returns a receipt with a status of 0, you can decode the revert reason by simulating the transaction with eth_call using the original transaction data and block number. For gas estimation failures, track if a transaction is replaced due to underpricing (RPC error "replacement transaction underpriced") or stuck due to low max priority fee.

For production systems, asynchronous webhook-based monitoring is superior to simple polling. Services like Chainlink Functions, Ponder, or custom indexers can listen for on-chain events and push status updates to your backend. This pattern decouples your application from polling logic and provides real-time alerts for transaction failures, which is essential for automated systems like batch payments or DeFi operations.

Log and visualize transaction metrics for observability. Track average confirmation time, failure rate by type (e.g., user rejected, out of gas, revert), and gas price trends. Tools like The Graph for indexing or Dune Analytics for dashboards can help aggregate this data. Setting up alerts for spikes in failure rates can help you identify network congestion or smart contract bugs before they significantly impact users.

Finally, always provide clear user feedback. Design your UI to show pending states, a link to the block explorer, and human-readable error messages for common failures like "Insufficient funds for gas" or "Transaction reverted: Insufficient liquidity." For critical transactions, consider implementing a transaction replacement or cancellation feature using a higher gas price to manage user experience during network volatility.

TRANSACTION STATUS

Frequently Asked Questions

Common questions and troubleshooting steps for developers tracking transaction processing on Ethereum and other EVM chains.

On EVM chains, a transaction progresses through distinct states:

  • Pending: The transaction is in the mempool, waiting to be included in a block by a miner/validator. It has been signed and broadcast but not yet confirmed.
  • Confirmed/Finalized: The transaction has been included in a block and added to the canonical chain. On Ethereum post-Merge, this requires the block to pass through the "finality" process (typically two epochs, ~12 minutes).
  • Failed/Reverted: The transaction was included in a block but the smart contract execution reverted, often due to an error like insufficient gas, a failed condition check, or a state change. The gas fee is still spent.
  • Dropped/Replaced: The transaction was removed from the mempool without being mined, often due to a low gas price or being replaced by a newer transaction with the same nonce and a higher gas fee.