Skip to content

HTMLCOIN/image-nft-marketplace-dApp

 
 

Repository files navigation

NFT Marketplace on Htmlcoin testnet

A. About

Full stack NFT market place based on Htmlcoin testnet network

Live demo: https://remix.qtum.info/nftmarketplace/



- Stack

- Project description

When a user lists an NFT for sale, the ownership of the item will be transferred from the creator to the marketplace contract.

When another user purchases an NFT, the purchase price will be transferred from the buyer to the seller and the item will be transferred from the marketplace to the buyer.

The marketplace owner will be able to set a listing fee. This fee will be taken from the seller and transferred to the contract owner upon completion of any sale, enabling the owner of the marketplace to earn recurring revenue from any sale transacted in the marketplace.

The marketplace logic consists of just one ECR721 smart contract


B. Deploying the smart contract

  1. Create a qtum wallet

    You can use qnekt wallet extension or create a qtum web wallet (choose option create from mnemonic)

    Save your mnemonic for later use.

  2. Fund your account with testnet qtum coins

    Go to qtum testnet faucet and paste the address generated in step 1, to receive some funds.

  3. Clone the repo

  4. Create an .env file with the following variables

REACT_APP_PINATA_KEY= < paste key from https://www.pinata.cloud/ >
REACT_APP_PINATA_SECRET= < paste secret from https://www.pinata.cloud/ >
REACT_APP_HTMLCOIN_NETWORK="https://testnet-janus.qiswap.com/api/"
REACT_APP_HTMLCOIN_PRIV_KEY= < a private key from a valid Htmlcoin address >
MNEMONIC= < mnemonic seed phrase >

Note: The NMENOMIC seed phrase from step 1.

  1. Deploy smart contract to qtum testnet

    Run the following:

truffle migrate --network testnet
  1. Verify contract

    Go to qtum testnet block explorer and search the address of the contract returned by truffle migrate from previous step


C. Bring up the NFT Market Place Web UI

Dev environment

npm run start

Production (docker based)

docker build -t qtum/nftstore .
docker run -d -p 3000:3000 --name qtumnft qtum/nftstore

D. Accessing the NFT Market place

On your Chrome browser go to http://localhost:3000/nftmarketplace

Make sure you have installed the Htmlcoin Qnekt wallet browser extension

About

Demo Image NFT Marketplace on Htmlcoin Web3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.5%
  • Solidity 15.7%
  • HTML 5.0%
  • CSS 3.1%
  • Dockerfile 0.7%