-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for estimate fees and simulate transactions #411
Comments
I haven't checked the project code in detail, but if project contributors think this can be implemented, I can try working on this. |
Hello, yes I think it would be very useful. My understanding is that we need two steps:
|
@fracek will try to complete this and raise a PR. |
fracek
added a commit
that referenced
this issue
Apr 3, 2024
## Context As described in the issue #411, dapps sometimes needs fees estimation before doing the actual contract call. For this, I've created the useEstimateFees hook. ## Changes in this Pull Request - Added useEstimateFees custom hook. - Added relevant documentation in the docs with usage example.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As described in title, it would be good to have support for these two features. We could propose a standard and take help of wallets to do necessary integrations.
Reason for estimate fees:
DApps will be able to show precise fee to users on their UI's itself
Reason for simulate:
Dapps will be able to precisely use info on tokens in and out to give users easy clarity on what they would receive finally. Usually, this is an easy thing for simple contracts, but for projects like Hashstack.finance which involve integrations with different DeFi apps for swaps, liquidity provisions, staking etc, being able to write logic to estimate tokens output can itself be complex math. Given that the RPC supports simulation, exposing it could be easier and may even help others?
The text was updated successfully, but these errors were encountered: