From 09451e2ace72691e5b06f92aa78dee28d69bc27d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 23 Apr 2024 16:47:05 +0530 Subject: [PATCH 1/2] feat: Added support for polygon zkevm cardona testnet --- src/components/Faucets.jsx | 4 ++-- src/components/VerifyAlias.jsx | 4 ++-- src/config/config-dev.js | 12 ++++++------ src/config/config-staging.js | 12 ++++++------ src/connectors/chains.ts | 6 +++--- src/helpers/CaipHelper.ts | 2 +- src/helpers/UtilityHelper.ts | 14 +++++++------- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/components/Faucets.jsx b/src/components/Faucets.jsx index 491171cea1..7084e3f84b 100644 --- a/src/components/Faucets.jsx +++ b/src/components/Faucets.jsx @@ -51,11 +51,11 @@ const Faucets = () => { link: "https://faucet.quicknode.com/optimism/sepolia", }, { - id: "1442", + id: "2442", value: "Polygon zkEVM", title: "Polygon zkEVM Bridge", function: () => {}, - link: "https://public.zkevm-test.net/" + link: "https://faucet.polygon.technology/" }, { id: "421614", diff --git a/src/components/VerifyAlias.jsx b/src/components/VerifyAlias.jsx index c415de0138..58476b9ef3 100644 --- a/src/components/VerifyAlias.jsx +++ b/src/components/VerifyAlias.jsx @@ -44,9 +44,9 @@ const VerifyAlias = ({ aliasEthAccount, setAliasVerified }) => { label: "Sepolia OpETH", url: "https://faucet.quicknode.com/optimism/sepolia" }, - 1442: { + 2442: { label: "Polygon zkEVM ETH", - url: "https://public.zkevm-test.net/" + url: "https://faucet.polygon.technology/" }, 421614: { label: "Sepolia ArbETH", diff --git a/src/config/config-dev.js b/src/config/config-dev.js index 1218d06536..7a4c5a4098 100644 --- a/src/config/config-dev.js +++ b/src/config/config-dev.js @@ -27,7 +27,7 @@ export const config = { 80002, //for amoy polygon 97, // bnb testnet 11155420, // optimism sepolia testnet - 1442, // polygon zkevm testnet + 2442, // polygon zkevm cardona testnet 421614, // arbitrum testnet 123, // fuse testnet ], @@ -43,7 +43,7 @@ export const config = { 80002: 'https://polygon-amoy.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', 97: 'https://data-seed-prebsc-1-s1.binance.org:8545', 11155420: 'https://optimism-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', - 1442: 'https://rpc.public.zkevm-test.net', + 2442: 'https://rpc.cardona.zkevm-rpc.com', 421614: 'https://arbitrum-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', }, infuraApiUrl: 'https:/infura-ipfs.io/ipfs/', @@ -153,12 +153,12 @@ export const CHAIN_DETAILS = { rpcUrl: 'https://optimism-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', commAddress: '0x754787358fac861ef904c92d54f7adb659779317', }, - 1442: { + 2442: { label: 'Polygon zkEVM Testnet', name: 'POLYGON_ZK_EVM_TESTNET', - chainId: 1442, - rpcUrl: 'https://rpc.public.zkevm-test.net', - commAddress: '0x630b152e4185c63D7177c656b56b26f878C61572', + chainId: 2442, + rpcUrl: 'https://rpc.cardona.zkevm-rpc.com', + commAddress: '0x9cb3bd7550b5c92baa056fc0f08132f49508145f', }, 421614: { label: 'Arbitrum Testnet', diff --git a/src/config/config-staging.js b/src/config/config-staging.js index d2d6f9253f..af6d605119 100644 --- a/src/config/config-staging.js +++ b/src/config/config-staging.js @@ -28,7 +28,7 @@ export const config = { 80002, //for amoy polygon 97, // bnb testnet 11155420, // optimism sepolia testnet - 1442, // polygon zkevm testnet + 2442, // polygon zkevm cardona testnet 421614, // arbitrum testnet 123, // fuse testnet ], @@ -44,7 +44,7 @@ export const config = { 80002: 'https://polygon-amoy.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', 97: 'https://data-seed-prebsc-1-s1.binance.org:8545', 11155420: 'https://optimism-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', - 1442: 'https://rpc.public.zkevm-test.net', + 2442: 'https://rpc.cardona.zkevm-rpc.com', 421614: 'https://arbitrum-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', }, infuraApiUrl: 'https:/infura-ipfs.io/ipfs/', @@ -149,12 +149,12 @@ export const CHAIN_DETAILS = { rpcUrl: 'https://optimism-sepolia.infura.io/v3/5524d420b29f4f7a8d8d2f582a0d43f7', commAddress: '0x9Dc25996ba72A2FD7E64e7a674232a683f406F1A', }, - 1442: { + 2442: { label: 'Polygon zkEVM Testnet', name: 'POLYGON_ZK_EVM_TESTNET', - chainId: 1442, - rpcUrl: 'https://rpc.public.zkevm-test.net', - commAddress: '0xb3971BCef2D791bc4027BbfedFb47319A4AAaaAa', + chainId: 2442, + rpcUrl: 'https://rpc.cardona.zkevm-rpc.com', + commAddress: '0x6e489b7af21ceb969f49a90e481274966ce9d74d', }, 421614: { label: 'Arbitrum Testnet', diff --git a/src/connectors/chains.ts b/src/connectors/chains.ts index a1863ae047..11fa81ba76 100644 --- a/src/connectors/chains.ts +++ b/src/connectors/chains.ts @@ -168,11 +168,11 @@ export const TESTNET_CHAINS: ChainConfig = { nativeCurrency: BNB, blockExplorerUrls: [], }, - 1442: { + 2442: { name: 'Polygon zkEVM Testnet', - urls: ['https://rpc.public.zkevm-test.net'], + urls: ['https://rpc.cardona.zkevm-rpc.com'], nativeCurrency: MATIC, - blockExplorerUrls: [], + blockExplorerUrls: ['https://cardona-zkevm.polygonscan.com/'], }, 123: { name: 'Fuse Testnet', diff --git a/src/helpers/CaipHelper.ts b/src/helpers/CaipHelper.ts index 94584cacb5..454bcea288 100644 --- a/src/helpers/CaipHelper.ts +++ b/src/helpers/CaipHelper.ts @@ -2,7 +2,7 @@ import { appConfig } from '../config/index.js'; export const Eip155EnabledIds: Array = [ - 1, 56, 137, 10, 1101, 42161, 11155111, 97, 80002, 11155420, 1442, 421614, 122, 123, + 1, 56, 137, 10, 1101, 42161, 11155111, 97, 80002, 11155420, 2442, 421614, 122, 123, ]; // Types diff --git a/src/helpers/UtilityHelper.ts b/src/helpers/UtilityHelper.ts index a4f3372acb..1d4fb33ce9 100644 --- a/src/helpers/UtilityHelper.ts +++ b/src/helpers/UtilityHelper.ts @@ -53,7 +53,7 @@ export const MaskedAliasChannels: { 97: {}, 10: {}, 11155420: {}, - 1442: {}, + 2442: {}, 1101: {}, 42161: {}, 421614: {}, @@ -115,7 +115,7 @@ export const networkName = { 56: 'BNB Mainnet', 11155420: 'Optimism Sepolia', 10: 'Optimism Mainnet', - 1442: 'Polygon zkEVM Testnet', + 2442: 'Polygon zkEVM Testnet', 1101: 'Polygon zkEVM Mainnet', 42161: 'ArbitrumOne Mainnet', 421614: 'Arbitrum Testnet', @@ -141,7 +141,7 @@ export const aliasChainIdToChainName = { 42161: 'ARBITRUMONE', 421614: 'ARBITRUMONE', 1101: 'POLYGONZKEVM', - 1442: 'POLYGONZKEVM', + 2442: 'POLYGONZKEVM', 122: 'FUSE', 123: 'FUSE', }; @@ -197,11 +197,11 @@ export const NETWORK_DETAILS = { blockExplorerUrls: ['https://optimistic.etherscan.io/'], }, POLYGON_ZK_EVM_TESTNET: { - chainId: utils.hexValue(1442), + chainId: utils.hexValue(2442), chainName: 'Polygon zkEVM Testnet', nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 }, - rpcUrls: ['https://rpc.public.zkevm-test.net'], - blockExplorerUrls: ['https://testnet-zkevm.polygonscan.com'], + rpcUrls: ['https://rpc.cardona.zkevm-rpc.com'], + blockExplorerUrls: ['https://cardona-zkevm.polygonscan.com/'], }, POLYGON_ZK_EVM_MAINNET: { chainId: utils.hexValue(1101), @@ -253,7 +253,7 @@ export const LOGO_FROM_CHAIN_ID: { 56: 'BNB.svg', 11155420: 'Optimism.svg', 10: 'Optimism.svg', - 1442: 'PolygonZkEVM.svg', + 2442: 'PolygonZkEVM.svg', 1101: 'PolygonZkEVM.svg', 42161: 'Arbitrum.svg', 421614: 'Arbitrum.svg', From 9ccca2ad40077058d967a940c29855441832540d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 23 Apr 2024 17:17:50 +0530 Subject: [PATCH 2/2] chore: update sdk package versions --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index c8dba4f96e..a9da965b62 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,9 @@ "@mui/icons-material": "^5.8.4", "@mui/lab": "^5.0.0-alpha.72", "@mui/material": "^5.5.0", - "@pushprotocol/restapi": "0.0.1-alpha.78", + "@pushprotocol/restapi": "1.7.10", "@pushprotocol/socket": "0.5.3", - "@pushprotocol/uiweb": "1.3.1-alpha.16", + "@pushprotocol/uiweb": "1.2.8", "@reduxjs/toolkit": "^1.7.1", "@testing-library/dom": "^9.0.1", "@testing-library/jest-dom": "^4.2.4", diff --git a/yarn.lock b/yarn.lock index a08997a7f8..61614f8976 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4215,9 +4215,9 @@ __metadata: languageName: node linkType: hard -"@pushprotocol/restapi@npm:0.0.1-alpha.78": - version: 0.0.1-alpha.78 - resolution: "@pushprotocol/restapi@npm:0.0.1-alpha.78" +"@pushprotocol/restapi@npm:1.7.10": + version: 1.7.10 + resolution: "@pushprotocol/restapi@npm:1.7.10" dependencies: "@metamask/eth-sig-util": ^5.0.2 axios: ^0.27.2 @@ -4240,7 +4240,7 @@ __metadata: peerDependenciesMeta: ethers: optional: true - checksum: 10ab283ec990cf8db06c04dd53b0485583506d3bb858744433807b117468d11955581b9797dac5a00f6bbe30fddfab8b17fa018ca8fb1e36dc36aa44676e7b8e + checksum: 8077c74b994240eb39e261046d74a78d23c575c1e77fe79ad233f03e6947d29c84f83d969c9153a35cad2b753bd8c7832e3fb1bc83027c72eacbe6319fafeddb languageName: node linkType: hard @@ -4256,9 +4256,9 @@ __metadata: languageName: node linkType: hard -"@pushprotocol/uiweb@npm:1.3.1-alpha.16": - version: 1.3.1-alpha.16 - resolution: "@pushprotocol/uiweb@npm:1.3.1-alpha.16" +"@pushprotocol/uiweb@npm:1.2.8": + version: 1.2.8 + resolution: "@pushprotocol/uiweb@npm:1.2.8" dependencies: "@livekit/components-react": ^1.2.2 "@livekit/components-styles": ^1.0.6 @@ -4291,7 +4291,7 @@ __metadata: react: ">=16.8.0" styled-components: ^6.0.8 viem: ^1.3.0 - checksum: 67a2dc547d58decda56af4a0e1db54c01fe185a1664bdb7be6ce689eda3de33d971ea19ba3eeb785efc6f7cd7a81a799947f61ecbf1637598a56f67a2d13bd4a + checksum: de2f6f78a59cf4e2c1e58d2e9e93af20f67718537f7e3b3121852ee76bc0ab180e1ef539bff8064529c182c9d907683dff7b0950abc6ac769b2a3b36c865c2f3 languageName: node linkType: hard @@ -19322,9 +19322,9 @@ __metadata: "@mui/icons-material": ^5.8.4 "@mui/lab": ^5.0.0-alpha.72 "@mui/material": ^5.5.0 - "@pushprotocol/restapi": 0.0.1-alpha.78 + "@pushprotocol/restapi": 1.7.10 "@pushprotocol/socket": 0.5.3 - "@pushprotocol/uiweb": 1.3.1-alpha.16 + "@pushprotocol/uiweb": 1.2.8 "@reduxjs/toolkit": ^1.7.1 "@testing-library/dom": ^9.0.1 "@testing-library/jest-dom": ^4.2.4