Minting NFT DApp
Minting platform for any eth nft collection just connecting the wanted contract
How to use
This repository is intended to run with my smart contract project also based on hashlips original project.
First things first, you'll need to setup up the files that the minting dapp will use to read the contract. The needed changes is:
- In src/scripts/main.tsx change the config path to your contract config.
import CollectionConfig from '../../../erc721-dynamic-suply/config/CollectionConfig'
- In src/scripts/lib/NftContractType.ts compile your contract and target the generated typeschain file and the right contract name intead of "NftContract" (if isn't yet)
import { NftContract as NftContractType } from '../../../../erc721-dynamic-suply/typechain/index'
- In src/scripts/lib/Whitelist.ts target the JSON file with the list of whitelisted users.
import whitelistAddresses from '../../../../erc721-dynamic-suply/config/whitelist.json'
- In src/scripts/react/Dapp.tsx you'll have to change the path three times.
import CollectionConfig from '../../../../erc721-dynamic-suply/config/CollectionConfig'
import NetworkConfigInterface from '../../../../erc721-dynamic-suply/lib/NetworkConfigInterface'
const ContractAbi = require('../../../../erc721-dynamic-suply/artifacts/contracts/' + CollectionConfig.contractName + '.sol/' + CollectionConfig.contractName + '.json').abi
- At least, in src/scripts/react/MintWidget.tsx
import NetworkConfigInterface from '../../../../erc721-dynamic-suply/lib/NetworkConfigInterface'
-
After all of this, you can simply use
yarn install
ornpm install
to install dependencies. -
To execute the project in dev mode, execute
yarn dev-server
-
To build use
yarn build
-
Deploy the Dapp in any website host using the files generated in public folder.
Why?
The idea of this project was to simpy study solidity and how this can be functional in real world NFT collections although this project can be used in production, this isn't the best code possible and can enhanced in the future.
Found a bug?
Create a issue in the repo or simply create a pull request with the solution and a description about it (I'll thank a lot).
Disclaimer
This code was heavily based on Hashlips mint dapp repository so give a star on that project too!
Special thanks to Liarco and Daniel (Hashlips) by creating a very intuitive guide for beguinners.