Skip to content

Commit 3a23dec

Browse files
committed
Merge remote-tracking branch 'origin/v-next' into fs-traces
2 parents f6d6196 + 5401a88 commit 3a23dec

File tree

51 files changed

+582
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+582
-202
lines changed

.changeset/loud-buses-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Allowed requesting help via the -h flag

.changeset/tiny-apes-tell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Remove the `defaultNetwork` config option and introduce a network called `default` ([#6875](https://github.com/NomicFoundation/hardhat/issues/6875))

.changeset/twenty-lies-destroy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Fix node crash when sending a tx with insufficient funds

.changeset/wild-boats-study.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@nomicfoundation/hardhat-errors": patch
3+
"@nomicfoundation/hardhat-verify": patch
4+
"hardhat": patch
5+
---
6+
7+
Enable verification providers by default and throw if Etherscan apiKey is empty ([#6937](https://github.com/NomicFoundation/hardhat/pull/6937))

scripts/check-release.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { appendFile } from "node:fs/promises";
55
import { readPackage, isPackageReleasedToNpm } from "./lib/packages.mjs";
66

77
/**
8-
* The function checks whether the version of hardhat from its' package.json is available in the NPM registry
8+
* The function checks whether the version of hardhat from its package.json is available in the NPM registry
99
* It appends this information to the GITHUB_OUTPUT file (this is an env variable available in the GitHub Actions environment)
1010
*/
1111
async function checkRelease() {

v-next/hardhat-errors/src/descriptors.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,6 +2620,17 @@ chainDescriptors: {
26202620
websiteDescription: `The block explorer responded that the address does not contain a contract. This usually means the address is incorrect, the contract was not deployed on the selected network, or there is a temporary issue with the block explorer not updating its index.
26212621
Please verify the address and network, and try again later if necessary.`,
26222622
},
2623+
EXPLORER_API_KEY_EMPTY: {
2624+
number: 80030,
2625+
messageTemplate: `The {verificationProvider} API key is empty.`,
2626+
websiteTitle: "Block explorer API key is empty",
2627+
websiteDescription: `The provided API key for the block explorer is empty. This can happen in the following cases:
2628+
- No "apiKey" field is configured in the hardhat config.
2629+
- The "apiKey" is explicitly set to an empty string in the Hardhat config.
2630+
- The "apiKey" is assigned to a config variable that resolves to an empty string at runtime.
2631+
2632+
To resolve this, set a valid non-empty API key in your Hardhat config, then try again.`,
2633+
},
26232634
},
26242635
VALIDATION: {
26252636
INVALID_ADDRESS: {

v-next/hardhat-ethers/test/gas-config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { before, describe, it } from "node:test";
1010
import { initializeTestEthers } from "./helpers/helpers.js";
1111

1212
type GasLimitValue = "default" | "auto" | bigint;
13-
type ConnectedNetwork = "hardhat" | "localhost";
13+
type ConnectedNetwork = "default" | "localhost";
1414

1515
interface Combination {
1616
hardhatGasLimit: GasLimitValue;
@@ -34,7 +34,7 @@ function generateCombinations(): Combination[] {
3434
1_000_000n,
3535
];
3636

37-
// TODO: enable when V3 is ready: V3 node required - add hardhat network -> ["hardhat", "localhost"];
37+
// TODO: enable when V3 is ready: V3 node required - add hardhat network -> ["default", "localhost"];
3838
const connectedNetworkValues: ConnectedNetwork[] = ["localhost"];
3939

4040
for (const hardhatGasLimit of hardhatGasLimitValues) {
@@ -67,7 +67,7 @@ describe("gas config behavior", () => {
6767
{ artifactName: "Example", fileName: "gas-config" },
6868
]));
6969

70-
if (hardhatGasLimit !== "default" && connectedNetwork === "hardhat") {
70+
if (hardhatGasLimit !== "default" && connectedNetwork === "default") {
7171
networkConfig.gas = hardhatGasLimit;
7272
}
7373

@@ -85,12 +85,12 @@ describe("gas config behavior", () => {
8585
// the result of an estimateGas call should be used
8686
let defaultGasLimit: bigint | undefined;
8787
if (
88-
(connectedNetwork === "hardhat" && hardhatGasLimit === 1_000_000n) ||
88+
(connectedNetwork === "default" && hardhatGasLimit === 1_000_000n) ||
8989
(connectedNetwork === "localhost" && localhostGasLimit === 1_000_000n)
9090
) {
9191
defaultGasLimit = 1_000_000n;
9292
} else if (
93-
(connectedNetwork === "hardhat" && hardhatGasLimit === "default") ||
93+
(connectedNetwork === "default" && hardhatGasLimit === "default") ||
9494
(connectedNetwork === "localhost" && localhostGasLimit === "default")
9595
) {
9696
// expect the block gas limit to be used as the default gas limit

v-next/hardhat-ethers/test/hardhat-ethers-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ describe("hardhat ethers provider", () => {
136136
// it("should return the network", async ()=>{
137137
// const network = await ethers.provider.getNetwork();
138138

139-
// assert.equal(network.name, "hardhat");
139+
// assert.equal(network.name, "default");
140140
// assert.equal(network.chainId, 31337n);
141141
// });
142142

v-next/hardhat-ethers/test/hardhat-ethers-signer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe("hardhat ethers signer", () => {
157157
const { ethers: hhEthers, provider: hhProvider } =
158158
await initializeTestEthers([], {
159159
networks: {
160-
hardhat: {
160+
default: {
161161
type: "edr",
162162
accounts: [
163163
{ balance: "1000000000000000000", privateKey: TEST_P_KEY_1 },
@@ -174,7 +174,7 @@ describe("hardhat ethers signer", () => {
174174
const { ethers: hhEthers, provider: hhProvider } =
175175
await initializeTestEthers([], {
176176
networks: {
177-
hardhat: {
177+
default: {
178178
type: "edr",
179179
accounts: HD_ACCOUNTS,
180180
},

v-next/hardhat-ethers/test/helpers/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export async function initializeTestEthers(
2525
const hre = await createHardhatRuntimeEnvironment(config);
2626

2727
const network =
28-
config.networks?.localhost !== undefined ? "localhost" : "hardhat";
28+
config.networks?.localhost !== undefined ? "localhost" : "default";
2929

3030
const connection = await hre.network.connect(network);
3131

0 commit comments

Comments
 (0)