Skip to content

[evm,sdk]: fix reverting quote() on HyperApp and HyperFungibleToken#994

Merged
Wizdave97 merged 2 commits into
mainfrom
roy/fix-reverting-quote-987
Jun 25, 2026
Merged

[evm,sdk]: fix reverting quote() on HyperApp and HyperFungibleToken#994
Wizdave97 merged 2 commits into
mainfrom
roy/fix-reverting-quote-987

Conversation

@royvardhan

Copy link
Copy Markdown
Collaborator

HyperApp.quote() was view and called getAmountsIn through an interface that declared it pure, so the compiler emitted a STATICCALL. On mainnet the host's fee oracle is now a Uniswap V3 quoter wrapper whose getAmountsIn prices by executing a swap and reverting to read the result — a state write that a STATICCALL rejects, so quote() reverts.

Dropped view/pure so the call runs as a CALL, and propagated the change to the HyperFungibleToken/WrappedHyperFungibleToken quote overrides. The SDK now reads quote via simulateContract (eth_call) since it is no longer a view function. Added a mainnet-fork test that prices a send through the real UniV3UniswapV2Wrapper.

Ships as an implementation upgrade behind the existing WHFT proxy; no proxy/state redeployment.

Closes #987

@royvardhan royvardhan requested a review from Wizdave97 June 25, 2026 12:31

@Wizdave97 Wizdave97 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump the core package's patch version

@Wizdave97 Wizdave97 merged commit 0a2bf6c into main Jun 25, 2026
5 of 6 checks passed
@Wizdave97 Wizdave97 deleted the roy/fix-reverting-quote-987 branch June 25, 2026 17:08
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.

[evm]: Fix reverting quote function on IHyperApp and HyperfungibleToken

2 participants