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.
Properties
Section titled “Properties”arrayChildren
Section titled “arrayChildren”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
.
arrayLength
Section titled “arrayLength”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
.
baseType
Section titled “baseType”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"
)
components
Section titled “components”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
.
indexed
Section titled “indexed”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][]"
)
Methods
Section titled “Methods”format()
Section titled “format()”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"
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
format? | FormatType |
Returns
Section titled “Returns”string
isArray()
Section titled “isArray()”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.
Returns
Section titled “Returns”this is ParamType & { arrayChildren: ParamType; arrayLength: number }
isIndexable()
Section titled “isIndexable()”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.
Returns
Section titled “Returns”this is ParamType & { indexed: boolean }
isTuple()
Section titled “isTuple()”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.
Returns
Section titled “Returns”this is ParamType & { components: readonly ParamType[] }
walk()
Section titled “walk()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
value | any |
process | ParamTypeWalkFunc |
Returns
Section titled “Returns”any
walkAsync()
Section titled “walkAsync()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
value | any |
process | ParamTypeWalkAsyncFunc |
Returns
Section titled “Returns”Promise
<any
>
from()
Section titled “from()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
obj | any |
allowIndexed? | boolean |
Returns
Section titled “Returns”ParamType
isParamType()
Section titled “isParamType()”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.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
value | any |
Returns
Section titled “Returns”value is ParamType