Ankita.eth
GithubContact
  • About Ankita
  • experience
    • TECHNOLOGIES
    • Frontend
      • Javascript
      • React
      • NextJS
      • HTML & CSS
      • UI Libraries & Frameworks
        • Tailwind CSS
        • Comprehensive Guide to UI Libraries and Frameworks
    • Backend
      • Node.js
      • Express.js
    • Database
      • Mongodb, Mongoose
      • PostgresSQl
      • MySQL
    • Packege Mangers
      • NPM-Node Packege Manager
      • Yarn
      • Yarn 2 (Berry)
      • PNPM
      • BUN
      • Commands cheatsheet
    • API Providers
      • Alchemy
      • Telegram Bot
      • CoinMarket
      • Thirdweb
      • Infura
      • Moralis
    • DevOps/Infrastructure
      • Docker
      • Kubernetes
      • CI/CD
      • Docker Swam
    • Protocols
      • ERCs & EIPs
        • ERC-20
        • ERC-721
        • ERC-1155
        • ERC-4337
        • ERC-6551
        • ERC-777
        • ERC-3643
        • EIP-7702
        • ERC-7715
        • ERC-7739
        • EIP-6780
        • EIP-5792
        • ERC-4626
        • EIP-1559
        • ERC-404
        • ERC-3643
        • ERC-223
    • Web3 Toolkits
      • Foundry
      • Hardhat
      • RemixIDE
    • Messaging/Caching
      • Kafka
      • Redis
      • Sendgrid
    • Blockchain
      • Solana
      • Ethereum
      • Polygon & Zero knowldge Proof
      • Bitcoin
      • Solidity
    • Deployment Platforms
      • AWS
      • Vercel
      • Heroku, Render
      • Domain setup
  • SDKs
    • Google Cloud SDK
    • AWS SDK
    • Firebase SDK
  • EOF EVM Object Format
  • Articles
    • Medium Articles
    • 🌐 My Work
  • 📞 Get in Touch
Powered by GitBook
On this page

Was this helpful?

  1. experience
  2. Protocols
  3. ERCs & EIPs

ERC-4337

ERC-4337: Account Abstraction 🔐

ERC-4337 introduces account abstraction, allowing for smart contract wallets to be used as easily as regular externally owned accounts (EOAs). This standard enables advanced features like social recovery, multi-signature wallets, and sponsored transactions without changes to the Ethereum protocol.

Key features of ERC-4337:

  • Introduces "UserOperations" as an alternative to traditional transactions

  • Enables gasless transactions and batched transactions

  • Allows for customizable account logic and recovery mechanisms

ERC-4337 was introduced to address several limitations of traditional Ethereum accounts and to enhance the user experience in blockchain interactions. Here's why it was introduced and how it's helpful in the blockchain ecosystem:

Why ERC-4337 was introduced:

  • To overcome the limitations of Externally Owned Accounts (EOAs)

  • To enable more flexible and programmable account behaviors

  • To improve user onboarding and reduce complexity for new users

  • To allow for more advanced security features at the account level

How ERC-4337 is helpful in blockchain:

  • Improved User Experience: Simplifies onboarding by allowing users to interact with dApps without managing private keys or understanding gas fees

  • Enhanced Security: Enables built-in multi-factor authentication and social recovery options

  • Flexible Account Logic: Allows for programmable spending limits, automated actions, and other custom behaviors

  • Gas Abstraction: Enables sponsored transactions, where dApps or third parties can pay for users' gas fees

  • Batched Transactions: Improves efficiency by allowing multiple operations to be executed in a single transaction

By introducing these features, ERC-4337 aims to make blockchain interactions more user-friendly, secure, and flexible, potentially accelerating the adoption of blockchain technology and decentralized applications.

Example of a simplified UserOperation structure:

const userOp = {
  sender: '0x...',  // Address of the smart contract account
  nonce: 1,
  initCode: '0x...',  // Code to deploy the account if it's not deployed yet
  callData: '0x...',  // The actual operation to perform
  callGasLimit: 200000,
  verificationGasLimit: 100000,
  preVerificationGas: 50000,
  maxFeePerGas: ethers.utils.parseUnits("20", "gwei"),
  maxPriorityFeePerGas: ethers.utils.parseUnits("5", "gwei"),
  paymasterAndData: '0x...',  // Optional, for sponsored transactions
  signature: '0x...'  // Signature authorizing the operation
};
PreviousERC-1155NextERC-6551

Last updated 8 months ago

Was this helpful?