Skip to content

Commit 680f7c6

Browse files
authored
Merge pull request #6464 from NomicFoundation/edr-cache-default-path
Use default value for rpcCachePath when running solidity tests
2 parents bb04f47 + 40db092 commit 680f7c6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.changeset/long-toes-deny.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Use default value for rpcCachePath when running solidity tests

v-next/hardhat/src/internal/builtin-plugins/solidity-test/config.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { HardhatUserConfig } from "../../../config.js";
22
import type { HardhatConfig } from "../../../types/config.js";
33
import type { HardhatUserConfigValidationError } from "../../../types/hooks.js";
44

5+
import path from "node:path";
6+
57
import { isObject } from "@nomicfoundation/hardhat-utils/lang";
68
import { resolveFromRoot } from "@nomicfoundation/hardhat-utils/path";
79
import {
@@ -121,6 +123,13 @@ export async function resolveSolidityTestUserConfig(
121123
testsPath = typeof testsPath === "object" ? testsPath.solidity : testsPath;
122124
testsPath ??= "test";
123125

126+
const defaultRpcCachePath = path.join(resolvedConfig.paths.cache, "edr");
127+
128+
const solidityTest = {
129+
rpcCachePath: defaultRpcCachePath,
130+
...userConfig.solidityTest,
131+
};
132+
124133
return {
125134
...resolvedConfig,
126135
paths: {
@@ -130,6 +139,6 @@ export async function resolveSolidityTestUserConfig(
130139
solidity: resolveFromRoot(resolvedConfig.paths.root, testsPath),
131140
},
132141
},
133-
solidityTest: userConfig.solidityTest ?? {},
142+
solidityTest,
134143
};
135144
}

0 commit comments

Comments
 (0)