Skip to content

Commit c6eebf9

Browse files
committed
Added optimism to EtherscanProvider (ethers-io#2968).
1 parent 32b7373 commit c6eebf9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
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)