Skip to content
Alchemy Logo

predictModularAccountV2Address

function predictModularAccountV2Address(params): `0x${string}`;

Defined in: packages/smart-accounts/src/ma-v2/predictAddress.ts:56

Predicts the address of a modular account V2 based on the provided parameters, which include factory address, salt, and implementation address. This function supports different types of accounts including "SMA" and "MA".

import { predictModularAccountV2Address } from "@alchemy/smart-accounts";
 
const accountAddress = predictModularAccountV2Address({
  factoryAddress: "0xFactoryAddress" as Address,
  implementationAddress: "0xImplementation" as Address,
  salt: 0n,
  type: "SMA",
  ownerAddress: "0xOwner" as Address,
});

ParameterTypeDescription

params

PredictModularAccountV2AddressParams

The parameters for predicting the modular account address, including factoryAddress, salt, implementationAddress, and additional properties based on the account type.

`0x${string}`

The predicted address for the modular account V2.

Was this page helpful?