eth_getCode
Is essential for developers to inspect and verify contract code deployed on the Ethereum blockchain
Request
Examples
curl https://rpc.xone.org \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_getCode","params":["0x5B56438000bAc5ed2c6E0c1EcFF4354aBfFaf889","latest"],"id":1,"jsonrpc":"2.0"}'
'
Response
200 OK
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
Request params
Name | Type | Description |
---|---|---|
id | integer | Request identifier |
jsonrpc | string | JSON-RPC version |
method | string | API method name |
Parameters | array of strings | |
address | string | |
blockNumber | string | The block number or tag ("latest", "earliest", "pending") at which to get the balance. |
Response
200
The smart contract code (EVM bytecode) stored at the specified address, returned as a hexadecimal string.Name | Type | Description |
---|---|---|
Parameters | object | |
id | integer | |
jsonrpc | string | |
result | string |