fuel-explorer icon indicating copy to clipboard operation
fuel-explorer copied to clipboard

feat: add L1 indexer to fetch contract logs for the bridge

Open helciofranco opened this issue 2 years ago • 0 comments

Add L1 indexer, it'll sync contract events logs from a given start block number. After that, it'll keep watching the blockchain for new logs and blocks.

New env vars have been added to the graphql:

  • FUEL_CHAIN_NAME (example fuelBeta5)
  • ETH_CHAIN_NAME (example sepolia)
  • ETH_ALCHEMY_ID (your alchemy key)
  • ETH_INFURA_ID (your infura key – used as fallback to alchemy)
  • ETH_INITIAL_BLOCK (block number that got our contracts)

📷 Indexer demo

pnpm sync:bridge

💾 API demo

Query Result
Screenshot 2024-04-04 at 18 01 16 Screenshot 2024-04-04 at 18 01 27

helciofranco avatar Apr 04 '24 22:04 helciofranco