Contracts :
The DonorContract is a Solidity smart contract designed to manage data related to organ donation. It tracks three main categories: pledges (people promising to donate organs), donors, and patients (organ recipients).
Data Storage:
Stores details like name, age, gender, medical ID, blood type, organs, weight, and height for pledges, donors, and patients.
Uses mappings (key-value pairs) to store information and arrays to maintain lists of IDs.
Functions:
Set Data: Add details for pledges, donors, or patients (ensures no duplicate medical_id).
Get Data: Retrieve information by medical_id or get lists/counts of all entries.
Validate Data: Check if an entry exists in the system using its medical_id.
The contract supports a decentralized system for managing organ donation data, ensuring integrity, transparency, and easy access to information.
The Migrations contract is a helper contract used in the Truffle framework to track the progress of smart contract deployments.
Owner: Only the deployer of the contract (the owner) can update the migration status.
Purpose: Records the last completed migration step to avoid re-executing the same deployment steps.
Key Function: set Completed(uint completed) updates the latest migration step (restricted to the owner).
Primarily used in the Truffle framework for managing contract deployment in a controlled and sequential manner.
Implementation :
In My blockchain project, the front-end was developed using HTML, CSS, and JavaScript, which provided a dynamic and interactive user interface. Users could interact with the blockchain by initiating transactions and viewing updates through the front-end. This interface was designed to be user-friendly, ensuring that the blockchain operations were accessible and understandable.
Contracts and Transactions
Details of Donor and Patient:
Details of Donor and Patient :
Patient and Donor Match Details :