starknet_getClassHashAt
Starknet node API
starknet_getClassHashAt | Starknet
Starknet API method that returns the hash of the class at a given address. It provides the hash of the class at the specified address.
POST
starknet_getClassHashAt
Documentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
Starknet OpenRPC specFor the latest version of the publicly maintained OpenRPC spec, see the Starknet specs GitHub repo.
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
-
address— the address of the contract. -
block_id— the hash of the requested block, or number (height) of the requested block, or a block tag:latest— the most recent block in the blockchain and the current state of the blockchain at the most recent block. A chain reorganization is to be expected.safe— the block that received justification from the beacon chain. Although this block could be involved in a chain reorganization, it would necessitate either a coordinated attack by the majority of validators or an instance of severe propagation latency.finalized— the block accepted as canonical by more than 2/3 of the validators. A chain reorganization is extremely unlikely, and it would require at least 1/3 of the staked ETH to be burned.earliest— the earliest available or genesis blockpending— the pending state and transactions block. The current state of transactions that have been broadcast to the network but have not yet been included in a block.
Response
result— the hash of the class at the given address, represented as a hexadecimal string.
Use case
A practical use case forstarknet_getClassHashAt is to verify the type of contract deployed at a given address. This can be useful for developers to ensure that the correct contract has been deployed at the expected address.
Deprecated feeder gateway method
The feeder gateway was deprecated on December 11, 2023. Example of the call you had to make to the feeder gateway before the deprecation:Shell
Last modified on May 18, 2026