MCPcopy Index your code
hub / github.com/bilinearlabs/quixote

github.com/bilinearlabs/quixote @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
539 symbols 1,396 edges 25 files 102 documented · 19%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

quixote

From the blockchain to your database. Index RWAs, Stablecoins, and Digital Assets.

quixote

GitHub Actions Workflow Status GitHub License Rust Duckdb PostgreSQL Join our Discord

quixote is a lightweight, high-performance EVM event indexer built in Rust. It lets you capture, store, and query blockchain events with minimal setup. Get it up and running in two commands.

Index and query on-chain data from stablecoins, RWAs, DeFi protocols, or any asset on EVM-compatible blockchains.

Just point it at an RPC, specify the events you care about, and start querying your data with SQL.

Quickstart

Install:

curl -fsSL https://quixote.bilinearlabs.io/install | bash -s

Index all existing pools in Uniswap V4:

quixote -r https://gateway.tenderly.co/public/mainnet \
  -c 0x000000000004444c5dc75cB358380D2e3dE08A90 \
  -e "Initialize(bytes32 indexed id, address indexed currency0, address indexed currency1, uint24 fee, int24 tickSpacing, address hooks, uint160 sqrtPriceX96, int24 tick)" \
  -s 21688329

Now quixote will start indexing the Initialize event for this smart contract starting from block 21688329 and dumping all the content into quixote_indexer.duckdb. You can check the sync status as follows.

curl http://localhost:9720/list_events

And the database schema as follows.

curl http://localhost:9720/db_schema

You can also pass raw SQL queries as follows.

curl -X POST http://localhost:9720/raw_query \
-H "Content-Type: application/json" \
-d '{"query": "SELECT * FROM event_1_initialize_dd466 limit 5"}'

And quixote ships with a built-in frontend that you can use to query data in a simple way, showing the content as a table. Go to http://127.0.0.1:8501

Features

  • Simple to run: Single binary, minimal configuration. Point to an RPC and start indexing.
  • Dual database support: Choose between DuckDB (file-based, zero setup) or PostgreSQL (scalable, production-ready). See docs.
  • Any EVM chain: Works with Ethereum, Arbitrum, Optimism, Polygon, and any EVM-compatible chain.
  • Flexible event selection: Index specific events or entire ABIs. Filter by address, topic, or any indexed parameter.
  • Built-in REST API: List events, query contracts, or execute raw SQL via HTTP endpoints.
  • Generic GraphQL engine: Expose any SQL view as a typed GraphQL API with filtering, pagination, relations, and The Graph compatibility. See docs.
  • Tor hidden service: Optionally expose the API as a .onion address for privacy-preserving access. See docs.
  • Built-in frontend: Embedded Streamlit dashboard at http://localhost:8501 for data exploration.
  • Auto resume: Automatically resumes from the last synced block.
  • Resilient: Exponential backoff and retry logic for network issues and RPC rate limits.
  • RPC cost control: The --block-range parameter controls blocks per request to match provider limits.
  • YAML configuration: Advanced filtering and multi-job support via config files.
  • Built in Rust: Fast, safe, and memory-efficient.

Data integrity

Data integrity, or, in other words, ensuring that the data indexed in your database reflects exactly what happened on-chain—is our top priority. To achieve this, we have implemented several measures: * By default, the indexer runs on finalized blocks, meaning no reorgs can occur that would alter transaction history. * We process events in atomic batches. In the event of a crash or failure of any kind, the indexer remains in a consistent state. * We process events in order, meaning we never perform out-of-order inserts. This simplifies recovery: if the indexer stops or errors, there is no need to roll back or fill gaps. * We have conducted extensive testing, including reconciliation against the on-chain state, to ensure we can faithfully reproduce it from the indexed events.

Learn more about data integrity.

License

This project is open source and available under the MIT License.

About Bilinear Labs

quixote is built and maintained by Bilinear Labs, a team passionate about building high-performance infrastructure for blockchain and finance.

Need help with custom indexing solutions, high-performance backends, or managed infrastructure? We're happy to help. Whether it's tailoring quixote for your specific use case, building something bespoke, or running the infrastructure so you don't have to. Feel free to reach out.

Extension points exported contracts — how you extend this code

StorageFactory (Interface)
Trait for creating storage instances. # Description This trait abstracts over the creation of storage instances for co [4 …
src/storage/storage_api.rs
OptionalAddressDisplay (Interface)
Extension trait for displaying `Option ` with a fallback. [1 implementers]
src/lib.rs
Storage (Interface)
(no doc) [4 implementers]
src/storage/storage_api.rs

Core symbols most depended-on inside this repo

clone
called by 175
src/storage/storage_duckdb.rs
collect
called by 49
src/event_collector.rs
build_schema_from_factory
called by 20
src/api_graphql.rs
scalar
called by 20
src/storage/storage_duckdb.rs
compile
called by 18
src/storage/storage_duckdb.rs
approval_event
called by 17
src/storage/storage_duckdb.rs
field_name_for
called by 15
src/api_graphql.rs
include_events
called by 15
tests/tor_integration.rs

Shape

Function 311
Method 168
Class 51
Enum 6
Interface 3

Languages

Rust99%
Python1%

Modules by API surface

src/storage/storage_duckdb.rs97 symbols
src/storage/storage_postgresql.rs76 symbols
src/api_the_graph.rs65 symbols
tests/aave_governance_integration.rs45 symbols
src/api_graphql.rs36 symbols
src/collector_seed.rs32 symbols
src/configuration.rs27 symbols
tests/tor_integration.rs24 symbols
src/test_utils.rs24 symbols
src/tor_service.rs20 symbols
src/event_collector.rs19 symbols
src/api_rest.rs17 symbols

For agents

$ claude mcp add quixote \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page