A Fragment which represents a method.

Hierarchy

Constructors

  • Private

    Parameters

    • guard: any
    • name: string
    • stateMutability: "view" | "payable" | "nonpayable" | "pure"
    • inputs: readonly ParamType[]
    • outputs: readonly ParamType[]
    • gas: bigint

    Returns FunctionFragment

Properties

constant: boolean

If the function is constant (e.g. pure or view functions).

gas: bigint

The recommended gas limit to send when calling this function.

inputs: readonly ParamType[]

The inputs for the fragment.

name: string

The name of the fragment.

outputs: readonly ParamType[]

The returned types for the result of calling this function.

payable: boolean

If the function can be sent value during invocation.

stateMutability: "view" | "payable" | "nonpayable" | "pure"

The state mutability (e.g. payable, nonpayable, view or pure)

The type of the fragment.

Accessors

  • get selector(): string
  • The Function selector.

    Returns string

Methods

  • Returns a string representation of this function as %%format%%.

    Parameters

    Returns string

  • Return the selector for a function with %%name%% and %%params%%.

    Parameters

    • name: string
    • Optional params: any[]

    Returns string

  • Returns true if %%value%% is an [[ErrorFragment]].

    Parameters

    • value: any

    Returns value is ErrorFragment

  • Returns true if %%value%% is an [[EventFragment]].

    Parameters

    • value: any

    Returns value is EventFragment

  • Returns true and provides a type guard if %%value%% is a FunctionFragment.

    Parameters

    • value: any

    Returns value is FunctionFragment

  • Returns true if %%value%% is a [[StructFragment]].

    Parameters

    • value: any

    Returns value is StructFragment

Generated using TypeDoc