This site is based on the great work of Hashlips. To build it from scratch please go to Hashlips YouTube channel. The site is adapted to communicate with Wasm contract on Shiden Network.
This repo provides a nice and easy way for linking an existing Wasm NFT smart contract to this minting dapp.
Clone this project:
https://github.com/Maar-io/ink-mint-dapp
Make sure you have node.js and yarn installed and then run:
yarn install
Rut it on local with:
yarn start
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.
Note: this dapp is designed to work with this PSP34 NFT smart contract, that takes no parameters in the mintNext()
function. But you can change that in the App.js file if you need to use functions like mint()
which that takes 2 params.
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.
There are a couple of other parameters in this file (left from EVM config), please ignore them but keep in config file.
{
"CONTRACT_ADDRESS": "b8QeEr72aJQKfaXcEDGwB5iwqGuF1b9oysHtj3nwMsdmgHa",
"SCAN_LINK": "https://shiden.subscan.io/account/b8QeEr72aJQKfaXcEDGwB5iwqGuF1b9oysHtj3nwMsdmgHa",
"NETWORK": {
"NAME": "Shiden",
"SYMBOL": "SDN",
"ID": 336
},
"NFT_NAME": "ShidenGraffiti",
"SYMBOL": "SHG",
"MAX_SUPPLY": 100,
"WEI_COST": "1000000000000000000",
"DISPLAY_COST": 1,
"MARKETPLACE": "SubWallet",
"MARKETPLACE_LINK": "https://",
"WS_PROVIDER": "wss://rpc.shiden.astar.network"
}
Make sure you copy your contract metadata.json from and paste it as src/redux/blockchain/abi.json
file.
Now you will need to create and change 2 images and a gif in the public/config/images
folder,
bg.png
example.gif
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;
}
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" />
Also remember to update the short_name and name fields in the public/manifest.json
file
{
"short_name": "NCC",
"name": "Coder Clone NFT"
}
After all the changes you can run.
yarn start
Watch this video to learn:
- Config ink! Contract
- Deploy NFT Collection
- Configure UI
That's it! you're done.