eth_getCodeHTTP

Returns the code stored at an address in the selected state. Empty 0x means no stored code, not proof of a particular account type. On networks using EIP-6780, SELFDESTRUCT normally preserves existing code.

Chain EthereumTransport HTTPTry-it live

How to use

  1. Pick an API key (or paste one) in the Try it panel.
  2. Fill each parameter (order = params array index).
  3. Send request — live against the gateway; counts toward daily quota.

Parameters

JSON-RPC positional arguments — order matches the array sent in params. Index badges below match array positions.

addressDATA(20B)required

Account address to inspect on the selected network.

blockQUANTITY|TAGoptional

Hex block number or tag; omitted means latest on clients following the current execution API. Send latest explicitly for compatibility. State is evaluated after that block. Historical state must remain available. Tags and finality guarantees vary by network. In Advanced JSON mode, clients supporting EIP-1898 also accept {"blockHash":"0x...","requireCanonical":true} or {"blockNumber":"0x..."}; do not combine both keys, and use requireCanonical only with blockHash.

Tags
latestearliestsafefinalizedpending
Defaultlatest

params array (shape)

eth_getCode · paramsjson
1[
2 "0xdAC17F958D2ee523a2206206994597C13D831ec7",
3 "latest"
4]

Response fields

The result row describes the complete result; other rows describe its object fields or array elements. Indented rows describe nested members. For subscriptions,params.* rows describe later notifications rather than the initial reply.

FieldTypeDescription
resultDATAStored bytecode, an EIP-7702 delegation indicator where supported, or 0x when no code is stored. This does not resolve delegated implementation code; precompiles may have no stored bytecode.