-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: implement an estimate gas method #192
Conversation
gnolang/gno#1826 PR should be the first to be merged. |
e1ffd83
to
9e45d2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great 👏 👏 👏
A giant leap in UX 🙏
One idea we can improve is how the Tx lifecycle is implemented. Right now we have methods that (in 1):
- create a tx
- sign the tx
- broadcast the tx
when in reality these should be separate, and allow the user to modify bits and pieces they want; but this is for a future PR 🫡
## Description Closes #1826 along with gnolang/tm2-js-client#192 This PR introduces a method `EstimateGas` to estimate the gas used by a transaction in gnoclient. We can use this call to get a ballpark estimate if a transaction succeeds, and if it does, how much gas it actually used.
Descriptions
Retrieve the estimated
GasUsed
by calling the simulate method of the ABCI query.Send transaction data through the
.app/simulate
path to the ABCI query to extractGasUsed
information from the executed result.Related Issue
app
path method to simulate for ABCI query gno#3207