iankressin / eql

Query language to interact with EVM chains
https://eql.sh
MIT License
68 stars 7 forks source link
blockchain ethereum evm languages rust sql

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:

The Solution

EQL abstracts away the complexity by:

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

Supported Operations

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