Skip to main content

Reading Blockchain State

Overview

Push Chain is an EVM-compatible blockchain, so you can use familiar Ethereum tools to fetch on-chain data. This guide shows you how to:

  • Initialize HTTP client for one-off requests
  • Fetch transactions and blocks
  • Initialize WebSocket client for real-time streaming
  • Subscribe to new blocks and filter for specific transactions

For full reference on each library, see:

Initialize HTTP Client

VIRTUAL NODE IDE

Fetch a Transaction by Hash

VIRTUAL NODE IDE

Fetch Blocks

Latest Block

VIRTUAL NODE IDE


Block by Hash

VIRTUAL NODE IDE

Websocket Client

Initialize WebSocket Client

VIRTUAL NODE IDE


Subscribing to New Blocks

VIRTUAL NODE IDE


Filtering New Blocks for Specific Transactions

VIRTUAL NODE IDE

Next Steps

  • Dive into our Contract Helpers to detect and work with both cross-chain accounts and native Push Chain smart accounts.
  • Use our UI Kit to abstract away wallet and chain logic and accelerate your front-end development.