Deploy an instance of a published contract on a given chain
import { deployPublishedContract } from "thirdweb/deploys"; const address = await deployPublishedContract({ client, chain, account, contractId: "MyPublishedContract", contractParams: { param1: "value1", param2: 123, }, publisher: "0x...", // optional, defaults to the thirdweb deployer});
import { deployPublishedContract } from "thirdweb/deploys"; const address = await deployPublishedContract({ client, chain, account, contractId: "MyPublishedContract", contractParams: { param1: "value1", param2: 123, }, publisher: "0x...", salt: "your-salt", // this will deterministically deploy the contract at the same address on all chains});
function deployPublishedContract( options: DeployPublishedContractOptions,): Promise<string>;
the deploy options
let options: { account: Account; chain: Chain; client: ThirdwebClient; contractId: string; contractParams?: Record<string, unknown>; implementationConstructorParams?: Record<string, unknown>; publisher?: string; salt?: string; version?: string;};
let returnType: Promise<string>;
a promise that resolves to the deployed contract address