Function getFallbackBySelector

  • Retrieves the fallback handler for a given selector in 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: GetFallbackBySelectorParameters<TSmartAccount>

      Parameters including the smart account and optional selector.

    Returns Promise<[Hex, Hex]>

    A tuple containing the call type and address of the fallback handler.

    Throws

    If the account is not found.

    Example

    import { getFallbackBySelector } from '@biconomy/abstractjs'

    const [callType, handlerAddress] = await getFallbackBySelector(nexusClient, {
    selector: '0x12345678'
    })
    console.log(callType, handlerAddress) // '0x1' '0x...'