> For the complete documentation index, see [llms.txt](/llms.txt).

# `starknet_getClassHashAt`

Returns the contract class hash of the specified contract class address in the specified block.

## Parameters[​](#parameters "Direct link to Parameters")

- `block_id`: [_Required_] The block parameter object containing one of the following:  
  - `block_hash`: (string) Block hash.
  - `block_number`: (integer) Decimal block number.
  - One of the string tags `latest` or `pending`.
- `contract_address`: (string) [_Required_] The address of the requested [contract class](https://docs.starknet.io/documentation/architecture%5Fand%5Fconcepts/Smart%5FContracts/contract-classes/).

## Returns[​](#returns "Direct link to Returns")

The [class hash](https://docs.starknet.io/documentation/architecture%5Fand%5Fconcepts/Smart%5FContracts/class-hash/)of the requested contract class.

## Example[​](#example "Direct link to Example")

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://app.infura.io/).

### Request[​](#request "Direct link to Request")

- curl

```
curl https://starknet-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "starknet_getClassHashAt",
    "params": {
      "block_id": {
        "block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
      },
      "contract_address": "0x03b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558"
    },
    "id": 0
  }'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x515dd668a1798214e7ca9ec90c52e267229b8104fb296a90f20b6f70baaef53"
}

```
