Skip to content

Commit f39fb5a

Browse files
committed
fix: support non default name networks
1 parent b39f5a4 commit f39fb5a

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

packages/example-project/hardhat.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ export default defineConfig({
66
plugins: [hardhatIgnitionViemPlugin, openScanPlugin],
77
solidity: "0.8.29",
88
networks: {
9+
hardhatBlocks: {
10+
type: "edr-simulated",
11+
mining: {
12+
auto: false,
13+
interval: 5000,
14+
}
15+
},
916
localhost: {
1017
type: "http",
1118
url: "http://127.0.0.1:8545",

packages/plugin/src/hooks/network.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ export default async (): Promise<Partial<NetworkHooks>> => {
6060
const connection = await next(context);
6161

6262
// Start webapp on first connection (when Hardhat node starts)
63-
// The network name is "default" for the built-in Hardhat network
64-
if (!webappStarted && connection.networkName === "default") {
63+
if (!webappStarted) {
6564
webappStarted = true;
6665
await startWebapp();
6766
}

0 commit comments

Comments
 (0)