Deploy a contract on a given chain
import { deployContract } from "thirdweb/deploys"; const address = await deployContract({ client, chain, bytecode: "0x...", abi: contractAbi, constructorParams: { param1: "value1", param2: 123, }, salt, // optional: salt enables deterministic deploys});
import { deployContract } from "thirdweb/deploys"; const address = await deployContract({ client, chain, bytecode: "0x...", abi: contractAbi, constructorParams: { param1: "value1", param2: 123, }, salt, // passing a salt will enable deterministic deploys});
function deployContract( options: { abi: Abi; bytecode: `0x${string}`; chain: Readonly; constructorParams?: Record<string, unknown>; extraDataWithUri?: string; } & { extraDataWithUri?: `0x${string}`; isStylus?: boolean; salt?: string; },): Promise<string>;
the deploy options
let options: { abi: Abi; bytecode: `0x${string}`; chain: Readonly; constructorParams?: Record<string, unknown>; extraDataWithUri?: string;} & { extraDataWithUri?: `0x${string}`; isStylus?: boolean; salt?: string;};