@@ -23,7 +23,7 @@ const DEFAULT_ETHERSCAN_CHAINLIST_ENDPOINT =
2323 "https://api.etherscan.io/v2/chainlist" ;
2424const DEFAULT_BLOCKSCOUT_CHAINLIST_ENDPOINT =
2525 "https://chains.blockscout.com/api/chains" ;
26- const BLOCKSCOUT_ALREADY_VERIFIED = "BLOCKSCOUT_ALREADY_VERIFIED " ;
26+ const VERIFIER_ALREADY_VERIFIED = "VERIFIER_ALREADY_VERIFIED " ;
2727const ROUTESCAN_CHAINLIST_ENDPOINTS = [
2828 {
2929 workspace : "mainnet" ,
@@ -327,7 +327,7 @@ export const buildJobExternalVerificationsObject = (
327327 if (
328328 verifierData . verificationId &&
329329 // We need to handle the special case for a blockscout already verified contract
330- verifierData . verificationId !== BLOCKSCOUT_ALREADY_VERIFIED
330+ verifierData . verificationId !== VERIFIER_ALREADY_VERIFIED
331331 ) {
332332 try {
333333 const apiBaseUrl = verifierService ?. getApiUrl (
@@ -530,14 +530,16 @@ export class EtherscanVerifyApiService implements WStorageService {
530530 return ;
531531 }
532532
533- // Handle the "already verified" case for Blockscout by storing
534- // { verificationId: "BLOCKSCOUT_ALREADY_VERIFIED " }
533+ // Handle the "already verified" case for Blockscout and Etherscan by storing
534+ // { verificationId: "VERIFIER_ALREADY_VERIFIED " }
535535 if (
536- this . IDENTIFIER === WStorageIdentifiers . BlockscoutVerify &&
537- response . result === "Smart-contract already verified."
536+ ( this . IDENTIFIER === WStorageIdentifiers . BlockscoutVerify &&
537+ response . result === "Smart-contract already verified." ) ||
538+ ( this . IDENTIFIER === WStorageIdentifiers . EtherscanVerify &&
539+ response . result === "Contract source code already verified" )
538540 ) {
539541 this . storeExternalVerificationResult ( jobData , {
540- verificationId : BLOCKSCOUT_ALREADY_VERIFIED ,
542+ verificationId : VERIFIER_ALREADY_VERIFIED ,
541543 } ) ;
542544 return ;
543545 }
0 commit comments