From 3d91cca7c6bb96639ef05229542cd11ceebaa730 Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Mon, 28 Jul 2025 18:01:18 +0530 Subject: [PATCH] Add steps to setup and start proxy --- .env.example | 4 ++-- README.md | 24 +++++++++++++++++++++++- router.py | 1 + 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index afc68a9..e1ff357 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -# Provider endpoints and auth +# Provider endpoints and auth (optional) ALCHEMY_API_KEY=your_key_here HELIUS_API_KEY=your_key_here QUICKNODE_ENDPOINT=your_endpoint.quiknode.pro @@ -12,4 +12,4 @@ BACKOFF_MINUTES=30 # Logging LOG_LEVEL=INFO -ERROR_DB_PATH=./errors.db \ No newline at end of file +ERROR_DB_PATH=./errors.db diff --git a/README.md b/README.md index 781020d..e3fa07a 100644 --- a/README.md +++ b/README.md @@ -1 +1,23 @@ -The trenches are brutal. +# Solana Proxy + +## Setup + +- Copy `.env.example` to `.env`: + + ```bash + cp .env.example .env + ``` + +- The proxy will work without making any changes to the `.env` file but you can optionally set the API keys for different providers + +## Run + +- Start the proxy: + + ```bash + python3 main.py + ``` + +- This will start the proxy with, + - RPC endpoint at: + - WS endpoint at: diff --git a/router.py b/router.py index 19c9693..5410bc1 100644 --- a/router.py +++ b/router.py @@ -44,6 +44,7 @@ class Router: if not self.disable_cache: self.cache.set(method, params, transformed_response) + self.logger.info(f"Request succeeded via {provider.name}") return transformed_response