ReceiptsManager
Constructors
new ReceiptsManager()
new ReceiptsManager(
mapDb
,chain
):ReceiptsManager
Parameters
• mapDb: MapDb
• chain: Chain
Returns
Defined in
Properties
chain
readonly
chain:Chain
Defined in
GET_LOGS_BLOCK_RANGE_LIMIT
GET_LOGS_BLOCK_RANGE_LIMIT:
number
=2500
Block range limit for getLogs
Defined in
GET_LOGS_LIMIT
GET_LOGS_LIMIT:
number
=10000
Limit of logs to return in getLogs
Defined in
GET_LOGS_LIMIT_MEGABYTES
GET_LOGS_LIMIT_MEGABYTES:
number
=150
Size limit for the getLogs response in megabytes
Defined in
mapDb
readonly
mapDb:MapDb
Defined in
Methods
deepCopy()
deepCopy(
chain
):ReceiptsManager
Parameters
• chain: Chain
Returns
Defined in
deleteReceipts()
deleteReceipts(
block
):Promise
<void
>
Parameters
• block: Block
Returns
Promise
<void
>
Defined in
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
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
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
getReceipts(blockHash, calcBloom, includeTxType)
getReceipts(
blockHash
,calcBloom
?,includeTxType
?):Promise
<TxReceipt
[]>
Parameters
• blockHash: Uint8Array
• calcBloom?: boolean
• includeTxType?: false
Returns
Promise
<TxReceipt
[]>
Defined in
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
>