Verifying paymaster - #16
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds verifying-paymaster validation and signing support for EIP-7702 smart accounts.
Changes:
- Adds paymaster stub/sign endpoints, validation, signing, and configuration.
- Adds contract bindings and shared user-operation structures.
- Updates gas-tank integration and API documentation.
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.env.example |
Documents paymaster configuration. |
api/controller_verifying_paymaster.go |
Implements paymaster endpoints. |
api/models.go |
Adds authorization-aware input model. |
api/route.go |
Registers paymaster routes. |
contract/SimpleSmartAccount7702.abi.json |
Updates smart-account ABI. |
contract/SimpleSmartAccount7702.go |
Updates generated binding. |
contract/VerifyingPaymaster.abi.json |
Adds paymaster ABI. |
contract/gas_tank_paymaster.go |
Shares packed user-operation type. |
contract/verifying_paymaster.go |
Adds generated paymaster binding. |
docs/docs.go |
Updates generated API documentation. |
docs/swagger.json |
Documents paymaster APIs. |
docs/swagger.yaml |
Documents paymaster APIs. |
main.go |
Adds the Paymaster API tag. |
service/account_abstract.go |
Uses shared delegation lookup. |
service/blockchain_util.go |
Extracts EIP-7702 delegation utility. |
service/errors.go |
Adds paymaster errors. |
service/paymaster_gas_tank.go |
Implements gas-tank paymaster logic. |
service/paymaster_verifying.go |
Implements verifying-paymaster service. |
service/paymaster_verifying_test.go |
Tests validation behavior. |
service/service.go |
Initializes the optional service. |
Files not reviewed (1)
- docs/docs.go: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 20 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- docs/docs.go: Generated file
Suppressed comments (2)
api/models.go:76
UserOperationis also the request type for the existing/aa/gastank/signendpoint, which explicitly supports only an empty init code. Making this field required therefore rejects every existing gas-tank client that omits it, forcing an unrelated breaking API change. Keep it optional; the verifying-paymaster validation already requires the marker whendelegatedContractis non-zero.
InitCode string `json:"initCode" binding:"required,hex,min=2"`
docs/swagger.yaml:193
- The newly generated request schema omits
initCode, although the sign handler binds that field and the EOA-upgrade path requires the0x7702…marker. Clients generated from this Swagger contract cannot discover or model the documented upgrade request. Regenerate all Swagger artifacts soinitCodeappears inUserOperationWithAuth(and the shared schema, if it remains there).
api.UserOperationWithAuth:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is