> ## 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.

# eth_getCode | Ronin

> The eth_getCode method returns the bytecode stored at a given address. eth_getCode JSON-RPC method available on the Ronin blockchain via Chainstack.

The `eth_getCode` method returns the bytecode stored at a given address. This method is typically used to retrieve the bytecode of smart contracts deployed on the Ronin network.

<Note>
  When called against a block older than the latest \~128 blocks, this method is treated as an archive request (2 RUs instead of 1 RU). See [request units](/docs/request-units#archive-state-methods).
</Note>

## Parameters

* `address`: The address to get the code from.
* `blockParameter` (optional): This can be a hexadecimal block number, or the strings "latest", "earliest", or "pending", indicating the state from which to get the code.

## Response

* `result`: The code at the given address, returned as a hexadecimal string.

## Use case

This method is essential for developers and tools that need to interact with or verify the bytecode of deployed contracts. It can be used for auditing, verifying contract deployments, or simply exploring the code of existing contracts on the blockchain.


## OpenAPI

````yaml openapi/ronin_node_api/eth_getCode.json POST /3997273fc956a67dc6982384500e669e
openapi: 3.0.0
info:
  title: eth_getCode
  version: 1.0.0
  description: Returns the code at a given address.
servers:
  - url: https://ronin-mainnet.core.chainstack.com
security: []
paths:
  /3997273fc956a67dc6982384500e669e:
    post:
      tags:
        - blockchain
      summary: Get code from an address
      operationId: getCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getCode
                params:
                  type: array
                  items:
                    type: string
                  default:
                    - '0x70fd02049333337a534a9383149c9a99ddf65495'
                    - latest
      responses:
        '200':
          description: Bytecode stored at the account
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````