Shadow
  • 🌗Overview
  • 🏁Quickstart
  • 🎯Use cases
  • ⛓️Supported chains
  • MODIFY CONTRACTS
    • Versioning
    • How to's
      • Proxy contracts
      • Using oracles
      • Factory contracts
      • Interdependent shadow contracts
  • GETTING DATA
    • Shadow RPC
    • Database syncs
    • Recurring exports
    • One-off exports
    • API Keys
  • Integrations
    • Postgres
    • GCS / S3
    • Dune
  • Product Guide
    • Catalog
    • Test runs
    • Subgraphs
  • Tips
    • Proxy contracts
    • Solidity beginners
      • Recommended tools
  • Resources
    • 📚Concepts
    • ❓FAQs
Powered by GitBook
On this page
  • API keys
  • Supported endpoints
  • RPC frontfills
  • RPC backfills
Export as PDF
  1. GETTING DATA

Shadow RPC

PreviousInterdependent shadow contractsNextDatabase syncs

Last updated 7 months ago

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.

https://rpc.shadow.xyz/ethereum/mainnet/v1/<fork_id>/<version>

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 page for more details.

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"
  }'

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

  5. eth_getBlockByHash

  6. eth_getBlockByNumber

  7. eth_getTransactionByHash

  8. eth_getTransactionReceipt

  9. eth_getBlockReceipts

  10. eth_getLogs

  11. eth_getTransactionByBlockNumberAndIndex

  12. eth_getTransactionByBlockHashAndIndex

  13. eth_getBlockTransactionCountByHash

  14. eth_getBlockTransactionCountByNumber

  15. eth_call (does not currently support state override set params)

RPC frontfills

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

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.

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 are included on free trials and paid .

RPC backfills are includes on paid .

API keys
Telegram chat
Shadow Fork plans
Pro Shadow Fork plans