Skip to main content
ChainLens reads configuration from environment variables. Copy .env.example to .env for local development when you need to override defaults.
Never commit real API keys, provider tokens, private RPC URLs, deployment keys, or production secrets. Keep production values outside git.

Provider keys

These keys are optional. ChainLens can run without them by using public RPC endpoints. When a key is present, ChainLens prefers that provider. When it is missing, ChainLens falls back to public RPC for real on-chain data.

Public RPC overrides

Use these only when you want ChainLens to call your own RPC endpoint instead of the built-in public defaults. Public RPC variables can contain comma-separated endpoint lists. ChainLens retries endpoints and uses the first successful response.

API server

The rate limit applies to GET /api/pair/:address/events, which fans out to upstream RPC providers. GET /api/health and pair resolution are not rate-limited. 127.0.0.1 is allow-listed for local development.
Requests without an Origin header, such as server-to-server calls or curl, are allowed by the API CORS logic. Browser requests must match ALLOWED_ORIGINS.

Pricing and Solana RPC

ChainLens uses Jupiter for Solana token prices, Coingecko for EVM token prices, and hardcoded stable/native fallbacks when external pricing is unavailable.

Frontend

The Vite dev server proxies /api automatically in local development.

Example local setup

For a local public-RPC-only run, leave HELIUS_API_KEY and ALCHEMY_API_KEY empty.