Type Alias ContractFunctionAsync<T, TABIFunction>

ContractFunctionAsync<T, TABIFunction>: ((...args: [...Partial<{
    comment: string;
    value: number;
}>, ...AbiParametersToPrimitiveTypes<TABIFunction["inputs"], "inputs">]) => Promise<T>)

Represents a generic contract function type that accepts an arbitrary number of arguments and returns a promise that resolves to a generic type T. This type is typically used to model the behavior of smart contract functions in a blockchain context.

Type Parameters

  • T = unknown

    The expected return type of the promise. Defaults to unknown if not specified.

  • TABIFunction

Type declaration

    • (...args): Promise<T>
    • Parameters

      • Rest...args: [...Partial<{
            comment: string;
            value: number;
        }>, ...AbiParametersToPrimitiveTypes<TABIFunction["inputs"], "inputs">]

        An array of arguments that the contract function accepts. The types of these arguments are not specified, allowing for flexibility in function signatures.

      Returns Promise<T>

      A promise that resolves to the type T, representing the result of the contract function execution.