Skip to content

Commit

Permalink
fix: simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Migone <[email protected]>
  • Loading branch information
tmigone committed Sep 15, 2023
1 parent 8f270a2 commit c380f5f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tasks/bridge/deposits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ task(TASK_BRIDGE_DEPOSITS, 'List deposits initiated on L1GraphTokenGateway')
`Tracking 'DepositFinalized' events on L2GraphTokenGateway (${l2Gateway.address}) from block ${l2StartBlock} onwards`,
)

const amount = await (
await l1Gateway.queryFilter(l1Gateway.filters.DepositInitiated(), l1StartBlock, l1EndBlock)
).length
console.log(`Found ${amount} deposits on L1`)
const deposits = await l1Gateway.queryFilter(
l1Gateway.filters.DepositInitiated(),
l1StartBlock,
l1EndBlock,
)
console.log(`Found ${deposits.length} deposits on L1`)

const depositInitiatedEvents = await Promise.all(
(
await l1Gateway.queryFilter(l1Gateway.filters.DepositInitiated(), l1StartBlock, l1EndBlock)
).map(async (e) => {
deposits.map(async (e) => {
const retryableTicket = await getL1ToL2MessageReader(
e.transactionHash,
graph.l1.provider,
Expand Down

0 comments on commit c380f5f

Please sign in to comment.