Skip to main content

eth_getCode

Ethereum API

Returns code at a given address.

Params

(2)

1. Address (required)

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

2. Block

(any of)
string
Match pattern:
^0x([1-9a-f]+[0-9a-f]*|0)$

Result

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

Params

Address

Block


Request

await window.ethereum.request({
"method": "eth_getCode",
"params": [
null,
null
]
});