EVM
Archive
eth_getCode
Summary: Get smart contract code
This request returns the compiled byte code of a smart contract, if any, at a given address and block.
Parameters
address
stringHex-encoded address.
Pattern: ^0x[0-9a-fA-F]{40}$
block
anyOfBlock number, block hash, or string tag.
Returns
eth_getCodeResponse
stringThe compiled byte code of the smart contract at the given address. Linea stores compiled smart contract code as a hexadecimal value.
Pattern: ^0x[0-9a-f]*$
Customize request
RequestCURL
CURL
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [],
"id": 1
}'