Skip to content

ABIArrayStaticType

Defined in: packages/abi/src/abi-type.ts:598

A static-length array ABI type.

new ABIArrayStaticType(childType, length): ABIArrayStaticType

Defined in: packages/abi/src/abi-type.ts:604

Creates a new static array type.

ABIType

The type of the array elements

number

The fixed length of the array

ABIArrayStaticType

ABIType.constructor

readonly childType: ABIType

Defined in: packages/abi/src/abi-type.ts:605

The type of the array elements


readonly length: number

Defined in: packages/abi/src/abi-type.ts:606

The fixed length of the array

get displayName(): string

Defined in: packages/abi/src/abi-type.ts:49

Returns a user-friendly display name for this type.

string

The display name for this type

ABIType.displayName


get name(): string

Defined in: packages/abi/src/abi-type.ts:614

Returns the ARC-4 type name string representation.

string

The ARC-4 type string

ABIType.name

byteLen(): number

Defined in: packages/abi/src/abi-type.ts:626

Gets the byte length of the encoded type for static types.

number

The number of bytes needed to encode this type

Error if the type is dynamic

ABIType.byteLen


decode(bytes): Uint8Array<ArrayBufferLike> | ABIValue[]

Defined in: packages/abi/src/abi-type.ts:652

Decodes bytes according to this ABI type.

Uint8Array

The bytes to decode

Uint8Array<ArrayBufferLike> | ABIValue[]

The decoded value

ABIType.decode


encode(value): Uint8Array

Defined in: packages/abi/src/abi-type.ts:641

Encodes a value according to this ABI type.

ABIValue

The value to encode

Uint8Array

The encoded bytes

ABIType.encode


equals(other): boolean

Defined in: packages/abi/src/abi-type.ts:618

Checks if this ABI type is equal to another.

ABIType

The other ABI type to compare with

boolean

True if the types are equal, false otherwise

ABIType.equals


isDynamic(): boolean

Defined in: packages/abi/src/abi-type.ts:622

Checks if this ABI type is dynamic (variable-length).

boolean

True if the type is dynamic, false otherwise

ABIType.isDynamic


toABITupleType(): ABITupleType

Defined in: packages/abi/src/abi-type.ts:637

Converts this static array type to an equivalent tuple type.

ABITupleType

The equivalent tuple type


toString(): string

Defined in: packages/abi/src/abi-type.ts:57

Returns the ARC-4 type name string representation.

string

The ARC-4 type string

ABIType.toString


static from(str): ABIType

Defined in: packages/abi/src/abi-type.ts:100

Creates an ABI type from an ARC-4 type string.

string

The ARC-4 type string (e.g., “uint256”, “bool”, “(uint8,address)“)

ABIType

The corresponding ABI type

ABIType.from