Skip to content

Commit c6eebf9

Browse files
committedMay 12, 2022
Added optimism to EtherscanProvider (#2968).

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎packages/providers/src.ts/etherscan-provider.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,12 @@ export class EtherscanProvider extends BaseProvider{
181181
return "https:/\/api-kovan.etherscan.io";
182182
case "goerli":
183183
return "https:/\/api-goerli.etherscan.io";
184+
case "optimism":
185+
return "https:/\/api-optimistic.etherscan.io";
184186
default:
185187
}
186188

187-
return logger.throwArgumentError("unsupported network", "network", name);
189+
return logger.throwArgumentError("unsupported network", "network", this.network.name);
188190
}
189191

190192
getUrl(module: string, params: Record<string, string>): string {

0 commit comments

Comments
 (0)
Please sign in to comment.