Skip to main content
Version: Next

Class: AbiParser2

Abi parser interface

Implements

Constructors

constructor

new AbiParser2(abi, parsingStrategy?): AbiParser2

Parameters

NameType
abiAbi
parsingStrategy?ParsingStrategy

Returns

AbiParser2

Defined in

src/utils/calldata/parser/parser-2.0.0.ts:18

Properties

abi

abi: Abi

Defined in

src/utils/calldata/parser/parser-2.0.0.ts:14


parsingStrategy

parsingStrategy: ParsingStrategy

Defined in

src/utils/calldata/parser/parser-2.0.0.ts:16

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-2.0.0.ts:23


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-2.0.0.ts:30


methodInputsLength

methodInputsLength(abiMethod): number

abi method inputs length

Parameters

NameTypeDescription
abiMethodFunctionAbiFunctionAbi

Returns

number

number

Implementation of

AbiParserInterface.methodInputsLength

Defined in

src/utils/calldata/parser/parser-2.0.0.ts:42


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-2.0.0.ts:51


getLegacyFormat

getLegacyFormat(): Abi

Get Abi in legacy format

Returns

Abi

Abi

Implementation of

AbiParserInterface.getLegacyFormat

Defined in

src/utils/calldata/parser/parser-2.0.0.ts:62