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-6551

ERC-6551: Non-Fungible Token Bound Accounts 🔗

ERC-6551 proposes a standard for creating unique blockchain accounts for non-fungible tokens (NFTs). This allows each NFT to own assets and interact with applications, effectively turning them into smart contract wallets.

Key features of ERC-6551:

  • Each NFT can have its own account to hold assets and execute transactions

  • Enables NFTs to own other NFTs, creating complex ownership structures

  • Allows for the creation of "nested NFTs" and more complex digital asset management

Example of creating an account for an NFT:

interface IERC6551Registry {
    function createAccount(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt,
        bytes calldata initData
    ) external returns (address);
}

contract NFTWallet {
    IERC6551Registry private registry;
    
    constructor(address _registry) {
        registry = IERC6551Registry(_registry);
    }
    
    function createAccountForNFT(
        address tokenContract,
        uint256 tokenId
    ) external returns (address) {
        return registry.createAccount(
            address(this),  // implementation
            block.chainid,  // chainId
            tokenContract,
            tokenId,
            0,  // salt
            ""  // initData
        );
    }
}

These ERCs represent significant advancements in Ethereum's capabilities, enabling more flexible and powerful smart contract interactions and asset management.

PreviousERC-4337NextERC-777

Last updated 8 months ago

Was this helpful?