Skip to content

Commit d00f4db

Browse files
committed
fix: preprocessor remappings >/dev/null
1 parent 103c650 commit d00f4db

File tree

3 files changed

+0
-38
lines changed

3 files changed

+0
-38
lines changed

contracts/hardhat.config.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as dotenv from "dotenv";
2-
import fs from "fs";
32

43
import { HardhatUserConfig, task } from "hardhat/config";
54
import "@nomiclabs/hardhat-waffle";
@@ -13,18 +12,9 @@ import "hardhat-watcher";
1312
import "hardhat-docgen";
1413
import "hardhat-contract-sizer";
1514
import "hardhat-tracer";
16-
import "hardhat-preprocessor";
1715

1816
dotenv.config();
1917

20-
function getRemappings() {
21-
return fs
22-
.readFileSync("remappings.txt", "utf8")
23-
.split("\n")
24-
.filter(Boolean)
25-
.map((line) => line.trim().split("="));
26-
}
27-
2818
const config: HardhatUserConfig = {
2919
solidity: {
3020
version: "0.8.9",
@@ -196,21 +186,6 @@ const config: HardhatUserConfig = {
196186
},
197187
],
198188
},
199-
// This fully resolves paths for imports in the ./lib directory for Hardhat
200-
preprocess: {
201-
eachLine: (hre) => ({
202-
transform: (line: string) => {
203-
if (line.match(/^\s*import /i)) {
204-
getRemappings().forEach(([find, replace]) => {
205-
if (line.match(find)) {
206-
line = line.replace(find, replace);
207-
}
208-
});
209-
}
210-
return line;
211-
},
212-
}),
213-
},
214189
};
215190

216191
export default config;

contracts/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"hardhat-deploy-tenderly": "^0.2.0",
5454
"hardhat-docgen": "^1.3.0",
5555
"hardhat-gas-reporter": "^1.0.9",
56-
"hardhat-preprocessor": "^0.1.5",
5756
"hardhat-tracer": "^1.1.1",
5857
"hardhat-watcher": "^2.5.0",
5958
"json-schema": "^0.4.0",

yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,6 @@ __metadata:
22822282
hardhat-deploy-tenderly: ^0.2.0
22832283
hardhat-docgen: ^1.3.0
22842284
hardhat-gas-reporter: ^1.0.9
2285-
hardhat-preprocessor: ^0.1.5
22862285
hardhat-tracer: ^1.1.1
22872286
hardhat-watcher: ^2.5.0
22882287
json-schema: ^0.4.0
@@ -12749,17 +12748,6 @@ __metadata:
1274912748
languageName: node
1275012749
linkType: hard
1275112750

12752-
"hardhat-preprocessor@npm:^0.1.5":
12753-
version: 0.1.5
12754-
resolution: "hardhat-preprocessor@npm:0.1.5"
12755-
dependencies:
12756-
murmur-128: ^0.2.1
12757-
peerDependencies:
12758-
hardhat: ^2.0.5
12759-
checksum: 7d543c2965828441741950b153d584ff096d7a006975f06af9870e05a928e56122b463c4a1b3b346f9a3baccaa6ee2dec1dfd026a434ac714ebf127bbe842fef
12760-
languageName: node
12761-
linkType: hard
12762-
1276312751
"hardhat-tracer@npm:^1.1.1":
1276412752
version: 1.1.1
1276512753
resolution: "hardhat-tracer@npm:1.1.1"

0 commit comments

Comments
 (0)