From 6dfff21194819df64fc7e41c25315943d5e95509 Mon Sep 17 00:00:00 2001 From: Ameesha Agrawal Date: Tue, 12 Nov 2024 18:04:34 +0530 Subject: [PATCH] feat: polygon amoy and polter testnets --- .env.example | 4 ++++ scripts/rpcConfig/constants/batcherSupportedChainSlug.ts | 2 ++ scripts/rpcConfig/constants/explorers.ts | 2 ++ scripts/rpcConfig/constants/icons.ts | 2 ++ scripts/rpcConfig/constants/rpc.ts | 2 ++ scripts/rpcConfig/constants/version.ts | 2 +- scripts/rpcConfig/rpcConfig.ts | 2 +- src/enums/chainId.ts | 2 ++ src/enums/chainSlug.ts | 2 ++ src/enums/chainSlugToHardhatChainName.ts | 2 ++ src/enums/chainSlugToId.ts | 2 ++ src/enums/chainSlugToKey.ts | 2 ++ src/enums/currency.ts | 2 ++ src/enums/ethLikeChains.ts | 1 + src/enums/hardhatChainName.ts | 2 ++ src/enums/hardhatChainNameToSlug.ts | 2 ++ src/enums/native-tokens.ts | 1 + src/enums/opStackChains.ts | 1 + src/enums/testnetIds.ts | 2 ++ 19 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 089d240e..32a2f622 100644 --- a/.env.example +++ b/.env.example @@ -103,3 +103,7 @@ AVALANCHE_RPC=' ' XLAYER_RPC=' ' MANTA_PACIFIC_RPC=' ' + +POLTER_TESTNET_RPC=' ' + +POLYGON_AMOY_RPC=' ' diff --git a/scripts/rpcConfig/constants/batcherSupportedChainSlug.ts b/scripts/rpcConfig/constants/batcherSupportedChainSlug.ts index b68fff8d..4de56eae 100644 --- a/scripts/rpcConfig/constants/batcherSupportedChainSlug.ts +++ b/scripts/rpcConfig/constants/batcherSupportedChainSlug.ts @@ -41,4 +41,6 @@ export const batcherSupportedChainSlugs = [ ChainSlug.AVALANCHE, ChainSlug.XLAYER, ChainSlug.MANTA_PACIFIC, + ChainSlug.POLTER_TESTNET, + ChainSlug.POLYGON_AMOY, ]; diff --git a/scripts/rpcConfig/constants/explorers.ts b/scripts/rpcConfig/constants/explorers.ts index c6f7649a..a9aa8e9c 100644 --- a/scripts/rpcConfig/constants/explorers.ts +++ b/scripts/rpcConfig/constants/explorers.ts @@ -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/", }; diff --git a/scripts/rpcConfig/constants/icons.ts b/scripts/rpcConfig/constants/icons.ts index 31aa0021..ddfc10e0 100644 --- a/scripts/rpcConfig/constants/icons.ts +++ b/scripts/rpcConfig/constants/icons.ts @@ -18,4 +18,6 @@ export const icons = { [ChainSlug.AVALANCHE]: "", [ChainSlug.XLAYER]: "", [ChainSlug.MANTA_PACIFIC]: "", + [ChainSlug.POLTER_TESTNET]: "", + [ChainSlug.POLYGON_AMOY]: "", }; diff --git a/scripts/rpcConfig/constants/rpc.ts b/scripts/rpcConfig/constants/rpc.ts index 2e7dbca8..cef2f2c3 100644 --- a/scripts/rpcConfig/constants/rpc.ts +++ b/scripts/rpcConfig/constants/rpc.ts @@ -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"), }; diff --git a/scripts/rpcConfig/constants/version.ts b/scripts/rpcConfig/constants/version.ts index 55cfd988..ca99e550 100644 --- a/scripts/rpcConfig/constants/version.ts +++ b/scripts/rpcConfig/constants/version.ts @@ -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", }; diff --git a/scripts/rpcConfig/rpcConfig.ts b/scripts/rpcConfig/rpcConfig.ts index d6c8eded..c23b4ecb 100644 --- a/scripts/rpcConfig/rpcConfig.ts +++ b/scripts/rpcConfig/rpcConfig.ts @@ -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), diff --git a/src/enums/chainId.ts b/src/enums/chainId.ts index d0cd6b7d..65baf72c 100644 --- a/src/enums/chainId.ts +++ b/src/enums/chainId.ts @@ -49,4 +49,6 @@ export enum ChainId { AVALANCHE = 43114, XLAYER = 196, MANTA_PACIFIC = 169, + POLTER_TESTNET = 631571, + POLYGON_AMOY = 80002, } diff --git a/src/enums/chainSlug.ts b/src/enums/chainSlug.ts index af77c9d3..fb8c094f 100644 --- a/src/enums/chainSlug.ts +++ b/src/enums/chainSlug.ts @@ -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, } diff --git a/src/enums/chainSlugToHardhatChainName.ts b/src/enums/chainSlugToHardhatChainName.ts index 1bbbf92a..c6445538 100644 --- a/src/enums/chainSlugToHardhatChainName.ts +++ b/src/enums/chainSlugToHardhatChainName.ts @@ -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], }; diff --git a/src/enums/chainSlugToId.ts b/src/enums/chainSlugToId.ts index d1d5846d..cf176317 100644 --- a/src/enums/chainSlugToId.ts +++ b/src/enums/chainSlugToId.ts @@ -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, }; diff --git a/src/enums/chainSlugToKey.ts b/src/enums/chainSlugToKey.ts index 684e25bd..50dd7a45 100644 --- a/src/enums/chainSlugToKey.ts +++ b/src/enums/chainSlugToKey.ts @@ -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, }; diff --git a/src/enums/currency.ts b/src/enums/currency.ts index f3162213..b31b31e5 100644 --- a/src/enums/currency.ts +++ b/src/enums/currency.ts @@ -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"], }; diff --git a/src/enums/ethLikeChains.ts b/src/enums/ethLikeChains.ts index b21fefc2..db0d14b6 100644 --- a/src/enums/ethLikeChains.ts +++ b/src/enums/ethLikeChains.ts @@ -23,4 +23,5 @@ export const ethLikeChains = [ ChainSlug.LINEA, ChainSlug.ZKEVM, ChainSlug.AVALANCHE, + ChainSlug.POLYGON_AMOY, ]; diff --git a/src/enums/hardhatChainName.ts b/src/enums/hardhatChainName.ts index f55b81d8..3be7496e 100644 --- a/src/enums/hardhatChainName.ts +++ b/src/enums/hardhatChainName.ts @@ -49,4 +49,6 @@ export enum HardhatChainName { AVALANCHE = "avalanche", XLAYER = "xlayer", MANTA_PACIFIC = "manta_pacific", + POLTER_TESTNET = "polter_testnet", + POLYGON_AMOY = "polygon_amoy", } diff --git a/src/enums/hardhatChainNameToSlug.ts b/src/enums/hardhatChainNameToSlug.ts index 418f7ee6..27a21406 100644 --- a/src/enums/hardhatChainNameToSlug.ts +++ b/src/enums/hardhatChainNameToSlug.ts @@ -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, }; diff --git a/src/enums/native-tokens.ts b/src/enums/native-tokens.ts index c059d89a..1e70d1bf 100644 --- a/src/enums/native-tokens.ts +++ b/src/enums/native-tokens.ts @@ -11,4 +11,5 @@ export enum NativeTokens { "dai" = "dai", "avalanche-2" = "avalanche-2", "okb" = "okb", + "aavegotchi" = "aavegotchi", } diff --git a/src/enums/opStackChains.ts b/src/enums/opStackChains.ts index 61c2a7af..92a76691 100644 --- a/src/enums/opStackChains.ts +++ b/src/enums/opStackChains.ts @@ -18,4 +18,5 @@ export const opStackL2Chain = [ ChainSlug.BLAST, ChainSlug.POLYNOMIAL, ChainSlug.MANTA_PACIFIC, + ChainSlug.POLTER_TESTNET, ]; diff --git a/src/enums/testnetIds.ts b/src/enums/testnetIds.ts index 20870b4a..d2e9ca07 100644 --- a/src/enums/testnetIds.ts +++ b/src/enums/testnetIds.ts @@ -24,4 +24,6 @@ export const TestnetIds: ChainSlug[] = [ ChainSlug.BSC_TESTNET, ChainSlug.NEOX_TESTNET, ChainSlug.NEOX_T4_TESTNET, + ChainSlug.POLTER_TESTNET, + ChainSlug.POLYGON_AMOY, ];