Docs

eth_getStorageAt - Get Contract Storage V...

Access raw storage data from smart contracts on Centrifuge network. Read contract state variables, proxy implementations, and storage mappings directly from the blockchain.

Retrieves the value from a storage position at a given address on the Centrifuge network. This method allows direct access to contract storage slots, enabling you to read contract state variables, proxy implementation addresses, and other stored data.

Code Examples

Bash
# Read storage slot 0 from USDC contract on Ethereum
curl -X POST https://api-centrifuge.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getStorageAt",
    "params": [
      "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "0x0",
      "latest"
    ],
    "id": 1
  }'

Use Cases

  • Contract State Inspection: Read private or internal variables
  • Proxy Implementation: Get implementation address from proxy contracts
  • Token Balances: Access balance mappings directly
  • Access Control: Check role assignments and permissions
  • Debugging: Investigate contract state during development

Important Notes

  • Storage values are always 32 bytes (64 hex characters plus 0x prefix)
  • Unused storage slots return 0x0000000000000000000000000000000000000000000000000000000000000000
  • Storage layout depends on Solidity version and compiler optimizations
  • For dynamic arrays, slot contains length; actual data starts at keccak256(slot)
  • Packed structs may share storage slots for gas optimization

Need help? Contact our support team or check the Centrifuge documentation.