Skip to content

Commit 1717abb

Browse files
committed
Added Polygon Amoy testnet (#4645).
1 parent 014004d commit 1717abb

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src.ts/providers/default-provider.ts

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export function getDefaultProvider(network?: string | Networkish | WebSocketLike
104104
if (allowService("publicPolygon") && staticNetwork) {
105105
if (staticNetwork.name === "matic") {
106106
providers.push(new JsonRpcProvider("https:/\/polygon-rpc.com/", staticNetwork, { staticNetwork }));
107+
} else if (staticNetwork.name === "matic-amoy") {
108+
providers.push(new JsonRpcProvider("https:/\/rpc-amoy.polygon.technology/", staticNetwork, { staticNetwork }));
107109
}
108110
}
109111

src.ts/providers/network.ts

+1
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ function injectCommonNetworks(): void {
415415
getGasStationPlugin("https:/\/gasstation.polygon.technology/v2")
416416
]
417417
});
418+
registerEth("matic-amoy", 80002, { });
418419
registerEth("matic-mumbai", 80001, {
419420
altNames: [ "maticMumbai", "maticmum" ], // @TODO: Future remove these alts
420421
plugins: [

src.ts/providers/provider-alchemy.ts

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* - Optimism Goerli Testnet (``optimism-goerli``)
1818
* - Optimism Sepolia Testnet (``optimism-sepolia``)
1919
* - Polygon (``matic``)
20+
* - Polygon Amoy Testnet (``matic-amoy``)
2021
* - Polygon Mumbai Testnet (``matic-mumbai``)
2122
*
2223
* @_subsection: api/providers/thirdparty:Alchemy [providers-alchemy]
@@ -61,6 +62,8 @@ function getHost(name: string): string {
6162
return "base-sepolia.g.alchemy.com";
6263
case "matic":
6364
return "polygon-mainnet.g.alchemy.com";
65+
case "matic-amoy":
66+
return "polygon-amoy.g.alchemy.com";
6467
case "matic-mumbai":
6568
return "polygon-mumbai.g.alchemy.com";
6669
case "optimism":

src.ts/providers/provider-infura.ts

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* - Optimism Goerli Testnet (``optimism-goerli``)
2222
* - Optimism Sepolia Testnet (``optimism-sepolia``)
2323
* - Polygon (``matic``)
24+
* - Polygon Amoy Testnet (``matic-amoy``)
2425
* - Polygon Mumbai Testnet (``matic-mumbai``)
2526
*
2627
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
@@ -72,6 +73,8 @@ function getHost(name: string): string {
7273
return "linea-goerli.infura.io";
7374
case "matic":
7475
return "polygon-mainnet.infura.io";
76+
case "matic-amoy":
77+
return "polygon-amoy.infura.io";
7578
case "matic-mumbai":
7679
return "polygon-mumbai.infura.io";
7780
case "optimism":

0 commit comments

Comments
 (0)