prepareDirectDeployTransaction

Prepares a direct deploy transaction with ABI.

Example

import { prepareDirectDeployTransaction } from "thirdweb/deploys";
import { ethereum } from "thirdweb/chains";
const tx = prepareDirectDeployTransaction({
client,
chain: ethereum,
bytecode: "0x...",
constructorAbi: {
inputs: [{ type: "uint256", name: "value" }],
type: "constructor",
},
constructorParams: [123],
});
function prepareDirectDeployTransaction(options: {
abi: Abi;
bytecode: `0x${string}`;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
constructorParams?: Record<string, unknown>;

Parameters

The options for preparing the transaction.

Type

let options: {
abi: Abi;
bytecode: `0x${string}`;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
constructorParams?: Record<string, unknown>;
};

Returns

let returnType: PreparedTransaction<
[],
AbiFunction,
>;
  • The prepared transaction.