-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add ERC: JSON-RPC API for ERC-4337 #628
Add ERC: JSON-RPC API for ERC-4337 #628
Conversation
✅ All reviewers have approved. |
@forshtat my understanding is that API standards should be directed to https://github.com/ethereum/execution-apis rather than create an EIP/ERC |
This is not an ethereum node RPC-API, but an API for an external entity (bundler) that supports the ERC-4337 standard itself. |
ERCS/erc-4337-rpc.md
Outdated
title: JSON-RPC API for Account Abstraction Using the UserOperation Mempool | ||
description: A set of JSON-RPC API methods that defines a communication between smart contract account wallets and bundlers | ||
author: Vitalik Buterin (@vbuterin), Yoav Weiss (@yoavw), Dror Tirosh (@drortirosh), Shahaf Nacson (@shahafn), Alex Forshtat (@forshtat) | ||
discussions-to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create a discussions topic in Eth Magicians. It just needs to be a link to this PR.
Co-authored-by: Andrew B Coathup <28278242+abcoathup@users.noreply.github.com>
The commit 392299c (as a parent of a5fdbec) contains errors. |
@abcoathup : can this PR be merged? |
@drortirosh you need an ERC editor to review (I am not an editor). There is only a small number of editors, so it can take some time to get reviewed. In the meantime, ensure that the validator doesn’t raise any errors & fix any issues. There is a fortnightly office hours that you could attend: ethcatherders/EIPIP#360 |
##### Parameters: | ||
|
||
1. **UserOperation** a full user-operation struct.\ | ||
All fields MUST be set as hex values.\ | ||
Empty `bytes` block (e.g. empty `initCode`) MUST be set to `"0x"`\ | ||
2. **factory** and **factoryData**\ | ||
Must provide either both of these parameters, or none. | ||
3. **paymaster**, **paymasterData**, **paymasterValidationGasLimit**, **paymasterPostOpGasLimit**\ | ||
Must provide either all of these parameters, or none. | ||
4. **entryPoint** the `EntryPoint` contract address the request should be sent through.\ | ||
This MUST be one of the entry points returned by the `supportedEntryPoints` RPC call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever a proposal is specifying anything to do with JSON, I suggest that you seriously consider using JSON Schema to define and document valid JSON. It's machine tractable, has a ton of tooling, and is way more specific than english text.
ERCS/erc-7769.md
Outdated
{ | ||
"jsonrpc": "2.0", | ||
"id": 1, | ||
"result": "0x1234...5678" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the result here actually supposed to have the three dots?
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
|
||
Request: | ||
|
||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```json | |
```js |
Not a hard requirement, but if you use js
instead of json
, it'll still highlight but won't complain about comments.
This operation may also return an error if either the inner call to the account contract reverts, | ||
or paymaster's `postOp` call reverts. | ||
|
||
#### * eth_getUserOperationByHash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the star? Also don't forget backticks.
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Reviewers Have Approved; Performing Automatic Merge...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Reviewers Have Approved; Performing Automatic Merge...
When opening a pull request to submit a new EIP, please use the suggested template: https://github.com/ethereum/EIPs/blob/master/eip-template.md
We have a GitHub bot that automatically merges some PRs. It will merge yours immediately if certain criteria are met: