From 8c903ec5a53714558096ad8805d7d6b83c02d7f3 Mon Sep 17 00:00:00 2001 From: sanyu1225 Date: Fri, 12 Apr 2024 11:04:14 +0700 Subject: [PATCH 1/4] feat: deprecate goerli testnet --- src/contracts/index.ts | 4 ---- src/services/evm.ts | 50 +---------------------------------------- src/types/ChainTypes.ts | 1 - 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/src/contracts/index.ts b/src/contracts/index.ts index 829d7d8..c2d4058 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -13,10 +13,6 @@ export const ContractInfos: ContractInfosType = { abi: valueDappAbi, address: "0x009c403BdFaE357d82AAef2262a163287c30B739", }, - [EvmChainId.EthereumGoerli]: { - abi: valueDappAbi, - address: "0x009c403BdFaE357d82AAef2262a163287c30B739", - }, [EvmChainId.Bsc]: { abi: valueDappAbi, address: "0x009c403BdFaE357d82AAef2262a163287c30B739", diff --git a/src/services/evm.ts b/src/services/evm.ts index 56d64b3..1ab396e 100644 --- a/src/services/evm.ts +++ b/src/services/evm.ts @@ -22,13 +22,6 @@ export const supportedChains = [ ], environment: "mainnet", }, - { - name: "Ethereum Goerli", - chainId: "0x5", - rpcUrls: ["https://rpc.ankr.com/eth_goerli"], - faucet: "https://goerlifaucet.com/", - environment: "testnet", - }, { name: "Ethereum Sepolia", chainId: "0xaa36a7", @@ -42,13 +35,6 @@ export const supportedChains = [ rpcUrls: ["https://arb1.arbitrum.io/rpc"], environment: "mainnet", }, - { - name: "Arbitrum Goerli Testnet", - chainId: "0x66eed", - rpcUrls: ["https://goerli-rollup.arbitrum.io/rpc"], - faucet: "https://faucet.triangleplatform.com/arbitrum/goerli", - environment: "testnet", - }, { name: "Arbitrum Sepolia Testnet", chainId: "0x66eee", @@ -101,13 +87,6 @@ export const supportedChains = [ rpcUrls: ["https://mainnet.optimism.io"], environment: "mainnet", }, - { - name: "Optimism Testnet", - chainId: "0x1a4", - rpcUrls: ["https://goerli.optimism.io"], - faucet: "https://faucet.paradigm.xyz/", - environment: "testnet", - }, { name: "Optimism Sepolia Testnet", chainId: "0xaa37dc", @@ -121,13 +100,6 @@ export const supportedChains = [ rpcUrls: ["https://mainnet.base.org"], environment: "mainnet", }, - { - name: "Base Goerli Testnet", - chainId: "0x14a33", - rpcUrls: ["https://goerli.base.org"], - faucet: "https://faucet.quicknode.com/base/goerli", - environment: "testnet", - }, { name: "Base Sepolia Testnet", chainId: "0x14a34", @@ -141,13 +113,6 @@ export const supportedChains = [ rpcUrls: ["https://rpc.zora.energy"], environment: "mainnet", }, - { - name: "Zora Goerli Testnet", - chainId: "0x3E7", - rpcUrls: ["https://testnet.rpc.zora.energy"], - faucet: "https://testnet.zora.co", - environment: "testnet", - }, { name: "Zora Sepolia Testnet", chainId: "0x3b9ac9ff", @@ -161,12 +126,6 @@ export const supportedChains = [ rpcUrls: ["https://rpc.scroll.io"], environment: "mainnet", }, - { - name: "Scroll Goerli Testnet", - chainId: "0x82751", - rpcUrls: ["https://alpha-rpc.scroll.io/l2"], - environment: "testnet", - }, { name: "Scroll Sepolia Testnet", chainId: "0x8274f", @@ -180,13 +139,6 @@ export const supportedChains = [ rpcUrls: ["https://rpc.linea.build"], environment: "mainnet", }, - { - name: "Linea Goerli Testnet", - chainId: "0xe704", - rpcUrls: ["https://rpc.goerli.linea.build"], - faucet: "https://faucet.goerli.linea.build/", - environment: "testnet", - }, { name: "zKatana Sepolia Testnet", chainId: "0x133e40", @@ -215,7 +167,7 @@ const bloctoSDK = new BloctoSDK({ // (required for Ethereum) JSON RPC endpoint rpc: isMainnet ? `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}` - : "https://rpc.ankr.com/eth_goerli", + : "https://ethereum-sepolia.blockpi.network/v1/rpc/public", walletServer: process.env.REACT_APP_WALLET_SERVER, }, appId: process.env.REACT_APP_DAPP_ID, diff --git a/src/types/ChainTypes.ts b/src/types/ChainTypes.ts index acb113c..8ab9f7f 100644 --- a/src/types/ChainTypes.ts +++ b/src/types/ChainTypes.ts @@ -15,7 +15,6 @@ export enum EvmChain { export enum EvmChainId { Ethereum = "0x1", - EthereumGoerli = "0x5", Bsc = "0x38", BscTestnet = "0x61", Polygon = "0x89", From 0800e0eb67852007fbdd4a8beabd659f2b0861f9 Mon Sep 17 00:00:00 2001 From: sanyu1225 Date: Fri, 12 Apr 2024 17:52:54 +0700 Subject: [PATCH 2/4] feat: evm default testnet chainId --- src/services/evm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/evm.ts b/src/services/evm.ts index 1ab396e..e3fa3aa 100644 --- a/src/services/evm.ts +++ b/src/services/evm.ts @@ -163,7 +163,7 @@ export const supportedChains = [ const bloctoSDK = new BloctoSDK({ ethereum: { // (required) chainId to be used - chainId: isMainnet ? "0x1" : "0x5", + chainId: isMainnet ? "0x1" : "0xaa36a7", // (required for Ethereum) JSON RPC endpoint rpc: isMainnet ? `https://mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}` From 5e3b9e608ae78625689e93254f502e8445e64a16 Mon Sep 17 00:00:00 2001 From: sanyu1225 Date: Fri, 12 Apr 2024 18:06:57 +0700 Subject: [PATCH 3/4] fix: remove goreli config --- src/contracts/index.ts | 8 -------- src/types/ChainTypes.ts | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/contracts/index.ts b/src/contracts/index.ts index c2d4058..fc9538e 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -41,18 +41,10 @@ export const ContractInfos: ContractInfosType = { abi: valueDappAbi, address: "0x806243c7368a90D957592B55875eF4C3353C5bEa", }, - [EvmChainId.ArbitrumTestnet]: { - abi: valueDappAbi, - address: "0x009c403BdFaE357d82AAef2262a163287c30B739", - }, [EvmChainId.Optimism]: { abi: valueDappAbi, address: "0x806243c7368a90D957592B55875eF4C3353C5bEa", }, - [EvmChainId.OptimismTestnet]: { - abi: valueDappAbi, - address: "0x009c403BdFaE357d82AAef2262a163287c30B739", - }, [OtherChain.Aptos]: { address: "0x4282ed29feb89781cd4da44a5bb1d23ff7e31a9dd64536233792efe78b4a494d", diff --git a/src/types/ChainTypes.ts b/src/types/ChainTypes.ts index 8ab9f7f..2414ffb 100644 --- a/src/types/ChainTypes.ts +++ b/src/types/ChainTypes.ts @@ -24,7 +24,7 @@ export enum EvmChainId { Arbitrum = "0xa4b1", ArbitrumTestnet = "0x66eed", Optimism = "0x000a", - OptimismTestnet = "0x01a4", + OptimismTestnet = "0xaa37dc", } export type ChainsType = OtherChain; From 83aae34ecb18ba19958d4e9656231329dfee17cc Mon Sep 17 00:00:00 2001 From: sanyu1225 Date: Fri, 12 Apr 2024 18:09:06 +0700 Subject: [PATCH 4/4] fix: remove goreli config --- src/types/ChainTypes.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/types/ChainTypes.ts b/src/types/ChainTypes.ts index 2414ffb..8f2d1ce 100644 --- a/src/types/ChainTypes.ts +++ b/src/types/ChainTypes.ts @@ -22,9 +22,7 @@ export enum EvmChainId { Avalanche = "0xa86a", AvalancheTestnet = "0xa869", Arbitrum = "0xa4b1", - ArbitrumTestnet = "0x66eed", Optimism = "0x000a", - OptimismTestnet = "0xaa37dc", } export type ChainsType = OtherChain;