graphprotocol / contracts

Contracts repository for The Graph protocol

Home Page:https://thegraph.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: verifyAll task failing when reading from config

Maikol opened this issue · comments

When trying to verify all contracts seems like graphConfig isn't being loaded correctly and accessing graphConfig.contracts results in an undefined object.

Running

DEBUG=hardhat:gre:* npx hardhat verifyAll --network sepolia --graph-config config/graph.sepolia.yml

Output:

> Verifying all contracts on chain sepolia[11155111]...
  hardhat:gre:debug *** Initializing Graph Runtime Environment (GRE) *** +0ms
  hardhat:gre:debug Main network: sepolia +0ms
  hardhat:gre:debug == Features +0ms
  hardhat:gre:debug Tx logging: disabled +0ms
  hardhat:gre:debug Secure accounts: enabled +0ms
  hardhat:gre:debug Forking: disabled +0ms
  hardhat:gre:debug == Getting chain ids +0ms
  hardhat:gre:debug Hardhat chain id: 11155111 +0ms
  hardhat:gre:debug Secondary chain id: 421614 +1ms
  hardhat:gre:debug L1 chain id: 11155111 - Is HHL1: true +0ms
  hardhat:gre:debug L2 chain id: 421614 - Is HHL2: false +0ms
  hardhat:gre:debug == Getting providers +0ms
  hardhat:gre:debug Provider url for L1(sepolia): https://sepolia.infura.io/v3/0fc9bfa770c64cf6a218187f93e2a9f0 +0ms
  hardhat:gre:debug Creating provider for L1(sepolia) +0ms
  hardhat:gre:debug Provider url for L2(arbitrum-sepolia): https://sepolia-rollup.arbitrum.io/rpcblock +266ms
  hardhat:gre:debug Creating provider for L2(arbitrum-sepolia) +0ms
  hardhat:gre:debug == Getting address book path +174ms
  hardhat:gre:debug Graph base dir: /Users/migueldeelias/Developer/the-graph/contracts +0ms
  hardhat:gre:debug 1) opts.addressBookPath: ./addresses.json +0ms
  hardhat:gre:debug 2) hre.config.graph.addressBook: addresses.json +0ms
  hardhat:gre:debug Address book path found: /Users/migueldeelias/Developer/the-graph/contracts/addresses.json +0ms
  hardhat:gre:debug == Getting graph config paths +1ms
  hardhat:gre:debug Graph base dir: /Users/migueldeelias/Developer/the-graph/contracts +0ms
  hardhat:gre:debug > L1 graph config +0ms
  hardhat:gre:debug 1) opts.l1GraphConfig: undefined +0ms
  hardhat:gre:debug 2) opts.graphConfig: config/graph.sepolia.yml +0ms
  hardhat:gre:debug 3) l1Network.graphConfig: config/graph.sepolia.yml +0ms
  hardhat:gre:debug 4) hre.config.graph.l1GraphConfig: config/graph.localhost.yml +0ms
  hardhat:gre:debug > L2 graph config +0ms
  hardhat:gre:debug 1) opts.l2GraphConfig: undefined +0ms
  hardhat:gre:debug 2) opts.graphConfig: undefined +0ms
  hardhat:gre:debug 3) l2Network.graphConfig: config/graph.arbitrum-sepolia.yml +0ms
  hardhat:gre:debug 4) hre.config.graph.l2GraphConfig: config/graph.arbitrum-localhost.yml +0ms
  hardhat:gre:debug L1 graph config path: /Users/migueldeelias/Developer/the-graph/contracts/config/graph.sepolia.yml +0ms
  hardhat:gre:debug L2 graph config path: /Users/migueldeelias/Developer/the-graph/contracts/config/graph.arbitrum-sepolia.yml +0ms
  hardhat:gre:debug GRE initialized successfully! +0ms
  hardhat:gre:debug Main network: L1 +0ms
  hardhat:gre:debug Secondary network: L2 +0ms
Preparing contracts on chain id: 11155111
Connected Wallet: address=----------------- nonce=-- balance=--

Gas settings: {"gasPrice":"auto","gasLimit":"auto"}

> Verifying contract GraphProxyAdmin...
An unexpected error occurred:

TypeError: Cannot read properties of undefined (reading 'GraphProxyAdmin')
    at getContractConfig (/Users/migueldeelias/Developer/the-graph/contracts/cli/config.ts:69:42)
    at SimpleTaskDefinition.action (/Users/migueldeelias/Developer/the-graph/contracts/tasks/verify/verify.ts:98:47)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Environment._runTaskDefinition (/Users/migueldeelias/Developer/the-graph/contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:219:14)
    at async Environment.run (/Users/migueldeelias/Developer/the-graph/contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:131:14)
    at async main (/Users/migueldeelias/Developer/the-graph/contracts/node_modules/hardhat/src/internal/cli/cli.ts:256:5)