Skip to content

Commit 27da169

Browse files
committed
fix: versions
1 parent 448edb4 commit 27da169

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

contracts/ExampleSupplyChain.sol

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity ^0.8.24;
33

44
import "@openzeppelin/contracts/access/Ownable.sol";
55
import "@openzeppelin/contracts/utils/Strings.sol";
@@ -78,7 +78,14 @@ contract ExampleSupplyChain is Ownable {
7878
string memory lotNo,
7979
string memory transporterId
8080
) external {
81-
emit CreateLotEvent(lotType, quantity, operatorId, originId, lotNo, transporterId);
81+
emit CreateLotEvent(
82+
lotType,
83+
quantity,
84+
operatorId,
85+
originId,
86+
lotNo,
87+
transporterId
88+
);
8289
}
8390

8491
function registerFirstProcess(
@@ -144,6 +151,12 @@ contract ExampleSupplyChain is Ownable {
144151
) external {
145152
_transportLotId += 1;
146153

147-
emit TransportEvent(packageId, operatorId, transporterId, cartonId, Strings.toString(_transportLotId));
154+
emit TransportEvent(
155+
packageId,
156+
operatorId,
157+
transporterId,
158+
cartonId,
159+
Strings.toString(_transportLotId)
160+
);
148161
}
149-
}
162+
}

test/ExampleSupplyChain.t.sol

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.26;
2+
pragma solidity ^0.8.24;
33

44
import "forge-std/Test.sol";
55
import "../contracts/ExampleSupplyChain.sol";
@@ -32,7 +32,14 @@ contract ExampleSupplyChainTest is Test {
3232
transporterId
3333
);
3434

35-
supplyChain.createLot(lotType, quantity, operatorId, originId, lotNo, transporterId);
35+
supplyChain.createLot(
36+
lotType,
37+
quantity,
38+
operatorId,
39+
originId,
40+
lotNo,
41+
transporterId
42+
);
3643
}
3744

3845
function testRegisterFirstProcessEmitsEvent() public {
@@ -145,13 +152,6 @@ contract ExampleSupplyChainTest is Test {
145152
);
146153

147154
// Call the function that should emit the event
148-
supplyChain.transport(
149-
packageId,
150-
operatorId,
151-
transporterId,
152-
cartonId
153-
);
155+
supplyChain.transport(packageId, operatorId, transporterId, cartonId);
154156
}
155-
156-
157157
}

0 commit comments

Comments
 (0)