Account Abstraction
Account Abstraction
ERC-4337 smart accounts, bundler, and paymaster integration
Account Abstraction
The NERO MPC SDK implements ERC-4337 Account Abstraction to enable smart contract wallets with gas sponsorship, batched operations, and programmable validation. Available when using the Pedersen DKG protocol (protocol: "pedersen").
Architecture
SimpleAccount (ABI encoding, address derivation)
│
BundlerClient (UserOperation submission)
│
External Bundler Service (eth_sendUserOperation, eth_estimateUserOperationGas)
PaymasterClient (Gas sponsorship)
│
External Paymaster Service (pm_sponsorUserOperation)The MPC-derived EOA serves as the owner of the smart account. Addresses are counterfactual — computed before contract deployment.
Core Components
| Component | Purpose |
|---|---|
| SimpleAccount | ERC-4337 compliant smart contract wallet. ABI encoding, address derivation, UserOperation construction |
| BundlerClient | Submits UserOperations to an off-chain bundler via eth_sendUserOperation |
| PaymasterClient | Requests gas sponsorship via pm_sponsorUserOperation. Supports ERC-20 token gas payments |
| EntryPoint | On-chain singleton that validates and executes UserOperations |
UserOperation Lifecycle
- Fetch current account nonce via RPC
- Encode target contract call data (
executeorexecuteBatch) - Estimate gas via bundler (
estimateUserOperationGas) - Optionally fetch paymaster data if sponsorship is enabled
- Assemble complete UserOperation
- Sign UserOperation hash with MPC
- Submit via
sendUserOperation - Poll for receipt via
waitForUserOperationReceipt