Indexing ERC4337 Events #182
ryansmith3136
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Here is an example Shovel (fka E2PG) config file that indexes ERC4337 events:
Config JSON
{ "pg_url": "postgres:///shovel", "eth_sources": [ {"name": "mainnet", "chain_id": 1, "url": "https://1.rlps.indexsupply.net"}, {"name": "base goerli", "chain_id": 84531, "url": "https://84531.rlps.indexsupply.net"} ], "integrations": [ { "name": "erc 4337", "enabled": true, "sources": [{"name": "base goerli"}, {"name": "mainnet"}], "table": { "name": "erc4337_user_ops", "columns": [ {"name": "chain_id", "type": "numeric"}, {"name": "block_num", "type": "numeric"}, {"name": "block_hash", "type": "bytea"}, {"name": "tx_hash", "type": "bytea"}, {"name": "tx_idx", "type": "numeric"}, {"name": "tx_signer", "type": "bytea"}, {"name": "tx_to", "type": "bytea"}, {"name": "tx_value", "type": "numeric"}, {"name": "log_addr", "type": "bytea"}, {"name": "log_idx", "type": "numeric"}, {"name": "op_hash", "type": "bytea"}, {"name": "op_sender", "type": "bytea"}, {"name": "op_paymaster", "type": "bytea"}, {"name": "op_nonce", "type": "numeric"}, {"name": "op_success", "type": "bool"}, {"name": "op_actual_gas_cost", "type": "numeric"}, {"name": "op_actual_gas_used", "type": "numeric"} ] }, "block": [ {"name": "chain_id", "column": "chain_id"}, {"name": "block_num", "column": "block_num"}, {"name": "block_hash", "column": "block_hash"}, {"name": "tx_hash", "column": "tx_hash"}, {"name": "tx_idx", "column": "tx_idx"}, {"name": "tx_signer", "column": "tx_signer"}, {"name": "tx_to", "column": "tx_to"}, {"name": "tx_value", "column": "tx_value"}, {"name": "log_addr", "column": "log_addr"}, {"name": "log_idx", "column": "log_idx"} ], "event": { "name": "UserOperationEvent", "type": "event", "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "userOpHash", "type": "bytes32", "column": "op_hash" }, { "indexed": true, "internalType": "address", "name": "sender", "type": "address", "column": "op_sender" }, { "indexed": true, "internalType": "address", "name": "paymaster", "type": "address", "column": "op_paymaster" }, { "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256", "column": "op_nonce" }, { "indexed": false, "internalType": "bool", "name": "success", "type": "bool", "column": "op_success" }, { "indexed": false, "internalType": "uint256", "name": "actualGasCost", "type": "uint256", "column": "op_actual_gas_cost" }, { "indexed": false, "internalType": "uint256", "name": "actualGasUsed", "type": "uint256", "column": "op_actual_gas_used" } ] } } ] }All reactions