Skip to content

Commit 8210a6f

Browse files
authored
fix: read config without metadata on verifyAll (#912)
1 parent 14785af commit 8210a6f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/contracts/tasks/verify/verify.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { GRE_TASK_PARAMS } from '@graphprotocol/sdk/gre'
77
import fs from 'fs'
88
import path from 'path'
99
import { HardhatRuntimeEnvironment } from 'hardhat/types/runtime'
10-
import { getContractConfig } from '@graphprotocol/sdk'
10+
import { getContractConfig, readConfig } from '@graphprotocol/sdk'
1111

1212
task('sourcify', 'Verifies contract on sourcify')
1313
.addPositionalParam('address', 'Address of the smart contract to verify', undefined, types.string)
@@ -94,20 +94,16 @@ task('verifyAll', 'Verifies all contracts on etherscan')
9494
}
9595

9696
console.log(`> Verifying all contracts on chain ${chainName}[${chainId}]...`)
97-
const { addressBook, graphConfig, getDeployer } = hre.graph({
97+
const { addressBook, getDeployer } = hre.graph({
9898
addressBook: args.addressBook,
9999
graphConfig: args.graphConfig,
100100
})
101-
101+
const graphConfig = readConfig(args.graphConfig, false)
102+
const deployer = (await getDeployer()).address
102103
for (const contractName of addressBook.listEntries()) {
103104
console.log(`\n> Verifying contract ${contractName}...`)
104105

105-
const contractConfig = getContractConfig(
106-
graphConfig,
107-
addressBook,
108-
contractName,
109-
(await getDeployer()).address,
110-
)
106+
const contractConfig = getContractConfig(graphConfig, addressBook, contractName, deployer)
111107
const contractPath = getContractPath(contractName)
112108
const constructorParams = contractConfig.params.map((p) => p.value.toString())
113109

0 commit comments

Comments
 (0)