Skip to main content
Version: 5.14.1

Namespace: cairo

Enumerations​

Functions​

isCairo1Abi​

â–¸ isCairo1Abi(abi): boolean

tells if an ABI comes from a Cairo 1 contract

Example

const isCairo1: boolean = isCairo1Abi(myAbi: Abi);

Parameters​

NameTypeDescription
abiAbirepresenting the interface of a Cairo contract

Returns​

boolean

TRUE if it is an ABI from a Cairo1 contract

Defined in​

src/utils/calldata/cairo.ts:46


felt​

â–¸ felt(it): string

felt cairo type

Parameters​

NameType
itBigNumberish

Returns​

string

Defined in​

src/utils/calldata/cairo.ts:90


isLen​

â–¸ isLen(name): boolean

Parameters​

NameType
namestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:15


isTypeFelt​

â–¸ isTypeFelt(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:16


isTypeArray​

â–¸ isTypeArray(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:17


isTypeTuple​

â–¸ isTypeTuple(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:19


isTypeNamedTuple​

â–¸ isTypeNamedTuple(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:20


isTypeStruct​

â–¸ isTypeStruct(type, structs): boolean

Parameters​

NameType
typestring
structsAbiStructs

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:21


isTypeUint​

â–¸ isTypeUint(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:22


isTypeUint256​

â–¸ isTypeUint256(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:23


isTypeBool​

â–¸ isTypeBool(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:24


isTypeContractAddress​

â–¸ isTypeContractAddress(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:25


isCairo1Type​

â–¸ isCairo1Type(type): boolean

Parameters​

NameType
typestring

Returns​

boolean

Defined in​

src/utils/calldata/cairo.ts:27


getArrayType​

â–¸ getArrayType(type): string

Parameters​

NameType
typestring

Returns​

string

Defined in​

src/utils/calldata/cairo.ts:29


uint256​

â–¸ uint256(it): Uint256

Uint256 cairo type (helper for common struct type)

Parameters​

NameType
itBigNumberish

Returns​

Uint256

Defined in​

src/utils/calldata/cairo.ts:69


tuple​

â–¸ tuple(...args): Record<number, boolean | object | BigNumberish>

unnamed tuple cairo type (helper same as common struct type)

Parameters​

NameType
...args(boolean | object | BigNumberish)[]

Returns​

Record<number, boolean | object | BigNumberish>

Defined in​

src/utils/calldata/cairo.ts:83