diff --git a/background/constants/base-assets.ts b/background/constants/base-assets.ts index 77f62aff8..14152b480 100644 --- a/background/constants/base-assets.ts +++ b/background/constants/base-assets.ts @@ -38,15 +38,6 @@ const OPTIMISTIC_ETH: NetworkBaseAsset = { }, } -const GOERLI_ETH: NetworkBaseAsset = { - ...ETH, - chainID: "5", - metadata: { - coinGeckoID: "ethereum", - tokenLists: [], - }, -} - const SEPOLIA_ETH: NetworkBaseAsset = { ...ETH, chainID: "11155111", @@ -126,7 +117,6 @@ export const BASE_ASSETS_BY_CUSTOM_NAME = { ARBITRUM_ONE_ETH, ARBITRUM_NOVA_ETH, OPTIMISTIC_ETH, - GOERLI_ETH, SEPOLIA_ETH, ARBITRUM_SEPOLIA_ETH, ZK_SYNC_ETH, diff --git a/background/constants/currencies.ts b/background/constants/currencies.ts index d40d8dbee..48e3055ca 100644 --- a/background/constants/currencies.ts +++ b/background/constants/currencies.ts @@ -54,11 +54,6 @@ export const ARBITRUM_NOVA_ETH: NetworkBaseAsset & Required = { ...ETH_DATA, } -export const GOERLI_ETH: NetworkBaseAsset & Required = { - ...BASE_ASSETS_BY_CUSTOM_NAME.GOERLI_ETH, - ...ETH_DATA, -} - export const SEPOLIA_ETH: NetworkBaseAsset & Required = { ...BASE_ASSETS_BY_CUSTOM_NAME.SEPOLIA_ETH, ...ETH_DATA, @@ -113,7 +108,6 @@ export const BUILT_IN_NETWORK_BASE_ASSETS = [ OPTIMISTIC_ETH, ARBITRUM_ONE_ETH, ARBITRUM_NOVA_ETH, - GOERLI_ETH, SEPOLIA_ETH, ARBITRUM_SEPOLIA_ETH, AVAX, diff --git a/background/constants/networks.ts b/background/constants/networks.ts index adbcc46d8..b6022a93d 100644 --- a/background/constants/networks.ts +++ b/background/constants/networks.ts @@ -6,7 +6,6 @@ import { AVAX, BNB, ETH, - GOERLI_ETH, SEPOLIA_ETH, ARBITRUM_SEPOLIA_ETH, MATIC, @@ -80,14 +79,6 @@ export const OPTIMISM: EVMNetwork = { coingeckoPlatformID: "optimistic-ethereum", } -export const GOERLI: EVMNetwork = { - name: "Ethereum Goerli", - baseAsset: GOERLI_ETH, - chainID: "5", - family: "EVM", - coingeckoPlatformID: "ethereum", -} - export const SEPOLIA: EVMNetwork = { name: "Ethereum Sepolia", baseAsset: SEPOLIA_ETH, @@ -115,7 +106,6 @@ export const DEFAULT_NETWORKS = [ ETHEREUM, POLYGON, OPTIMISM, - GOERLI, SEPOLIA, ARBITRUM_SEPOLIA, ARBITRUM_ONE, @@ -144,13 +134,11 @@ export const FORK: EVMNetwork = { } export const EIP_1559_COMPLIANT_CHAIN_IDS = new Set( - [ETHEREUM, POLYGON, GOERLI, SEPOLIA, AVALANCHE].map( - (network) => network.chainID, - ), + [ETHEREUM, POLYGON, SEPOLIA, AVALANCHE].map((network) => network.chainID), ) export const CHAINS_WITH_MEMPOOL = new Set( - [ETHEREUM, POLYGON, AVALANCHE, GOERLI, SEPOLIA, BINANCE_SMART_CHAIN].map( + [ETHEREUM, POLYGON, AVALANCHE, SEPOLIA, BINANCE_SMART_CHAIN].map( (network) => network.chainID, ), ) @@ -164,7 +152,6 @@ export const NETWORK_BY_CHAIN_ID = { [ARBITRUM_NOVA.chainID]: ARBITRUM_NOVA, [OPTIMISM.chainID]: OPTIMISM, [BINANCE_SMART_CHAIN.chainID]: BINANCE_SMART_CHAIN, - [GOERLI.chainID]: GOERLI, [SEPOLIA.chainID]: SEPOLIA, [ARBITRUM_SEPOLIA.chainID]: ARBITRUM_SEPOLIA, [FORK.chainID]: FORK, @@ -172,7 +159,7 @@ export const NETWORK_BY_CHAIN_ID = { } export const TEST_NETWORK_BY_CHAIN_ID = new Set( - [GOERLI, SEPOLIA, ARBITRUM_SEPOLIA].map((network) => network.chainID), + [SEPOLIA, ARBITRUM_SEPOLIA].map((network) => network.chainID), ) export const NETWORK_FOR_LEDGER_SIGNING = [ETHEREUM, POLYGON] @@ -185,7 +172,6 @@ export const CHAIN_ID_TO_0X_API_BASE: { [ETHEREUM.chainID]: "api.0x.org", [POLYGON.chainID]: "polygon.api.0x.org", [OPTIMISM.chainID]: "optimism.api.0x.org", - [GOERLI.chainID]: "goerli.api.0x.org", [SEPOLIA.chainID]: "sepolia.api.0x.org", [ARBITRUM_ONE.chainID]: "arbitrum.api.0x.org", [AVALANCHE.chainID]: "avalanche.api.0x.org", @@ -197,7 +183,7 @@ export const NETWORKS_SUPPORTING_SWAPS = new Set( ) export const ALCHEMY_SUPPORTED_CHAIN_IDS = new Set( - [ETHEREUM, POLYGON, ARBITRUM_ONE, OPTIMISM, GOERLI, SEPOLIA].map( + [ETHEREUM, POLYGON, ARBITRUM_ONE, OPTIMISM, SEPOLIA].map( (network) => network.chainID, ), ) @@ -227,7 +213,6 @@ export const CHAIN_ID_TO_RPC_URLS: { "https://1rpc.io/arb", ], [ARBITRUM_NOVA.chainID]: ["https://nova.arbitrum.io/rpc "], - [GOERLI.chainID]: ["https://ethereum-goerli-rpc.allthatnode.com"], [SEPOLIA.chainID]: ["https://endpoints.omniatech.io/v1/eth/sepolia/public"], [ARBITRUM_SEPOLIA.chainID]: ["https://sepolia-rollup.arbitrum.io/rpc"], [AVALANCHE.chainID]: [ diff --git a/background/lib/alchemy.ts b/background/lib/alchemy.ts index 7851ef15f..4961f366d 100644 --- a/background/lib/alchemy.ts +++ b/background/lib/alchemy.ts @@ -69,7 +69,7 @@ export async function getAssetTransfers( const category = ["external", "erc20"] if (addressOnNetwork.network.name === "Ethereum") { - // "internal" is supported only on Ethereum Mainnet, Goerli and Sepolia atm + // "internal" is supported only on Ethereum Mainnet and Sepolia atm // https://docs.alchemy.com/alchemy/enhanced-apis/transfers-api#alchemy_getassettransfers-testnets-and-layer-2s category.push("internal") } diff --git a/background/lib/utils/index.ts b/background/lib/utils/index.ts index 5d3087167..267245556 100644 --- a/background/lib/utils/index.ts +++ b/background/lib/utils/index.ts @@ -2,7 +2,7 @@ import { BigNumber, ethers, utils } from "ethers" import { normalizeHexAddress, toChecksumAddress } from "@tallyho/hd-keyring" import { NormalizedEVMAddress, UNIXTime } from "../../types" import { EVMNetwork } from "../../networks" -import { ETHEREUM, GOERLI, SEPOLIA } from "../../constants" +import { ETHEREUM, SEPOLIA } from "../../constants" import { AddressOnNetwork } from "../../accounts" export function isValidChecksumAddress( @@ -157,10 +157,6 @@ export function decodeJSON(input: string): unknown { export function getEthereumNetwork(): EVMNetwork { const ethereumNetwork = process.env.ETHEREUM_NETWORK?.toUpperCase() - if (ethereumNetwork === "GOERLI") { - return GOERLI - } - if (ethereumNetwork === "SEPOLIA") { return SEPOLIA } diff --git a/background/redux-slices/dapp.ts b/background/redux-slices/dapp.ts index 73be259f3..5bafc7834 100644 --- a/background/redux-slices/dapp.ts +++ b/background/redux-slices/dapp.ts @@ -8,7 +8,6 @@ import { AVALANCHE, BINANCE_SMART_CHAIN, ETHEREUM, - GOERLI, SEPOLIA, ARBITRUM_SEPOLIA, OPTIMISM, @@ -136,7 +135,6 @@ const dappSlice = createSlice({ OPTIMISM, AVALANCHE, BINANCE_SMART_CHAIN, - GOERLI, SEPOLIA, ARBITRUM_SEPOLIA, ARBITRUM_NOVA, diff --git a/background/services/chain/db.ts b/background/services/chain/db.ts index b7fdb5a90..f9974f721 100644 --- a/background/services/chain/db.ts +++ b/background/services/chain/db.ts @@ -17,7 +17,7 @@ import { CHAIN_ID_TO_RPC_URLS, DEFAULT_NETWORKS, ETH, - GOERLI, + SEPOLIA, isBuiltInNetwork, NETWORK_BY_CHAIN_ID, POLYGON, @@ -140,7 +140,7 @@ export class ChainDatabase extends Dexie { this.version(4).upgrade((tx) => { tx.table("accountsToTrack") .where("network.chainID") - .equals(GOERLI.chainID) + .equals(SEPOLIA.chainID) .delete() }) diff --git a/background/services/chain/tests/index.integration.test.ts b/background/services/chain/tests/index.integration.test.ts index 6023ce431..e17595405 100644 --- a/background/services/chain/tests/index.integration.test.ts +++ b/background/services/chain/tests/index.integration.test.ts @@ -197,7 +197,7 @@ describe("ChainService", () => { it("Should properly update supported networks", async () => { chainService.supportedNetworks = [] await chainService.updateSupportedNetworks() - expect(chainService.supportedNetworks.length).toBe(10) + expect(chainService.supportedNetworks.length).toBe(9) }) }) @@ -205,9 +205,9 @@ describe("ChainService", () => { // prettier-ignore const FANTOM_CHAIN_PARAMS = { chainId: "250", blockExplorerUrl: "https://ftmscan.com", chainName: "Fantom Opera", nativeCurrency: { name: "Fantom", symbol: "FTM", decimals: 18, }, rpcUrls: [ "https://fantom-mainnet.gateway.pokt.network/v1/lb/62759259ea1b320039c9e7ac", "https://rpc.ftm.tools", "https://rpc.ankr.com/fantom", "https://rpc.fantom.network", "https://rpc2.fantom.network", "https://rpc3.fantom.network", "https://rpcapi.fantom.network", "https://fantom-mainnet.public.blastapi.io", "https://1rpc.io/ftm", ], blockExplorerUrls: ["https://ftmscan.com"], } it("should update supported networks after adding a chain", async () => { - expect(chainService.supportedNetworks.length).toBe(10) + expect(chainService.supportedNetworks.length).toBe(9) await chainService.addCustomChain(FANTOM_CHAIN_PARAMS) - expect(chainService.supportedNetworks.length).toBe(11) + expect(chainService.supportedNetworks.length).toBe(10) }) it("should create a provider for the new chain", async () => { diff --git a/background/services/name/resolvers/ens.ts b/background/services/name/resolvers/ens.ts index 86f8e4906..997c03f0a 100644 --- a/background/services/name/resolvers/ens.ts +++ b/background/services/name/resolvers/ens.ts @@ -5,8 +5,8 @@ import { AVALANCHE, BINANCE_SMART_CHAIN, ETHEREUM, - GOERLI, SEPOLIA, + ARBITRUM_SEPOLIA, OPTIMISM, POLYGON, } from "../../../constants" @@ -18,10 +18,8 @@ const ENS_SUPPORTED_NETWORKS = [ POLYGON, OPTIMISM, ARBITRUM_ONE, - GOERLI, SEPOLIA, - // TODO: Add ARBITRUM_SEPOLIA once the support is added (tracked in - // https://github.com/ProjectOpenSea/opensea-js/issues/1201). + ARBITRUM_SEPOLIA, AVALANCHE, BINANCE_SMART_CHAIN, ] diff --git a/ui/components/TopMenu/TopMenuProtocolList.tsx b/ui/components/TopMenu/TopMenuProtocolList.tsx index 270a54105..c4caeefd9 100644 --- a/ui/components/TopMenu/TopMenuProtocolList.tsx +++ b/ui/components/TopMenu/TopMenuProtocolList.tsx @@ -5,7 +5,6 @@ import { AVALANCHE, BINANCE_SMART_CHAIN, ETHEREUM, - GOERLI, SEPOLIA, ARBITRUM_SEPOLIA, isBuiltInNetwork, @@ -37,11 +36,6 @@ export const productionNetworkInfo = { const disabledChainIDs = [ARBITRUM_NOVA.chainID] const testNetworks = [ - { - network: GOERLI, - info: i18n.t("protocol.testnet"), - isDisabled: false, - }, { network: SEPOLIA, info: i18n.t("protocol.testnet"), diff --git a/ui/public/images/networks/ethereumgoerli-square@2x.png b/ui/public/images/networks/ethereumgoerli-square@2x.png deleted file mode 100644 index 2af27d97b..000000000 Binary files a/ui/public/images/networks/ethereumgoerli-square@2x.png and /dev/null differ diff --git a/ui/public/images/networks/ethereumgoerli@2x.png b/ui/public/images/networks/ethereumgoerli@2x.png deleted file mode 100644 index 2af27d97b..000000000 Binary files a/ui/public/images/networks/ethereumgoerli@2x.png and /dev/null differ diff --git a/ui/utils/constants.ts b/ui/utils/constants.ts index 0ba4d8b26..e1a082331 100644 --- a/ui/utils/constants.ts +++ b/ui/utils/constants.ts @@ -4,7 +4,6 @@ import { AVALANCHE, BINANCE_SMART_CHAIN, ETHEREUM, - GOERLI, SEPOLIA, ARBITRUM_SEPOLIA, OPTIMISM, @@ -24,7 +23,6 @@ export const blockExplorer = { url: "https://optimistic.etherscan.io", }, [POLYGON.chainID]: { title: "Polygonscan", url: "https://polygonscan.com" }, - [GOERLI.chainID]: { title: "Etherscan", url: "https://goerli.etherscan.io/" }, [SEPOLIA.chainID]: { title: "Etherscan", url: "https://sepolia.etherscan.io/",