Skip to content

Conversation

@mablr
Copy link
Contributor

@mablr mablr commented Nov 22, 2025

Motivation

Anvil cleanup in the same vein as #12639 + smol nits

However, I created this PR separately as I’m not entirely certain that this one isn’t breaking, so it requires a more thorough review.

Imo Alloy's helper has the same logic as anvil's custom one https://github.com/alloy-rs/alloy/blob/9770720d77000d48c9d1f9979bf393f3b09b118b/crates/eips/src/eip1559/helpers.rs#L14-L30

Solution

  • Replace custom effective reward calculation with alloy's Transaction::effective_tip_per_gas()
  • Cleanup useless base_fee casts, only one is necessary u64->u128, instead of u64->u128->u64
  • More elegant default rewards: vec![] instead of heavy .iter().map().collect()

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes (maybe...)

…ryService::create_cache_entry`

- cleanup useless casts
- more elegant default rewards array
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool, yeah this is equivalent

@mattsse mattsse added this pull request to the merge queue Nov 23, 2025
Merged via the queue into foundry-rs:master with commit 3a38e02 Nov 23, 2025
27 of 29 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Nov 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants