From d30753fc6de79f9ac62a74ec174aab19ebcfa963 Mon Sep 17 00:00:00 2001 From: Christopher Dedominici <18092467+ChristopherDedominici@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:31:02 +0100 Subject: [PATCH] increase version in docs and code files --- .../docs/reference/solidity-support.md | 2 +- docs/src/model/markdown.tsx | 2 +- .../src/internal/cli/project-creation.ts | 2 +- .../hardhat-network/stack-traces/constants.ts | 2 +- .../src/internal/solidity/compiler/solc-info.ts | 1 + .../contracts/A.sol | 2 +- .../hardhat.config.js | 2 +- .../stack-traces/compilers-list.ts | 16 ++++++++++++++-- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/docs/src/content/hardhat-runner/docs/reference/solidity-support.md b/docs/src/content/hardhat-runner/docs/reference/solidity-support.md index d0aa7b4259..109300c335 100644 --- a/docs/src/content/hardhat-runner/docs/reference/solidity-support.md +++ b/docs/src/content/hardhat-runner/docs/reference/solidity-support.md @@ -13,7 +13,7 @@ These are the versions of Solidity that you can expect to fully work with Hardha - Any 0.5.x version starting from 0.5.1 - Any 0.6.x version - Any 0.7.x version -- Any 0.8.x version up to and including 0.8.23 +- Any 0.8.x version up to and including 0.8.24 We recommend against using Hardhat with newer, unsupported versions of Solidity. But if you need to do so; please read on. diff --git a/docs/src/model/markdown.tsx b/docs/src/model/markdown.tsx index f0946c54c2..e97790d389 100644 --- a/docs/src/model/markdown.tsx +++ b/docs/src/model/markdown.tsx @@ -104,7 +104,7 @@ export const withoutComments = (content: string) => { }; export const replacePlaceholders = (content: string) => { - const recommendedSolcVersion = "0.8.23"; + const recommendedSolcVersion = "0.8.24"; const latestPragma = "^0.8.0"; const hardhatPackageJson = fs .readFileSync( diff --git a/packages/hardhat-core/src/internal/cli/project-creation.ts b/packages/hardhat-core/src/internal/cli/project-creation.ts index 54c0e002c8..15bc1030b0 100644 --- a/packages/hardhat-core/src/internal/cli/project-creation.ts +++ b/packages/hardhat-core/src/internal/cli/project-creation.ts @@ -251,7 +251,7 @@ async function printRecommendedDepsInstallationInstructions( // exported so we can test that it uses the latest supported version of solidity export const EMPTY_HARDHAT_CONFIG = `/** @type import('hardhat/config').HardhatUserConfig */ module.exports = { - solidity: "0.8.19", + solidity: "0.8.24", }; `; diff --git a/packages/hardhat-core/src/internal/hardhat-network/stack-traces/constants.ts b/packages/hardhat-core/src/internal/hardhat-network/stack-traces/constants.ts index c737fa3570..4a77fa4647 100644 --- a/packages/hardhat-core/src/internal/hardhat-network/stack-traces/constants.ts +++ b/packages/hardhat-core/src/internal/hardhat-network/stack-traces/constants.ts @@ -1,2 +1,2 @@ -export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.23"; +export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.24"; export const FIRST_SOLC_VERSION_SUPPORTED = "0.5.1"; diff --git a/packages/hardhat-core/src/internal/solidity/compiler/solc-info.ts b/packages/hardhat-core/src/internal/solidity/compiler/solc-info.ts index fd06e60c43..d657184481 100644 --- a/packages/hardhat-core/src/internal/solidity/compiler/solc-info.ts +++ b/packages/hardhat-core/src/internal/solidity/compiler/solc-info.ts @@ -60,6 +60,7 @@ const defaultEvmTargets: { [key: string]: string } = { "0.8.21": "shanghai", "0.8.22": "shanghai", "0.8.23": "shanghai", + "0.8.24": "shanghai", }; export function getEvmVersionFromSolcVersion( diff --git a/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/contracts/A.sol b/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/contracts/A.sol index cb72dc902a..5be0c05871 100644 --- a/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/contracts/A.sol +++ b/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/contracts/A.sol @@ -1,3 +1,3 @@ -pragma solidity ^0.8.23; +pragma solidity ^0.8.24; contract A {} diff --git a/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/hardhat.config.js b/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/hardhat.config.js index ea72c9f4de..31b010f16d 100644 --- a/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/hardhat.config.js +++ b/packages/hardhat-core/test/fixture-projects/compilation-latest-solc-version/hardhat.config.js @@ -1,3 +1,3 @@ module.exports = { - solidity: "0.8.23", + solidity: "0.8.24", }; diff --git a/packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers-list.ts b/packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers-list.ts index ac4f193b25..9a74fd4876 100644 --- a/packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers-list.ts +++ b/packages/hardhat-core/test/internal/hardhat-network/stack-traces/compilers-list.ts @@ -208,7 +208,6 @@ export const solidityCompilers: SolidityCompiler[] = [ { solidityVersion: "0.8.21", compilerPath: "soljson-v0.8.21+commit.d9974bed.js", - latestSolcVersion: true, }, { solidityVersion: "0.8.21", @@ -217,7 +216,6 @@ export const solidityCompilers: SolidityCompiler[] = [ runs: 200, viaIR: true, }, - latestSolcVersion: true, }, { solidityVersion: "0.8.22", @@ -247,6 +245,20 @@ export const solidityCompilers: SolidityCompiler[] = [ }, latestSolcVersion: true, }, + { + solidityVersion: "0.8.24", + compilerPath: "soljson-v0.8.24+commit.e11b9ed9.js", + latestSolcVersion: true, + }, + { + solidityVersion: "0.8.24", + compilerPath: "soljson-v0.8.24+commit.e11b9ed9.js", + optimizer: { + runs: 200, + viaIR: true, + }, + latestSolcVersion: true, + }, ]; export const getLatestSupportedVersion = () =>