Skip to content

Commit

Permalink
fix: read config without metadata on verifyAll (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarranzav authored Jan 12, 2024
1 parent 14785af commit 8210a6f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/contracts/tasks/verify/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { GRE_TASK_PARAMS } from '@graphprotocol/sdk/gre'
import fs from 'fs'
import path from 'path'
import { HardhatRuntimeEnvironment } from 'hardhat/types/runtime'
import { getContractConfig } from '@graphprotocol/sdk'
import { getContractConfig, readConfig } from '@graphprotocol/sdk'

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

console.log(`> Verifying all contracts on chain ${chainName}[${chainId}]...`)
const { addressBook, graphConfig, getDeployer } = hre.graph({
const { addressBook, getDeployer } = hre.graph({
addressBook: args.addressBook,
graphConfig: args.graphConfig,
})

const graphConfig = readConfig(args.graphConfig, false)
const deployer = (await getDeployer()).address
for (const contractName of addressBook.listEntries()) {
console.log(`\n> Verifying contract ${contractName}...`)

const contractConfig = getContractConfig(
graphConfig,
addressBook,
contractName,
(await getDeployer()).address,
)
const contractConfig = getContractConfig(graphConfig, addressBook, contractName, deployer)
const contractPath = getContractPath(contractName)
const constructorParams = contractConfig.params.map((p) => p.value.toString())

Expand Down

0 comments on commit 8210a6f

Please sign in to comment.