get_code
Scalar function
Retrieves deployed EVM bytecode via eth_getCode, returning NULL for EOAs or pre-deploy addresses.
get_code(TRANSPORT, ADDRESS)
Returns the latest deployed bytecode for an address without a block tag.
1
SELECT get_code(
2
$transport, -- transport
3
'0x4200000000000000000000000000000000000006'::address -- Base WETH
4
) AS code;
Notebook ready in readonly mode.
get_code(TRANSPORT, ADDRESS, BIGINT)
Returns the deployed bytecode at a specific block height for reproducible historical replay.
Returns
| Name | Type |
|---|---|
| code | BYTES |
1
SELECT get_code(
2
$transport, -- transport
3
'0x4200000000000000000000000000000000000006'::address, -- Base WETH
4
4200000 -- block_number
5
) AS code;
Notebook ready in readonly mode.