starknet_getStorageAt RPC Method
Parameters
contract_address
string
REQUIRED
Loading...
key
string
REQUIRED
Loading...
block_id
string
REQUIRED
Loading...
Returns
result
string
Loading...
Request
# Note: You can specify Starknet version in the URL path
# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6
curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"latest"
]
}'// Note: You can specify Starknet version in the URL path
// Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6
const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
const raw = JSON.stringify({
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"latest"
]
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
# Note: You can specify Starknet version in the URL path
# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6
import requests
import json
url = "https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8"
payload = json.dumps({
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"latest"
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# Note: You can specify Starknet version in the URL path
# Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6
require "uri"
require "json"
require "net/http"
url = URI("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getStorageAt",
"params": [
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"latest"
]
})
response = http.request(request)
puts response.read_body
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free