Skip to content
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: use total_gas and total_fee from tx status #1574

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Jan 15, 2025

closes: #1394

Release notes

In this release, we:

  • Improved how we report total_gas and total_fee used for transactions.

Summary

The total_fee and total_gas is taken from the tx status.

The GasValidation trait is removed. This trait was used to make sure that the script_gas_limit is set correctly. The script_gas_limit is either:

  • 0 if there is no script code,
  • set by the user,
  • estimated by our builders
    so an additional check before sending the tx is redundant - By removing it we have one less dry run before sending the tx.

Breaking Changes

  • Removed get_response_from method from CallHandlers
  • Method get_response accepts TxStatu instead of Vec<Receipts>
  • struct CallResponse has new field total_fee
  • Method new is removed form CallResponse
  • GasValidation trait is removed from transaction builders

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@hal3e hal3e self-assigned this Jan 15, 2025
@hal3e hal3e added the tech-debt Improves code quality or safety label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Improves code quality or safety
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: use total_fee from the transaction status once refactoring exposes it
1 participant