Skip to content

Commit

Permalink
feat: polygon amoy and polter testnets
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeshaagrawal committed Nov 12, 2024
1 parent 193b78e commit 6dfff21
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ AVALANCHE_RPC=' '
XLAYER_RPC=' '

MANTA_PACIFIC_RPC=' '

POLTER_TESTNET_RPC=' '

POLYGON_AMOY_RPC=' '
2 changes: 2 additions & 0 deletions scripts/rpcConfig/constants/batcherSupportedChainSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ export const batcherSupportedChainSlugs = [
ChainSlug.AVALANCHE,
ChainSlug.XLAYER,
ChainSlug.MANTA_PACIFIC,
ChainSlug.POLTER_TESTNET,
ChainSlug.POLYGON_AMOY,
];
2 changes: 2 additions & 0 deletions scripts/rpcConfig/constants/explorers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ export const explorers = {
[ChainSlug.AVALANCHE]: "https://snowtrace.io/",
[ChainSlug.XLAYER]: "https://www.okx.com/web3/explorer/xlayer",
[ChainSlug.MANTA_PACIFIC]: "https://pacific-explorer.manta.network/",
[ChainSlug.POLTER_TESTNET]: "https://polter-testnet.explorer.alchemy.com/",
[ChainSlug.POLYGON_AMOY]: "https://amoy.polygonscan.com/",
};
2 changes: 2 additions & 0 deletions scripts/rpcConfig/constants/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ export const icons = {
[ChainSlug.AVALANCHE]: "",
[ChainSlug.XLAYER]: "",
[ChainSlug.MANTA_PACIFIC]: "",
[ChainSlug.POLTER_TESTNET]: "",
[ChainSlug.POLYGON_AMOY]: "",
};
2 changes: 2 additions & 0 deletions scripts/rpcConfig/constants/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ export const rpcs = {
[ChainSlug.AVALANCHE]: checkEnvValue("AVALANCHE_RPC"),
[ChainSlug.XLAYER]: checkEnvValue("XLAYER_RPC"),
[ChainSlug.MANTA_PACIFIC]: checkEnvValue("MANTA_PACIFIC_RPC"),
[ChainSlug.POLTER_TESTNET]: checkEnvValue("POLTER_TESTNET_RPC"),
[ChainSlug.POLYGON_AMOY]: checkEnvValue("POLYGON_AMOY_RPC"),
};
2 changes: 1 addition & 1 deletion scripts/rpcConfig/constants/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { DeploymentMode } from "../../../src";

export const version = {
[DeploymentMode.DEV]: "1.0.5",
[DeploymentMode.PROD]: "1.0.60",
[DeploymentMode.PROD]: "1.0.62",
};
2 changes: 1 addition & 1 deletion scripts/rpcConfig/rpcConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const getChainData = async (
chainName: chainSlugToHardhatChainName[chainSlug].toString(),
blockNumber: getBlockNumber(deploymentMode, chainSlug),
siblings: getSiblings(deploymentMode, chainSlug),
chainTxData: await getChainTxData(chainSlug, txData),
chainTxData: getChainTxData(chainSlug, txData),
nativeToken: getCurrency(chainSlug),
chainType: getChainType(chainSlug),
reSyncInterval: getReSyncInterval(chainSlug),
Expand Down
2 changes: 2 additions & 0 deletions src/enums/chainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ export enum ChainId {
AVALANCHE = 43114,
XLAYER = 196,
MANTA_PACIFIC = 169,
POLTER_TESTNET = 631571,
POLYGON_AMOY = 80002,
}
2 changes: 2 additions & 0 deletions src/enums/chainSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ export enum ChainSlug {
AVALANCHE = ChainId.AVALANCHE,
XLAYER = ChainId.XLAYER,
MANTA_PACIFIC = ChainId.MANTA_PACIFIC,
POLTER_TESTNET = ChainId.POLTER_TESTNET,
POLYGON_AMOY = ChainId.POLYGON_AMOY,
}
2 changes: 2 additions & 0 deletions src/enums/chainSlugToHardhatChainName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export const chainSlugToHardhatChainName = {
[ChainSlug.AVALANCHE]: [HardhatChainName.AVALANCHE],
[ChainSlug.XLAYER]: [HardhatChainName.XLAYER],
[ChainSlug.MANTA_PACIFIC]: [HardhatChainName.MANTA_PACIFIC],
[ChainSlug.POLTER_TESTNET]: [HardhatChainName.POLTER_TESTNET],
[ChainSlug.POLYGON_AMOY]: [HardhatChainName.POLYGON_AMOY],
};
2 changes: 2 additions & 0 deletions src/enums/chainSlugToId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export const ChainSlugToId = {
[ChainSlug.AVALANCHE]: ChainId.AVALANCHE,
[ChainSlug.XLAYER]: ChainId.XLAYER,
[ChainSlug.MANTA_PACIFIC]: ChainId.MANTA_PACIFIC,
[ChainSlug.POLTER_TESTNET]: ChainId.POLTER_TESTNET,
[ChainSlug.POLYGON_AMOY]: ChainId.POLYGON_AMOY,
};
2 changes: 2 additions & 0 deletions src/enums/chainSlugToKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export const ChainSlugToKey = {
[ChainSlug.AVALANCHE]: HardhatChainName.AVALANCHE,
[ChainSlug.XLAYER]: HardhatChainName.XLAYER,
[ChainSlug.MANTA_PACIFIC]: HardhatChainName.MANTA_PACIFIC,
[ChainSlug.POLTER_TESTNET]: HardhatChainName.POLTER_TESTNET,
[ChainSlug.POLYGON_AMOY]: HardhatChainName.POLYGON_AMOY,
};
2 changes: 2 additions & 0 deletions src/enums/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ export const Currency = {
[ChainSlug.GNOSIS]: NativeTokens["dai"],
[ChainSlug.AVALANCHE]: NativeTokens["avalanche-2"],
[ChainSlug.XLAYER]: NativeTokens["okb"],
[ChainSlug.POLTER_TESTNET]: NativeTokens["aavegotchi"],
[ChainSlug.POLYGON_AMOY]: NativeTokens["matic-network"],
};
1 change: 1 addition & 0 deletions src/enums/ethLikeChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ export const ethLikeChains = [
ChainSlug.LINEA,
ChainSlug.ZKEVM,
ChainSlug.AVALANCHE,
ChainSlug.POLYGON_AMOY,
];
2 changes: 2 additions & 0 deletions src/enums/hardhatChainName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ export enum HardhatChainName {
AVALANCHE = "avalanche",
XLAYER = "xlayer",
MANTA_PACIFIC = "manta_pacific",
POLTER_TESTNET = "polter_testnet",
POLYGON_AMOY = "polygon_amoy",
}
2 changes: 2 additions & 0 deletions src/enums/hardhatChainNameToSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export const hardhatChainNameToSlug = {
[HardhatChainName.AVALANCHE]: ChainSlug.AVALANCHE,
[HardhatChainName.XLAYER]: ChainSlug.XLAYER,
[HardhatChainName.MANTA_PACIFIC]: ChainSlug.MANTA_PACIFIC,
[HardhatChainName.POLTER_TESTNET]: ChainSlug.POLTER_TESTNET,
[HardhatChainName.POLYGON_AMOY]: ChainSlug.POLYGON_AMOY,
};
1 change: 1 addition & 0 deletions src/enums/native-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export enum NativeTokens {
"dai" = "dai",
"avalanche-2" = "avalanche-2",
"okb" = "okb",
"aavegotchi" = "aavegotchi",
}
1 change: 1 addition & 0 deletions src/enums/opStackChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export const opStackL2Chain = [
ChainSlug.BLAST,
ChainSlug.POLYNOMIAL,
ChainSlug.MANTA_PACIFIC,
ChainSlug.POLTER_TESTNET,
];
2 changes: 2 additions & 0 deletions src/enums/testnetIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ export const TestnetIds: ChainSlug[] = [
ChainSlug.BSC_TESTNET,
ChainSlug.NEOX_TESTNET,
ChainSlug.NEOX_T4_TESTNET,
ChainSlug.POLTER_TESTNET,
ChainSlug.POLYGON_AMOY,
];

0 comments on commit 6dfff21

Please sign in to comment.