Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreUnified QuotesshouldAccelerateOnchainReads

shouldAccelerateOnchainReads

Decide whether the on-chain reads specifically should poll at the accelerated interval — the RPC-lag retry. Unlike shouldAccelerateQuotePolling (which is true for every mid-transition stage, including the purely off-chain ones), this is true only while a row awaits on-chain confirmation: WRITE_ONCHAIN, WRITE_ONCHAIN_CLOSE, or CLOSING. The off-chain stages (OPTIMISTIC / PRICE_FILLED / OPTIMISTIC_CLOSE / CLOSE_PRICE_FILLED) have nothing on-chain to read before the anchor, so they must not drive on-chain polling.

import { shouldAccelerateOnchainReads } from "@symmio/trading-core"; const onchainInterval = shouldAccelerateOnchainReads(result) ? 1_500 : false;

Parameters

resultReconcileQuotesResultrequired

The latest reconciliation result from reconcileQuotes.

Returns

boolean

true when at least one row is awaiting on-chain confirmation (WRITE_ONCHAIN / WRITE_ONCHAIN_CLOSE / CLOSING).

Last updated on