Cronos EVM Docs
  • Getting Started
    • Getting Started
    • Background
    • Architecture
    • Cronos roadmap
  • FOR USERS
    • 💳Crypto.com Card Top Up
    • 🔥Crypto Wallets
    • 🦊MetaMask Configuration
    • 🦁Brave Wallet
    • 🌉Bridges
      • From the Crypto.com App and Exchange
        • From the Crypto.com App
        • From the Crypto.com Exchange
      • IBC (Cronos POS Chain, other Cosmos chains)
        • Cronos Bridge Web App
      • Independent bridges
      • FAQs for Bridge transfers
      • FAQs for transactions from/to centralized exchanges
    • 🚰Testnet Faucet
    • 💡Tips & FAQs
    • 👮Key Principles for Wallet Security
    • GasTracker
  • FOR DAPP DEVELOPERS
    • 💡Founder FAQs
    • 🏅Hacker's Getting Started Resources
    • 📃Smart Contracts
      • Contract Development on Testnet
      • Contract Deployment and Verification
      • Contract Verification Export: Cronoscan To Cronos Explorer
      • Best Practices
      • Token Contract Addresses
    • 💻dApp Creation
      • Free and commercial RPC endpoints
      • Wallet integrations
      • Web3-wallet
      • JSON-RPC methods
      • Address Conversion
      • Swagger Playground
    • ⚙️Dev Tools & Integrations
      • All dev tools & integrations
      • Account Abstraction
      • Band Protocol
      • Banxa
      • GoldRush
      • Cronos Safe
      • Flair
      • Google Bigquery
      • Moralis
      • Pyth
      • Secret Network
      • SubQuery
      • Witnet
    • Crypto.com AI Agent SDK
  • FOR NODE HOSTS
    • Running nodes
      • Cronos Mainnet
        • Quicksync
        • State-sync
        • Public Node Sync
        • KSYNC
        • The "Huygen" upgrade guide (v0.6.* to v0.7.*)
        • The "v0.7.0-hotfix" upgrade guide (v0.7.* to v0.8.*)
        • The "Galileo" upgrade guide (v0.8.* to v1.0.*)
        • The "Titan" upgrade guide (v1.0.* to v1.1.0)
        • The "v1.2" upgrade guide (v1.1.* to v1.2.0)
        • The "v1.3" upgrade guide (v1.2.* to v1.3.0)
        • The "v1.4" Pallene upgrade guide (v1.3.* to v1.4.1)
        • Patching Unlucky & Duplicate Tx
      • Cronos Testnet
      • Devnet
      • Best Practices
      • Cronosd build with Nix
      • VersionDB
      • MemIAVL
      • Local State Sync
    • Cronosd
  • CRONOS PLAY
    • Introduction
    • Unity Engine
      • Current Version
      • Legacy Version
        • EVM
        • Login Example
        • Custom RPC
        • ERC20
        • ERC721
        • ERC1155
      • Useful Links
    • Unreal Engine
      • Installation and Enabling
      • Working with Blueprint
        • Actors and Blueprint Classes
        • Cronos Configuration
        • Connect Defi Desktop/Onchain Wallet with URI
        • Connect Wallets with QR Code
        • Connect WalletConnect Step by Step
        • WalletConnect 2.0 and Unreal Engine 5: Hello World Example
        • Wallet
        • ERC20
        • ERC721
        • ERC1155
        • Broadcast Transactions
        • Get Tokens or Transactions
      • Working with C++
        • Creating a C++ Project
        • Creating a child DefiWalletCoreActor
        • Querying a contract
        • Customizing Network
      • Demo
    • Cronos Play C++ SDK
    • Crypto.com Pay Integration
    • Cronos Play FAQ
  • Block Explorers
    • Block Explorer and API Keys
    • Cronos Explorer
    • Cronoscan
  • CRONOS CHAIN PROTOCOL
    • Chain ID and Address Format
    • Cronos General FAQ
    • Genesis
    • Modules
      • module_bank
      • module_distribution
      • module_slashing
      • module_feemarket
    • Chain Details
      • List of parameters
      • Technical glossary
      • Protocol Documentation
    • Common IBC Commands
  • Cronos zkEVM
    • Cronos zkEVM
  • Resources
    • Media / brand kit
Powered by GitBook
On this page
  • 🔮 Flair
  • Why Flair?
  • Getting Started
  • Examples
  • Need help?

Was this helpful?

Edit on GitHub
  1. FOR DAPP DEVELOPERS
  2. Dev Tools & Integrations

Flair

Real-time and historical custom data indexing for any evm chain.

PreviousCronos SafeNextGoogle Bigquery

Last updated 4 months ago

Was this helpful?

🔮 Flair

Real-time and historical custom data indexing for any evm chain.

offers reusable indexing primitives (such as fault-tolerant RPC ingestors, custom processors, re-org aware database integrations) to make it easy to receive, transform, store and access your on-chain data.

Why Flair?

Compared to other alternatives the main reasons why are:

  • 🚀 Adopting parallel and distributed processing paradigm means high scalability and resiliency for your indexing stack. Instead of constrained sequential processing (e.g Subgraph).

  • 🧩 Work out-of-box with any EVM chain, you plug-in an RPC and indexer starts.

  • 🚄 Native real-time stream processing for certain data workload (such as aggregations, rollups) for things like total volume per pool.

  • ☁️ Managed cloud services avoid DevOps and irrelevant engineering costs for dApp developers.

Features

  • ✅ Listen to any EVM chain with just an RPC URL.

    • Free managed RPC URLs for +8 popular chains already included.

    • Works with both websocket and https-only RPCs.

  • ✅ Track and ingest any contract for any event topic.

    • Auto-track new contracts deployed from factory contracts.

  • ✅ Custom processor scripts with Javascript runtime (with Typescript support)

    • Make external API or Webhook calls to third-party or your backend.

    • Get current or historical USD value of any ERC20 token amount of any contract address on any chain

    • Use any external NPM library.

  • ✅ Stream any stored data to your destination database (Postgres, MognoDB, Kafka, Elasticsearch, Timescale, etc)

Getting Started

git clone https://github.com/flair-sdk/starter-boilerplate.git
# ... follow instructions in README.md

Boilerplate instructions will create a new cluster, generate an API Key, and set up a manifest.yml to index your first contract with sample custom processor scripts.

2️⃣ Configure Cronos RPC nodes

Set a unique namespace, Cronos chainId and RPC endpoint in your config. Remember that you can add up to 10 RPC endpoints for resiliency.

{
  "cluster": "dev",
  "namespace": "my-awesome-cronos-indexing-dev",
  "indexers": [
    {
      "chainId": 25,
      "enabled": true,
      "ingestionFilterGroup": "default",
      "processingFilterGroup": "default",
      "sources": [
        # Highly-recommended to have at least 1 websocket endpoint
        "wss://XXX",
        # You can put multiple endpoints for failover
        "https://evm.cronos.org"
      ]
    }
  ]
}
# backfill certain contracts or block ranges
pnpm flair backfill --chain 25 --address 0x6911dE03899e040745bdAC855333E294B927945D -d backward --max-blocks 10000

# backfill for a specific block number, if you have certain events you wanna test with
pnpm flair backfill --chain 25 -b 10329277

# backfill for the recent data in the last X minute
pnpm flair backfill --chain 25 --min-timestamp="30 mins ago" -d backward

Examples

Explore real-world usage of Flair indexing primitives for various use-cases.

DeFi

NFT

Need help?

1️⃣ Clone the template and follow the instructions

Learn more about the .

3️⃣ Sync some historical data using . Remember that enabled: true flag in your config enabled your indexer to capture data in real-time already.

4️⃣ your custom indexed data.

5️⃣ Stream the data to your .

are available to help you at any stage.

⚙️
starter boilerplate
structure of manifest.yml
backfill command
Query
own database
Aggregate protocol fees in USD across multiple chains
Calculate "Health Factor" of positions with contract factory tracking
Index Uniswap v2 swaps with USD price for all addresses
Index ERC721 and ERC1155 NFTs on any EVM chain with an RPC URL
Our engineers
Flair