Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.27 KB

File metadata and controls

44 lines (32 loc) · 1.27 KB

FOC DevNet Examples

This directory contains examples demonstrating how to interact with a running FOC DevNet instance using the exported devnet-info.json file.

Files

Prerequisites

  • Node.js 20+ installed
  • A running FOC DevNet instance (foc-devnet start)
  • npm packages: viem, zod

Usage

  1. Start the DevNet:

    foc-devnet start
  2. Find the devnet-info.json file:

    # The file is located in the run directory
    cat ~/.foc-devnet/state/latest/devnet-info.json
  3. Install dependencies and run examples:

    cd examples
    npm install
    
    # Validate the schema
    npm run validate-schema ~/.foc-devnet/state/latest/devnet-info.json
    
    # Read DevNet info
    npm run read-info ~/.foc-devnet/state/latest/devnet-info.json
    
    # Check balances
    npm run check-balances ~/.foc-devnet/state/latest/devnet-info.json