0x-maker / erc6551-implementation

Hardhat repo with basic erc6551 implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Managers - Hardhat implementation

This is the standard Hardhat implementation of ERC6551 used for deploying The Managers NFT project.

What is implemented in this NFT?

Where is ERC6551 part?

Key part is in tokenBoundCreation function that creates a NEW smart contract wallet and it is called when each ERC721A NFT is created

function tokenBoundCreation(uint256 quantity, uint256 currentMinted) internal returns (bool) {
    for (uint256 i = 1; i <= quantity; i++) {
        ERC6551Registry.createAccount(
            ERC6551AccountImplementation,
            block.chainid,
            address(this),
            currentMinted + i,
            0,
            abi.encodeWithSignature("initialize()", msg.sender)
        );
    }

    return true;
}

How to deploy it?

We are using Hardhat deploy plugin https://github.com/wighawag/hardhat-deploy so all this repo needs is for you to run npx hardhat deploy Don't forget to set .env variables

Have trouble installing?

Check here https://github.com/wighawag/hardhat-deploy#installation or just use npm install --force

Smart contract details

NFT contract is deployed here https://etherscan.io/address/0x8c34E6e60731D1Ff7E26c712EA1f798F90F29Ec6#code

Airdrop Starter Pack contract is deployed here https://etherscan.io/address/0xa67571f7a10c1e30eeefa42bcdd1a9548876584c#code

NFT data and provenance

https://github.com/managers-nft/nft-data

About

Hardhat repo with basic erc6551 implementation

License:MIT License


Languages

Language:JavaScript 50.9%Language:Solidity 49.1%