From a1f8a12e61e84da4220350591effd33ec42405b2 Mon Sep 17 00:00:00 2001 From: Orlanduis <153502813+Orlanduis@users.noreply.github.com> Date: Fri, 4 Oct 2024 22:11:46 -0600 Subject: [PATCH 1/2] Update chain.js --- components/chain/chain.js | 1506 +++++++++++++++++++++++++++++++++---- 1 file changed, 1366 insertions(+), 140 deletions(-) diff --git a/components/chain/chain.js b/components/chain/chain.js index c941c160b..7eb2bd7fa 100644 --- a/components/chain/chain.js +++ b/components/chain/chain.js @@ -1,141 +1,1367 @@ -import React, { useState, useEffect } from 'react'; -import { Typography, Paper, Grid, Button, Tooltip } from '@material-ui/core' -import Skeleton from '@material-ui/lab/Skeleton'; -import { useRouter } from 'next/router' -import Web3 from 'web3'; - -import classes from './chain.module.css' - -import stores from '../../stores/index.js' -import { getProvider } from '../../utils' - -import { - ERROR, - CONNECT_WALLET, - TRY_CONNECT_WALLET, - ACCOUNT_CONFIGURED -} from '../../stores/constants' - -export default function Chain({ chain }) { - const router = useRouter() - - const [account, setAccount] = useState(null) - - useEffect(() => { - const accountConfigure = () => { - const accountStore = stores.accountStore.getStore('account') - setAccount(accountStore) - } - - stores.emitter.on(ACCOUNT_CONFIGURED, accountConfigure) - - const accountStore = stores.accountStore.getStore('account') - setAccount(accountStore) - - return () => { - stores.emitter.removeListener(ACCOUNT_CONFIGURED, accountConfigure) - } - }, []) - - const toHex = (num) => { - return '0x' + num.toString(16) - } - - const addToNetwork = () => { - if (!(account && account.address)) { - stores.dispatcher.dispatch({ type: TRY_CONNECT_WALLET }) - return - } - - const params = { - chainId: toHex(chain.chainId), // A 0x-prefixed hexadecimal string - chainName: chain.name, - nativeCurrency: { - name: chain.nativeCurrency.name, - symbol: chain.nativeCurrency.symbol, // 2-6 characters long - decimals: chain.nativeCurrency.decimals, - }, - rpcUrls: chain.rpc, - blockExplorerUrls: [((chain.explorers && chain.explorers.length > 0 && chain.explorers[0].url) ? chain.explorers[0].url : chain.infoURL)] - } - - window.web3.eth.getAccounts((error, accounts) => { - window.ethereum.request({ - method: 'wallet_addEthereumChain', - params: [params, accounts[0]], - }) - .then((result) => { - console.log(result) - }) - .catch((error) => { - stores.emitter.emit(ERROR, error.message ? error.message : error) - console.log(error) - }); - }) - } - - const renderProviderText = () => { - - if (account && account.address) { - const providerTextList = { - tokenpocket: 'Add to TokenPocket', - dfox: 'Add to TokenPocket', - Metamask: 'Add to Metamask', - imToken: 'Add to imToken', - Wallet: 'Add to Wallet' +[ + + { + + "name": "Ethereum Mainnet", + + "chainId": 1, + + "shortName": "eth", + + "chain": "ETH", + + "network": "mainnet", + + "networkId": 1, + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "ETH", + + "decimals": 18 + + }, + + "rpc": [ + + "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", + + "wss://mainnet.infura.io/ws/v3/9aa3d95b3bc440fa88ea12eaa4456161", + + "https://api.mycryptoapi.com/eth", + + "https://cloudflare-eth.com" + + ], + + "faucets": [], + + "infoURL": "https://ethereum.org" + + }, + + { + + "name": "Optimistic Ethereum", + + "chainId": 10, + + "shortName": "oeth", + + "chain": "ETH", + + "network": "mainnet", + + "networkId": 10, + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "OETH", + + "decimals": 18 + + }, + + "rpc": [ + + "https://mainnet.optimism.io/", + "https://rpc.buildbear.io/esquivelfabian" + + ], + + "faucets": [], + + "infoURL": "https://optimism.io", + + "app_resource": { + + "ic_chain_select": "https://tp-upload.cdn.bcebos.com/v1/blockChain/OptimisticEthereum/1.png", + + "ic_chain_unselect": "https://tp-upload.cdn.bcebos.com/v1/blockChain/OptimisticEthereum/0.png", + + "color_chain_bg": "0xF54B49" + + } + + }, + + { + + "name": "Polygon (Matic) Mainnet", + + "chainId": 137, + + "shortName": "matic", + + "chain": "Matic", + + "network": "mainnet", + + "networkId": 137, + + "nativeCurrency": { + + "name": "Matic", + + "symbol": "MATIC", + + "decimals": 18 + + }, + + "rpc": [ + + "https://rpc-mainnet.matic.network", + + "wss://ws-mainnet.matic.network" + + ], + + "faucets": [], + + "infoURL": "https://matic.network/", + + "app_resource": { + + "ic_chain_select": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Polygon/1.png", + + "ic_chain_unselect": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Polygon/0.png", + + "color_chain_bg": "0x7F4CDE" + + } + + }, + + { + + "name": "Avalanche Mainnet", + + "chainId": 43114, + + "shortName": "Avalanche", + + "chain": "AVAX", + + "network": "mainnet", + + "networkId": 1, + + "nativeCurrency": { + + "name": "Avalanche", + + "symbol": "AVAX", + + "decimals": 18 + + }, + + "rpc": [ + + "https://api.avax.network/ext/bc/C/rpc" + + ], + + "faucets": [], + + "infoURL": "https://cchain.explorer.avax.network/", + + "app_resource": { + + "ic_chain_select": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Avalanche/1.png", + + "ic_chain_unselect": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Avalanche/0.png", + + "color_chain_bg": "0xE92734" + + } + + }, + + { + + "name": "Cronos Mainnet", + + "chainId": 25, + + "shortName": "CRO", + + "chain": "CRO", + + "network": "mainnet", + + "networkId": 25, + + "nativeCurrency": { + + "name": "CRO", + + "symbol": "CRO", + + "decimals": 18 + + }, + + "rpc": [ + + "https://evm.cronos.org", + + "https://cronosrpc-1.xstaking.sg", + + "https://evm-cronos.crypto.org", + + "https://cronos-rpc.heavenswail.one", + + "https://cronos-rpc.elk.finance" + + ], + + "faucets": [], + + "infoURL": "https://cronos.crypto.org/explorer" + + }, + + { + + "name": "Fusion Mainnet", + + "chainId": 32659, + + "shortName": "fsn", + + "chain": "FSN", + + "network": "mainnet", + + "networkId": 32659, + + "nativeCurrency": { + + "name": "Fusion", + + "symbol": "FSN", + + "decimals": 18 + + }, + + "rpc": [ + + "https://mainnet.anyswap.exchange" + + ], + + "faucets": [], + + "infoURL": "https://fsnex.com/", + + "app_resource": { + + "ic_chain_select": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Fusion/1.png", + + "ic_chain_unselect": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Fusion/0.png", + + "ic_chain_unselect_dark": "https://tp-upload.cdn.bcebos.com/v1/blockChain/Fusion/2.png", + + "color_chain_bg": "0x2E3B4A" + + } + + }, + + { + + "name": "ThunderCore Mainnet", + + "chainId": 108, + + "shortName": "TT", + + "chain": "TT", + + "network": "mainnet", + + "networkId": 108, + + "nativeCurrency": { + + "name": "ThunderCore Mainnet Ether", + + "symbol": "TT", + + "decimals": 18 + + }, + + "rpc": [ + + "https://mainnet-rpc.thundercore.com" + + ], + + "faucets": [ + + "https://faucet.thundercore.com" + + ], + + "infoURL": "https://thundercore.com", + + "app_resource": { + + "ic_chain_select": "https://tp-upload.cdn.bcebos.com/v1/blockChain/ThunderCore/1.png", + + "ic_chain_unselect": "https://tp-upload.cdn.bcebos.com/v1/blockChain/ThunderCore/0.png", + + "ic_chain_unselect_dark": "https://tp-upload.cdn.bcebos.com/v1/blockChain/ThunderCore/2.png", + + "color_chain_bg": "0xEAC541" + + } + + }, + + { + + "name": "FON Smart Chain", + + "chainId": 201022, + + "shortName": "FON", + + "chain": "FON", + + "network": "mainnet", + + "networkId": 201022, + + "nativeCurrency": { + + "name": "FON", + + "symbol": "FON", + + "decimals": 18 + + }, + + "rpc": [ + + "https://fsc-dataseed2.fonscan.io" + + ], + + "faucets": [], + + "explorers": [ + + { + + "name": "FONScan", + + "url": "https://fonscan.io/", + + "standard": "EIP3091" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/dapp/tokenpocket-1698387395064.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/dapp/tokenpocket-1698387436381.png", + + "color_chain_bg": "0x343434", + + "color_chain_text": "0xFFFFFF", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/dapp/tokenpocket-1675422074776.png", + + "ic_home_logo": "https://hk.tpstatic.net/dapp/tokenpocket-1675422139280.png" + + } + + }, + + { + + "name": "Fraxtal", + + "chain": "FRAX", + + "rpc": [ + + "https://rpc.frax.com" + + ], + + "faucets": [], + + "nativeCurrency": { + + "name": "Frax Ether", + + "symbol": "frxETH", + + "decimals": 18 + + }, + + "infoURL": "https://mainnet.frax.com", + + "shortName": "Fraxtal", + + "chainId": 252, + + "networkId": 252, + + "explorers": [ + + { + + "name": "FraxScan", + + "url": "https://fraxscan.com", + + "icon": "Frax", + + "standard": "EIP3091" + + } + + ], + + "status": "active", + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1710309559685.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1710309496700.png", + + "color_chain_bg": "0x000000", + + "color_chain_text": "0xFFFFFF", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1710309512399.png", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1710309529426.png" + + } + + }, + + { + + "name": "Viction Mainnet", + + "chainId": 88, + + "shortName": "vic", + + "chain": "VIC", + + "network": "mainnet", + + "networkId": 88, + + "nativeCurrency": { + + "name": "Viction Ether", + + "symbol": "VIC", + + "decimals": 18 + + }, + + "rpc": [ + + "https://rpc.tomochain.com" + + ], + + "faucets": [], + + "infoURL": "https://www.vicscan.xyz/", + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1701074390781.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1701074408625.png", + + "color_chain_bg": "0xF5F2C4", + + "color_chain_text": "0x1E1E1E", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1701074424755.png", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1701074444858.png" + + } + + }, + + { + + "name": "smartBCH Mainnet", + + "chainId": 10000, + + "shortName": "smartBCH", + + "chain": "smartBCH", + + "network": "mainnet", + + "networkId": 10000, + + "nativeCurrency": { + + "name": "Bitcoin Cash", + + "symbol": "BCH", + + "decimals": 18 + + }, + + "rpc": [ + + "https://smartbch.greyh.at", + + "https://rpc-mainnet.smartbch.org", + + "https://smartbch.fountainhead.cash/mainnet", + + "https://smartbch.devops.cash/mainnet" + + ], + + "faucets": [], + + "infoURL": "https://smartbch.org/", + + "app_resource": { + + "ic_chain_select": "https://assets.smartbch.org/img/bch_active_88px.png", + + "ic_chain_unselect": "https://assets.smartbch.org/img/bch_inactive_88px.png", + + "color_chain_bg": "0x4cc947" + + } + + }, + + { + + "name": "Aurora Mainnet", + + "chainId": 1313161554, + + "shortName": "Aurora", + + "chain": "NEAR", + + "network": "mainnet", + + "networkId": 1313161554, + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "aETH", + + "decimals": 18 + + }, + + "rpc": [ + + "https://mainnet.aurora.dev" + + ], + + "faucets": [], + + "infoURL": "https://aurora.dev", + + "app_resource": { + + "ic_home_logo": "https://tp-statics.tokenpocket.pro/dapp/tokenpocket-1641390444550.png", + + "ic_chain_select": "https://tp-statics.tokenpocket.pro/dapp/tokenpocket-1641390457950.png", + + "ic_chain_unselect": "https://tp-statics.tokenpocket.pro/dapp/tokenpocket-1641390467132.png", + + "ic_all_whitelist_logo": "https://tp-statics.tokenpocket.pro/dapp/tokenpocket-1641390477377.png", + + "color_chain_bg": "0x78d64b", + + "color_chain_text": "0xFFFFFF" + + } + + }, + + { + + "name": "PulseChain Mainnet", + + "shortName": "pls", + + "chain": "PLS", + + "chainId": 369, + + "networkId": 369, + + "infoURL": "https://pulsechain.com/", + + "rpc": [ + + "https://rpc.pulsechain.com" + + ], + + "faucets": [], + + "nativeCurrency": { + + "name": "Pulse", + + "symbol": "PLS", + + "decimals": 18 + + }, + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/dapp/tokenpocket-1684207110566.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/dapp/tokenpocket-1684207099184.png", + + "color_chain_bg": "0x1A1A1A", + + "color_chain_text": "0xFFFFFF", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/dapp/tokenpocket-1684207056831.png", + + "ic_home_logo": "https://hk.tpstatic.net/dapp/tokenpocket-1684207085917.png" + + } + + }, + + { + + "name": "Kortho Chain Mainnet", + + "chainId": 2559, + + "shortName": "KTO", + + "chain": "KTO", + + "network": "mainnet", + + "networkId": 2559, + + "nativeCurrency": { + + "name": "KORTHO", + + "symbol": "KTO", + + "decimals": 18 + + }, + + "rpc": [ + + "https://www.kortho-chain.com", + + "https://www.kortho-chain.co", + + "https://www.kortho-chain.org", + + "https://www.kortho-chain.xyz" + + ], + + "faucets": [], + + "infoURL": "https://www.kortho.io", + + "app_resource": { + + "ic_chain_select": "https://www.kortho.io/static/image/1.png", + + "ic_chain_unselect": "https://www.kortho.io/static/image/0.png", + + "color_chain_bg": "0x748ee3", + + "txUrl": " https://www.kortho.io/" + + } + + }, + + { + + "name": "Endurance Smart Chain Mainnet", + + "chain": "ACE", + + "rpc": [ + + "https://rpc-endurance.fusionist.io/" + + ], + + "faucets": [], + + "nativeCurrency": { + + "name": "Endurance Chain Native Token", + + "symbol": "ACE", + + "decimals": 18 + + }, + + "infoURL": "https://ace.fusionist.io/", + + "shortName": "ace", + + "chainId": 648, + + "networkId": 648, + + "explorers": [ + + { + + "name": "Endurance Scan", + + "url": "https://explorer.endurance.fusionist.io", + + "standard": "EIP3091" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1709886151485.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1709886075208.png", + + "color_chain_bg": "0x050504", + + "color_chain_text": "0xFFC783", + + "ic_home_logo": "hhttps://hk.tpstatic.net/token/tokenpocket-1709886106935.png", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1709886092252.png" + + } + + }, + + { + + "name": "Zora", + + "chain": "ETH", + + "rpc": [ + + "https://rpc.zora.energy/" + + ], + + "faucets": [], + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "ETH", + + "decimals": 18 + + }, + + "icon": "zora", + + "infoURL": "https://zora.energy", + + "shortName": "zora", + + "chainId": 7777777, + + "networkId": 7777777, + + "explorers": [ + + { + + "name": "Zora Network Explorer", + + "url": "https://explorer.zora.energy", + + "standard": "EIP3091" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1709899028504.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1709899005184.png", + + "color_chain_bg": "0x000000", + + "color_chain_text": "0xFFFFFF", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1709899016829.png", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1709899043712.png" + + } + + }, + + { + + "name": "Morph Testnet", + + "chain": "ETH", + + "rpc": [ + + "https://rpc-testnet.morphl2.io" + + ], + + "faucets": [], + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "ETH", + + "decimals": 18 + + }, + + "infoURL": "https://morphl2.io", + + "shortName": "tmorph", + + "chainId": 2710, + + "networkId": 2710, + + "slip44": 1, + + "explorers": [ + + { + + "name": "Morph Testnet Explorer", + + "url": "https://explorer-testnet.morphl2.io", + + "standard": "EIP3091" + + } + + ], + + "parent": { + + "type": "L2", + + "chain": "eip155-1", + + "bridges": [ + + { + + "url": "https://bridge-testnet.morphl2.io" + + } + + ] + + }, + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1709898729370.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1709898717628.png", + + "color_chain_bg": "0x000000", + + "color_chain_text": "0x6AF495", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1709898740826.png", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1709898759382.png" + + } + + }, + + { + + "name": "Mode", + + "chain": "ETH", + + "rpc": [ + + "https://mainnet.mode.network" + + ], + + "faucets": [], + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "ETH", + + "decimals": 18 + + }, + + "infoURL": "https://docs.mode.network/", + + "shortName": "mode", + + "chainId": 34443, + + "networkId": 34443, + + "icon": "mode", + + "explorers": [ + + { + + "name": "modescout", + + "url": "https://explorer.mode.network", + + "standard": "none" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1709899308595.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1709899325224.png", + + "color_chain_bg": "0xD9F417", + + "color_chain_text": "0x000000", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1709899339092.png", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1709899353868.png" + + } + + }, + + { + + "name": "Berachain Artio", + + "chain": "Berachain Artio", + + "rpc": [ + + "https://artio.rpc.berachain.com", + + "https://rpc.ankr.com/berachain_testnet" + + ], + + "faucets": [ + + "https://artio.faucet.berachain.com" + + ], + + "nativeCurrency": { + + "name": "BERA Token", + + "symbol": "BERA", + + "decimals": 18 + + }, + + "infoURL": "https://www.berachain.com", + + "shortName": "berachainArtio", + + "chainId": 80085, + + "networkId": 80085, + + "icon": "berachain", + + "explorers": [ + + { + + "name": "Beratrail", + + "url": "https://artio.beratrail.io", + + "icon": "berachain", + + "standard": "none" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1709885929619.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1709885915602.png", + + "color_chain_bg": "0xEF821F", + + "color_chain_text": "0x050504", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1709885984851.png", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1709885969274.png" + + } + + }, + + { + + "name": "BounceBit Testnet", + + "chainId": 6000, + + "shortName": "BBT", + + "chain": "BounceBit Testnet", + + "network": "testnet", + + "networkId": 6000, + + "nativeCurrency": { + + "name": "BounceBit", + + "symbol": "BB", + + "decimals": 18 + + }, + + "rpc": [ + + "https://fullnode-testnet.bouncebitapi.com" + + ], + + "faucets": [], + + "explorers": [ + + { + + "name": "BBScan", + + "url": "https://bbscan.io", + + "standard": "EIP3091" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1709901807789.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1709901770114.png", + + "color_chain_bg": "0xEDEAE4", + + "color_chain_text": "0x000000", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1709901821832.png", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1709901795926.png" + + } + + }, + + { + + "name": "zkLink Nova Mainnet", + + "chainId": 810180, + + "shortName": "zkLink Nova", + + "chain": "zkLink Nova Mainnet", + + "network": "Mainnet", + + "networkId": 810180, + + "nativeCurrency": { + + "name": "Ethereum", + + "symbol": "ETH", + + "decimals": 18 + + }, + + "rpc": [ + + "https://rpc.zklink.io", + + "wss://rpc.zklink.io" + + ], + + "faucets": [], + + "explorers": [ + + { + + "name": "zkLink Nova Block Explorer", + + "url": "https://explorer.zklink.io/", + + "standard": "EIP3091" + + } + + ], + + "app_resource": { + + "ic_chain_select": "https://hk.tpstatic.net/token/tokenpocket-1711359675534.png", + + "ic_chain_unselect": "https://hk.tpstatic.net/token/tokenpocket-1711359694827.png", + + "color_chain_bg": "0x000000", + + "color_chain_text": "0xffffff", + + "ic_home_logo": "https://hk.tpstatic.net/token/tokenpocket-1709901821832.png", + + "ic_chain_unselect_dark": "https://hk.tpstatic.net/token/tokenpocket-1711359711634.png" + + } + + }, + + { + + "name": "xDAI Chain", + + "chainId": 100, + + "shortName": "xdai", + + "chain": "XDAI", + + "network": "mainnet", + + "networkId": 100, + + "nativeCurrency": { + + "name": "xDAI", + + "symbol": "xDAI", + + "decimals": 18 + + }, + + "rpc": [ + + "https://rpc.xdaichain.com", + + "https://xdai.poanetwork.dev", + + "wss://rpc.xdaichain.com/wss", + + "wss://xdai.poanetwork.dev/wss", + + "http://xdai.poanetwork.dev", + + "https://dai.poa.network", + + "ws://xdai.poanetwork.dev:8546" + + ], + + "faucets": [], + + "infoURL": "https://forum.poa.network/c/xdai-chain", + + "app_resource": { + + "ic_chain_select": "https://tp-upload.cdn.bcebos.com/v1/blockChain/xDAI/1.png", + + "ic_chain_unselect": "https://tp-upload.cdn.bcebos.com/v1/blockChain/xDAI/0.png", + + "color_chain_bg": "0x58B2AF" + + } + + }, + + { + + "name": "zkSync Era Testnet", + + "chain": "ETH", + + "rpc": [ + + "https://zksync2-testnet.zksync.dev" + + ], + + "faucets": [ + + "https://goerli.portal.zksync.io/faucet" + + ], + + "nativeCurrency": { + + "name": "Ether", + + "symbol": "ETH", + + "decimals": 18 + + }, + + "infoURL": "https://era.zksync.io/docs/", + + "shortName": "zksync-goerli", + + "chainId": 280, + + "networkId": 280, + + "icon": "zksync-era", + + "explorers": [ + + { + + "name": "zkSync Era Block Explorer", + + "url": "https://goerli.explorer.zksync.io", + + "icon": "zksync-era", + + "standard": "EIP3091" + } - return providerTextList[getProvider()] - } else { - return 'Connect wallet' - } - - } - - if (!chain) { - return
- } - - return ( -