JSON-RPCMethods
eth_getCode: parameters, returns and CU
Return the contract bytecode deployed at an address at a given block. See parameters, return value, CU metering and supported chains for this method.
Summary
Return the contract bytecode deployed at an address at a given block.
Compute Units (CU) and Pricing
CU per call
10 CU
Price per 1M calls (USD)
$1
Parameters
| Parameter | Type | Description |
|---|---|---|
address | ADDRESS | Account address to query. |
blockParameter | QUANTITY|TAG | Block number or tag: latest, earliest, pending, safe or finalized. |
Returns
- Type:
DATA - Description: EVM bytecode as 0x-prefixed hex; 0x for an externally owned account or when no code exists at that block.
Notes
A contract can return different code at different blocks, for example before deployment or after it is destroyed.
Request Example
curl -X POST "https://dev-api.blockvectra.network/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"<address>",
"latest"
],
"id": 1
}'Supported Chains
Supported chains:
- EthereumBeta
eth_mainnet - HyperEVM
hyperevm_mainnet - Robinhood Chain
robinhood_mainnet
Related references
eth_getBalance: parameters, returns and CU
Return the balance of an address at a given block, in wei. See parameters, return value, CU metering and supported chains for this method.
eth_getStorageAt: parameters, returns and CU
Return the raw value stored at a given storage slot of an address. See parameters, return value, CU metering and supported chains for this method.