Repository navigation
feat: mock Hyperliquid orders in the testnet lifecycle (#39) - #59
Merged
Merged
Conversation
Block order place/modify/cancel from reaching Hyperliquid in the nightly harness, the same way Relay is mocked, while keeping approvals, account reads and Privy live. Co-authored-by: Joe Blau <[email protected]>
joeblau
marked this pull request as ready for review
October 19, 2026 00:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Joe asked that the nightly Testnet lifecycle job never place real Hyperliquid orders, including testnet post-only ones.
What changed
The existing test preload now mocks Hyperliquid order placement, modification and cancellation the same way Relay is already mocked:
BLOXWAP_E2E_MOCK_HL_ORDERS=1and receive fixture resting/cancel responses, a local order book forfrontendOpenOrders, and injectedorderUpdatesWebSocket frames./exchangeorder (or fund-moving action) fails closed instead of reaching the exchange.Lifecycle reports now have an explicit
orderscoverage entry (Hyperliquid orders (mocked)). Approvals/account reads stay recorded as live Hyperliquid. Order stages are not claimed as live.30 test USDC
Pre-funding is no longer required. Orders never hit the book, and the mocked Relay quote still has zero expected output, so settlement does not move funds. Preflight still requires a reachable testnet account with no positions, open orders, or leftover agent approvals.
Still live vs mocked
Live (no funds moved):
approveAgent/approveBuilderFeeand revocationclearinghouseState,extraAgents, live open-order preflight/cleanup checks, mids/meta)Mocked / blocked:
order,cancel,batchModify/modify, and other order-like exchange actionsMissing-secret preflight failure is unchanged.
Do not merge until checks are green and a reviewer accepts the live-vs-mocked split.