Yearn RPC Read Proxy

A minimum, cached, read-only proxy for Ethereum JSON-RPC requests, optimized for frontend.

Endpoint

POST /chain/[chainId]

Supported Chains

Supported Methods

Example Request

curl -v -X POST https://rpc.yearn.fi/chain/1 \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
  }'

Example Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x134a5b2"
}

Caching

Usage with Libraries

// viem
const client = createPublicClient({
  transport: http('https://rpc.yearn.fi/chain/1')
})
// ethers
const provider = new JsonRpcProvider('https://rpc.yearn.fi/chain/1')