fix: Bump to latest Solidity version (0.8.28)
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 ```
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.13;
|
||||
pragma solidity ^0.8.28;
|
||||
|
||||
contract Counter {
|
||||
uint256 public number;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.28;
|
||||
|
||||
contract FrontendSwapRouter {
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user