Skip to main content
. 2022 Sep 8;22(18):6806. doi: 10.3390/s22186806
Algorithm 1: Smart Contract Initialization Phase
begin
  if (ObjIdExists (obj.id, bc) == true) then
   return Error ();
  if AddrIdExists (obj.grpId, bc) then
   return Error ();
  if (obj.type == manager) then
  {
   if GrpIdExists(obj.grpId, bc) == true then
    return Error ();
  }else if (obj.type == follower) then
   {
    if GrpIdExists(obj.grpId, bc) == true then
    return Error ();
   }if (bc.CertificateVerif (obj.certificate) == false) then
    return Error ();
   else
    return Error ();
  end
// Initialization phase finished with success