Git Product home page Git Product logo

nft-marketplace-solidity-hardhat-nexjs-web3js-tailwind's Introduction

NFT Marketplace Tutorial

image

This repository is related to the [upcoming] tutorial. It contains the boilerplates code for a functioning Ethereum NFT marketplace.

Prerequisites

  • Metamask

Installation

Install the node packages:

yarn install

Compile the Smart Contracts:

npx hardhat compile

You have two ways to interact with the NFT Marketplace:

  • Locally using Hardhat
  • Deploying the contracts on Polygon Mumbai-testnet

Deploying the NFTMarketplace locally

Open your terminal and run:

npx hardhat node

This will start a local Ethereum blockchain node, log 19 wallets and their private keys.

Now in a new terminal window run:

npx hardhat run ./scripts/deploy.js --network localhost

This will deploy the contracts on the local ethereum node and print out their addresses (see: change contracts address section)

Deploying the NFTMarketplace on Polygon Mumbai

As is, the contracts contained in the repository, are already deployed on Polygon Mumbai-testnet.

If you want to work with brand new contracts, though, you'll need to:

  1. Navigate to hardhat.config.js file in the root folder and substitute the private key, with your wallet's private key.

image

  1. Get some test MATIC from an online faucet such as this one

Once you'll have both, run the following code in your terminal:

npx hardhat run ./scripts/deploy.js --network mumbai

This will log the address of the newly deployed contracts.

Refer to the next section to learn how to change the contracts adress the front-end will interact with.

Change The NFT Marketplace Contracts Adresses

Navigate to /pages/utils/options.js and substitute the contracts addresses with new ones.

image

Disclaimer

All the work contained in this repository is provided ​“AS IS”. Developer makes no other warranties, express or implied, and hereby disclaims all implied warranties, including any warranty of merchantability and warranty of fitness for a particular purpose. The code should not be used in a production environment.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

nft-marketplace-solidity-hardhat-nexjs-web3js-tailwind's People

Contributors

eversmile12 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.