-
Notifications
You must be signed in to change notification settings - Fork 397
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: add EstimateGas
to gnoclient
#3498
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):No automated checks match this pull request. ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
looks good 👍
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.
just 2c post merge: shouldn't we expose the Simulate
method?
The problem I see with this method is that it still requires for us to encode a transaction where on the user side we put the maximum gas value. Because of that, having a Simulate
method, which can be used for other use-cases, seems more appropriate.
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.