eth_getCode

Returns code at a given address.

Request

curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
    -X POST \
    -H 'x-amberdata-blockchain-id: ethereum-mainnet' \
    -d '{"jsonrpc":"2.0","id":1,"method":"eth_getCode","params":["0x06012c8cf97bead5deae237070f9587f8e7a266d","0x65a8db"]}'

Index

Description

0 - address

The address.

1 - blockNumber

The integer of a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.

Response

{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x6060604052600436106102a5576..."
}

Field

Description

result

The code from the given address.