Skip to main content
Version: 6.11.0

Class: RPCResponseParser

Implements​

  • Omit<ResponseParser, "parseDeclareContractResponse" | "parseDeployContractResponse" | "parseInvokeFunctionResponse" | "parseGetTransactionReceiptResponse" | "parseGetTransactionResponse" | "parseCallContractResponse">

Constructors​

constructor​

• new RPCResponseParser(margin?): RPCResponseParser

Parameters​

NameType
margin?Object
margin.l1BoundMaxAmountnumber
margin.l1BoundMaxPricePerUnitnumber
margin.maxFeenumber

Returns​

RPCResponseParser

Defined in​

src/utils/responseParser/rpc.ts:38

Properties​

margin​

• Private margin: undefined | { l1BoundMaxAmount: number ; l1BoundMaxPricePerUnit: number ; maxFee: number }

Defined in​

src/utils/responseParser/rpc.ts:36

Methods​

estimatedFeeToMaxFee​

â–¸ estimatedFeeToMaxFee(estimatedFee): bigint

Parameters​

NameType
estimatedFeeBigNumberish

Returns​

bigint

Defined in​

src/utils/responseParser/rpc.ts:42


estimateFeeToBounds​

â–¸ estimateFeeToBounds(estimate): RESOURCE_BOUNDS_MAPPING

Parameters​

NameType
estimate0n | { unit: "WEI" | "FRI" ; gas_consumed: string ; gas_price: string ; overall_fee: string ; data_gas_consumed: undefined | string ; data_gas_price: undefined | string }

Returns​

RESOURCE_BOUNDS_MAPPING

Defined in​

src/utils/responseParser/rpc.ts:46


parseGetBlockResponse​

â–¸ parseGetBlockResponse(res): GetBlockResponse

Parameters​

NameType
resBlockWithTxHashes

Returns​

GetBlockResponse

Implementation of​

Omit.parseGetBlockResponse

Defined in​

src/utils/responseParser/rpc.ts:54


parseTransactionReceipt​

â–¸ parseTransactionReceipt(res): GetTxReceiptResponseWithoutHelper

Parameters​

NameType
resTransactionReceipt

Returns​

GetTxReceiptResponseWithoutHelper

Defined in​

src/utils/responseParser/rpc.ts:58


parseFeeEstimateResponse​

â–¸ parseFeeEstimateResponse(res): EstimateFeeResponse

Parameters​

NameType
res{ unit: "WEI" | "FRI" ; gas_consumed: string ; gas_price: string ; overall_fee: string ; data_gas_consumed: undefined | string ; data_gas_price: undefined | string }[]

Returns​

EstimateFeeResponse

Implementation of​

Omit.parseFeeEstimateResponse

Defined in​

src/utils/responseParser/rpc.ts:74


parseFeeEstimateBulkResponse​

â–¸ parseFeeEstimateBulkResponse(res): EstimateFeeResponseBulk

Parameters​

NameType
res{ unit: "WEI" | "FRI" ; gas_consumed: string ; gas_price: string ; overall_fee: string ; data_gas_consumed: undefined | string ; data_gas_price: undefined | string }[]

Returns​

EstimateFeeResponseBulk

Defined in​

src/utils/responseParser/rpc.ts:88


parseSimulateTransactionResponse​

â–¸ parseSimulateTransactionResponse(res): SimulateTransactionResponse

Parameters​

NameType
resany

Returns​

SimulateTransactionResponse

Implementation of​

Omit.parseSimulateTransactionResponse

Defined in​

src/utils/responseParser/rpc.ts:101


parseContractClassResponse​

â–¸ parseContractClassResponse(res): ContractClassResponse

Parameters​

NameType
resContractClassPayload

Returns​

ContractClassResponse

Defined in​

src/utils/responseParser/rpc.ts:118


parseL1GasPriceResponse​

â–¸ parseL1GasPriceResponse(res): string

Parameters​

NameType
resBlockWithTxHashes

Returns​

string

Defined in​

src/utils/responseParser/rpc.ts:125