This is a simple DApp allows users to raise donations or funds through minting NFTs, the user does not need to be aware that the Ether is sent to the donation address, since it is handled transparently by the contract. A user can mint an NFT by signing his signature or autograph or even draw anything on the canvas, then click on the mint button to mint the NFT.
The smart contract uses Openzeppelin contracts and libraries such as ERC721Enumerable, Counters and Ownable.
The contract is deployed and verified on Ropsten testnet at 0x43D6Ff6FEe89CbfDFF3576eA300DcAAE3899dB03
- user can mint an NFT by signing his/her signature or autograph or even draw something on the canvas.
- A clear button to clear the canvas and restart the process before minting.
- The minted NFT gets uploaded to IPFS server along with the metadata.
- Each NFT minted has 3 properties, ID, name and description.
- Currently the name and description properties are static, this could be upgraded into dynamic names and descriptions.
- GoodNFT DApp requires Metamask browser wallet extension to interact with.
- Connect metamask browser wallet to Ropsten Test Network.
- Request and get test etheres for the metamask account from Ropsten Faucet to make transactions.
- GoodNFT Smart Contract is deployed to Ropsten Testnet - 0x43D6Ff6FEe89CbfDFF3576eA300DcAAE3899dB03
- Access the GoodNFT DApp at GoodNFT Website and start minting your NFTs.
npm install -g truffle
npm i ganache-cli
ganache-cli --port 8545
git clone https://github.com/fbsaif/blockchain-developer-bootcamp-final-project.git
npm install
truffle compile
truffle migrate
truffle test
npm start
- Open metamask browser wallet and connect network to Localhost 8545.
- Import accounts from ganache-cli into the metamask browser wallet to make transactions on the DApp.
npm install -g truffle
git clone https://github.com/fbsaif/blockchain-developer-bootcamp-final-project.git
npm install
- Create a new .env file in the project directory.
- Copy and paste the contents of .env.example into the new .env file.
- Add your seed phrase from metamask wallet to the seed phrase section in the .env file
- Get a project API-KEY from https://infura.io/ and added to your choosen network in the .env file.
- Go to
truffle-config.js
- Add your chosen network anywhere below
networks: {
, use the code below as an example
ropsten: {
provider: () => new HDWalletProvider(process.env.SEED_PHRASE, process.env.ROPSTEN_RPC_URL),
network_id: 3, // Ropsten's id
gas: 5500000, // Ropsten has a lower block limit than mainnet
confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
},
- Change the RPC_URL name in the second line of the code above to your chosen network name, for example,
process.env.MAINNET_RPC_URL
- Make sure that you added your RPC URL of your chosen network in the .env file.
truffle compile
truffle migrate --network <network_name>
truffle test
npm start
- Open metamask browser wallet and connect network to your chosen network
- Get Eth or test Eth wallet to make transactions on the DApp.
Key files and folders structures are as below:
.
├── build
├── contracts
│ └── GoodNFT.sol
│ └── Migrations.sol
├── migrations
│ └── 1_initial_migration.js
│ └── 2_GoodNFT_migration.js
├── node_modules
├── public
├── src
│ └── assets/bg
│ └── contracts
│ └── redux
│ └── App.js
├── test
│ └── GoodNFT.test.js
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
└── truffle-config.js
0x7df34834d123124b48459feaadc7472fad025674