The helper scripts fall back to static block heights when Hiro API requests fail. That makes market timing increasingly inaccurate over time and can produce bad end/resolution dates whenever the API is unreachable.
Evidence:
scripts/utils/transaction-helpers.ts returns 6188000 when the mainnet block-height fetch fails.
scripts/interact-contract.ts returns 6037876 in its own fallback branch.
Impact:
- Deadlines and resolution windows can be calculated from stale chain heights.
- Operators can unknowingly deploy markets with incorrect timing if the API is rate-limited or unavailable.
Reproduction:
- Disconnect or block access to the Hiro API.
- Run a script that computes future blocks, such as
scripts/bulk-create-markets.ts or scripts/interact-contract.ts.
- The script silently uses the hard-coded fallback block height instead of a live value.
Priority: High
Suggested scope:
Replace static fallback heights with a safer failure mode or a clearly surfaced manual override, and centralize the fallback policy so all scripts behave consistently.
The helper scripts fall back to static block heights when Hiro API requests fail. That makes market timing increasingly inaccurate over time and can produce bad end/resolution dates whenever the API is unreachable.
Evidence:
scripts/utils/transaction-helpers.tsreturns6188000when the mainnet block-height fetch fails.scripts/interact-contract.tsreturns6037876in its own fallback branch.Impact:
Reproduction:
scripts/bulk-create-markets.tsorscripts/interact-contract.ts.Priority: High
Suggested scope:
Replace static fallback heights with a safer failure mode or a clearly surfaced manual override, and centralize the fallback policy so all scripts behave consistently.