@@ -4,27 +4,25 @@ import type { NewTaskActionFunction } from "hardhat/types/tasks";
4
4
import path from "node:path" ;
5
5
6
6
import { verifyContract } from "@nomicfoundation/hardhat-verify/verify" ;
7
+ import { getVerificationInformation } from "@nomicfoundation/ignition-core" ;
7
8
8
9
interface TaskVerifyArguments {
9
10
deploymentId : string ;
10
- blockscout : boolean ;
11
11
force : boolean ;
12
12
}
13
13
14
14
const verifyTask : NewTaskActionFunction < TaskVerifyArguments > = async (
15
- { deploymentId, blockscout , force } ,
15
+ { deploymentId, force } ,
16
16
hre : HardhatRuntimeEnvironment ,
17
17
) => {
18
- const { getVerificationInformation } = await import (
19
- "@nomicfoundation/ignition-core"
20
- ) ;
21
-
22
18
const deploymentDir = path . join (
23
19
hre . config . paths . ignition ,
24
20
"deployments" ,
25
21
deploymentId ,
26
22
) ;
27
23
24
+ const connection = await hre . network . connect ( ) ;
25
+
28
26
for await ( const contractInfo of getVerificationInformation ( deploymentDir ) ) {
29
27
if ( typeof contractInfo === "string" ) {
30
28
console . log (
@@ -34,8 +32,6 @@ const verifyTask: NewTaskActionFunction<TaskVerifyArguments> = async (
34
32
continue ;
35
33
}
36
34
37
- const connection = await hre . network . connect ( ) ;
38
-
39
35
console . log (
40
36
`Verifying contract "${ contractInfo . contract } " for network ${ connection . networkName } ...` ,
41
37
) ;
@@ -44,7 +40,7 @@ const verifyTask: NewTaskActionFunction<TaskVerifyArguments> = async (
44
40
{
45
41
...contractInfo ,
46
42
force,
47
- provider : blockscout ? "blockscout" : "etherscan" ,
43
+ provider : "etherscan" ,
48
44
} ,
49
45
hre ,
50
46
) ;
0 commit comments