All packages

tron_foundational

StreamingFast
v0.1.2/3.7K downloads/Repository

Package ref

tron-foundational@v0.1.2

Run package

CLI

Run filtered_transactions from the command line.

substreams run tron-foundational@v0.1.2 filtered_transactions -e tron --start-block -1
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

TRON Foundational Modules

The TRON Foundational Modules Substreams contains a set of modules that allow you to easily retrieve basic information from the TRON blockchain.

Modules

map_transactions

This module retrieves all the NOT failed transactions, without any more filtering.

filtered_transactions

This module uses the index_transactions cache to match the filtered transactions based on the parameters passed as input to the module.

You can directly use this module to retrieve filtered transactions:

modules:
    - name: my_module
      use: tron_common:filtered_transactions

params:
    my_module: source_account:account1

index_transactions

This module creates a cache of transactions based on:

  • The contract type of every transactions.
  • The contract address of every transactions.
  • The owner address of every transactions that support it.
  • The to address of every transactions that suppoirt it

You can use this module as a blockFilter to filter transactions based on the parameters specified above. Here's an example to filter all the USDT (TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) transfers from TMAP4Dnyh2og7bzW6HxZfuZqRSTHsVDKRT:

  - name: my_module
    ...
    blockFilter:
      module: index_transactions
      query:
        string: (contract_type:TriggerSmartContract && contract_address:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t && from:TMAP4Dnyh2og7bzW6HxZfuZqRSTHsVDKRT)

Modules

Execution graph

3 modules
mapMain

filtered_transactions

Output

sf.substreams.tron.v1.Transactions

Inputs

blockIndex

index_transactions

Output

sf.substreams.index.v1.Keys

map

map_transactions

Output

sf.substreams.tron.v1.Transactions

Inputs

sf.substreams.v1.Clocksf.tron.type.v1.Block