@@ -18,12 +18,7 @@ contract ExampleSupplyChain is Ownable {
1818 //////////////////////////////////////////////////////////////////
1919
2020 event CreateLotEvent (
21- string lotType ,
22- string quantity ,
23- string operatorId ,
24- string originId ,
25- string lotNo ,
26- string transporterId
21+ string lotType , string quantity , string operatorId , string originId , string lotNo , string transporterId
2722 );
2823
2924 event FirstProcessEvent (
@@ -53,11 +48,7 @@ contract ExampleSupplyChain is Ownable {
5348 );
5449
5550 event TransportEvent (
56- string packageId ,
57- string operatorId ,
58- string transporterId ,
59- string cartonId ,
60- string transportLotId
51+ string packageId , string operatorId , string transporterId , string cartonId , string transportLotId
6152 );
6253
6354 //////////////////////////////////////////////////////////////////
@@ -77,15 +68,10 @@ contract ExampleSupplyChain is Ownable {
7768 string memory originId ,
7869 string memory lotNo ,
7970 string memory transporterId
80- ) external {
81- emit CreateLotEvent (
82- lotType,
83- quantity,
84- operatorId,
85- originId,
86- lotNo,
87- transporterId
88- );
71+ )
72+ external
73+ {
74+ emit CreateLotEvent (lotType, quantity, operatorId, originId, lotNo, transporterId);
8975 }
9076
9177 function registerFirstProcess (
@@ -94,16 +80,13 @@ contract ExampleSupplyChain is Ownable {
9480 string memory machineId ,
9581 string memory processingHouseId ,
9682 string memory timestamp
97- ) external {
83+ )
84+ external
85+ {
9886 _firstProcessLotId += 1 ;
9987
10088 emit FirstProcessEvent (
101- lotNos,
102- operatorId,
103- machineId,
104- processingHouseId,
105- timestamp,
106- Strings.toString (_firstProcessLotId)
89+ lotNos, operatorId, machineId, processingHouseId, timestamp, Strings.toString (_firstProcessLotId)
10790 );
10891 }
10992
@@ -112,15 +95,13 @@ contract ExampleSupplyChain is Ownable {
11295 string memory machineId ,
11396 string memory operatorId ,
11497 string memory secondProcessOutputLotId
115- ) external {
98+ )
99+ external
100+ {
116101 _secondProcessLotId += 1 ;
117102
118103 emit SecondProcessEvent (
119- firstProcessLotIds,
120- machineId,
121- operatorId,
122- secondProcessOutputLotId,
123- Strings.toString (_secondProcessLotId)
104+ firstProcessLotIds, machineId, operatorId, secondProcessOutputLotId, Strings.toString (_secondProcessLotId)
124105 );
125106 }
126107
@@ -130,16 +111,13 @@ contract ExampleSupplyChain is Ownable {
130111 string memory packageId ,
131112 string memory weight ,
132113 string memory packagingType
133- ) external {
114+ )
115+ external
116+ {
134117 _packingLotId += 1 ;
135118
136119 emit PackagingEvent (
137- secondProcessLotId,
138- operatorId,
139- packageId,
140- weight,
141- packagingType,
142- Strings.toString (_packingLotId)
120+ secondProcessLotId, operatorId, packageId, weight, packagingType, Strings.toString (_packingLotId)
143121 );
144122 }
145123
@@ -148,15 +126,11 @@ contract ExampleSupplyChain is Ownable {
148126 string memory operatorId ,
149127 string memory transporterId ,
150128 string memory cartonId
151- ) external {
129+ )
130+ external
131+ {
152132 _transportLotId += 1 ;
153133
154- emit TransportEvent (
155- packageId,
156- operatorId,
157- transporterId,
158- cartonId,
159- Strings.toString (_transportLotId)
160- );
134+ emit TransportEvent (packageId, operatorId, transporterId, cartonId, Strings.toString (_transportLotId));
161135 }
162136}
0 commit comments