Skip to content

Commit

Permalink
chore: added support for solc versions 0.8.28
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Nov 21, 2024
1 parent 97365ef commit e47b495
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/silly-flowers-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added support for solc versions 0.8.28
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.27
- Any 0.8.x version up to and including 0.8.28

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.27";
const recommendedSolcVersion = "0.8.28";
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.27;
pragma solidity ^0.8.28;

// 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.27",
solidity: "0.8.28",
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

// 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.27",
solidity: "0.8.28",
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

// 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 type { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";

const config: HardhatUserConfig = {
solidity: "0.8.27",
solidity: "0.8.28",
};

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.27;
pragma solidity ^0.8.28;

// 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.27",
solidity: "0.8.28",
};

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 @@ -260,7 +260,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.27",
solidity: "0.8.28",
};
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.27";
export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.28";
export const FIRST_SOLC_VERSION_SUPPORTED = "0.5.1";
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const defaultEvmTargets: { [key: string]: string } = {
"0.8.25": "cancun",
"0.8.26": "cancun",
"0.8.27": "cancun",
"0.8.28": "cancun",
};

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

contract A {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
solidity: "0.8.27",
solidity: "0.8.28",
};
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,20 @@ export const solidityCompilers: SolidityCompiler[] = [
},
latestSolcVersion: true,
},
{
solidityVersion: "0.8.28",
compilerPath: "soljson-v0.8.28+commit.7893614a.js",
latestSolcVersion: true,
},
{
solidityVersion: "0.8.28",
compilerPath: "soljson-v0.8.28+commit.7893614a.js",
optimizer: {
runs: 200,
viaIR: true,
},
latestSolcVersion: true,
},
];

export const getLatestSupportedVersion = () =>
Expand Down

0 comments on commit e47b495

Please sign in to comment.