Skip to content

Conversation

@jefft0
Copy link
Contributor

@jefft0 jefft0 commented Nov 7, 2025

The gnoclient package has Simulate. We can use this to add EstimateTxFees which estimates the total transaction fee. There are various ways to do this, so we make the following assumptions:

  • When we query the node for the gas price, it is an error if the node doesn't respond, or doesn't provide a price in ugnot
  • We modify the gas price with the provided gasPriceMarginPercent, but we don't use a margin for the storage price since it is fixed and provided in the simulation result
  • We return the estimated gas fee as a single Coin since we only accept ugnot
  • We return the estimated storage fee as an array of Coins as returned from GetStorageInfo
  • When computing the total fee, we only consider storage fee in ugnot

If we want more flexibility than these assumptions, we might want some options:

  • A default gas price in case querying the node for the gas price fails
  • Allow a gas price other than ugnot. (Keep track of multiple possible denominations for gas price)
  • Provide a margin for the storage price
  • Provide the total fee as an array of Coins with multiple denominations according the gas and storage prices

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Nov 7, 2025

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)
🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: jefft0/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🔴 At least one of these user(s) reviewed the pull request: [jefft0 leohhhn n0izn0iz notJoon omarsy x1unix] (with state "APPROVED")
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🟢 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
gno.land/pkg/gnoclient/client_txs.go 0.00% 29 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jefft0 jefft0 force-pushed the feat/add-gnoclient-EstimateTxFees branch from 0ea8a9b to b33e1ca Compare November 12, 2025 09:11
@github-actions github-actions bot added the 🐹 golang Pull requests that update Go code label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐹 golang Pull requests that update Go code 📦 ⛰️ gno.land Issues or PRs gno.land package related

Projects

Status: No status
Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants