|
Algorithm 5 The robotic arm needs to run for five seconds when calling
|
|
Require: Smart contract deployment address: , Smart Contract Owner: , Address of device:
|
|
Ensure: All cases
|
-
1:
▷ Get the timestamp of runtime
-
2:
▷ Get the block height of runtime
-
3:
-
4:
▷ Generate a random set of parameters on request
-
5:
-
6:
-
7:
for do ▷ Create a new case
-
8:
-
9:
-
10:
▷ Set the timestamp
-
11:
▷ Set the block
-
12:
-
13:
if == false then
-
14:
▷ Add Case to the success collection
-
15:
else
-
16:
▷ Add Case to the failed collection
-
17:
end if
-
18:
end for
-
19:
return All cases
|