Skip to content

Commit

Permalink
feat: Add ethereum account abstraction EIP 4337 (#1423)
Browse files Browse the repository at this point in the history
* Adding EIP 4337 account abstration methods to Ethereum spec as addon

* Add params to function template and remove archive extension from the bundler addon

* API name typo fix

* Added config example for ETH provider with bundler addon

* Marking deterministic bundler methods as deterministic

---------

Co-authored-by: Vincent Taglia <[email protected]>
Co-authored-by: oren-lava <[email protected]>
Co-authored-by: Omer <[email protected]>
  • Loading branch information
4 people authored May 16, 2024
1 parent 90cf8dd commit 3d09369
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/provider_examples/eth_provider_with_bundler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
endpoints:
- api-interface: jsonrpc
chain-id: ETH1
network-address:
address: "127.0.0.1:2224"
node-urls:
- url: my-eth-node.com/eth-bundler/ws
addons:
- bundler
123 changes: 123 additions & 0 deletions cookbook/specs/spec_add_ethereum.json
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,129 @@
}
}
]
},
{
"enabled": true,
"collection_data": {
"api_interface": "jsonrpc",
"internal_path": "",
"type": "POST",
"add_on": "bundler"
},
"apis": [
{
"name": "eth_sendUserOperation",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 200,
"enabled": true,
"category": {
"deterministic": false,
"local": true,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "eth_estimateUserOperationGas",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 200,
"enabled": true,
"category": {
"deterministic": true,
"local": true,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "eth_getUserOperationByHash",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 200,
"enabled": true,
"category": {
"deterministic": true,
"local": true,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "eth_getUserOperationReceipt",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 200,
"enabled": true,
"category": {
"deterministic": true,
"local": true,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
},
{
"name": "eth_supportedEntryPoints",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 200,
"enabled": true,
"category": {
"deterministic": false,
"local": true,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
}
],
"verifications": [
{
"name": "bundler",
"parse_directive": {
"function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_supportedEntryPoints\",\"params\":[],\"id\":1}",
"function_tag": "VERIFICATION",
"result_parsing": {
"parser_arg": [
"0"
],
"parser_func": "PARSE_BY_ARG"
},
"api_name": "eth_supportedEntryPoints"
},
"values": [
{
"expected_value": "*"
}
]
}
],
"extensions": []
}
]
},
Expand Down

0 comments on commit 3d09369

Please sign in to comment.