Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: fetch withdrawals in parallel when possible #2147

Merged
merged 11 commits into from
Dec 19, 2024
Prev Previous commit
Next Next commit
export return type
  • Loading branch information
spsjvc committed Dec 17, 2024
commit a6dfd9cad0360cdf7823b38d4afbac9618aa5c3e
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Provider, BlockTag } from '@ethersproject/providers'
import { ChildToParentMessageReader } from '@arbitrum/sdk'

export type FetchETHWithdrawalsFromEventLogsResult = Awaited<
ReturnType<typeof ChildToParentMessageReader.getChildToParentEvents>
>

/**
* Fetches initiated ETH withdrawals from event logs in range of [fromBlock, toBlock].
*
@@ -20,7 +24,7 @@ export function fetchETHWithdrawalsFromEventLogs({
fromBlock: BlockTag
toBlock: BlockTag
l2Provider: Provider
}) {
}): Promise<FetchETHWithdrawalsFromEventLogsResult> {
if (typeof receiver === 'undefined') {
return Promise.resolve([])
}