prepareDeterministicDeployTransaction

Deploy a contract deterministically - will maintain the same address across chains. This is meant to be used with published contracts configured with the 'direct deploy' method. Under the hood, this uses a keyless transaction with a common create2 factory.

Example

import { prepareDeterministicDeployTransaction } from "thirdweb/deploys";
import { sepolia } from "thirdweb/chains";
const tx = prepareDeterministicDeployTransaction({
client,
chain: sepolia,
contractId: "AccountFactory",
constructorParams: [123],
});

Parameters

Returns

  • the transaction to deploy the contract