@@ -7,7 +7,7 @@ import { GRE_TASK_PARAMS } from '@graphprotocol/sdk/gre'
7
7
import fs from 'fs'
8
8
import path from 'path'
9
9
import { HardhatRuntimeEnvironment } from 'hardhat/types/runtime'
10
- import { getContractConfig } from '@graphprotocol/sdk'
10
+ import { getContractConfig , readConfig } from '@graphprotocol/sdk'
11
11
12
12
task ( 'sourcify' , 'Verifies contract on sourcify' )
13
13
. addPositionalParam ( 'address' , 'Address of the smart contract to verify' , undefined , types . string )
@@ -94,20 +94,16 @@ task('verifyAll', 'Verifies all contracts on etherscan')
94
94
}
95
95
96
96
console . log ( `> Verifying all contracts on chain ${ chainName } [${ chainId } ]...` )
97
- const { addressBook, graphConfig , getDeployer } = hre . graph ( {
97
+ const { addressBook, getDeployer } = hre . graph ( {
98
98
addressBook : args . addressBook ,
99
99
graphConfig : args . graphConfig ,
100
100
} )
101
-
101
+ const graphConfig = readConfig ( args . graphConfig , false )
102
+ const deployer = ( await getDeployer ( ) ) . address
102
103
for ( const contractName of addressBook . listEntries ( ) ) {
103
104
console . log ( `\n> Verifying contract ${ contractName } ...` )
104
105
105
- const contractConfig = getContractConfig (
106
- graphConfig ,
107
- addressBook ,
108
- contractName ,
109
- ( await getDeployer ( ) ) . address ,
110
- )
106
+ const contractConfig = getContractConfig ( graphConfig , addressBook , contractName , deployer )
111
107
const contractPath = getContractPath ( contractName )
112
108
const constructorParams = contractConfig . params . map ( ( p ) => p . value . toString ( ) )
113
109
0 commit comments