resolveAbiFromBytecode

Resolves the ABI (Application Binary Interface) from the bytecode of a contract.

Example

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>>,
): Promise<Abi>;

Parameters

The ThirdwebContract instance.

Type

let contract: Readonly<ContractOptions<any>>;

Returns

let returnType: Promise<Abi>;

The resolved ABI as a generic type.