Skip to content

Make gas price and premium gas calculation overridable#8993

Merged
damian-orzechowski merged 1 commit into
feature/arbitrum-setupfrom
feature/arb-overridable-gas-price-calc
Jul 21, 2025
Merged

Make gas price and premium gas calculation overridable#8993
damian-orzechowski merged 1 commit into
feature/arbitrum-setupfrom
feature/arb-overridable-gas-price-calc

Conversation

@damian-orzechowski

Copy link
Copy Markdown
Contributor

Make gas price and premium gas calculation overridable in classed derived from transaction processor.

Changes

Make the following calculations as virtual methods of TransactionProcessor for ease of overriding:

  • TryCalculatePremiumPerGas
  • CalculateEffectiveGasPrice

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

@LukaszRozmej LukaszRozmej left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should those be virtual methods, or separate strategies?

@damian-orzechowski

Copy link
Copy Markdown
Contributor Author

Should those be virtual methods, or separate strategies?

With the current way we override tx processing, I'd keep it virtual methods, but in the future we could think of redesigning it to cover different strategies e.g. to calculate intrinsic gas or calc effective price (if that is what you meant).

@damian-orzechowski damian-orzechowski merged commit 8a711fc into feature/arbitrum-setup Jul 21, 2025
63 checks passed
@damian-orzechowski damian-orzechowski deleted the feature/arb-overridable-gas-price-calc branch July 21, 2025 11:47
@damian-orzechowski damian-orzechowski mentioned this pull request Sep 4, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants