Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for solc 0.8.24 #4855

Merged
merged 4 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/model/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.24;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.19",
solidity: "0.8.24",
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.24;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.19",
solidity: "0.8.24",
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.24;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";

const config: HardhatUserConfig = {
solidity: "0.8.19",
solidity: "0.8.24",
};

export default config;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma solidity ^0.8.24;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const config: HardhatUserConfig = {
solidity: "0.8.19",
solidity: "0.8.24",
};

export default config;
2 changes: 1 addition & 1 deletion packages/hardhat-core/src/internal/cli/project-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Original file line number Diff line number Diff line change
Expand Up @@ -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",
ChristopherDedominici marked this conversation as resolved.
Show resolved Hide resolved
};

export function getEvmVersionFromSolcVersion(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pragma solidity ^0.8.23;
pragma solidity ^0.8.24;

contract A {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
solidity: "0.8.23",
solidity: "0.8.24",
};
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -217,7 +216,6 @@ export const solidityCompilers: SolidityCompiler[] = [
runs: 200,
viaIR: true,
},
latestSolcVersion: true,
},
{
solidityVersion: "0.8.22",
Expand Down Expand Up @@ -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 = () =>
Expand Down
Loading