Giter Club home page Giter Club logo

cached-eth-rpc's Introduction

ETH RPC Cache Layer

A simple http server to cache specific eth rpc requests in memory. Useful for massive repeatedly requests to ETH rpc endpoints. Multiple endpoints/chains can be configured to be cached.

Usage (with docker)

  1. Edit docker-compose.yml

  2. docker-compose up

Usage

redis-url is optional

cargo run --release -- \
  --port=8124 \
  --bind=0.0.0.0 \
  --endpoint=eth=https://rpc.ankr.com/eth \
  --endpoint=bsc=https://rpc.ankr.com/bsc \
  --redis-url=redis://localhost:6379

Following redirection will be made:

Supported methods

Mainly supported requests with determined block number. Other methods will be directly send to the configured ETH rpc endpoint.

  • eth_call

  • eth_chainId

  • eth_estimateGas

  • eth_getBalance

  • eth_getBlockByHash

  • eth_getBlockByNumber

  • eth_getBlockReceipts

  • eth_getCode

  • eth_getLogs

  • eth_getStorageAt

  • eth_getTransactionByBlockHashAndIndex

  • eth_getTransactionByBlockNumberAndIndex

  • eth_getTransactionByHash

  • eth_getTransactionCount

  • eth_getTransactionReceipt

  • debug_traceBlockByHash

  • debug_traceBlockByNumber

  • debug_traceCall

  • debug_traceTransaction

cached-eth-rpc's People

Contributors

tonyke-bot avatar cloud10240 avatar publicqi avatar 0xawm avatar

Stargazers

s1cs avatar Chaofan Shou  avatar  avatar  avatar Julia Smith avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.