TriportRPC

eth_getStorageAt

POSThttps://triport.io/rpc/bsc

Return a contract storage slot at a block.

BNB Smart Chainbsc:rpcbsc_read_rpc - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

eth_getStorageAt returns the raw 32-byte-style value stored at one contract storage position at a selected BNB Smart Chain block.

Both the storage position and block number use EVM hex quantities. The result is raw 0x-prefixed byte data; interpreting mappings, packed fields, and other Solidity layouts is the caller's responsibility.

Use this method for a single raw slot. Use eth_getProof when proof material is required, or eth_call when a public contract getter provides the intended abstraction. Historical reads depend on the two confirmed archive-state pool nodes.

Parameters

JSON-RPC params is a positional array: [address, position, block].

addressstring (20-byte hex address)required
The 20-byte EVM account or contract address to query.
positionstring (hex quantity)required
Storage position encoded as an EVM hex quantity.
blockstring (block tag or hex quantity)required
Block selector: latest, earliest, pending, or an EVM hex block number.

Response

The response below is the checked fixture for this method; it is reproduced without changing its fields or values.

resultstring (hex data)
Raw storage value as hex data.

Errors

Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.

CodeMeaningWhen it happens
-32602Invalid paramsA required positional parameter is missing or a value does not match the OpenRPC schema.
-32000Upstream request failureInterpret the message with the code: header not found means a missing block; pruned/unsupported state text means unavailable historical state.
401UnauthorizedThe x-token API key is missing or invalid.
429Rate limitedThe request exceeds the configured category RPS for the caller's tier.

Examples

JavaScript (fetch)

const response = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
      "0x0000000000000000000000000000000000000000",
      "0x0",
      "latest"
    ]
  }),
});


const payload = await response.json();
console.log(payload.result);

Notes

  • Historical state is confirmed on two pool nodes. A historical request can fail when no eligible archive-state node is available.
  • Treat upstream -32000 by both code and message: header not found and pruned historical state are different conditions.
  • The BSC categories use configured defaults of 15 / 20 / 100 / 250 RPS; they are marked unmeasured in the tier matrix.
  • Related methods: eth_getProof, eth_call, eth_getCode.