Skip to content

Commit 9f93405

Browse files
committed
Move default edr cache inside base cache directory
1 parent 77094ab commit 9f93405

File tree

5 files changed

+8
-13
lines changed

5 files changed

+8
-13
lines changed

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

+8-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,8 +123,13 @@ export async function resolveSolidityTestUserConfig(
121123
testsPath = typeof testsPath === "object" ? testsPath.solidity : testsPath;
122124
testsPath ??= "test";
123125

126+
const defaultRpcCachePath = path.join(
127+
resolvedConfig.paths.cache,
128+
"edr-cache",
129+
);
130+
124131
const solidityTest = {
125-
rpcCachePath: "edr-cache",
132+
rpcCachePath: defaultRpcCachePath,
126133
...userConfig.solidityTest,
127134
};
128135

v-next/hardhat/templates/01-node-test-runner-viem/.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
# Hardhat compilation (v2) support directory
1414
/cache
1515

16-
# EDR Cache
17-
/edr-cache
18-
1916
# Typechain output
2017
/types

v-next/hardhat/templates/01-node-test-runner-viem/gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
# Hardhat compilation (v2) support directory
1414
/cache
1515

16-
# EDR Cache
17-
/edr-cache
18-
1916
# Typechain output
2017
/types

v-next/hardhat/templates/02-mocha-ethers/.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
# Hardhat compilation (v2) support directory
1414
/cache
1515

16-
# EDR Cache
17-
/edr-cache
18-
1916
# Typechain output
2017
/types

v-next/hardhat/templates/02-mocha-ethers/gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@
1313
# Hardhat compilation (v2) support directory
1414
/cache
1515

16-
# EDR Cache
17-
/edr-cache
18-
1916
# Typechain output
2017
/types

0 commit comments

Comments
 (0)