Skip to content

Commit ea14f20

Browse files
committed
fix: target undefined error
Signed-off-by: Tomás Migone <[email protected]>
1 parent bbdef06 commit ea14f20

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

packages/hardhat-graph-protocol/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# hardhat-graph-protocol
22

3+
## 0.1.18
4+
5+
### Patch Changes
6+
7+
- Fix target undefined bug
8+
39
## 0.1.17
410

511
### Patch Changes

packages/hardhat-graph-protocol/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hardhat-graph-protocol",
3-
"version": "0.1.17",
3+
"version": "0.1.18",
44
"publishConfig": {
55
"access": "public"
66
},

packages/hardhat-graph-protocol/src/gre.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ export const greExtendEnvironment = (hre: HardhatRuntimeEnvironment) => {
8282
}
8383

8484
// Accounts
85-
const accounts = getAccounts(provider, chainId, greDeployments.horizon.contracts.GraphToken.target)
85+
// We use ? here because we've previously asserted that the deployment exists which might not be true
86+
const accounts = getAccounts(provider, chainId, greDeployments.horizon?.contracts?.GraphToken?.target)
8687

8788
logDebug('GRE initialized successfully!')
8889

packages/horizon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"hardhat": "^2.22.18",
5656
"hardhat-contract-sizer": "^2.10.0",
5757
"hardhat-gas-reporter": "^1.0.8",
58-
"hardhat-graph-protocol": "workspace:^0.1.17",
58+
"hardhat-graph-protocol": "workspace:^0.1.18",
5959
"hardhat-secure-accounts": "^1.0.5",
6060
"lint-staged": "^15.2.2",
6161
"prettier": "^3.2.5",

packages/subgraph-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"hardhat": "^2.22.18",
5757
"hardhat-contract-sizer": "^2.10.0",
5858
"hardhat-gas-reporter": "^1.0.8",
59-
"hardhat-graph-protocol": "workspace:^0.1.17",
59+
"hardhat-graph-protocol": "workspace:^0.1.18",
6060
"hardhat-secure-accounts": "^1.0.5",
6161
"json5": "^2.2.3",
6262
"lint-staged": "^15.2.2",

0 commit comments

Comments
 (0)