4

Objective:

I want to build a public blockchain where people can put their education certificates on the chain. The certificate's issuer and recipient both put their signature on the certificate to verify where it came from and who it is given to.

Concern:

Firstly, I think it's quite unfeasible to treat the EVM as a storage unit simply because the gas cost to manage it would be ridiculous. This leads me to think I'll have to put the storage unit on an off-chain DAPP that is perhaps regularly updated whenever someone submits a new certificate through executing the smart contract in EVM.

Secondly, I'm not sure if Ethereum supports smart contracts that create a certificate which contains the issuer and recipient's "signature" as a variable. Most of the articles I've read are about multi-sig wallets, but not necessarily about putting multiple signatures on an object that the contract generates.

Question:

  1. What would be the best way for me to design this DAPP's structure?

  2. How do I enable users to put multiple signatures onto the certificate using Solidity (it if is possible at all)?

  3. Is what I am proposing beyond the scope of what EVM allows people to do?

3

You should use a mapping to store the certificates and two mappings to index by issuers and recipients. Best approach might be both issuers an recipients are Ethereum addresses.

struct cert {
    uint256 certId;
    address issuerAddress;
    address recipientAddress;
    string certContent;
    timestamp issuingDate;
}
mapping (uint256 => cert) certificates;
mapping (address => uint256) certificatesByIssuer;
mapping (address => uint256) certificatesByRecipient;

Developing some functions to add new certificate and to query a given certificate would probably be enough for the backend of the DApp.

Hope this helps!

  • 1
    Hi Juan, thanks for the reply it's really helpful. Sorry for the late reply. – potatoguy Nov 24 '17 at 4:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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