- ERC-4337 turns a standard crypto wallet into a programmable smart contract — no changes to Ethereum’s base protocol required.
- Four key parts make it work: UserOperation, Bundler, EntryPoint, and Paymaster.
- Smart accounts let you offer gasless transactions, batch multiple actions, use social recovery, and accept ERC-20 tokens for gas fees.
- You can build a working smart account today using free tools like permissionless.js or viem and a bundler RPC from Pimlico or Alchemy.
- Chia Network solved a similar problem natively — every Chialisp coin is already programmable at the base layer, making Chia a useful mental model for understanding ERC-4337.
- Over 40 million smart accounts have been deployed across Ethereum and Layer 2 networks, with nearly 20 million deployed in 2024 alone.1
An account abstraction tutorial teaches you how to replace a basic Ethereum wallet with a programmable smart contract account using the ERC-4337 standard. This unlocks features like gasless transactions, social recovery, and batched operations — making blockchain apps far easier for real people to use.
Why Standard Ethereum Wallets Fall Short
If you have ever sent ETH, you used an Externally Owned Account, or EOA. An EOA is just a private key and a public address. It does one thing: sign transactions. That is it. You cannot batch two actions into one step, pay gas in anything except ETH, or recover your wallet if you lose your seed phrase. For developers building apps that non-technical people will use, EOAs are a real problem.
Think of it this way. You are a miner who just moved into blockchain development. You want to build a DeFi app where users do not need ETH in their wallet before they can do anything. With a standard EOA, that is impossible. The user must have ETH to pay gas before they can make their first move. That friction kills adoption before it starts.
Account abstraction solves this by replacing the rigid EOA model with a smart contract that acts as your wallet. The smart contract can enforce any rules you want — who can sign, how gas gets paid, and how many steps get bundled together. ERC-4337 is how you build that smart contract wallet on Ethereum today, without waiting for any core protocol changes.
ERC-4337 is the current industry standard for account abstraction on Ethereum and every EVM-compatible chain. It has been live on Ethereum mainnet since March 1, 2023, and works right now without any consensus-layer changes.1
The Four Pillars Every Account Abstraction Tutorial Covers
Before you write a single line of code, you need to understand the four parts of ERC-4337. They work together as a pipeline — each one passes work to the next until your action is recorded on-chain.
UserOperation
A UserOperation is a data object that describes what you want to do — for example, “send 10 USDC to Alice.” It looks a lot like a regular Ethereum transaction but includes extra fields that support programmable logic. Instead of going directly to the Ethereum mempool, it goes to a separate alternative mempool built specifically for ERC-4337.2 You can pack multiple instructions into a single UserOperation, which means you can approve a token and swap it in one step instead of two.
Bundler
A Bundler is a specialized node that watches the alternative mempool. It picks up valid UserOperations, packages several of them together into one transaction, and sends that bundle to the EntryPoint contract on-chain. Think of the Bundler as a mail carrier who collects outgoing letters from a neighborhood dropbox and delivers them to the post office in one trip. Services like Pimlico and Alchemy act as hosted bundlers so you do not have to run your own.1
EntryPoint Contract
The EntryPoint is a single, globally shared smart contract deployed at the same address on every EVM chain that supports ERC-4337. It receives the bundle from the Bundler, validates each UserOperation, and then calls the smart account contract to execute the action. Because it is a singleton — meaning only one copy exists per chain — all account abstraction activity funnels through the same trusted contract, which keeps the system predictable and auditable.3
Paymaster
The Paymaster is an optional smart contract that sponsors gas fees on behalf of the user. When a Paymaster is involved, your user can interact with your app without holding any ETH at all. The Paymaster pays the gas and can be set up to accept ERC-20 tokens as repayment, or to simply cover costs as a business decision (like offering a free trial). This is the feature that finally makes true “gasless” apps possible on Ethereum.4
| Goal | Feature to Use | Difficulty | Best Tool |
|---|---|---|---|
| Let users pay gas in USDC | Paymaster (ERC-20 mode) | Intermediate | Biconomy SDK |
| Sponsor gas for new users | Paymaster (sponsored mode) | Beginner | Alchemy Gas Manager |
| Approve + swap in one click | UserOperation batching | Beginner | permissionless.js |
| Recover a lost wallet | Social recovery module | Advanced | Safe (formerly Gnosis) |
| Multi-sig corporate wallet | Custom validateUserOp logic | Advanced | Safe + ZeroDev Kernel |
| Simple AA starter project | Smart account + bundler RPC | Beginner | ZeroDev / Thirdweb |
Account Abstraction Tutorial: Step-by-Step Setup
This walkthrough uses permissionless.js and viem — two well-maintained JavaScript libraries with built-in ERC-4337 support. You can use any testnet like Sepolia to practice without spending real ETH. Every step here maps to real, working code you can run today.
Step 1: Install Your Libraries
Open your terminal and create a new project folder. Then install the two main dependencies. These libraries handle the low-level ERC-4337 encoding for you, so you are not writing raw calldata by hand.
npm install viem permissionless
You will also need a Bundler RPC URL. Sign up for a free account at Pimlico (pimlico.io) or Alchemy (alchemy.com). Both provide a testnet bundler URL you can paste straight into your config. Think of this URL as the endpoint your UserOperations will be sent to before they reach the chain.
Step 2: Get Your Smart Account Address
Unlike a standard wallet where your address comes from your private key, a smart account address is calculated from a factory contract using a combination of your owner key and a salt value. This means you can know your smart account address before you ever deploy the contract on-chain. You can even receive funds at that address before it exists as a live contract — the factory deploys it the first time you send a transaction.
import { createSmartAccountClient } from "permissionless";
import { privateKeyToSimpleSmartAccount } from "permissionless/accounts";
import { createPublicClient, http } from "viem";
import { sepolia } from "viem/chains";
const publicClient = createPublicClient({
chain: sepolia,
transport: http("//rpc.sepolia.org"),
});
const smartAccount = await privateKeyToSimpleSmartAccount(publicClient, {
privateKey: "0xYOUR_PRIVATE_KEY",
factoryAddress: "0x9406Cc6185a346906296840746125a0E44976454",
entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
});
console.log("Smart Account Address:", smartAccount.address);
Step 3: Build and Send a UserOperation
Once you have your smart account object, you can construct a UserOperation. In the simplest case, this is just defining a recipient address, a value in wei, and optional calldata. The library handles wrapping this into the correct ERC-4337 format. You then send the UserOperation to your Bundler RPC endpoint, which validates it and forwards it to the EntryPoint contract.5
import { createSmartAccountClient } from "permissionless";
import { http, parseEther } from "viem";
const smartAccountClient = createSmartAccountClient({
account: smartAccount,
chain: sepolia,
bundlerTransport: http("//api.pimlico.io/v1/sepolia/rpc?apikey=YOUR_KEY"),
});
const txHash = await smartAccountClient.sendTransaction({
to: "0xRecipientAddress",
value: parseEther("0.001"),
data: "0x",
});
console.log("Transaction Hash:", txHash);
Step 4: Add a Paymaster for Gasless Transactions (Optional)
To enable gasless transactions, you connect a Paymaster to your smart account client. The Paymaster service intercepts each UserOperation before it is sent, attaches a signed sponsorship payload called paymasterAndData, and then releases the operation to the Bundler. From the user’s perspective, the transaction just works — no ETH required. This is how mobile apps and gaming platforms are starting to onboard millions of new users who have never heard of gas fees.
import { createPimlicoPaymasterClient } from "permissionless/clients/pimlico";
const paymasterClient = createPimlicoPaymasterClient({
transport: http("//api.pimlico.io/v2/sepolia/rpc?apikey=YOUR_KEY"),
});
const smartAccountClient = createSmartAccountClient({
account: smartAccount,
chain: sepolia,
bundlerTransport: http("//api.pimlico.io/v1/sepolia/rpc?apikey=YOUR_KEY"),
middleware: {
sponsorUserOperation: paymasterClient.sponsorUserOperation,
},
});
Step 5: Sign and Track Your Transaction
When you call sendTransaction, your smart account client automatically signs the UserOperation hash using your owner key. The signature can come from a standard private key, a passkey stored in your device’s secure enclave, or even a social login via a service like Web3Auth. Once signed, the Bundler submits the bundled transaction on your behalf. You can track the result on any block explorer using the transaction hash returned from sendTransaction.6
Top Tools for Account Abstraction Development
You do not have to build everything from scratch. A strong ecosystem of production-ready tools exists for ERC-4337 development. Choosing the right one depends on your chain target, your team’s language preference, and how much low-level control you want.
Safe (Formerly Gnosis Safe)
Safe is the most widely audited smart account implementation in the industry. If you are building a multisig wallet, a treasury, or any high-value custody solution, Safe is the standard starting point. It supports ERC-4337 through its Safe{Core} AA SDK and is deployed on over a dozen EVM networks. The Safe contracts have secured hundreds of billions of dollars in value, making them a well-tested foundation for enterprise-grade development.
ZeroDev and Kernel
ZeroDev offers a modular smart account called Kernel, built specifically for fast and user-friendly account abstraction. Its plugin architecture lets you attach custom validation logic — like passkey signing or session keys — without rewriting the base contract. ZeroDev is a strong choice if you want to move quickly and still have fine-grained control over how your smart account behaves.
Biconomy SDK
The Biconomy SDK is designed for developers who need gasless transactions and social login integration with minimal setup. It wraps the ERC-4337 complexity behind a clean API and pairs well with Web2-style onboarding flows. It is a popular choice for mobile apps where the goal is to hide all blockchain complexity from the end user.
ERC-4337 vs Traditional Wallets: Key Differences
| Feature | EOA (Standard Wallet) | ERC-4337 Smart Account |
|---|---|---|
| Gas payment | Must pay in ETH | Can use ERC-20 or Paymaster sponsorship |
| Transaction batching | One action at a time | Multiple actions in one UserOperation |
| Key recovery | Seed phrase only — lose it, lose funds | Social recovery via trusted guardians |
| Signature schemes | ECDSA only | Passkeys, multisig, session keys, biometrics |
| Protocol changes needed | N/A | None — works on top of existing Ethereum |
| Deployable today | Yes | Yes — on Ethereum, Base, Polygon, Optimism, and more |
What Chia Network Developers Already Know About This
If you come from a Chia background, account abstraction on Ethereum will feel familiar. Chia’s coin model has been natively “abstracted” since day one. In Chialisp, there are no traditional accounts at all — only programmable coins. Every coin is locked by a puzzle written in Chialisp, and to spend it you must provide a solution that satisfies the puzzle’s conditions.7
The parallel to ERC-4337 is direct. The Chialisp puzzle is functionally equivalent to a smart account’s validateUserOp() logic — both are programs that define the rules under which funds can move. The Chialisp solution maps to the signed UserOperation: proof that the conditions have been met. The key difference is that Chia built this programmable logic into its base layer, while Ethereum had to add it on top via ERC-4337 without changing the core protocol.
For miners crossing over into Ethereum development, this is worth noting: Chia’s approach proves that programmable spending conditions at the base layer are not just possible — they can be more secure and auditable than Ethereum’s global account model. Understanding Chialisp’s coin-and-puzzle model gives you a clean mental framework for reasoning about smart accounts on any chain. To go deeper on how Chialisp achieves this, read our full breakdown of how Chialisp is transforming blockchain smart contracts.
Real-World Adoption: ERC-4337 in Production
ERC-4337 is not experimental anymore. Since launching on Ethereum mainnet on March 1, 2023, the standard has driven deployment of over 40 million smart accounts across Ethereum and its Layer 2 networks, with nearly 20 million of those accounts created in 2024 alone — a 7x year-over-year increase. The vast majority of UserOperations processed use Paymasters, meaning real applications are already sponsoring gas for their users at scale.1 Networks like Base, Polygon, and Optimism have seen the strongest adoption, driven by gaming, social, and DeFi apps that need seamless user experiences.
“Modern account abstraction is ‘really elegant’ because it doesn’t require changes to the underlying protocol like other upgrades before it.”
— Vitalik Buterin, Ethereum co-founder, speaking at ETHcc in Paris8
Beyond individual dApps, the ERC-4337 ecosystem is evolving rapidly. EIP-7702, which shipped as part of Ethereum’s Pectra upgrade in May 2025, added a new pathway that lets existing EOA wallets temporarily act as smart accounts. And on March 1, 2026, Vitalik Buterin confirmed that EIP-8141 — which would bring native account abstraction directly into Ethereum’s base protocol — is expected to ship via the Hegotia hard fork within one year.9 ERC-4337 is not just a stepping stone — it is the live production standard that millions of users are already depending on.
Conclusion
Account abstraction via ERC-4337 is the most important usability upgrade in Ethereum’s history, and it is available to you right now. By following this account abstraction tutorial, you can move from a basic EOA setup to a fully programmable smart wallet in a single afternoon. Whether your goal is gasless onboarding, social recovery, batched DeFi interactions, or custom signing logic, the ERC-4337 stack has a production-ready tool for each use case. If you are coming from Chia development, you already understand the core insight: programmable spending conditions make blockchain apps safer and more user-friendly. The only difference is that on Ethereum, you have to wire this up yourself — and now you know exactly how. Start on Sepolia testnet, pick one of the SDK options above, and deploy your first smart account today.
Account Abstraction Tutorial FAQs
What is an account abstraction tutorial for beginners?
An account abstraction tutorial for beginners walks you through replacing a standard Ethereum wallet with a programmable smart contract account using ERC-4337. It covers the four core components — UserOperation, Bundler, EntryPoint, and Paymaster — and shows you how to deploy and use a smart account on a testnet using libraries like permissionless.js and viem.
Do I need to know Solidity to follow this account abstraction tutorial?
No — you do not need deep Solidity knowledge to follow this account abstraction tutorial if you use an SDK like permissionless.js, ZeroDev, or Biconomy. These libraries abstract the smart contract layer and let you interact with ERC-4337 using standard JavaScript. Solidity knowledge becomes useful when you want to write custom validation logic or build your own Paymaster.
What is the difference between ERC-4337 and EIP-7702?
ERC-4337 is a smart contract-based system that runs on top of Ethereum and gives you a fully programmable smart account from scratch. EIP-7702, which shipped in Ethereum’s Pectra upgrade in May 2025, is a lighter approach that lets an existing EOA wallet temporarily take on smart account behavior without full deployment. For new projects, ERC-4337 is the more flexible and production-hardened choice.
Can I use account abstraction on blockchains other than Ethereum?
Yes — ERC-4337 works on any EVM-compatible chain. It is already live in production on Base, Polygon, Optimism, Arbitrum, BNB Chain, and more. Because the EntryPoint contract is deployed at the same address across all these networks, your smart account code and tooling transfers across chains with minimal changes.
How does Chialisp compare to ERC-4337 smart accounts?
Chialisp compares to ERC-4337 smart accounts in a meaningful way: both make transaction logic programmable, but Chia baked this into its base layer from the start. In Chia, every coin is locked by a Chialisp puzzle — a program that defines spending conditions — which is functionally similar to the validateUserOp logic in an ERC-4337 smart account. Chia achieved native programmable accounts without needing an add-on layer like ERC-4337.
Account Abstraction Tutorial Citations
- Alchemy — What is ERC-4337? Account Abstraction Overview
- Ethereum Improvement Proposals — ERC-4337: Account Abstraction Using Alt Mempool
- Hacken — ERC-4337 & Account Abstraction: A Comprehensive Overview
- OpenZeppelin Docs — Account Abstraction (ERC-4337)
- QuickNode — Account Abstraction and ERC-4337 Guide (Part 1)
- Stackup — What is ERC-4337?
- Chia Documentation — Coin Set Model Introduction
- Decrypt — Vitalik Buterin Explains How Ethereum Plans to Make Wallets as Simple as Email (ETHcc, Paris)
- Spendnode — Vitalik Buterin EIP-8141: Account Abstraction via Hegotia Fork
- Chialisp.com — About Chialisp
