UserOperation, Bundler, EntryPoint, and Contract Account. Optional components include Paymasters and Aggregators.
Building ERC-4337 transactions
ERC-4337 transactions are calledUserOperations to avoid confusion with the regular transaction type. UserOperations are pseudo-transaction objects that are used to execute transactions with contract accounts. ERC-4337 transactions have to be sent to nodes that include ERC-4337 bundlers.
The UserOperation object has a few fields.
ERC-4337 wallets
Users must have an ERC-4337 smart contract account to validateUserOperations. The core interface for an ERC-4337 wallet is:
Resources
- ERC-4337 proposal is the link to the official proposal and technical specification.
- @account-abstraction SDK is an npm package for using ERC-4337 developed by the authors of the proposal.
- Stackup provides node services with ERC-4337 bundlers and other ERC-4337 infrastructure.
- WalletKit is an all-in-one platform for adding smart, gasless wallets to your app. It has integrated support for ERC-4337 and comes with a paymaster and bundler included, requiring no extra setup.