Skip to content

ParamType

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:108

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

readonly arrayChildren: null | ParamType;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:146

The type of each child in the array.

For non-array types this is null.


readonly arrayLength: null | number;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:140

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

For non-array types this is null.


readonly baseType: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:122

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


readonly components: null | readonly ParamType[];

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:134

The components for the tuple.

For non-tuple types this is null.


readonly indexed: null | boolean;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:128

True if the parameters is indexed.

For non-indexable types this is null.


readonly name: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:113

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


readonly type: string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:118

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

format(format?): string;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:162

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"

ParameterType
format?FormatType

string


isArray(): this is ParamType & { arrayChildren: ParamType; arrayLength: number };

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:169

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

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

this is ParamType & { arrayChildren: ParamType; arrayLength: number }


isIndexable(): this is ParamType & { indexed: boolean };

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:188

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

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

this is ParamType & { indexed: boolean }


isTuple(): this is ParamType & { components: readonly ParamType[] };

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:179

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

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

this is ParamType & { components: readonly ParamType[] }


walk(value, process): any;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:195

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

ParameterType
valueany
processParamTypeWalkFunc

any


walkAsync(value, process): Promise<any>;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:203

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.

ParameterType
valueany
processParamTypeWalkAsyncFunc

Promise<any>


static from(obj, allowIndexed?): ParamType;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:210

Creates a new ParamType for %%obj%%.

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

ParameterType
objany
allowIndexed?boolean

ParamType


static isParamType(value): value is ParamType;

Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/abi/fragments.d.ts:214

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

ParameterType
valueany

value is ParamType