Skip to main content
POST
eth_getStorageAt
This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see Hyperliquid methods for the full availability breakdown.
The 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.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

The method takes three parameters:
  1. Address - The contract address to read storage from
  2. Storage position - The storage slot position to read
  3. Block parameter - The block at which to read the storage

Parameter details

  • address (string, required) — The 20-byte contract address
  • position (string, required) — The storage position as a hexadecimal string
  • block (string, required) — Block identifier: "latest" (only the latest block is supported on Hyperliquid)

Response

The method returns the 32-byte value stored at the specified position as a hexadecimal string.

Response structure

Storage value:
  • result — The 32-byte storage value as a hexadecimal string with 0x prefix

Data interpretation

Storage format:
  • Always returns 32 bytes (64 hex characters + 0x prefix)
  • Values are zero-padded to 32 bytes
  • 0x0000000000000000000000000000000000000000000000000000000000000000 indicates empty/zero storage
  • Actual data may be packed or encoded depending on variable type
Value decoding:

Storage layout

Solidity storage rules

Basic types:
  • uint256, int256, bytes32 — Occupy full 32-byte slot
  • uint128, uint64, etc. — Packed into slots when possible
  • address — 20 bytes, often packed with other data
  • bool — 1 byte, packed with other data
Complex types:
  • Arrays — Length at base slot, elements at calculated positions
  • Mappings — Values at keccak256(key, slot) positions
  • Structs — Members packed sequentially starting from base slot

Storage slot calculation

Simple variables:
Arrays:
Mappings:

Contract state inspection

Variable reading

Direct variable access:
  • Read public variables directly from their storage slots
  • Decode packed variables using appropriate offsets
  • Handle different data types and encodings
  • Verify variable values against expected ranges
State verification:
  • Compare storage values with expected contract state
  • Verify contract initialization and configuration
  • Check for state corruption or unexpected changes
  • Validate contract upgrade states

Current state analysis

State inspection:
  • Read current contract storage values
  • Analyze current contract state and configuration
  • Verify current variable values and settings
  • Inspect current contract initialization state

Usage example

Basic implementation

Hyperliquid-specific considerations

Block limitations

Latest block only:
  • Only the "latest" block parameter is supported
  • Historical storage queries are not available in the default implementation
  • All storage reads are performed against the current state
  • For historical analysis, consider using archive node implementations

Storage analysis

Current state inspection:
  • Read contract storage values at current block
  • Analyze current contract configuration and state
  • Verify current variable values and settings
  • Debug current contract behavior and issues
Data interpretation:
  • Storage values are always 32 bytes (64 hex characters + “0x”)
  • Values are zero-padded to 32 bytes
  • Different data types require different decoding approaches
  • Packed variables share storage slots for gas efficiency

Example request

This an example call with wrapped HYPE (wHYPE) on the Hyperliquid mainnet deployed at 0x5555555555555555555555555555555555555555.
Use your own endpoint in your code. The code examples use a placeholder Chainstack endpoint (YOUR_CHAINSTACK_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the Chainstack console. The curl above uses a shared public endpoint for quick checks only; do not use it in production.

Use cases

The eth_getStorageAt method is essential for applications that need to:
  • Contract debugging: Inspect current contract state during development and testing
  • State verification: Verify current contract variables and configuration
  • Security analysis: Analyze current contract storage for security vulnerabilities
  • Contract auditing: Examine current contract state for audit and compliance
  • Development tools: Build contract inspection and debugging tools
  • Reverse engineering: Analyze unknown contracts by examining current storage
  • Testing frameworks: Verify current contract state in automated tests
  • Block explorers: Display current contract storage information
  • Integration services: Provide current contract state data to external systems
On Hyperliquid, 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.

Body

application/json
jsonrpc
enum<string>
default:2.0
required

JSON-RPC version

Available options:
2.0
method
enum<string>
default:eth_getStorageAt
required

The RPC method name

Available options:
eth_getStorageAt
params
array
required

Parameters: [address, position, block]

id
integer
default:1
required

Request identifier

Response

200 - application/json

Successful response with the storage value

jsonrpc
string

JSON-RPC version

id
integer

Request identifier

result
string

The 32-byte storage value as a hexadecimal string

Last modified on June 24, 2026