deploySmartAccount

Deployes a smart account via a dummy transaction.

Example

import { deploySmartAccount } from "thirdweb";
const account = await deploySmartAccount({
smartAccount,
chain,
client,
accountContract,
});
function deploySmartAccount(args: {
accountContract: Readonly<ContractOptions<[], string>>;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
smartAccount: Account;
}): Promise<
| undefined
| {
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
maxBlocksWaitTime?: number;
readonly transactionHash: `0x${string}`;
}
>;

Parameters

Arguments for the deployment.

Type

let args: {
accountContract: Readonly<ContractOptions<[], string>>;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
smartAccount: Account;
};

Returns

let returnType: Promise<
| undefined
| {
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
maxBlocksWaitTime?: number;
readonly transactionHash: `0x${string}`;
}
>;