Skip to content

feat: allow reuse of API for calculating initial tx gas for tx#2215

Merged
rakita merged 2 commits intobluealloy:mainfrom
Wodann:refactor/calc-initial-gas
Mar 17, 2025
Merged

feat: allow reuse of API for calculating initial tx gas for tx#2215
rakita merged 2 commits intobluealloy:mainfrom
Wodann:refactor/calc-initial-gas

Conversation

@Wodann
Copy link
Contributor

@Wodann Wodann commented Mar 14, 2025

This PR:

  • adds rich error information for InvalidTransaction::CallGasCostMoreThanGasLimit and InvalidTransaction::GasFloorMoreThanGasLimit, such that we can inform the user - in the error message - about which values they should use to make their transaction valid.
  • Splits off the calculate_initial_tx_gas_for_tx function so it can be reused

If approved, this PR should be applied after #2214, as it depends on the change made there.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 14, 2025

CodSpeed Performance Report

Merging #2215 will not alter performance

Comparing Wodann:refactor/calc-initial-gas (4353dc9) with main (e3bc276)

Summary

✅ 8 untouched benchmarks

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

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

lgtm, pending conflict

@rakita rakita changed the title Refactor/calc initial gas feat: allow reuse of API for calculating initial tx gas for tx Mar 17, 2025
@Wodann Wodann force-pushed the refactor/calc-initial-gas branch from 65b765a to 4353dc9 Compare March 17, 2025 15:25
@Wodann
Copy link
Contributor Author

Wodann commented Mar 17, 2025

lgtm, pending conflict

Rebased, resolving the conflict.

@rakita rakita merged commit 5a2ff70 into bluealloy:main Mar 17, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants