starknet_getClassAt | Starknet

πŸ“˜

Starknet OpenRPC spec

For the latest version of the publicly maintained OpenRPC spec, see the Starknet specs GitHub repo.

Starknet API method that returns the class of a contract at a given address.

It provides the class of a contract at a specific address. This is useful for clients or wallets to inspect the class of a contract, which can provide information about the contract's functionality and behavior.

πŸ‘

Get you own node endpoint today

Start 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 string of the address of the contract.

Response

  • class β€” the class of the contract at the given address.

Use case

A practical use case for starknet_getClassAt is to retrieve the class of a specific contract. For example, a wallet may use this method to display the class of a contract to a user, or a client may use it to verify the class of a contract before interacting with it.

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:

curl 'https://alpha-mainnet.starknet.io/feeder_gateway/get_full_contract?contractAddress=0x073314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82'
Language
Click Try It! to start a request and see the response here!