Macha Docs
  • Overview
    • Macha Introduction
    • Macha Overview
    • Macha Ecosystem
    • Get Started on Macha
    • Build on Macha
  • Engineering
    • Macha Federated Network
    • Macha Infrastructure
  • Contracts, Nodes & SDKs
    • Data Nodes
    • Meta SDK
    • Meta Iframe
  • Guides
    • How to use Studio
    • How to use dApp
    • Terminology
Powered by GitBook
On this page
  • Build Configuartion
  • Run Macha Data Nodes
  • Reading Configuration
  • Streaming real-time txns
  • Fetching historical txns
  • Use of Handlers for
  1. Contracts, Nodes & SDKs

Data Nodes

Guide on how to use Macha Data Nodes

Build Configuartion

Run Macha Data Nodes

Reading Configuration

Streaming real-time txns

Macha's highly efficient system fetches real-time events with near 0% latency. This function listens to events triggered from the current timestamp of running the node.

A stream is initiated which periodically checks for new events. For every valid event caught, the loop is run to decode the associated data. This data arrives RawData which cannot be utilized directly. Hence, it must be deciphered and simplified to a usable form. The decoded data consists of - method params, function name, transaction hash and the transaction receipt.

To get the data of all previous transactions, head to the next section.

Fetching historical txns

In this section, we go over how historical transactions are fetched. Crate ethers is used to create a client and fetch all previous transactions. The results can be restricted by start_block and end_block as the lower bound and upper bound respectively.

Once this data is received successfully, it is formatted and added to the database as shown above.

Use of Handlers for

PreviousMacha InfrastructureNextMeta SDK

Last updated 1 year ago