File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ impl CreateArgs {
172
172
) -> Result < ( ) > {
173
173
// NOTE: this does not represent the same `VerifyArgs` that would be sent after deployment,
174
174
// since we don't know the address yet.
175
- let verify = verify:: VerifyArgs {
175
+ let mut verify = verify:: VerifyArgs {
176
176
address : Default :: default ( ) ,
177
177
contract : self . contract . clone ( ) ,
178
178
compiler_version : None ,
@@ -193,6 +193,13 @@ impl CreateArgs {
193
193
verifier : self . verifier . clone ( ) ,
194
194
show_standard_json_input : self . show_standard_json_input ,
195
195
} ;
196
+
197
+ // Check config for Etherscan API Keys to avoid preflight check failing if no
198
+ // ETHERSCAN_API_KEY value set.
199
+ let config = verify. load_config_emit_warnings ( ) ;
200
+ verify. etherscan . key =
201
+ config. get_etherscan_config_with_chain ( Some ( chain. into ( ) ) ) ?. map ( |c| c. key ) ;
202
+
196
203
verify. verification_provider ( ) ?. preflight_check ( verify) . await ?;
197
204
Ok ( ( ) )
198
205
}
You can’t perform that action at this time.
0 commit comments