feat: Add Across Perps withdraw support#8841
Open
pedronfigueiredo wants to merge 1 commit into
Open
Conversation
aa718cf to
dc6ef3f
Compare
dc6ef3f to
a30e120
Compare
a30e120 to
ddcc878
Compare
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.
Summary
Adds Across support for HyperLiquid-source Perps withdraw post-quote flows in transaction-pay-controller.
Changes
perpsAcrossWithdrawtoTransactionTypefor Across Perps withdraw bridge legs.perpsWithdrawtransactions.Note
Medium Risk
Adds new transaction typing and conditional quote/submit logic for HyperLiquid-source Perps withdrawals, affecting how Across requests are normalized, validated, and submitted. Risk is moderate due to changes in transaction classification and gas/fiat calculations, but the behavior is gated to a specific request shape.
Overview
Adds Across support for post-quote HyperLiquid-source Perps withdrawal flows.
Introduces a new
TransactionType.perpsAcrossWithdrawbridge-leg type and a newisPerpsWithdrawTransactionhelper (including nested-transaction detection) so the Across submit path can label generated transactions correctly.Updates the Across strategy/quotes/submit pipeline to accept supported HyperLiquid-source withdraw requests even when source/target are same-chain, normalize them to HyperCore USDC-PERPS with 6→8 decimal shifting, anchor fiat-rate lookup to Arbitrum USDC, and avoid prepending the original parent tx / post-quote gas when submitting these withdraws (covered by new tests and changelog entries).
Reviewed by Cursor Bugbot for commit ddcc878. Bugbot is set up for automated code reviews on this repo. Configure here.