-
Notifications
You must be signed in to change notification settings - Fork 18
fix(pimlico): send EIP-7702 authorization as separate field per ERC-7769 #2858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
🤖 PR Review Bot
|
The authorization was incorrectly encoded in factoryData. Per ERC-7769, eip7702Auth must be a separate field in the UserOperation JSON. - Add eip7702Auth field to UserOperationV07 interface - Send authorization as separate eip7702Auth field instead of factoryData - Set factoryData to '0x' (used for storage init, not auth)
- Use EntryPoint v0.8 (required for EIP-7702) - Use correct EIP-7702 factory marker (0x7702... right-padded) - Pass eip7702Auth as separate field with 'contractAddress' key - Remove factoryData param (not needed for EIP-7702)
2eed754 to
58fdf1c
Compare
- Remove dead code: encodeAuthorizationAsFactoryData (no longer used) - Rename UserOperationV07 to UserOperationV08 for clarity - Include eip7702Auth BEFORE gas estimation (was added after) - This ensures Pimlico bundler can properly estimate gas with the authorization context
Code-Review: EIP-7702 Authorization FixZusammenfassungDer PR ändert wie EIP-7702 Autorisierungen an den Pimlico Bundler gesendet werden:
✅ Was korrekt ist
|
Summary
Fix gasless EIP-7702 + ERC-4337 transactions by sending the authorization as a separate
eip7702Authfield instead of encoding it infactoryData.Problem: After fixing the paymaster address issue (#2853), transactions failed with:
Root cause: Per ERC-7769, the EIP-7702 authorization must be sent as a separate
eip7702Authfield in the UserOperation JSON, not encoded infactoryData.Changes:
eip7702Authfield to UserOperationV07 interfaceeip7702AuthfieldfactoryDatato'0x'(empty, as it's for storage init)Test plan
Sources: