Saltar al contenido principal

eth_getCode

Returns code at a given contract address

Params

(2)

1. address (required)

string
Match pattern:
^0x[0-9,a-f,A-F]{40}$

2. blockNumber (required)

(one of)
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$

Result

(bytes)
string
Match pattern:
^0x[0-9a-f]*$

Examples

Request

curl -X POST --data \
'{
"method": "eth_getCode",
"params": [
"0x1e6309dc46a2a4936abda54b69c91d7a3c75a39e"
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
localhost:12539

Result

"0x"

Endpoint

Params

address

blockNumber


Request

curl -X POST --data \
'{
"method": "eth_getCode",
"params": [
null,
null
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
https://evmtestnet.confluxrpc.com