Skip to main content

eth_getCode

Returns the bytecode at a given address on Arbitrum.

Why Arbitrum? Build on Ethereum's leading Layer 2 with 46% L2 market share and $12B+ TVL with full EVM compatibility, 1.5M daily transactions, and $3B+ DAO treasury for ecosystem growth.

Use Cases#

The eth_getCode method is essential for:

  • Contract verification - Check if address is a contract
  • Security analysis - Verify deployed bytecode matches expected
  • DeFi integrations - Validate contracts before interactions
  • Protocol analysis - Analyze contract deployments for high-volume DeFi (GMX, Uniswap, Aave), gaming, and cross-chain applications

Parameters#

ParameterTypeRequiredDescription
addressDATAYes20-byte address
blockParameterQUANTITY|TAGYesBlock number or tag

Request#

{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0x13867a801e352e219c2d2AC29288Bf086e5C81ef",
"latest"
],
"id": 1
}

Returns#

TypeDescription
DATAContract bytecode or 0x if EOA

Code Examples#

curl -X POST https://api-arbitrum-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0x13867a801e352e219c2d2AC29288Bf086e5C81ef",
"latest"
],
"id": 1
}'