get_code
Table function
Retrieves deployed EVM bytecode through eth_getCode, yielding 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 code
2
FROM get_code(
3
$transport, -- transport
4
'0x4200000000000000000000000000000000000006'::address -- Base WETH
5
)
6
WHERE code IS NOT NULL;
Notebook ready in readonly mode.
get_code(TRANSPORT, ADDRESS, BIGINT)
Returns the deployed bytecode at a specific block height for reproducible historical replay.
1
SELECT code
2
FROM get_code(
3
$transport, -- transport
4
'0x4200000000000000000000000000000000000006'::address, -- Base WETH
5
4200000 -- block_number
6
);
Notebook ready in readonly mode.