Skip to content

fix(eip7702): validate factory field with eip7702 requirements#712

Merged
mouseless0x merged 9 commits intomainfrom
fix/7702-userops
Apr 7, 2026
Merged

fix(eip7702): validate factory field with eip7702 requirements#712
mouseless0x merged 9 commits intomainfrom
fix/7702-userops

Conversation

@mouseless0x
Copy link
Copy Markdown
Member

  • Add validation for 0x7702 factory address in both short and padded
    forms

  • Require eip7702Auth when factory is set to 0x7702

  • Add comprehensive test coverage for both factory address formats

- Add validation for 0x7702 factory address in both short and padded
forms

- Require eip7702Auth when factory is set to 0x7702

- Add comprehensive test coverage for both factory address formats
- Add early validation check for EIP-7702 userOps with 0x7702 factory

- Ensure eip7702Auth is provided when factory is 0x7702

- Update error message for consistency
- Removed validation check that incorrectly rejected userOps with factory 0x7702 but no eip7702Auth

- This check was overly restrictive and not aligned with EIP-7702 specification
- Add early userOp field validation in eth_estimateUserOperationGas

- Add isEstimation flag to skip gas checks during estimation

- Consolidate EIP-7702 factory validation and remove duplication
- Add test cases for rejecting estimation with 0x7702 factory without eip7702Auth

- Test both short form (0x7702) and zero-padded form validation

- Skip test for v0.6 which doesn't support factory field
…tion

- Separate bundler client creation for gas estimation calls

- Rename smartAccountClient for clarity

- Pass entryPointAddress explicitly to estimateUserOperationGas
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

@mouseless0x mouseless0x merged commit d40772d into main Apr 7, 2026
4 checks passed
@mouseless0x mouseless0x deleted the fix/7702-userops branch April 7, 2026 15:39
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.

2 participants