Each input and output of a [[Fragment]] is an Array of ParamType.

Constructors

  • Private

    Parameters

    • guard: any
    • name: string
    • type: string
    • baseType: string
    • indexed: boolean
    • components: readonly ParamType[]
    • arrayLength: number
    • arrayChildren: ParamType

    Returns ParamType

Properties

#private: any
arrayChildren: ParamType

The type of each child in the array.

For non-array types this is null.

arrayLength: number

The array length, or -1 for dynamic-lengthed arrays.

For non-array types this is null.

baseType: string

The base type (e.g. "address", "tuple", "array")

components: readonly ParamType[]

The components for the tuple.

For non-tuple types this is null.

indexed: boolean

True if the parameters is indexed.

For non-indexable types this is null.

name: string

The local name of the parameter (or "" if unbound)

type: string

The fully qualified type (e.g. "address", "tuple(address)", "uint256[3][]")

Methods

  • Return a string representation of this type.

    For example,

    sighash" => "(uint256,address)"

    "minimal" => "tuple(uint256,address) indexed"

    "full" => "tuple(uint256 foo, address bar) indexed baz"

    Parameters

    Returns string

  • Returns true if %%this%% is an Array type.

    This provides a type gaurd ensuring that [[arrayChildren]] and [[arrayLength]] are non-null.

    Returns boolean

  • Returns true if %%this%% is an Indexable type.

    This provides a type gaurd ensuring that [[indexed]] is non-null.

    Returns boolean

  • Returns true if %%this%% is a Tuple type.

    This provides a type gaurd ensuring that [[components]] is non-null.

    Returns boolean

  • Walks the ParamType with %%value%%, calling %%process%% on each type, destructing the %%value%% recursively.

    Parameters

    Returns any

  • Walks the ParamType with %%value%%, asynchronously calling %%process%% on each type, destructing the %%value%% recursively.

    This can be used to resolve ENS names by walking and resolving each "address" type.

    Parameters

    Returns Promise<any>

  • Creates a new ParamType for %%obj%%.

    If %%allowIndexed%% then the indexed keyword is permitted, otherwise the indexed keyword will throw an error.

    Parameters

    • obj: any
    • Optional allowIndexed: boolean

    Returns ParamType

  • Returns true if %%value%% is a ParamType.

    Parameters

    • value: any

    Returns value is ParamType

Generated using TypeDoc