GithubHelp home page GithubHelp logo

nft-toolkit's Introduction

NFT toolkit: ERC721 with hardhat-deploy

This repo helps you learn to deploy and mint NFTs using Hardhat-deploy and ethers.js

Features

  1. Requires minimal configuration

    Just set up your .env file.

  2. Example ERC721

The included contract is barebone (for clarity) but functional.

ℹ️ the contract is intended for training purpose, it hasn't been vetted for production, use at your own risk.

  1. Example scripts for minting and testing

  2. Extra-functionalities thanks to Hardhat-deploy

    • npx hardhat deploy deploys only if your contract has changed
    • npx hardhat test enable test fixtures for faster tests
    • npx hardhat sourcify simplifies the process of contract verification with Sourcify.dev

Pre-requisites

  1. Node.js 16 LTS

  2. An INFURA account (optional)

    This repo has been pre-configured to use INFURA as a convenience but you can choose any provider you wish.

  3. Basic understanding of Ethereum/Solidity

  4. Basic understanding of Hardhat

Installation

    ```bash
    npm install
    ```

Configuration

Fill out your env values in .example-env then rename the file .env:

network specific node uri : "ETH_NODE_URI_" + networkName.toUpperCase()

ETH_NODE_URI_MAINNET=https://eth-mainnet.alchemyapi.io/v2/

generic node uri (if no specific found) :

ETH_NODE_URI=https://{{networkName}}.infura.io/v3/

network specific mnemonic : "MNEMONIC_ " + networkName.toUpperCase()

MNEMONIC_MAINNET=

generic mnemonic (if no specific found):

MNEMONIC=

Usage

Compile contract:

    ```bash
    npx hardhat compile
    ```

Deploy contract to Hardhat's dev network:

Start Hardhat's localhost network:

    ```bash
    npx hardhat node
    ```

Deploy on localhost network:

ℹ️ You can choose the network you want to interact with by using the --network suffix.

    ```bash
    npx hardhat deploy --network localhost
    ```

Deploy contract to mainnet:

    ```bash
    npx hardhat deploy --network production
    ```

Mint an NFT on Ethereum mainnet:

    ```bash
    npx hardhat mint-nft --token-uri "the-URI-of-your-NFT" --network production
    ```

Run test(s):

    ```bash
    npx hardhat test
    ```

Verify a contract with sourcify.dev:

    ```bash
    npx  hardhat --network mainnet sourcify
    ```

Credits to Ronan Sandford for creating Hardhat-deploy.

deploy-mainnet

nft-toolkit's People

Contributors

anegg0 avatar mbaxter avatar

Stargazers

 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.