starknet_getClassHashAt

Get the contract class hash in the given block for the contract deployed at the given address

Parameters

Object NameRequiredTypeDetail
BLOCK PARAMETERString"block_hash", "block_number", "latest", "pending"
CONTRACT ADDRESSStringThe address of the contract whose class hash will be returned
"params": [
    {
        "block_number": 49896
    },
    "0x0533edf603f434013aaaac1b843588db6fe19f4dee5a4302e3596a35fbe22c49"
]

Result

The class hash of the given contract

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "starknet_getClassHashAt",
    "params": [
        {
            "block_number": 49896
        },
        "0x0533edf603f434013aaaac1b843588db6fe19f4dee5a4302e3596a35fbe22c49"
    ]
}
'

Return

{
    "jsonrpc": "2.0",
    "result": "0x601407cf04ab1fbab155f913db64891dc749f4343bc9e535bd012234a46dc61",
    "id": 1
}
Language
Click Try It! to start a request and see the response here!