eth_getCode

Retrieves the bytecode of a smart contract at the specified address.

Example

import { getRpcClient, eth_getCode } from "thirdweb/rpc";
const rpcRequest = getRpcClient({ client, chain });
const bytecode = await eth_getCode(rpcRequest, {
address: "0x...",
});

Parameters

Returns

A promise that resolves to the bytecode of the smart contract.