predictAddress

Predict the address of a smart account.

Example

import { predictAddress } from "thirdweb/wallets/smart";
const predictedAddress = await predictAddress({
factoryContract,
adminAddress,
accountSalt,
});
function predictAddress(args: {
accountAddress?: string;
accountSalt?: string;
adminAddress: string;
factoryContract: Readonly<ContractOptions<[]>>;
predictAddressOverride?: (
factoryContract: Readonly<ContractOptions<[]>>,
admin: string,
) => Promise<string>;
}): Promise<string>;

Parameters

The options for predicting the address of a smart account.

Type

let args: {
accountAddress?: string;
accountSalt?: string;
adminAddress: string;
factoryContract: Readonly<ContractOptions<[]>>;
predictAddressOverride?: (
factoryContract: Readonly<ContractOptions<[]>>,
admin: string,
) => Promise<string>;
};

Returns

let returnType: Promise<string>;

The predicted address of the smart account.