Skip to content

ReceiptsManager

Constructors

new ReceiptsManager()

new ReceiptsManager(mapDb, chain): ReceiptsManager

Parameters

mapDb: MapDb

chain: Chain

Returns

ReceiptsManager

Defined in

RecieptManager.ts:125

Properties

GET_LOGS_BLOCK_RANGE_LIMIT

GET_LOGS_BLOCK_RANGE_LIMIT: number = 2500

Block range limit for getLogs

Defined in

RecieptManager.ts:142


GET_LOGS_LIMIT

GET_LOGS_LIMIT: number = 10000

Limit of logs to return in getLogs

Defined in

RecieptManager.ts:132


GET_LOGS_LIMIT_MEGABYTES

GET_LOGS_LIMIT_MEGABYTES: number = 150

Size limit for the getLogs response in megabytes

Defined in

RecieptManager.ts:137


chain

readonly chain: Chain

Defined in

RecieptManager.ts:127


mapDb

readonly mapDb: MapDb

Defined in

RecieptManager.ts:126

Methods

deepCopy()

deepCopy(chain): ReceiptsManager

Parameters

chain: Chain

Returns

ReceiptsManager

Defined in

RecieptManager.ts:144


deleteReceipts()

deleteReceipts(block): Promise<void>

Parameters

block: Block

Returns

Promise<void>

Defined in

RecieptManager.ts:160


getLogs()

getLogs(from, to, addresses?, topics?): Promise<GetLogsReturn>

Returns logs as specified by the eth_getLogs JSON RPC query parameters

Parameters

from: Block

to: Block

addresses?: Uint8Array[]

topics?: (null | Uint8Array | Uint8Array[])[] = []

Returns

Promise<GetLogsReturn>

Defined in

RecieptManager.ts:225


getReceiptByTxHash()

getReceiptByTxHash(txHash): Promise<null | GetReceiptByTxHashReturn>

Returns receipt by tx hash with additional metadata for the JSON RPC response, or null if not found

Parameters

txHash: Uint8Array

the tx hash

Returns

Promise<null | GetReceiptByTxHashReturn>

Defined in

RecieptManager.ts:204


getReceipts()

getReceipts(blockHash, calcBloom, includeTxType)

getReceipts(blockHash, calcBloom?, includeTxType?): Promise<TxReceiptWithType[]>

Returns receipts for given blockHash

Parameters

blockHash: Uint8Array

the block hash

calcBloom?: boolean

whether to calculate and return the logs bloom for each receipt (default: false)

includeTxType?: true

whether to include the tx type for each receipt (default: false)

Returns

Promise<TxReceiptWithType[]>

Defined in

RecieptManager.ts:171

getReceipts(blockHash, calcBloom, includeTxType)

getReceipts(blockHash, calcBloom?, includeTxType?): Promise<TxReceipt[]>

Parameters

blockHash: Uint8Array

calcBloom?: boolean

includeTxType?: false

Returns

Promise<TxReceipt[]>

Defined in

RecieptManager.ts:172


saveReceipts()

saveReceipts(block, receipts): Promise<void>

Saves receipts to db. Also saves tx hash indexes if within txLookupLimit, and removes tx hash indexes for one block past txLookupLimit.

Parameters

block: Block

the block to save receipts for

receipts: TxReceipt[]

the receipts to save

Returns

Promise<void>

Defined in

RecieptManager.ts:154