Skip to content

Commit

Permalink
feat: do not swallow error result, when calling "verifysourcecode"
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Aug 27, 2024
1 parent 4413ea3 commit d9a2d75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/artifact/internal/etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d9a2d75

Please sign in to comment.