@@ -287,7 +287,7 @@ impl VerifyBytecodeArgs {
287287 } ;
288288
289289 // Obtain Etherscan compilation metadata.
290- let etherscan_metadata = source_code. as_ref ( ) . map ( |source| source. items . first ( ) . unwrap ( ) ) ;
290+ let etherscan_metadata = source_code. as_ref ( ) . and_then ( |source| source. items . first ( ) ) ;
291291
292292 // The EVM version to verify against: the explorer-reported version when available,
293293 // otherwise the local project configuration.
@@ -321,7 +321,7 @@ impl VerifyBytecodeArgs {
321321 provided. into ( )
322322 } else if let Some ( source_code) = & source_code {
323323 // If no constructor args were provided, try to retrieve them from the explorer.
324- check_explorer_args ( source_code. clone ( ) ) ?
324+ check_explorer_args ( source_code) ?
325325 } else {
326326 Bytes :: new ( )
327327 } ;
@@ -369,7 +369,7 @@ impl VerifyBytecodeArgs {
369369 . await ?;
370370
371371 evm_env. block_env . set_number ( U256 :: from ( deploy_block) ) ;
372- let genesis_block = provider. get_block ( deploy_block. into ( ) ) . full ( ) . await ?;
372+ let deploy_block_info = provider. get_block ( deploy_block. into ( ) ) . full ( ) . await ?;
373373
374374 // Setup genesis tx_env and evm_evm.
375375 let deployer = Address :: with_last_byte ( 0x1 ) ;
@@ -381,7 +381,7 @@ impl VerifyBytecodeArgs {
381381 tx_env. set_gas_limit ( evm_env. block_env . gas_limit ( ) ) ;
382382 tx_env. set_gas_price ( evm_env. block_env . basefee ( ) as u128 ) ;
383383
384- if let Some ( ref block) = genesis_block {
384+ if let Some ( ref block) = deploy_block_info {
385385 configure_env_block :: < FEN > ( & mut evm_env, block, config. networks ) ;
386386 tx_env. set_gas_limit ( block. header ( ) . gas_limit ( ) ) ;
387387 tx_env. set_gas_price ( block. header ( ) . base_fee_per_gas ( ) . unwrap_or_default ( ) as u128 ) ;
0 commit comments