Techiio-author
Started by Sidhdarth BasuMay 20, 2022

Open
How can I connect smart contract to react website for mint nfts ?

5 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 5 VIEWES SHARE

I am new in this technolongy so please someone help me about this.

1 Replies

Techiio-commentatorPrince Mishra replied 3 months ago0 likes0 dislikes

Hope this will be helpful to you read it carefully you will understand..

1. Installation 🛠️

If you are cloning the project then run this first, otherwise you can download the source code on the release page and skip this step.

git clone https://github.com/HashLips/hashlips_nft_minting_dapp.git

Sh

Make sure you have node.js installed so you can use npm, then run:

npm install

Sh

2. Usage ℹ️

In order to make use of this dapp, all you need to do is change the configurations to point to your smart contract as well as update the images and theme file.

For the most part all the changes will be in the public folder.

To link up your existing smart contract, go to the public/config/config.json file and update the following fields to fit your smart contract, network and marketplace details. The cost field should be in wei.

Note: this dapp is designed to work with the intended NFT smart contract, that only takes one parameter in the mint function "mintAmount". But you can change that in the App.js file if you need to use a smart contract that takes 2 params.

{"CONTRACT_ADDRESS": "0x827acb09a2dc20e39c9aad7f7190d9bc53534192",
"SCAN_LINK": "https://polygonscan.com/token/0x827acb09a2dc20e39c9aad7f7190d9bc53534192",
"NETWORK": {
"NAME": "Polygon",
"SYMBOL": "Matic",
"ID": 137
},
"NFT_NAME": "Nerdy Coder Clones",
"SYMBOL": "NCC",
"MAX_SUPPLY": 1000,
"WEI_COST": 75000000000000000,
"DISPLAY_COST": 0.075,
"GAS_LIMIT": 285000,
"MARKETPLACE": "OpenSea",
"MARKETPLACE_LINK": "https://opensea.io/collection/nerdy-coder-clones",
"SHOW_BACKGROUND": true
}

JSON

Make sure you copy the contract ABI from remix and paste it in the public/config/abi.json file.
(follow the youtube video if you struggle with this part).

Now you will need to create and change 2 images and a gif in the public/config/images folder, bg.png, example.gif and logo.png.

Next change the theme colors to your liking in the public/config/theme.css file.

:root {
--primary: #ebc908;
--primary-text: #1a1a1a;
--secondary: #ff1dec;
--secondary-text: #ffffff;
--accent: #ffffff;
--accent-text: #000000;
}

CSS

Now you will need to create and change the public/favicon.ico, public/logo192.png, and
public/logo512.png to your brand images.

Remember to update the title and description the public/index.html file

<title>Nerdy Coder Clones</title>
<meta name="description" content="Mint your Nerdy Coder Clone NFT" />

HTML

Also remember to update the short_name and name fields in the public/manifest.json file

{
"short_name": "NCC",
"name": "Coder Clone NFT"
}

JSON

After all the changes you can run.

npm run start

Sh

Or create the build if you are ready to deploy.

npm run build

Sh

Now you can host the contents of the build folder on a server.

That's it! you're done.

You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance