> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# starknet_getClassAt

> Returns the contract class definition of the specified contract class address in the specified block.

### Parameters

<ParamField query="chainId" type="string" default="starknet-sepolia" required>
  Unique identifier for a blockchain network.
</ParamField>

<ParamField body="id" type="number" default={1} required>
  Request identifier used to match responses.
</ParamField>

<ParamField body="jsonrpc" type="string" default="2.0" required>
  JSON-RPC version.
</ParamField>

<ParamField body="method" type="string" default="starknet_getClassAt" required>
  JSON-RPC method name.
</ParamField>

<ParamField body="params" type="object" default={{"block_id":{"block_hash":"0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"},"contract_address":"0x03b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558"}} placeholder="{&#x22;block_id&#x22;:{&#x22;block_hash&#x22;:&#x22;0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4&#x22;},&#x22;contract_address&#x22;:&#x22;0x03b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558&#x22;}" required>
  Parameters for starknet\_getNonce: \[block\_id, contract\_address].

  Parameters for <code>starknet\_getClassAt</code>:

  <ul>
    <li><code>params.block\_id</code>: BlockID object containing hash and number.</li>
    <li><code>params.contract\_address</code>: The address of the request contract.</li>
  </ul>
</ParamField>

### Returns

<ResponseField name="result" type="object">
  Contract class object.

  <Expandable title="properties">
    <ResponseField name="abi" type="array">
      The class ABI, as supplied by the user declaring the class.

      <Expandable title="items">
        <ResponseField name="items[]" type="object">
          ABI entry object.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="contract_class_version" type="string">
      Version of the contract class object.
    </ResponseField>

    <ResponseField name="entry_points_by_type" type="object">
      Entry points by type.

      <Expandable title="properties">
        <ResponseField name="constructor" type="array">
          List of constructor entry points.

          <Expandable title="items">
            <ResponseField name="items[]" type="object">
              <Expandable title="properties">
                <ResponseField name="selector" type="string" />

                <ResponseField name="offset" type="string" />
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="external" type="array">
          List of external entry points.

          <Expandable title="items">
            <ResponseField name="items[]" type="object">
              <Expandable title="properties">
                <ResponseField name="selector" type="string" />

                <ResponseField name="offset" type="string" />
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="l1_handler" type="array">
          List of L1 handler entry points.

          <Expandable title="items">
            <ResponseField name="items[]" type="object">
              <Expandable title="properties">
                <ResponseField name="selector" type="string" />

                <ResponseField name="offset" type="string" />
              </Expandable>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sierra_program" type="array">
      List of Sierra instructions of which the program consists.

      <Expandable title="items">
        <ResponseField name="items[]" type="string" />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Curl theme={null}
  curl --request POST \
    --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
    --header 'content-type: application/json' \
    --data '{
      "id": 1,
      "jsonrpc": "2.0",
      "method": "starknet_getClassAt",
      "params": {
        "block_id": {
          "block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
        },
        "contract_address": "0x03b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "abi": "[{\"type\": \"impl\", \"name\": \"ISTARKSImpl\", \"interface_name\": \"ins::ins::ISTARKS\"}, {\"type\": \"interface\", \"name\": \"ins::ins...",
      "contract_class_version": "0.1.0",
      "entry_points_by_type": {
        "CONSTRUCTOR": [
          {
            "__truncated": true
          }
        ],
        "EXTERNAL": [
          {
            "__truncated": true
          },
          {
            "__truncated": true
          }
        ],
        "L1_HANDLER": []
      },
      "sierra_program": [
        "0x1",
        "0x3",
        "0x0",
        "0x361",
        "..."
      ]
    }
  }
  ```
</ResponseExample>
