diff --git a/.changeset/templates-solc-0-8-39.md b/.changeset/templates-solc-0-8-39.md new file mode 100644 index 00000000000..0d1cbbf46c4 --- /dev/null +++ b/.changeset/templates-solc-0-8-39.md @@ -0,0 +1,5 @@ +--- +"hardhat": minor +--- + +The project templates have been updated to Solidity 0.8.39. diff --git a/packages/example-project/hardhat.config.ts b/packages/example-project/hardhat.config.ts index 9fafafd4ed8..0cd86563c26 100644 --- a/packages/example-project/hardhat.config.ts +++ b/packages/example-project/hardhat.config.ts @@ -215,7 +215,7 @@ export default defineConfig({ version: "0.8.26", }, { - version: "0.8.33", + version: "0.8.39", }, ], overrides: { diff --git a/packages/hardhat-slang/test/evm-version.ts b/packages/hardhat-slang/test/evm-version.ts index 471c9cc7c29..37b24e01b3a 100644 --- a/packages/hardhat-slang/test/evm-version.ts +++ b/packages/hardhat-slang/test/evm-version.ts @@ -28,6 +28,7 @@ describe("hardhat-slang default EVM version", { skip: skipSlow }, () => { ["0.8.25", "cancun"], ["0.8.30", "prague"], ["0.8.34", "osaka"], + ["0.8.37", "osaka"], ]) { it(`keeps Hardhat's default of ${evmVersion} for Solidity ${version}`, async () => { assert.equal( @@ -37,13 +38,6 @@ describe("hardhat-slang default EVM version", { skip: skipSlow }, () => { }); } - it("leaves the EVM version unset where Hardhat has no default", async () => { - assert.equal( - await getSlangEvmVersion({ type: "slang", version: "0.8.37" }), - undefined, - ); - }); - it("keeps a user-set EVM version over the plugin's default", async () => { assert.equal( await getSlangEvmVersion({ diff --git a/packages/hardhat/src/internal/builtin-plugins/solidity/build-system/solc-info.ts b/packages/hardhat/src/internal/builtin-plugins/solidity/build-system/solc-info.ts index 3e6056a902e..2e13fff3826 100644 --- a/packages/hardhat/src/internal/builtin-plugins/solidity/build-system/solc-info.ts +++ b/packages/hardhat/src/internal/builtin-plugins/solidity/build-system/solc-info.ts @@ -129,6 +129,11 @@ const defaultEvmTargets: { [key: string]: string } = { "0.8.32": "osaka", "0.8.33": "osaka", "0.8.34": "osaka", + "0.8.35": "osaka", + "0.8.36": "osaka", + "0.8.37": "osaka", + "0.8.38": "osaka", + "0.8.39": "osaka", }; export function getEvmVersionFromSolcVersion( diff --git a/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.sol b/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.sol index 622b554ff15..e8424d7c344 100644 --- a/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.sol +++ b/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.34; +pragma solidity ^0.8.39; contract Counter { uint public x; diff --git a/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.t.sol b/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.t.sol index 2d0349fa8a1..c5ac4d0e074 100644 --- a/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.t.sol +++ b/packages/hardhat/templates/01-node-test-runner-viem/contracts/Counter.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.34; +pragma solidity ^0.8.39; import {Counter} from "./Counter.sol"; import {Test} from "forge-std/Test.sol"; diff --git a/packages/hardhat/templates/01-node-test-runner-viem/hardhat.config.ts b/packages/hardhat/templates/01-node-test-runner-viem/hardhat.config.ts index b9bfd6aaa6d..0a954d6807f 100644 --- a/packages/hardhat/templates/01-node-test-runner-viem/hardhat.config.ts +++ b/packages/hardhat/templates/01-node-test-runner-viem/hardhat.config.ts @@ -6,10 +6,10 @@ export default defineConfig({ solidity: { profiles: { default: { - version: "0.8.34", + version: "0.8.39", }, production: { - version: "0.8.34", + version: "0.8.39", settings: { optimizer: { enabled: true, diff --git a/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.sol b/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.sol index 622b554ff15..e8424d7c344 100644 --- a/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.sol +++ b/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.34; +pragma solidity ^0.8.39; contract Counter { uint public x; diff --git a/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.t.sol b/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.t.sol index 48a5e34fe96..4cfc18c38cb 100644 --- a/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.t.sol +++ b/packages/hardhat/templates/02-mocha-ethers/contracts/Counter.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.34; +pragma solidity ^0.8.39; import {Counter} from "./Counter.sol"; import {Test} from "forge-std/Test.sol"; diff --git a/packages/hardhat/templates/02-mocha-ethers/hardhat.config.ts b/packages/hardhat/templates/02-mocha-ethers/hardhat.config.ts index e85ca54d597..c1f4550df01 100644 --- a/packages/hardhat/templates/02-mocha-ethers/hardhat.config.ts +++ b/packages/hardhat/templates/02-mocha-ethers/hardhat.config.ts @@ -6,10 +6,10 @@ export default defineConfig({ solidity: { profiles: { default: { - version: "0.8.34", + version: "0.8.39", }, production: { - version: "0.8.34", + version: "0.8.39", settings: { optimizer: { enabled: true, diff --git a/packages/hardhat/templates/03-minimal/hardhat.config.ts b/packages/hardhat/templates/03-minimal/hardhat.config.ts index 5a0af0053dc..ea129983a46 100644 --- a/packages/hardhat/templates/03-minimal/hardhat.config.ts +++ b/packages/hardhat/templates/03-minimal/hardhat.config.ts @@ -2,6 +2,6 @@ import { defineConfig } from "hardhat/config"; export default defineConfig({ solidity: { - version: "0.8.34", + version: "0.8.39", }, });