Skip to content

feat(sdk): surface the HyperCore origin tx hash once the send lands - #1140

Merged
pedromcunha merged 2 commits into
relayprotocol:mainfrom
officialchengyud:hypercore-origin-tx-hash
Sep 29, 2026
Merged

pedromcunha merged 2 commits into
relayprotocol:mainfrom
officialchengyud:hypercore-origin-tx-hash

Conversation

@officialchengyud

@officialchengyud officialchengyud commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

For HyperCore origins (chain 1337), the SDK posts the signed action to Hyperliquid's /exchange, which acknowledges it without a hash. The step then stays in validating, with no origin tx hash, until Relay's status reports one. On fast routes that first status is already success, so the step goes from validating straight to complete and the origin is never reported as confirmed while the fill is in progress.

Once the action is posted, the SDK now also looks the send up in the sender's Hyperliquid ledger (userNonFundingLedgerUpdates) by its signed nonce. The entry appears about a second after posting. If it's found before Relay reports a status, the step item gets the hash in internalTxHashes and the same state Relay's own pending status produces (checkStatus: 'pending', progressState cleared, isValidatingSignature: false). Later submitted and success statuses overwrite it as before.

  • Runs alongside status polling, so polling isn't delayed.
  • Only applies to signer-owned sendAsset actions with a nonce (no fromSubAccount).
  • Polls the ledger every second for up to 3 seconds. Lookup errors and misses fall back to the current behaviour.
  • Never overwrites a status already reported by polling or the websocket, and is discarded once validation ends, so a failed request can't later report pending.

Covered by unit tests for the ledger lookup and the signature step: the pending state, polling not being held up, no pending after a polling failure, no overwrite of a websocket-reported status, and lookup misses and errors.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@officialchengyud is attempting to deploy a commit to the Uneven Labs Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds transaction hash lookup for Hyperliquid send operations.

The PR appears safe to merge; no outstanding findings or new actionable issues remain.

Summary

The PR looks up a posted HyperCore send in the sender’s ledger and reports its origin hash while Relay status tracking continues. The latest change also lets the lookup add a hash when Relay has already reported pending without one.

  • The lookup remains independent of status polling.
  • Added tests cover pending-state enrichment and preservation of a hash already supplied by Relay.

Reviews (4) · Last reviewed commit: "fix(sdk): add the HyperCore origin hash ..."

Comment thread packages/sdk/src/utils/executeSteps/signatureStep.ts Outdated
Comment thread packages/sdk/src/utils/executeSteps/signatureStep.ts Outdated
Comment thread packages/sdk/src/utils/executeSteps/signatureStep.ts Outdated
@greptile-apps

This comment has been minimized.

Comment thread packages/sdk/src/utils/executeSteps/signatureStep.ts Outdated
@officialchengyud
officialchengyud marked this pull request as draft September 24, 2026 08:19
@officialchengyud officialchengyud changed the title fix(sdk): surface the HyperCore origin tx hash once the send lands feat(sdk): surface the HyperCore origin tx hash once the send lands Sep 24, 2026
@pedromcunha
pedromcunha marked this pull request as ready for review September 28, 2026 16:59
@pedromcunha
pedromcunha merged commit 3181078 into relayprotocol:main Sep 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants