Skip to content

Commit 9f037eb

Browse files
authored
fix(network-subgraphs): Build hub-contracts (#1017)
Added missing build step to `copyAbisFromContractsPackage.sh`. The script builds the contracts in `network-contracts` subpackage, but doesn't build the contracts in the `hub-contracts` subpackage. It should clearly build both, as it tries to copy the generated hub-contract files at lines 19-21. ## Error The `copyAbisFromContractsPackage.sh` is a utility script used by `build.sh` If `./build.sh` was run on a clean repository (e.g. after `npm run clean`), it doesn't have built hub contracts available. It errored like this: ``` Error: Error in subgraph.yaml: Path: dataSources > 4 > mapping > abis > 0 > file File does not exist: abis/MarketplaceV4.json Path: dataSources > 5 > mapping > abis > 0 > file File does not exist: abis/ProjectStakingV1.json ```
1 parent 2ee6ab9 commit 9f037eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/network-subgraphs/scripts/copyAbisFromContractsPackage.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -ex
44
pushd ../network-contracts
55
npm run build
66
popd
7+
pushd ../hub-contracts
8+
npm run build
9+
popd
710

811
mkdir -p abis
912
jq .abi ../network-contracts/artifacts/contracts/NodeRegistry/NodeRegistry.sol/NodeRegistry.json > abis/NodeRegistry.json

0 commit comments

Comments
 (0)