Skip to main content
. 2022 Oct 15;22(20):7842. doi: 10.3390/s22207842
Algorithm 1: Smart contract for private supervision information on-chain
Input:EnterPeer, Keysupchan, PriSupInfo
   Output:txID, BlockNum
1 // Verify the validity of supervision channel authorization file
2 If val(Keysupchan)
3 // Pre-chain supervision of trading information
4 if ((isTdTypeLegal(PriSupInfo) && isTdContentLegal(PriSupInfo))
5   // Store the data trading information into the corresponding channel
6   if (wriSupChannel(EnterPeer, Keysupchan, PriSupInfo))
7  return txID, BlockNum;