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

# eth_getCode

Returns code at a given address

### Body

<ParamField body="id" type="number" placeholder="1">
  Serves as a unique identifier for the request
</ParamField>

<ParamField body="jsonrpc" type="string" placeholder="2.0">
  Indicates the version of JSON-RPC being used
</ParamField>

<ParamField body="method" type="string" placeholder="eth_getCode">
  Represents the name of the remote procedure or method to be called
</ParamField>

<ParamField body="params" type="array">
  Contains the list of parameters passed to the remote method

  <ParamField body="address" type="string">
    A string representing the address (20 bytes) of the code
  </ParamField>

  <ParamField body="block" type="string">
    A hexadecimal block number, or the string "latest", "earliest" or "pending" or the hash (32 bytes) of a block
  </ParamField>
</ParamField>

### Response

<ResponseField name="id" type="number">
  Returns unique identifier for the request
</ResponseField>

<ResponseField name="jsonrpc" type="string">
  Returns the version of JSON-RPC being used
</ResponseField>

<ResponseField name="code" type="string">
  A hex of the code from the given address
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl  'https://rpc1.aries.axiomesh.io' \
  --header 'Content-Type: application/json' \
  --data '{
      "jsonrpc": "2.0",
      "method": "eth_getCode",
      "params": ["0x4cd8ee4fc57c51d8af5b6b6a08cc441f2b4fcbfe","latest"],
      "id": 1
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "jsonrpc": "2.0",
      "id": 1,
      "result": "0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c80634000e4f61461004357806395bc26731461005f578063d1ed74ad1461007b575b5f80fd5b61005d6004803603810190610058919061012a565b6100ab565b005b61007960048036038101906100749190610168565b6100c4565b005b61009560048036038101906100909190610168565b6100da565b6040516100a291906101a2565b60405180910390f35b805f808481526020019081526020015f20819055505050565b5f808281526020019081526020015f205f905550565b5f805f8381526020019081526020015f20549050919050565b5f80fd5b5f819050919050565b610109816100f7565b8114610113575f80fd5b50565b5f8135905061012481610100565b92915050565b5f80604083850312156101405761013f6100f3565b5b5f61014d85828601610116565b925050602061015e85828601610116565b9150509250929050565b5f6020828403121561017d5761017c6100f3565b5b5f61018a84828501610116565b91505092915050565b61019c816100f7565b82525050565b5f6020820190506101b55f830184610193565b9291505056fea2646970667358221220437081030a95ec1b93d76fa792d493ac78419902766526d0577c07f751022b0a64736f6c63430008140033"
  }
  ```
</ResponseExample>
