Skip to main content

Module: utils/lib

getFirstBlockForL1Block()

getFirstBlockForL1Block(__namedParameters): 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

ParameterType
__namedParametersGetFirstBlockForL1BlockProps

Returns

Promise\< number | undefined >

  • A Promise that resolves to a number if a block is found, or undefined otherwise.

Source

arbitrum-sdk/src/lib/utils/lib.ts:89


getTransactionReceipt()

getTransactionReceipt(
provider,
txHash,
confirmations?,
timeout?): Promise< null | TransactionReceipt >

Waits for a transaction receipt if confirmations or timeout is provided Otherwise tries to fetch straight away.

Parameters

ParameterTypeDescription
providerProvider
txHashstring
confirmations?number
timeout?number

Returns

Promise\< null | TransactionReceipt >

Source

arbitrum-sdk/src/lib/utils/lib.ts:32