Resolves the ABI (Application Binary Interface) from the bytecode of a contract.
import { createThirdwebClient, getContract } from "thirdweb";import { resolveAbiFromBytecode } from "thirdweb/contract";import { ethereum } from "thirdweb/chains";const client = createThirdwebClient({ clientId: "..." });const myContract = getContract({ client, address: "...", chain: ethereum,});const abi = await resolveAbiFromBytecode(myContract);
function resolveAbiFromBytecode( contract: Readonly<ContractOptions<any, `0x${string}`>>,): Promise<Abi>;
The ThirdwebContract instance.
let contract: Readonly<ContractOptions<any, `0x${string}`>>;
let returnType: readonly Array<(AbiConstructor) | (AbiError) | (AbiEvent) | (AbiFallback) | (AbiFunction) | (AbiReceive)>
The resolved ABI as a generic type.