starknet_getClassHashAt RPC Method
Parameters
block_id
string
REQUIRED
Loading...
contract_address
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_getClassHashAt",
"params": [
"latest",
"0x066733193503019e4e9472f598ff32f15951a0ddb8fb5001f0beaa8bd1fb6840"
]
}'// 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_getClassHashAt",
"params": [
"latest",
"0x066733193503019e4e9472f598ff32f15951a0ddb8fb5001f0beaa8bd1fb6840"
]
});
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_getClassHashAt",
"params": [
"latest",
"0x066733193503019e4e9472f598ff32f15951a0ddb8fb5001f0beaa8bd1fb6840"
]
})
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_getClassHashAt",
"params": [
"latest",
"0x066733193503019e4e9472f598ff32f15951a0ddb8fb5001f0beaa8bd1fb6840"
]
})
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