Skip to content

Commit

Permalink
Add Arbitrum time for polling (#488)
Browse files Browse the repository at this point in the history
* Add Arbitrum time for polling

* Add Base

* Increase freq of LimitOrder checking
  • Loading branch information
codyborn authored Nov 5, 2024
1 parent 56b00d9 commit 17be6e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/handlers/check-order-status/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ const checkOrderStatusHandler = new CheckOrderStatusHandler(
LimitOrdersRepository.create(documentClient),
FILL_EVENT_LOOKBACK_BLOCKS_ON,
new FillEventLogger(FILL_EVENT_LOOKBACK_BLOCKS_ON, AnalyticsService.create()),
new CheckOrderStatusUtils(OrderType.Limit, AnalyticsService.create(), limitOrdersRepository, () => {
return 30
})
new CheckOrderStatusUtils(
OrderType.Limit,
AnalyticsService.create(),
limitOrdersRepository,
calculateDutchRetryWaitSeconds
)
),
relayOrderService
)
Expand Down
4 changes: 4 additions & 0 deletions lib/handlers/check-order-status/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ export const AVERAGE_BLOCK_TIME = (chainId: ChainId): number => {
switch (chainId) {
case ChainId.MAINNET:
return 12
case ChainId.ARBITRUM_ONE:
return 1
case ChainId.BASE:
return 2
case ChainId.POLYGON:
// Keep this at the default 12 for now since we would have to do more retries
// if it was at 2 seconds
Expand Down

0 comments on commit 17be6e3

Please sign in to comment.