A supply chain tracker that can manage queues of processing operation , and then publish a nft as certificate about what happened in the process.
In this project the aim is to track supply chain information. The contract is ERC721 complaint , so it is capable to issue a certificate in the form of a non-fungible token ( NFT ) for the purpose of verifying the provenance of the production batch of a product. The NFT is immutable and therefore once issued cannot be changed. The NFT contains the information that lists all the various processing steps of the product batch at suppliers who have exclusive access. The contract is able to process production batches. The batch is identified by a code as the concatenation of block timestamp strings. The contract manages queues of products identified by and identification code . A supplier can pull a product pushing it to another queue. In this way it is possible to know in real time where products are processed. The supplier: - must be authorized by an authorized list entry ( white list ) - is identified in the software by a "wallet" address on blockchain - has a defined role depending on the type(s) of processing it can do on the product - can call up software functionality that writes down what happened downstream of the processing (e.g., temperature, etc.); - calls up smart contract features it is enabled to depending on the role(s) it has been assigned, the role here is defined as in what queue a supplier can push or pull a product - can have the special role of issuing the certificate to have the link . The link can be used to create a QR code The contract also manages the administration features. The administrator: - can have access to all features of the contract because he/she can be the owner ( for testing purpose the openzeppelin Ownable contract is not used ) - defines what suppliers are whitelisted and what roles suppliers have setting up who can push or pull from a specific queue of product - is identified by a wallet address like the suppliers. All of these information are saved in the contract.
How it's made
This project is made with: - hardhat to deploy the contract on polygon and mumbai - nextjs for the frontend - web3.storage for the NFT token uri creation. I used also @moonshotcollective/scaffold-moonshot-starter starter ( a fork of scaffold-eth) to put together the contract stuff and the frontend. I decided to publish the contract on polygon because gas fees are cheap and for this reason polygon can be a good candidate for a supply chain tracker.