Hemera Doc
  • 👋Welcome
    • Introduction
    • Quick Start
    • Account Centric Indexing Protocol
      • What is Account-Centric Indexing?
      • Why "account-centric" indexing?
      • The advantages of Account-Centric Indexing
      • What's next for account-centric indexing?
      • Why create a new protocol here?
      • The Hemera Network
        • Network Roles
        • Indexers
        • Validators
        • Proprietary models & knowledge
        • Proprietary data and labels
        • Smart Contracts
        • Key roadmap items
        • Supported blockchains
      • Example Hemera use cases
        • SocialScan Explorers
        • Anti-sybil UML algorithm
        • Ethereum long term DA
        • EVM chain history preservation
        • Ecosystem AI Agents
        • User-defined AI Agents
  • 👩‍💻Developer Resources
    • Smart Contract Developers
    • EVM-compatible chains
      • Blockchain explorers
      • SocialScan explorer API doc
      • Ecosystem AI Agents
    • Dapp developers
    • User-defined Agent creators
    • AVS Operator
  • 🖥️Hemera Indexer
    • Introduction
    • Installation
      • Prerequisites
      • Install & Run
      • Export Result
    • Configurations
    • Benchmark
    • Data Class
      • Raw Data Tables
        • Blocks
        • Transactions
        • Logs
        • Traces
      • Generated Tables
        • Contract Internal Transactions
        • ERC20 Token Transfers
        • Tokens
        • ERC20 Token Holders
        • ERC721 Token Transfers
        • ERC721 Token Holders
        • ERC1155 Token Transfers
        • ERC1155 Token Holders
        • Address Coin Balances
        • Address Token Balances
        • Address Current Token Balances
        • Daily Wallet Address Stats
        • Contracts
      • Other Tables
        • Inscriptions
        • Bridges
          • L1 to L2 Transactions
          • L2 to L1 Transactions
          • Optimistic Rollup Data Availability Batches
          • Optimistic Rollup State Batches
    • Use Cases
      • UniSwap V3
        • Data Class
        • Trigger and Function
        • Run & Query
      • ENS
        • Data Class
        • Trigger and Function
        • Run & Query
      • OpenSea
        • Data Class
        • Trigger and Function
        • Run & Query
      • Deposit to L2
        • Data Class
        • Trigger and Function
        • Run & Query
      • User Profile
  • UDFs - User Defined Functions
    • Introduction
    • Components of UDFs
    • Building User Defined Functions(UDF)
    • Testing and Running UDF
    • Troubleshooting and Support
    • Supported UDFs
    • FAQs
  • 😄About us
    • The story behind building Hemera
    • Partners & Backers
    • Partnership inquiries
    • Hemera Powered Explorers
    • Active Developer Hackathons
    • Developer Contribution
  • Documentation feedback
Powered by GitBook
On this page
  • 1. Configuration
  • 2. Verify ABI
  • 3. Indexing Data
  • 4. Verify Data
  • Get Current Holdings for a Wallet Address
  • Get First Liquidity Addition Time for a Wallet Address
  • Get the Number of Pools with Liquidity Added or Removed by a Wallet Address
  1. Hemera Indexer
  2. Use Cases
  3. UniSwap V3

Run & Query

1. Configuration

In the indexer/modules/custom/uniswap_v3/config.ini file, configure the protocol information for your specific blockchain. Use the chainId as the key.

2. Verify ABI

Ensure that the ABI matches the Uniswap V3 protocol you're working with. If it doesn't, update the ABI in the indexer/modules/custom/uniswap_v3/constants.py file.

3. Indexing Data

To start indexing the data, run the following command:

python hemera.py stream -pg postgresql://{db_user}:{db_password}@{db_url}:5432/{database} -p {chain_rpc} -s {start_block_number} -e {end_block_number} -o postgres -B 1000 -w 5 -b 100 -E {entity_type}

(you can add your {entity_type} in enumeration/entity_type.py)

4. Verify Data

Get Current Holdings for a Wallet Address

First, retrieve all tokenIds held by the wallet_address, and then fetch the prices for the pools associated with these tokenIds.

API Path: /v1/aci/<wallet_address>/uniswapv3/current_holding

Get First Liquidity Addition Time for a Wallet Address

API Path: /v1/aci/<wallet_address>/uniswapv3/first_liquidity_time

Get the Number of Pools with Liquidity Added or Removed by a Wallet Address

API Path: /v1/aci/<wallet_address>/uniswapv3/provide_liquidity_pool_count

PreviousTrigger and FunctionNextENS

Last updated 8 months ago

🖥️