eth_getStorageAt

The eth_getStorageAt method returns the value from a storage position at a given address on the Tron network (TVM). This method allows direct access to a smart contract's storage slots, enabling you to read specific state variables by their storage position.

It's useful for advanced contract analysis, debugging, and reading data from contracts without needing their ABI, though understanding the storage layout is required. Developers use this for low-level contract inspection, verifying storage values, analyzing contract state, and accessing data when the contract ABI is unavailable. Each storage slot holds 32 bytes of data, and the method supports querying historical storage values by specifying different block parameters. Understanding Solidity storage layout is essential for determining the correct position values.


Parameters

parameter
type
description
address
string (required)
The Tron contract address (20-byte hex string with 0x prefix)
position
string (required)
The storage slot position as a 32-byte hex string (e.g., '0x0' for the first slot). For mappings and dynamic arrays, the position must be calculated using keccak256 hashing
blockParameter
string (required)
Block number in hex format (e.g., '0x10d4f') or one of the string tags: 'latest', 'earliest', or 'pending'
Return Object
field
type
description
result
string
The value stored at the specified storage position, returned as a 32-byte hexadecimal string. The value is left-padded with zeros if it's smaller than 32 bytes. Returns "0x0000000000000000000000000000000000000000000000000000000000000000" for empty storage slots.
Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?