Skip to content

Commit

Permalink
Merge pull request #403 from SocketDotTech/new-chains
Browse files Browse the repository at this point in the history
feat: polygon amoy and polter testnets
  • Loading branch information
ameeshaagrawal authored Nov 12, 2024
2 parents 16661e2 + 0558450 commit f91aa90
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 11 deletions.
12 changes: 2 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,15 @@ DL_API_DEV_URL=''
DL_API_PROD_URL=''

NEOX_TESTNET_RPC=' '

NEOX_T4_TESTNET_RPC=' '

NEOX_RPC=' '

GNOSIS_RPC=' '

LINEA_RPC=' '

ZKEVM_RPC=' '

AVALANCHE_RPC=' '

XLAYER_RPC=' '

MANTA_PACIFIC_RPC=' '

POLTER_TESTNET_RPC=' '
POLYGON_AMOY_RPC=' '
OPBNB_RPC=' '

GEIST_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,6 +41,8 @@ export const batcherSupportedChainSlugs = [
ChainSlug.AVALANCHE,
ChainSlug.XLAYER,
ChainSlug.MANTA_PACIFIC,
ChainSlug.POLTER_TESTNET,
ChainSlug.POLYGON_AMOY,
ChainSlug.OPBNB,
ChainSlug.GEIST,
];
2 changes: 2 additions & 0 deletions scripts/rpcConfig/constants/explorers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ 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/",
[ChainSlug.OPBNB]: "https://opbnb.bscscan.com/",
[ChainSlug.GEIST]: "https://geist-mainnet.explorer.alchemy.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,6 +18,8 @@ export const icons = {
[ChainSlug.AVALANCHE]: "",
[ChainSlug.XLAYER]: "",
[ChainSlug.MANTA_PACIFIC]: "",
[ChainSlug.POLTER_TESTNET]: "",
[ChainSlug.POLYGON_AMOY]: "",
[ChainSlug.OPBNB]: "",
[ChainSlug.GEIST]: "",
};
2 changes: 2 additions & 0 deletions scripts/rpcConfig/constants/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ 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"),
[ChainSlug.OPBNB]: checkEnvValue("OPBNB_RPC"),
[ChainSlug.GEIST]: checkEnvValue("GEIST_RPC"),
};
2 changes: 1 addition & 1 deletion scripts/rpcConfig/rpcConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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,6 +49,8 @@ export enum ChainId {
AVALANCHE = 43114,
XLAYER = 196,
MANTA_PACIFIC = 169,
POLTER_TESTNET = 631571,
POLYGON_AMOY = 80002,
OPBNB = 204,
GEIST = 63157,
}
2 changes: 2 additions & 0 deletions src/enums/chainSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export enum ChainSlug {
AVALANCHE = ChainId.AVALANCHE,
XLAYER = ChainId.XLAYER,
MANTA_PACIFIC = ChainId.MANTA_PACIFIC,
POLTER_TESTNET = ChainId.POLTER_TESTNET,
POLYGON_AMOY = ChainId.POLYGON_AMOY,
OPBNB = ChainId.OPBNB,
GEIST = ChainId.GEIST,
}
2 changes: 2 additions & 0 deletions src/enums/chainSlugToHardhatChainName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ 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],
[ChainSlug.OPBNB]: [HardhatChainName.OPBNB],
[ChainSlug.GEIST]: [HardhatChainName.GEIST],
};
2 changes: 2 additions & 0 deletions src/enums/chainSlugToId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ 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,
[ChainSlug.OPBNB]: ChainId.OPBNB,
[ChainSlug.GEIST]: ChainId.GEIST,
};
2 changes: 2 additions & 0 deletions src/enums/chainSlugToKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ 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,
[ChainSlug.OPBNB]: HardhatChainName.OPBNB,
[ChainSlug.GEIST]: HardhatChainName.GEIST,
};
2 changes: 2 additions & 0 deletions src/enums/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ 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"],
[ChainSlug.OPBNB]: NativeTokens["binancecoin"],
[ChainSlug.GEIST]: NativeTokens["aavegotchi"],
};
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,6 +49,8 @@ export enum HardhatChainName {
AVALANCHE = "avalanche",
XLAYER = "xlayer",
MANTA_PACIFIC = "manta_pacific",
POLTER_TESTNET = "polter_testnet",
POLYGON_AMOY = "polygon_amoy",
OPBNB = "opbnb",
GEIST = "geist",
}
2 changes: 2 additions & 0 deletions src/enums/hardhatChainNameToSlug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ 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,
[HardhatChainName.OPBNB]: ChainSlug.OPBNB,
[HardhatChainName.GEIST]: ChainSlug.GEIST,
};
1 change: 1 addition & 0 deletions src/enums/opStackChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export const opStackL2Chain = [
ChainSlug.BLAST,
ChainSlug.POLYNOMIAL,
ChainSlug.MANTA_PACIFIC,
ChainSlug.POLTER_TESTNET,
ChainSlug.OPBNB,
];
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 f91aa90

Please sign in to comment.