Add steps to setup and start proxy
This commit is contained in:
parent
07c6888bb6
commit
3d91cca7c6
@ -1,4 +1,4 @@
|
|||||||
# Provider endpoints and auth
|
# Provider endpoints and auth (optional)
|
||||||
ALCHEMY_API_KEY=your_key_here
|
ALCHEMY_API_KEY=your_key_here
|
||||||
HELIUS_API_KEY=your_key_here
|
HELIUS_API_KEY=your_key_here
|
||||||
QUICKNODE_ENDPOINT=your_endpoint.quiknode.pro
|
QUICKNODE_ENDPOINT=your_endpoint.quiknode.pro
|
||||||
|
24
README.md
24
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: <http://0.0.0.0:8545>
|
||||||
|
- WS endpoint at: <http://0.0.0.0:8545/ws>
|
||||||
|
@ -44,6 +44,7 @@ class Router:
|
|||||||
|
|
||||||
if not self.disable_cache:
|
if not self.disable_cache:
|
||||||
self.cache.set(method, params, transformed_response)
|
self.cache.set(method, params, transformed_response)
|
||||||
|
|
||||||
self.logger.info(f"Request succeeded via {provider.name}")
|
self.logger.info(f"Request succeeded via {provider.name}")
|
||||||
return transformed_response
|
return transformed_response
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user