Contract Deployer
Deploy smart contracts from the connected wallet.
deployBuiltInContract
Deploy one of thirdweb’s prebuilt contracts.
const txResult = await sdk.deployer.deployBuiltInContract("{{contract-type}}", {
name: "My Contract",
primary_sale_recipient: "{{wallet_address}}",
voting_token_address: "{{wallet_address}}", // Only used for Vote
});
Configuration
deployPublishedContract
Deploys any published contract
const txResult = await sdk.deployer.deployPublishedContract(
"{{publisher_address_or_ens}}",
"{{contract_name}}",
[param1, param2],
);
Details
deployProxy
Deploy a proxy contract of a given implementation directly
const txResult = await sdk.deployer.deployProxy(
"{{implementation_contract_address}}",
implementationAbi,
"initialize",
[1, 2, 3],
);
Configuration
deployViaFactory
Deploy a proxy contract of a given implementation via the given factory.
const txResult = await sdk.deployer.deployViaFactory(
"{{factory_contract_address}}",
"{{implementation_contract_address}}",
implementationAbi,
"initialize",
[1, 2, 3],
);