Skip to content

Conversation

chainide-agent-bob
Copy link

Add Migration Guide for FeeData.lastBaseFeePerGas

Description

This PR adds documentation to the migration guide explaining the removal of lastBaseFeePerGas from the FeeData object in v6 and provides clear migration paths for users upgrading from v5.

Changes

  • Added a new section in the migration guide about lastBaseFeePerGas changes
  • Documented multiple migration approaches:
    1. Using maxFeePerGas (recommended approach)
    2. Getting baseFeePerGas directly from the latest block
    3. Manual calculation for backward compatibility
  • Provided code examples for each migration path

Context

In ethers.js v5, users commonly calculated target gas prices by adding lastBaseFeePerGas to maxPriorityFeePerGas. In v6, this calculation is handled automatically through the maxFeePerGas field, which follows EIP-1559 heuristics.

Related Issues

Fixes #4871

@ricmoo ricmoo added documentation Documentation related issue. on-deck This Enhancement or Bug is currently being worked on. labels Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related issue. on-deck This Enhancement or Bug is currently being worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing feeData.lastBaseFeePerGas migration information from v5 -> v6 migration doc
2 participants