Skip to content

Commit 24acb9c

Browse files
committed
Updating task-node to properly manage the provider
1 parent d5a336a commit 24acb9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hardhat/tasks/task-node.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ task('node', 'Run a node')
2323
const networkHostReplace = (taskArguments.useOvm ? 'optimism-' : '') + network;
2424

2525
if (network === 'mainnet' && !useOvm) {
26-
taskArguments.fork = process.env.PROVIDER_URL_MAINNET.replace(
27-
'network',
28-
networkHostReplace
29-
);
26+
taskArguments.fork = process.env.PROVIDER_URL_MAINNET;
27+
} else {
28+
taskArguments.fork =
29+
taskArguments.fork || process.env.PROVIDER_URL.replace('network', networkHostReplace);
3030
}
3131

3232
console.log(yellow(`Forking ${network}...`));

0 commit comments

Comments
 (0)