Prototype code for Certificate Generation and Validation on the Blockchain for SIH (Smart India Hackathon) by team NeoGlyphs
To set up the HashComparer smart contract and IPFS storage, follow these steps for a smooth installation process.
-
Clone the Repository:
git clone https://github.com/kshitijaucharmal/Blockchain-Certificate
-
Switch to the Smart Contracts Branch:
git checkout smart-contracts cd HashComparer
-
Install Dependencies:
npm install npm install --save-dev hardhat
-
Run Tests:
npx hardhat test
-
Switch to the IPFS Storage Branch:
git checkout ipfs-storage cd CertificateGen
-
Install Dependencies:
npm install
-
Query Data on IPFS: To retrieve data from IPFS, run the following command:
node src/query.mjs
-
Generate Certificate (Optional): To store data on IPFS, use the following command. Note that data has already been stored, so you can skip this step. If you wish to store new data, make sure to uncomment lines 52 and 57 in the
generate_certificate.mjs
file.node src/generate_certificate.mjs
By following these instructions, you'll have the HashComparer smart contract and IPFS storage set up and ready for use.