Skip to content

Commit

Permalink
fix: Bump to latest Solidity version (0.8.28)
Browse files Browse the repository at this point in the history
Earlier versions have known vulnerabilities.

Slither output:
```
INFO:Detectors:
Version constraint ^0.8.13 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)
	- VerbatimInvalidDeduplication
	- FullInlinerNonExpressionSplitArgumentEvaluationOrder
	- MissingSideEffectsOnSelectorAccess
	- StorageWriteRemovalBeforeConditionalTermination
	- AbiReencodingHeadOverflowWithStaticArrayCleanup
	- DirtyBytesArrayToStorage
	- InlineAssemblyMemorySideEffects
	- DataLocationChangeInInternalOverride
	- NestedCalldataArrayAbiReencodingSizeValidation.
It is used by:
	- ^0.8.13 (src/Counter.sol#2)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity
INFO:Slither:foundry/ analyzed (2 contracts with 93 detectors), 1 result(s) found
```
  • Loading branch information
TAMARA LIPOWSKI committed Jan 17, 2025
1 parent b530000 commit a2c5bdc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
src = 'src'
out = 'out'
libs = ['lib']
solc = "0.8.18"
solc = "0.8.28"
evm_version = 'shanghai'
optimizer = true
optimizer_runs = 1000
Expand Down
2 changes: 1 addition & 1 deletion foundry/src/Counter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.28;

contract Counter {
uint256 public number;
Expand Down
3 changes: 3 additions & 0 deletions foundry/src/TychoRouter.sol
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;

contract FrontendSwapRouter {
constructor() {}
}
2 changes: 1 addition & 1 deletion foundry/test/Counter.t.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.28;

import {Test, console} from "forge-std/Test.sol";
import {Counter} from "../src/Counter.sol";
Expand Down

0 comments on commit a2c5bdc

Please sign in to comment.