Skip to content

Maar-io/ink-mint-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minting UI for Wasm smart contract on Astar/Shiden

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.

HashLips NFT minting dapp 🔥

This repo provides a nice and easy way for linking an existing Wasm NFT smart contract to this minting dapp.

Installation 🛠️

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

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.

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.

Configuration 🏭

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"
}

Update Metadata

Make sure you copy your contract metadata.json from and paste it as src/redux/blockchain/abi.json file.

Update Images

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

Update Theme

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;
}

Favicon

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

Other

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

Video recording (smart contract plus UI)

Watch this video to learn:

  • Config ink! Contract
  • Deploy NFT Collection
  • Configure UI

Youtube

That's it! you're done.