getContract

Creates a Thirdweb contract by combining the Thirdweb client and contract options.

Example

import { createThirdwebClient, getContract } from "thirdweb";
import { sepolia } from "thirdweb/chains";
const client = createThirdwebClient({ clientId: "..." });
const contract = getContract({
client,
chain: sepolia,
address: "0x123...",
// optional ABI
abi: [...],
});

Parameters

Returns

The Thirdweb contract.