Skip to content

Commit

Permalink
hardhat-verify: fix lint for internal/sourcify.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcocastignoli committed Dec 14, 2023
1 parent 8ce5602 commit 03d2e4b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/hardhat-verify/src/internal/sourcify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import { ValidationResponse } from "./utilities";
export class Sourcify {
public apiUrl: string = "https://sourcify.dev/server";
public browserUrl: string = "https://repo.sourcify.dev";
private chainId: number;
private _chainId: number;

constructor(chainId: number, apiUrl?: string, browserUrl?: string) {
this.chainId = chainId;
if (apiUrl) {
this._chainId = chainId;
if (apiUrl !== undefined) {
this.apiUrl = apiUrl;
}
if (browserUrl) {
if (browserUrl !== undefined) {
this.browserUrl = browserUrl;
}
}
Expand All @@ -30,7 +30,7 @@ export class Sourcify {
public async isVerified(address: string) {
const parameters = new URLSearchParams({
addresses: address,
chainIds: `${this.chainId}`,
chainIds: `${this._chainId}`,
});

const url = new URL(`${this.apiUrl}/check-all-by-addresses`);
Expand Down Expand Up @@ -94,7 +94,7 @@ export class Sourcify {
const parameters: any = {
address,
files,
chain: `${this.chainId}`,
chain: `${this._chainId}`,
};

if (chosenContract !== undefined) {
Expand Down Expand Up @@ -139,7 +139,7 @@ export class Sourcify {
contractStatus === ContractStatus.PERFECT
? "full_match"
: "partial_match";
return `${this.browserUrl}/contracts/${matchType}/${this.chainId}/${address}/`;
return `${this.browserUrl}/contracts/${matchType}/${this._chainId}/${address}/`;
}
}

Expand Down

0 comments on commit 03d2e4b

Please sign in to comment.