Skip to content

Conversation

@jefft0
Copy link
Contributor

@jefft0 jefft0 commented Aug 1, 2025

Similar to code in the gnokey CLI, we add an API function estimateTxFees to estimate gas and storage fees.

  • In gnonativetypes.go, add EstimateTxFeesRequest and EstimateTxFeesResponse
  • In rpc.proto, add EstimateTxFees
  • Run make regenerate
  • In api.go, refactor out the helper estimateGasWanted from EstimateGas. Add EstimateTxFees
  • In expo/src/api, add estimateTxFees

Tested in Gnokey Mobile with:

const { txJson, gasWanted, gasFee, storageDelta, storageFee, totalFee } =
  await gnonative.estimateTxFees(txJsonInput, keyinfo?.address, 110, 110, true)

@jefft0 jefft0 changed the title feat: Add estimateGasFee feat: Add estimateTxFees Aug 19, 2025
@jefft0 jefft0 marked this pull request as ready for review October 31, 2025 08:31
@jefft0 jefft0 requested review from D4ryl00 and removed request for D4ryl00 October 31, 2025 08:31
@jefft0 jefft0 marked this pull request as draft October 31, 2025 09:10
@jefft0 jefft0 force-pushed the feat/add-estimateGasFee branch from 4ce58c3 to e2b10a0 Compare October 31, 2025 09:31
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
@jefft0 jefft0 force-pushed the feat/add-estimateGasFee branch from e2b10a0 to 4adfbd4 Compare November 4, 2025 08:32
@jefft0 jefft0 marked this pull request as ready for review November 4, 2025 08:43
@jefft0 jefft0 requested a review from D4ryl00 November 4, 2025 08:43
Copy link
Contributor

@D4ryl00 D4ryl00 left a comment

Choose a reason for hiding this comment

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

LGTM

@jefft0 jefft0 merged commit 91cacb8 into gnolang:main Nov 4, 2025
@jefft0 jefft0 deleted the feat/add-estimateGasFee branch November 4, 2025 13:24
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

🎉 This PR is included in version 4.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants