Class: RPCResponseParser
Implements​
Omit
<ResponseParser
,"parseDeclareContractResponse"
|"parseDeployContractResponse"
|"parseInvokeFunctionResponse"
|"parseGetTransactionReceiptResponse"
|"parseGetTransactionResponse"
|"parseCallContractResponse"
>
Constructors​
constructor​
• new RPCResponseParser(margin?
): RPCResponseParser
Parameters​
Name | Type |
---|---|
margin? | Object |
margin.l1BoundMaxAmount | number |
margin.l1BoundMaxPricePerUnit | number |
margin.maxFee | number |
Returns​
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​
Name | Type |
---|---|
estimatedFee | BigNumberish |
Returns​
bigint
Defined in​
src/utils/responseParser/rpc.ts:42
estimateFeeToBounds​
â–¸ estimateFeeToBounds(estimate
): RESOURCE_BOUNDS_MAPPING
Parameters​
Name | Type |
---|---|
estimate | 0n | { unit : "WEI" | "FRI" ; gas_consumed : string ; gas_price : string ; overall_fee : string ; data_gas_consumed : undefined | string ; data_gas_price : undefined | string } |
Returns​
Defined in​
src/utils/responseParser/rpc.ts:46
parseGetBlockResponse​
â–¸ parseGetBlockResponse(res
): GetBlockResponse
Parameters​
Name | Type |
---|---|
res | BlockWithTxHashes |
Returns​
Implementation of​
Omit.parseGetBlockResponse
Defined in​
src/utils/responseParser/rpc.ts:54
parseTransactionReceipt​
â–¸ parseTransactionReceipt(res
): GetTxReceiptResponseWithoutHelper
Parameters​
Name | Type |
---|---|
res | TransactionReceipt |
Returns​
GetTxReceiptResponseWithoutHelper
Defined in​
src/utils/responseParser/rpc.ts:58
parseFeeEstimateResponse​
â–¸ parseFeeEstimateResponse(res
): EstimateFeeResponse
Parameters​
Name | Type |
---|---|
res | { unit : "WEI" | "FRI" ; gas_consumed : string ; gas_price : string ; overall_fee : string ; data_gas_consumed : undefined | string ; data_gas_price : undefined | string }[] |
Returns​
Implementation of​
Omit.parseFeeEstimateResponse
Defined in​
src/utils/responseParser/rpc.ts:74
parseFeeEstimateBulkResponse​
â–¸ parseFeeEstimateBulkResponse(res
): EstimateFeeResponseBulk
Parameters​
Name | Type |
---|---|
res | { unit : "WEI" | "FRI" ; gas_consumed : string ; gas_price : string ; overall_fee : string ; data_gas_consumed : undefined | string ; data_gas_price : undefined | string }[] |
Returns​
Defined in​
src/utils/responseParser/rpc.ts:88
parseSimulateTransactionResponse​
â–¸ parseSimulateTransactionResponse(res
): SimulateTransactionResponse
Parameters​
Name | Type |
---|---|
res | any |
Returns​
Implementation of​
Omit.parseSimulateTransactionResponse
Defined in​
src/utils/responseParser/rpc.ts:101
parseContractClassResponse​
â–¸ parseContractClassResponse(res
): ContractClassResponse
Parameters​
Name | Type |
---|---|
res | ContractClassPayload |
Returns​
Defined in​
src/utils/responseParser/rpc.ts:118
parseL1GasPriceResponse​
â–¸ parseL1GasPriceResponse(res
): string
Parameters​
Name | Type |
---|---|
res | BlockWithTxHashes |
Returns​
string