CEGC is a Decentralized Application where you can mint a Ethereum Gift Card NFT for you or any wallet address, then you can redeem the NFT and withdraw it to your wallet.
- GiftCard Solidity Contract giftcard-nft
- Create React App Create React App
- Moralis : react-moralis
- Web3uikit : web3uikit
- Web3.js : web3.js
- Material UI @mui/material
- working on GOERLI testnet ( Get Goerli Testnet Faucet )
- Mint customizable ERC721 Token (NFT) with your desired value
- Redeem NFT and withdraw the value to the destination wallet
- Transfer NFT to a destination wallet
- Get the latest Eth price from chainlink
- Node.js v16.xx.x
-
Clone repo
git clone https://github.com/sam-shariat/crypto-ethereum-giftcard-nft.git
-
Install packages
npm install or yarn install
-
Run application
npm start or yarn start
-
Open development server on http://localhost:3000
- Install a wallet extention like Metamask and create an account Metamask Chrome Extention
- Add funds using goerli testnet faucet
- Enjoy
- You need to add these configs to webpack for building this package
- webpack.config.js can be found at node_modules/react-scripts/config
{ ...currentConfig,
resolve: {
fallback: {
"fs": false,
"tls": false,
"net": false,
"path": false,
"zlib": false,
"http": false,
"https": false,
"stream": false,
"crypto": false,
"os": require.resolve("os-browserify/browser"),
"crypto-browserify": require.resolve('crypto-browserify'),
// if you want to use this module also don't forget npm i crypto-browserify
}
}
- Then Run
npm build or yarn build
- build files will be distributed to 'build' folder
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request