Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/templates-solc-0-8-39.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": minor
---

The project templates have been updated to Solidity 0.8.39.
2 changes: 1 addition & 1 deletion packages/example-project/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export default defineConfig({
version: "0.8.26",
},
{
version: "0.8.33",
version: "0.8.39",
},
],
overrides: {
Expand Down
8 changes: 1 addition & 7 deletions packages/hardhat-slang/test/evm-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -37,13 +38,6 @@ describe("hardhat-slang default EVM version", { skip: skipSlow }, () => {
});
}

it("leaves the EVM version unset where Hardhat has no default", async () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed because every Solidity version slang supports (0.8.0–0.8.37) now has a Hardhat default EVM version, so no version is left to test this case with; it can come back once a slang release supports a version Hardhat doesn't have a default for yet.

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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.34;
pragma solidity ^0.8.39;

contract Counter {
uint public x;
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.34;
pragma solidity ^0.8.39;

contract Counter {
uint public x;
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
4 changes: 2 additions & 2 deletions packages/hardhat/templates/02-mocha-ethers/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat/templates/03-minimal/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { defineConfig } from "hardhat/config";

export default defineConfig({
solidity: {
version: "0.8.34",
version: "0.8.39",
},
});
Loading