1

I am trying to develop a website for verification of certificates using React and Solidity.

I have reached a stage where a student can request for a certificate but I want a notification to go to the professor to approve/verify the certificate. Basically, I want a system where students request for a certificate and professors verify them. Could someone help with this?

Thank you very much in advance.

1
  • What problem do you have with this and what did you try already to solve it? Commented Mar 25, 2019 at 9:24

1 Answer 1

0

The tricky part in your scenario will be the notification part. There is no way to send general "notifications" in Ethereum. But here are some options:

1) Issue the request transaction normally and send a notification (email or whatever) with your backend system (so the notification has nothing to do with the blockchain)

2) Send some sort of transaction to the professor's wallet and the professor has some monitoring system which notifies him when there's a new transaction to his wallet. Or a smart contract which does something (emits an event for example ) and the professor monitors the smart contract.

Otherwise it's pretty basic stuff assuming the students and the professor can be identified with their public address. So something like this:

pragma solidity ^0.5.0;

contract Certs {

    mapping(address => string) requests;
    address professorAddr;

    modifier onlyProfessor() {
        require(msg.sender == professorAddr);
        _;
    }

    function requestCert(string memory certName) public {
        requests[msg.sender] = certName;
    }



    function approve(address requestAddr) public onlyProfessor {
        delete requests[requestAddr];
        // issue certificate in some way

    }
 }
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.