Skip to content

Commit

Permalink
hn: cctp: Updated finality time
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed Jun 25, 2024
1 parent 72bb0f9 commit 1a05dea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/hop-node/src/cctp/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ export async function poll(
}

// TODO: V2: Get this from config
// This represents the custom finality time for each chain
export function getFinalityTimeFromChainIdMs(chainId: string): number {
switch (chainId) {
case '1':
return 6 * TimeIntervals.ONE_MINUTE_MS
case '10':
return 10_000
return 6 * TimeIntervals.ONE_MINUTE_MS
case '42161':
return 10_000
return 6 * TimeIntervals.ONE_MINUTE_MS
case '8453':
return 10_000
return 6 * TimeIntervals.ONE_MINUTE_MS
case '137':
return 1 * TimeIntervals.ONE_MINUTE_MS
return 6 * TimeIntervals.ONE_MINUTE_MS
default:
throw new Error(`Unknown chainId: ${chainId}`)
}
Expand Down

0 comments on commit 1a05dea

Please sign in to comment.