Blockflow Docs
AppBlog
CLI
CLI
  • Getting Started
    • Installation
    • Quickstart Guide
    • Project Structure
  • Building Blocks
    • Configuring YAML
    • Setting up Database Schema
    • Setting up Handlers
  • Writing handlers
    • Database Operations
      • Instance
      • API
      • Native
    • Indexing Factory Contracts
  • Production
    • Testing
    • Deployment
    • Query The Database
    • Building REST API
    • Building GraphQL APIs
  • Advanced
    • Migrate Subgraph
    • CLI Cheatsheet
    • Console Account
    • Logging
  • Hands-on Project
    • CCTP Protocol
    • ERC-4626
    • Credit-Debit
    • Avocado
    • ENS
    • SolverScan
    • xERC20
    • Snapshot
  • Glossary
    • IEventContext
    • IFunctionContext
    • ILog
    • ITransaction
    • IBlock
Powered by GitBook
On this page

Glossary

The handler code within the subgraph project utilizes predefined interfaces and type utilities, which are imported from the @blockflow-labs/utils library. This library is pre-installed when you set up your project using the Blockflow CLI, ensuring consistent and maintainable type definitions across your codebase.

  • IEventContext

  • IFunctionContext

  • ILog

  • ITransaction

  • IBlock


Purpose

These predefined interfaces and type utilities serve several purposes:

  1. Type Safety: They provide a standardized and strongly-typed structure for working with blockchain data, ensuring type safety and catching potential errors during development.

  2. Code Reusability: By using shared interfaces and types, developers can write reusable code that adheres to consistent data structures, promoting code maintainability and collaboration within teams.

  3. Integration with Subgraph Schema: The interfaces and types are designed to align with the subgraph's schema, facilitating seamless mapping and transformation of blockchain data into the desired database entities.

  4. Documentation and Clarity: Well-defined interfaces and types act as self-documenting code, improving code readability and making it easier for developers to understand and work with the blockchain data structures.

PreviousSnapshotNextIEventContext