eth_getStorageAt
Gets a storage value from a contract address, a position, and an optional blockNumber
- CURL
curl --request POST \
     --url https://evm.confluxrpc.com \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": ["0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e","0x100",null],
  "method": "eth_getStorageAt"
}'
Params
address required
Schema
type : string
Pattern : 
^0x[0-9,a-f,A-F]{40}$position required
Schema
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,63}|0)$blocknumber optional
Block Number or Tags
oneOf
- U64
- BlockHash
- BlockNumber
- string
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,15}|0)$type : object
- blockHash string requiredtype : stringPattern :- ^0x[0-9,a-f,A-F]{64}$
- requireCanonical booleantype : boolean
type : object
- blockNumber string requiredtype : stringPattern :- ^0x([1-9a-f][0-9a-f]{0,15}|0)$
type : string
Possible values : 
- earliest
- latest
- pending
Result
Schema
type : string
Pattern : 
^0x[0-9,a-f,A-F]{64}$Examples
- eth_getStorageAt
- eth_getStorageAt
- eth_getStorageAt
- eth_getStorageAt
- eth_getStorageAt
- eth_getStorageAt
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
        "0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e",
        "0x100"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
"0x0000000000000000000000000000000000000000000000000000000000000000"
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
        "0x7253cb7bb788f91b18e20b61e708cb0c98383fc8",
        "0x100"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
"0x0000000000000000000000000000000000000000000000000000000000000000"
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
        "0x7253cb7bb788f91b18e20b61e708cb0c98383fc8",
        "0x100",
        "earliest"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
{
  "code": -32016,
  "message": "Error processing request: State for epoch (number=0 hash=0x3fb9d350f95424c3c27fcf248d9a6f633a83c2a75c11ef887ea41540c85e7804) does not exist: out-of-bound StateAvailabilityBoundary { synced_state_height: 0, lower_bound: 71248001, upper_bound: 71252842, optimistic_executed_height: Some(71252842) }"
}
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
        "0x7253cb7bb788f91b18e20b61e708cb0c98383fc8",
        "0x100",
        "latest"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
"0x0000000000000000000000000000000000000000000000000000000000000000"
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
        "0x7253cb7bb788f91b18e20b61e708cb0c98383fc8",
        "0x100",
        "pending"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
{
  "code": -32602,
  "message": "Invalid parameters: epoch_number",
  "data": "\"Latest mined epoch is not executed\""
}
Request
curl -X POST --data \
'{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getStorageAt",
    "params": [
        "0x7253cb7bb788f91b18e20b61e708cb0c98383fc8",
        "0x100",
        "0xf4240"
    ]
}' \
-H "Content-Type: application/json" \
localhost:12539
Response
{
  "code": -32016,
  "message": "Error processing request: State for epoch (number=1000000 hash=0x0fab248a77b93e4a464d07847f4c971ff98941d53ddd70eaa8a9614bdfcc498a) does not exist: out-of-bound StateAvailabilityBoundary { synced_state_height: 0, lower_bound: 71248001, upper_bound: 71252842, optimistic_executed_height: Some(71252842) }"
}