lib
Functions
getFirstBlockForL1Block()
function getFirstBlockForL1Block(__namedParameters: GetFirstBlockForL1BlockProps): Promise<number | undefined>
This function performs a binary search to find the first L2 block that corresponds to a given L1 block number. The function returns a Promise that resolves to a number if a block is found, or undefined otherwise.
Parameters
Parameter | Type |
---|---|
__namedParameters | GetFirstBlockForL1BlockProps |
Returns
Promise
<number
| undefined
>
- A Promise that resolves to a number if a block is found, or undefined otherwise.
Source
getTransactionReceipt()
function getTransactionReceipt(
provider: Provider,
txHash: string,
confirmations?: number,
timeout?: number): Promise<null | TransactionReceipt>
Waits for a transaction receipt if confirmations or timeout is provided Otherwise tries to fetch straight away.
Parameters
Parameter | Type | Description |
---|---|---|
provider | Provider | |
txHash | string | |
confirmations ? | number | |
timeout ? | number |
Returns
Promise
<null
| TransactionReceipt
>