Returns the value stored at a specific storage position in a smart contract.
eth_getStorageAt
JSON-RPC method returns the value stored at a specific storage position in a smart contract. This method provides direct access to contract storage, enabling contract state inspection, debugging, and advanced contract analysis.
address
(string, required) — The 20-byte contract addressposition
(string, required) — The storage position as a hexadecimal stringblock
(string, required) — Block identifier: "latest"
(only the latest block is supported on Hyperliquid)result
— The 32-byte storage value as a hexadecimal string with 0x
prefix0x
prefix)0x0000000000000000000000000000000000000000000000000000000000000000
indicates empty/zero storageuint256
, int256
, bytes32
— Occupy full 32-byte slotuint128
, uint64
, etc. — Packed into slots when possibleaddress
— 20 bytes, often packed with other databool
— 1 byte, packed with other datakeccak256(key, slot)
positions"latest"
block parameter is supportedeth_getStorageAt
method is essential for applications that need to:
eth_getStorageAt
only supports the latest block. Storage positions are calculated based on Solidity’s storage layout rules. Complex types like arrays and mappings require specific calculations to determine the correct storage positions.Successful response with the storage value
The response is of type object
.