Skip to content

Conversation

@dohaki
Copy link
Contributor

@dohaki dohaki commented Dec 16, 2025

This PR allows to set a output amount for simulateMarketOrder via Hyperliquid. Useful for #2106

@vercel
Copy link

vercel bot commented Dec 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
app-frontend-v3 Ready Ready Preview, Comment Dec 16, 2025 4:01am
sepolia-frontend-v3 Ready Ready Preview, Comment Dec 16, 2025 4:01am

Copy link
Member

@ashwinrava ashwinrava left a comment

Choose a reason for hiding this comment

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

Looks good!! Thanks for adding this. I will rebase on top of your commit and amend my PR. 👍

Comment on lines +346 to 349
const baseAvailable = ethers.utils.parseUnits(
Number(level.sz).toFixed(tokenIn.decimals),
tokenIn.decimals
);
Copy link
Member

Choose a reason for hiding this comment

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

I see in some places we use isBuyingBase to determine if we should use tokenIn.decimals vs tokenOut.decimals. Is it all the same in HyperCore or do we need that check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, good point... I think I wrote this before I knew that every token on HyperCore has 8 decimals.

@dohaki dohaki merged commit 76c29d2 into master Dec 17, 2025
10 of 11 checks passed
@dohaki dohaki deleted the support-output-amount-sim-market-order branch December 17, 2025 07:33
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.

3 participants