Skip to content

iankressin/eql

Repository files navigation

EVM Query Language (EQL)

cover image

A SQL-like language for querying EVM chains with minimal boilerplate.

Discord Tests GitHub commits since latest release (branch) GitHub contributors GitHub Release Date

EQL provides a declarative way to query Ethereum Virtual Machine (EVM) chains. It enables developers and researchers to fetch blockchain data using familiar SQL-like syntax, eliminating the need for complex boilerplate code.

# Fetch Vitalik's balance across multiple chains
GET balance, balance FROM account vitalik.eth ON eth, base, arbitrum

Table of Contents

Why EQL?

The Problem

Querying EVM chain data traditionally requires:

  • Writing extensive boilerplate code
  • Managing multiple RPC provider connections
  • Handling rate limits and retries
  • Dealing with different response formats

The Solution

EQL abstracts away the complexity by:

  • Providing a simple, SQL-like syntax
  • Managing RPC connections under the hood
  • Handling data formatting automatically
  • Supporting cross-chain queries in a single line

How It Works

EQL uses a two-phase interpreter to transform your queries into RPC calls:

  1. Frontend Phase

    • Tokenizes and parses your query
    • Validates syntax and semantics
    • Builds an Abstract Syntax Tree (AST)
  2. Backend Phase

    • Maps AST to appropriate JSON-RPC methods
    • Manages concurrent RPC requests
    • Formats responses into consistent structures

For example, this query:

GET balance, nonce FROM account vitalik.eth ON eth

Gets transformed into:

  1. ENS resolution for "vitalik.eth"
  2. eth_getBalance RPC call
  3. eth_getTransactionCount RPC call
  4. Results formatting into a structured response

Quick Start

Installation

# Install EQL version manager
curl https://raw.githubusercontent.com/iankressin/eql/main/eqlup/install.sh | sh

# Install latest EQL version
eqlup

Usage

CLI Mode

# Run a query file
eql run query.eql

# Interactive REPL
eql repl

Library Mode

# Cargo.toml
[dependencies]
eql_core = "0.1"
use eql_core::interpreter::Interpreter;

async fn main() {
    let query = "GET balance FROM account vitalik.eth ON eth";
    let result = Interpreter::run_program(query).await?;
}

Web Mode

https://eql.sh

Features

Supported Entities

  • Accounts
  • Blocks
  • Transactions
  • Logs

Supported Operations

  • GET: Query entity data
  • Filtering: WHERE clauses for precise queries
  • Cross-chain: Query multiple chains in one go
  • Data Export: CSV, JSON, Parquet formats

Documentation

For detailed documentation on queries and installation:

Roadmap

roadmap image

See our detailed Roadmap for upcoming features.

Contributing

We welcome contributions! See our Contributing Guide for details.

License

MIT License - see LICENSE for details