Title
Add ERC-4337 bundler RPC client
Labels
enhancement, account-abstraction, rpc, bundler
Description
Implement RPC client for interacting with ERC-4337 bundlers to submit and manage UserOperations, similar to viem's bundler client.
Requirements
Bundler Namespace
UserOperationReceipt Type
UserOpGasEstimate
Error Handling
File Location
src/rpc/bundler.zig # Bundler RPC namespace
src/account_abstraction/
└── types.zig # AA-specific types
References
Title
Add ERC-4337 bundler RPC client
Labels
enhancement,account-abstraction,rpc,bundlerDescription
Implement RPC client for interacting with ERC-4337 bundlers to submit and manage UserOperations, similar to viem's bundler client.
Requirements
Bundler Namespace
BundlerNamespacesimilar to existingEthNamespaceeth_sendUserOperation(userOp: UserOperation, entryPoint: Address) -> Hasheth_estimateUserOperationGas(userOp: UserOperation, entryPoint: Address) -> UserOpGasEstimateeth_getUserOperationByHash(hash: Hash) -> ?UserOperationeth_getUserOperationReceipt(hash: Hash) -> ?UserOperationReceipteth_supportedEntryPoints() -> []AddressUserOperationReceipt Type
UserOperationReceiptstruct with:userOpHash: Hash- UserOperation hashentryPoint: Address- EntryPoint contract usedsender: Address- Account that sent the operationnonce: u256- Nonce usedpaymaster: ?Address- Paymaster if usedactualGasUsed: u256- Total gas usedactualGasCost: u256- Total gas cost in weisuccess: bool- Execution statusreason: ?[]u8- Revert reason if failedlogs: []Log- Event logs emittedreceipt: Receipt- Inner transaction receiptUserOpGasEstimate
preVerificationGas: u256verificationGasLimit: u256callGasLimit: u256paymasterVerificationGasLimit: ?u256paymasterPostOpGasLimit: ?u256Error Handling
InvalidUserOpSimulationFailedOpcodeValidationFailedPaymasterRejectedAccountNotDeployedFile Location
References