From d9a2d758d301b0180dda5cf0265852c7a6537046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crist=C3=B3v=C3=A3o=20Honorato?= Date: Tue, 27 Aug 2024 15:55:01 +0200 Subject: [PATCH] feat: do not swallow error result, when calling "verifysourcecode" --- src/artifact/internal/etherscan.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/artifact/internal/etherscan.ts b/src/artifact/internal/etherscan.ts index a341ae5..2c3a98b 100644 --- a/src/artifact/internal/etherscan.ts +++ b/src/artifact/internal/etherscan.ts @@ -76,13 +76,14 @@ export async function verifySourceCode({ }, body: parameters.toString(), }); - const { status, message } = (await response.json()) as { + const { status, message, result } = (await response.json()) as { status: number; message: string; + result: string; }; if (!isOk(status)) { - throw new Error(`Verification Error: ${status} ${message}`); + throw new Error(`Verifying SourceCode: ${message} ${result}`); } return {