Function fetchViewFunctionAbi

  • Fetches the ABI for a view function from the specified module address. This function ensures that the ABI is valid and retrieves the type parameters, parameters, and return types for the view function.

    Parameters

    • moduleAddress: string

      The address of the module containing the view function.

    • moduleName: string

      The name of the module containing the view function.

    • functionName: string

      The name of the view function for which to fetch the ABI.

    • aptosConfig: AptosConfig

      The configuration settings for Aptos.

    Returns Promise<ViewFunctionABI>

    An object containing the type parameters, parameters, and return types of the view function.

    Error if the ABI cannot be found or if the function is not a view function.