Skip to content

🐛 fix: Prevent negative values from getEffectiveGasPrice#281

Merged
roninjin10 merged 1 commit intomainfrom
fix/issue-78-effectivegasprice
Jan 4, 2026
Merged

🐛 fix: Prevent negative values from getEffectiveGasPrice#281
roninjin10 merged 1 commit intomainfrom
fix/issue-78-effectivegasprice

Conversation

@roninjin10
Copy link
Contributor

Summary

Test plan

  • Returns baseFee when baseFee > maxFee
  • Never returns negative values
  • Normal cases still work

🤖 Generated with Claude Code

Clamp effectivePriorityFee to 0n when baseFee exceeds maxFeePerGas.
Per EIP-1559, such transactions are ineligible for block inclusion,
so returning baseFee (with 0 priority fee) is the correct behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dist Error Error Jan 4, 2026 11:58am
voltaire Error Error Jan 4, 2026 11:58am

@roninjin10 roninjin10 merged commit 179b9c7 into main Jan 4, 2026
19 of 48 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.

Bug: getEffectiveGasPrice may return negative values

1 participant