Based on the [ERC-721] standard, this smart contract allows the creation of a non-fungible token (NFT) that represents a student's degree. The NFT is minted by the university and sent to the student's wallet. The student can then transfer the NFT to a potential employer, who can verify the student's degree by checking the NFT's metadata.
- Clone the repo
git clone
- Install NPM packages
npm install
- Copy the .env.example file and rename it to .env
cp .env.example .env
- Fill in the .env file with your Infura project ID and your Metamask mnemonic
INFURA_PROJECT_ID=your_infura_project_id MNEMONIC=your_metamask_mnemonic
- Compile the smart contract
$truffle compile or $npm run compile
- Start Ganache
$ganache - Migrate the smart contract to the blockchain
$truffle migrate or $npm run migrate
- Run the tests
$truffle test or $npm run test
- Create a new project on Infura
- Copy the project ID and paste it in the .env file
INFURA_PROJECT_ID=your_infura_project_id
- Create a new wallet on Metamask
- Copy the mnemonic and paste it in the .env file
MNEMONIC=your_metamask_mnemonic
- Enable the Sepolia testnet network in truffle-config.js
- Run
truffle deploy --network sepolia
In your terminal, run the following command to start the truffle console:
$truffle console --network sepoliaIn the truffle console, run the following commands to interact with the smart contract:
truffle(sepolia)> let instance = await DiplomaToken.deployed()