This project is an example of mint pass nft smart contract with a nodejs backend and a Handlebars user interface. It is a simple implementation that swap Ether for erc721 tokens with timelocks, blacklisted users, roles and categories(silver, platinum, gold mint passes). Built with solidity this contract consumes chainlink feeds to bring offchain data like usd/eth current price on chain.
The process to have a mintpass is only to click on buy button in the user interface, a metamask transaction will pop up.
After transaction beeing completed, user will have to add the NFT token Id to his wallet with the contract address
This example has been deployed on Kovan testnet at following address 0xf484a46c14e0b44bb40275727587e14d3cc4d5b6
NODE JS
Node package manager
npm install
npx hardhat compile
Look for Deployment to know more about how to deploy this project.
Scripts can be found inside the scripts folder and can be excecuted like the command below. Scripts allow us to call methods or get variables from the contract using javascript
node scripts/scriptName.js
This project come with built in API which can be serve using following command
Node server.js
To deploy compiled contracts please enter commands below In that case, deployment is beeing done to ropsten testnet
npx hardhat run scripts/deploy.js --network ropsten
Tools used to create this project
- NodeJS - API Development
- Expressjs - API Framewwork
- Solidity - Smart contract language
- OpenZeppelin - Provides security products to build, automate, and operate decentralized applications.
- Hardhat-ethers - debugging
- DotEnv - environment variables
- Alchemy-web3 - Blockchain interactions
0.0.1
People who participated in this project development from day one
- Tommy Theodore - Initial work - tommy509
SPDX-License-Identifier: MIT. ISC
- Let the world know about this project 📢
- If it was useful to you buy us a beer🍺 or a coffee☕.
0x1552ef1C29D09310bebA7abEDa20Aa4717687670
- Thanks a lot for reading🤓.
⌨️ with ❤️ by tommy509 😊