All pages
Powered by GitBook
1 of 1

Loading...

Shadow RPC

Every shadow fork comes with its own Shadow RPC and a standard set of JSON-RPC endpoints. Shadow RPCs look and feel like a normal RPC, but contains additional shadow data that's custom to your shadow fork.

Each Shadow RPC is versioned, which allows you to safely deploy changes to your shadow fork and test them without disrupting previously running jobs.

Since your Shadow RPC behaves like a normal RPC, you can use it as a drop-in replacement in your own infrastructure (e.g. include shadow events in your custom indexer, or add shadow events to your self-hosted subgraph).

API keys

Every request to your Shadow RPC must include the API key in the header of the request. See the API keys page for more details.

Supported endpoints

Free trial accounts are currently rate limited to 60 RPC requests per minute.

Shadow RPCs currently support the following endpoints:

  1. eth_chainId

  2. net_version

  3. web3_clientVersion

  4. eth_blockNumber

We're working getting to 100% parity for all JSON-RPC endpoints. Don't see one you need? Let us know in our .

RPC frontfills

RPC frontfills are included on free trials and paid .

As soon as you deploy a shadow contract, your shadow fork RPC will start frontfilling new data within seconds. This means that you can request any data that is generated for new blocks that occur after the point of your shadow contract deployment.

RPC backfills

RPC backfills are includes on paid .

You can also tell Shadow to backfill your shadow fork RPC, which will trigger a background job that populates historical data going back to the genesis block. Once the RPC backfill job is completed, you'll be able to request any historical data for past blocks on your shadow fork.

https://rpc.shadow.xyz/ethereum/mainnet/v1/<fork_id>/<version>
curl https://rpc.shadow.xyz/ethereum/mainnet/v1/<fork_id>/<version> \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-SHADOW-API-KEY: <API_KEY>" \
  --data '{
    "method": "eth_getLogs",
    "params": [{
      "fromBlock": "safe",
      "toBlock": "latest",
      "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "topics": []
    }],
    "id": 1,
    "jsonrpc": "2.0"
  }'
  • eth_getBlockByHash

  • eth_getBlockByNumber

  • eth_getTransactionByHash

  • eth_getTransactionReceipt

  • eth_getBlockReceipts

  • eth_getLogs

  • eth_getTransactionByBlockNumberAndIndex

  • eth_getTransactionByBlockHashAndIndex

  • eth_getBlockTransactionCountByHash

  • eth_getBlockTransactionCountByNumber

  • eth_call (does not currently support state override set params)

  • Telegram chat
    Shadow Fork plans
    Pro Shadow Fork plans