Skip to main content

eth_getCode RPC Method

Returns the compiled bytecode of a smart contract.

Updated on
Nov 23, 2026
On the /evm path, requests for a block older than the retained range return the latest state instead of an error. Use /nanoreth to query historical state. See History on /evm for details.

Parameters

address
string
REQUIRED

The address of the smart contract from which the bytecode will be obtained

blockNumber
string
REQUIRED

The block number in hexadecimal format or the tag 'latest'

Returns

result
string

The bytecode from a given address returned as a string

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free