Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(account-abstraction): prepare fees when estimating user operation gas#4768

Merged
jxom merged 2 commits into
wevm:mainfrom
nikhilkumar1612:main
Jul 2, 2026
Merged

fix(account-abstraction): prepare fees when estimating user operation gas#4768
jxom merged 2 commits into
wevm:mainfrom
nikhilkumar1612:main

Conversation

@nikhilkumar1612

Copy link
Copy Markdown
Contributor

Description

Fixes #4726.

estimateUserOperationGas was passing maxFeePerGas and maxPriorityFeePerGas in the prepareUserOperation parameters list, but those are User Operation field names, not valid preparation keys.

This updates the call to use the existing fees preparation key instead, so prepareUserOperation runs the client.userOperation.estimateFeesPerGas hook before sending eth_estimateUserOperationGas.

This makes the outgoing gas estimation request include maxFeePerGas and maxPriorityFeePerGas for strict bundlers.

Included a patch changeset.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the steps in the CONTRIBUTING.md document.
  • My code follows the code style of this project.

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@nikhilkumar1612 is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e287156

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jxom jxom 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.

Verified locally against a forked-anvil harness: without fees, the outgoing eth_estimateUserOperationGas payload now includes maxFeePerGas/maxPriorityFeePerGas (previously absent since the invalid preparation keys made the fees step a no-op); userOperation.estimateFeesPerGas hook values reach the wire; explicit fee overrides pass through unchanged; no double fee-fetch in the sendUserOperation path (inner prepare short-circuits on resolved fees).

@jxom jxom merged commit 4817566 into wevm:main Jul 2, 2026
16 of 24 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 2, 2026
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(account-abstraction): estimateUserOperationGas strips gas prices, causing validation failure on strict bundlers (EntryPoint 0.7)

2 participants