Function uninstallModules

  • Uninstalls multiple modules from a smart account.

    Type Parameters

    • TSmartAccount extends undefined | object & Assign_<SmartAccountImplementation<Abi, EntryPointVersion, object>, {
          address: `0x${string}`;
          getNonce: ((parameters?) => Promise<bigint>);
          isDeployed: (() => Promise<boolean>);
          type: "smart";
      }> & {
          address: `0x${string}`;
          getNonce: ((parameters?) => Promise<bigint>);
          isDeployed: (() => Promise<boolean>);
          type: "smart";
      }

    Parameters

    • client: Client<Transport, undefined | Chain, TSmartAccount>

      The client instance.

    • parameters: UninstallModulesParameters<TSmartAccount>

      Parameters including the smart account, modules to uninstall, and optional gas settings.

    Returns Promise<Hex>

    The hash of the user operation as a hexadecimal string.

    Throws

    If the account is not found.

    Example

    import { uninstallModules } from '@biconomy/abstractjs'

    const userOpHash = await uninstallModules(nexusClient, {
    modules: [
    { type: 'executor', address: '0x...', context: '0x' },
    { type: 'validator', address: '0x...', context: '0x' }
    ]
    })
    console.log(userOpHash) // '0x...'