createModularAccountV2
Creates a ModularAccount V2 account, with the mode depending on the provided “mode” field. Possible modes include: “default”, which is SMA Bytecode, and “7702”, which is SMA 7702. Handles nonce generation, transaction encoding, and mode variant-specific behavior like initcode construction.
Import
Usage
Parameters
config
CreateModularAccountV2Params
Configuration parameters for creating a Modular Account V2.
Returns
Promise<ModularAccountV2>
A promise that resolves to an ModularAccountV2
providing methods for nonce retrieval, transaction execution, and more.