Eth getCode

Returns code at a given address.

Request body sample: {"jsonrpc":"2.0","method":"eth_getCode","params":["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"],"id":1}

POSTeth_getCode
Body
idinteger
jsonrpcstring
methodstring
paramsnullable array of any
Response

OK

Body
idinteger
jsonrpcstring
resultstring
Request
const response = await fetch('eth_getCode', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "jsonrpc": "text",
  "result": "text"
}