Eth_getCode
Authorizations
api-keystringRequired
Body
jsonrpcstringRequiredExample:
JSON-RPC version.
2.0methodstringRequiredExample:
JSON-RPC method name.
eth_getCodeparamsstring[] · min: 2 · max: 2RequiredExample:
Parameters array with two elements:
- The address to get the code for (hex string, 0x-prefixed).
- The block number or block tag (e.g., "latest", "earliest", "pending").
["0x407d73d8a49eeb85d32cf465507dd71d507100c1","latest"]idintegerRequiredExample:
Request identifier.
1Responses
200
Contract bytecode in hex format
application/json
jsonrpcstringOptionalExample:
JSON-RPC version.
2.0idintegerOptionalExample:
Request ID.
1resultstringOptionalExample:
The contract bytecode as a hex string (0x-prefixed). Returns "0x" if no contract code is found at the address.
0x6080604052348015600f57600080fd5b5060...post
/200
Contract bytecode in hex format
Last updated