Giter Club home page Giter Club logo

erc6551-implementation's Introduction

Deploy on Vechain

  1. Run Thor
  2. npm i --force
  3. npx hardhat deploy --network vechain

Note: If you want to redeploy you need to remove all temporary files and redo the process.

Run Tests

  1. Follow previous steps to deploy
  2. Use NFT address printed in the console in ERC6551.test.js
  3. Run npx hardhat test --network vechain

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

erc6551-implementation's People

Contributors

makischristou avatar n00b21337 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.