From 96653d9e9b8ae21f259c2dd84b9a95ba7ac762cf Mon Sep 17 00:00:00 2001 From: Ryan Pate Date: Tue, 26 Mar 2024 17:20:36 -0700 Subject: [PATCH] fix(core): Remove use of isVerified during contract verification --- .changeset/eighty-tigers-teach.md | 5 +++++ packages/core/src/etherscan.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/eighty-tigers-teach.md diff --git a/.changeset/eighty-tigers-teach.md b/.changeset/eighty-tigers-teach.md new file mode 100644 index 000000000..48e2ecd26 --- /dev/null +++ b/.changeset/eighty-tigers-teach.md @@ -0,0 +1,5 @@ +--- +'@sphinx-labs/core': patch +--- + +Do not use isVerified at all diff --git a/packages/core/src/etherscan.ts b/packages/core/src/etherscan.ts index 7bce5f8d3..c5ec79479 100644 --- a/packages/core/src/etherscan.ts +++ b/packages/core/src/etherscan.ts @@ -237,8 +237,7 @@ export const attemptVerification = async ( ) guid = response.message } catch (err) { - const verified = await etherscan.isVerified(address) - if (verified) { + if ((err.message as string).toLowerCase().includes('already verified')) { console.log( `The contract ${address} has already been verified on Etherscan:\n${contractURL}` )