Skip to content

Commit 176d5b1

Browse files
committed
fix: dont import tasks on initial build run
Signed-off-by: Tomás Migone <[email protected]>
1 parent f978dbb commit 176d5b1

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

packages/horizon/hardhat.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import 'hardhat-storage-layout'
88
import 'hardhat-contract-sizer'
99
import 'hardhat-secure-accounts'
1010

11-
import './tasks/deploy'
12-
1311
// Skip importing hardhat-graph-protocol when building the project, it has circular dependency
1412
if (process.env.BUILD_RUN !== 'true') {
1513
require('hardhat-graph-protocol')
14+
require('./tasks/deploy')
1615
}
1716

1817
export default hardhatBaseConfig

packages/subgraph-service/hardhat.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ import 'hardhat-contract-sizer'
1010
import 'hardhat-secure-accounts'
1111
import 'solidity-docgen'
1212

13-
import './tasks/deploy'
14-
1513
// Skip importing hardhat-graph-protocol when building the project, it has circular dependency
1614
if (process.env.BUILD_RUN !== 'true') {
1715
require('hardhat-graph-protocol')
16+
require('./tasks/deploy')
1817
}
1918

2019
const config: HardhatUserConfig = {

packages/subgraph-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"lint:sol": "prettier --write contracts/**/*.sol test/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js",
1616
"lint": "yarn lint:ts && yarn lint:sol",
1717
"clean": "rm -rf build dist cache cache_forge typechain-types",
18-
"build": "forge build --skip test && BUILD_RUN=true hardhat compile",
18+
"build": "BUILD_RUN=true hardhat compile",
1919
"test": "forge test && hardhat test"
2020
},
2121
"devDependencies": {

0 commit comments

Comments
 (0)