From 90a99beca64d0872351043ea440a5a2881ac9999 Mon Sep 17 00:00:00 2001 From: Stefan Arnold Date: Mon, 29 Apr 2024 09:12:38 +0200 Subject: [PATCH] Added Polygon Amoy Testnet Support for EtherScan --- lib.commonjs/providers/provider-etherscan.d.ts | 1 + lib.commonjs/providers/provider-etherscan.js | 3 +++ lib.esm/providers/provider-etherscan.d.ts | 1 + lib.esm/providers/provider-etherscan.js | 3 +++ src.ts/providers/provider-etherscan.ts | 3 +++ 5 files changed, 11 insertions(+) diff --git a/lib.commonjs/providers/provider-etherscan.d.ts b/lib.commonjs/providers/provider-etherscan.d.ts index 8089a8bf67..0bdd81da41 100644 --- a/lib.commonjs/providers/provider-etherscan.d.ts +++ b/lib.commonjs/providers/provider-etherscan.d.ts @@ -17,6 +17,7 @@ * - Optimism Goerli Testnet (``optimism-goerli``) * - Polygon (``matic``) * - Polygon Mumbai Testnet (``matic-mumbai``) + * - Polygon Amoy Testnet (``matic-amoy``) * * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan] */ diff --git a/lib.commonjs/providers/provider-etherscan.js b/lib.commonjs/providers/provider-etherscan.js index f1ac86c4f3..71154e1e0f 100644 --- a/lib.commonjs/providers/provider-etherscan.js +++ b/lib.commonjs/providers/provider-etherscan.js @@ -18,6 +18,7 @@ * - Optimism Goerli Testnet (``optimism-goerli``) * - Polygon (``matic``) * - Polygon Mumbai Testnet (``matic-mumbai``) + * - Polygon Amoy Testnet (``matic-amoy``) * * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan] */ @@ -126,6 +127,8 @@ class EtherscanProvider extends abstract_provider_js_1.AbstractProvider { return "https:/\/api.polygonscan.com"; case "matic-mumbai": return "https:/\/api-testnet.polygonscan.com"; + case "matic-amoy": + return "https:/\/api-amoy.polygonscan.com"; case "optimism": return "https:/\/api-optimistic.etherscan.io"; case "optimism-goerli": diff --git a/lib.esm/providers/provider-etherscan.d.ts b/lib.esm/providers/provider-etherscan.d.ts index 8089a8bf67..0bdd81da41 100644 --- a/lib.esm/providers/provider-etherscan.d.ts +++ b/lib.esm/providers/provider-etherscan.d.ts @@ -17,6 +17,7 @@ * - Optimism Goerli Testnet (``optimism-goerli``) * - Polygon (``matic``) * - Polygon Mumbai Testnet (``matic-mumbai``) + * - Polygon Amoy Testnet (``matic-amoy``) * * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan] */ diff --git a/lib.esm/providers/provider-etherscan.js b/lib.esm/providers/provider-etherscan.js index 32c273d56c..62d4d8917a 100644 --- a/lib.esm/providers/provider-etherscan.js +++ b/lib.esm/providers/provider-etherscan.js @@ -17,6 +17,7 @@ * - Optimism Goerli Testnet (``optimism-goerli``) * - Polygon (``matic``) * - Polygon Mumbai Testnet (``matic-mumbai``) + * - Polygon Amoy Testnet (``matic-amoy``) * * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan] */ @@ -124,6 +125,8 @@ export class EtherscanProvider extends AbstractProvider { return "https:/\/api.polygonscan.com"; case "matic-mumbai": return "https:/\/api-testnet.polygonscan.com"; + case "matic-amoy": + return "https:/\/api-amoy.polygonscan.com"; case "optimism": return "https:/\/api-optimistic.etherscan.io"; case "optimism-goerli": diff --git a/src.ts/providers/provider-etherscan.ts b/src.ts/providers/provider-etherscan.ts index 26c2884c6b..801340c2da 100644 --- a/src.ts/providers/provider-etherscan.ts +++ b/src.ts/providers/provider-etherscan.ts @@ -17,6 +17,7 @@ * - Optimism Goerli Testnet (``optimism-goerli``) * - Polygon (``matic``) * - Polygon Mumbai Testnet (``matic-mumbai``) + * - Polygon Amoy Testnet (``matic-amoy``) * * @_subsection api/providers/thirdparty:Etherscan [providers-etherscan] */ @@ -178,6 +179,8 @@ export class EtherscanProvider extends AbstractProvider { return "https:/\/api.polygonscan.com"; case "matic-mumbai": return "https:/\/api-testnet.polygonscan.com"; + case "matic-amoy": + return "https:/\/api-amoy.polygonscan.com"; case "optimism": return "https:/\/api-optimistic.etherscan.io"; case "optimism-goerli":