Skip to main content
Version: Next

Class: AbiParser1

Abi parser interface

Implements

Constructors

constructor

new AbiParser1(abi, parsingStrategy?): AbiParser1

Parameters

NameType
abiAbi
parsingStrategy?ParsingStrategy

Returns

AbiParser1

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:11

Properties

abi

abi: Abi

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:7


parsingStrategy

parsingStrategy: ParsingStrategy

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:9

Methods

getRequestParser

getRequestParser(abiType): (val: unknown) => any

Get request parser for the given abi type

Parameters

NameTypeDescription
abiTypestringAbiEntryType

Returns

fn

Parser function

▸ (val): any

Parameters
NameType
valunknown
Returns

any

Implementation of

AbiParserInterface.getRequestParser

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:16


getResponseParser

getResponseParser(abiType): (responseIterator: Iterator<string, any, undefined>) => any

Get response parser for the given abi type

Parameters

NameTypeDescription
abiTypestringAbiEntryType

Returns

fn

Parser function

▸ (responseIterator): any

Parameters
NameType
responseIteratorIterator<string, any, undefined>
Returns

any

Implementation of

AbiParserInterface.getResponseParser

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:23


methodInputsLength

methodInputsLength(abiMethod): number

abi method inputs length without '_len' inputs cairo 0 reducer

Parameters

NameTypeDescription
abiMethodFunctionAbiFunctionAbi

Returns

number

number

Implementation of

AbiParserInterface.methodInputsLength

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:36


getMethod

getMethod(name): undefined | FunctionAbi

get method definition from abi

Parameters

NameTypeDescription
namestringstring

Returns

undefined | FunctionAbi

FunctionAbi | undefined

Implementation of

AbiParserInterface.getMethod

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:45


getLegacyFormat

getLegacyFormat(): Abi

Get Abi in legacy format

Returns

Abi

Abi

Implementation of

AbiParserInterface.getLegacyFormat

Defined in

src/utils/calldata/parser/parser-0-1.1.0.ts:53