From 730b22286a43f69c03c58acc22bed43a6215d325 Mon Sep 17 00:00:00 2001 From: kairoski03 Date: Tue, 18 Jun 2024 11:10:46 +0900 Subject: [PATCH] change arbitrum stylus v2 testnet to arbitrum sepolia --- src/components/arbitrum/Compiler.tsx | 1 + src/components/arbitrum/Connect.tsx | 4 ++-- src/components/arbitrum/MetamaskConnect.tsx | 17 ++++++++++------- src/components/arbitrum/const.ts | 10 +++++++++- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/arbitrum/Compiler.tsx b/src/components/arbitrum/Compiler.tsx index 0a7d0b3..aedfde3 100644 --- a/src/components/arbitrum/Compiler.tsx +++ b/src/components/arbitrum/Compiler.tsx @@ -261,6 +261,7 @@ export const Compiler: React.FunctionComponent = ({ const socket = io(ARBITRUM_COMPILER_CONSUMER_ENDPOINT, { reconnection: false, transports: ['websocket'], + timeout: 120_000, }); try { diff --git a/src/components/arbitrum/Connect.tsx b/src/components/arbitrum/Connect.tsx index 5c9436e..c819893 100644 --- a/src/components/arbitrum/Connect.tsx +++ b/src/components/arbitrum/Connect.tsx @@ -5,7 +5,7 @@ import { Client } from '@remixproject/plugin'; import { Api } from '@remixproject/plugin-utils'; import { IRemixApi } from '@remixproject/plugin-api'; import { Connect as CommonConnect } from '../common/Connect'; -import { STYLUS_TESTNET_V2_CHAIN_ID } from './const'; +import { ARBITRUM_SEPOLIA_CHAIN } from './const'; interface InterfaceProps { client: Client>; @@ -39,7 +39,7 @@ export const Connect: React.FunctionComponent = ({ client }) => setInjectedProvider={setInjectedProvider} setProviderNetwork={setProviderNetwork} /> - {providerNetwork === STYLUS_TESTNET_V2_CHAIN_ID ? ( + {providerNetwork === ARBITRUM_SEPOLIA_CHAIN.chainId ? ( = ({ const [network, setNetwork] = useState(''); const ethereum = (window as any).ethereum; - + let networkName = ''; + if (network === ARBITRUM_SEPOLIA_CHAIN.chainId) { + networkName = ARBITRUM_SEPOLIA_CHAIN.chainName; + } // Establish a connection to the Aptos blockchain on component mount useEffect(() => { const connect = async () => { @@ -94,20 +97,20 @@ export const MetamaskConnect: React.FunctionComponent = ({ setError('')} />
{error}
- {network === STYLUS_TESTNET_V2_CHAIN_ID ? ( - + {network === ARBITRUM_SEPOLIA_CHAIN.chainId ? ( + ) : ( - Only Stylus Testnet V2 network is supported currently. + ${ARBITRUM_SEPOLIA_CHAIN.chainName} network is supported currently.
Please switch to the network below and reconnect your wallet.
- Chain ID: 13331371 + Chain ID: 421614
RPC URL: https://stylusv2.arbitrum.io/rpc
)} - {network === STYLUS_TESTNET_V2_CHAIN_ID ? ( + {network === ARBITRUM_SEPOLIA_CHAIN.chainId ? (
diff --git a/src/components/arbitrum/const.ts b/src/components/arbitrum/const.ts index ce02991..0630752 100644 --- a/src/components/arbitrum/const.ts +++ b/src/components/arbitrum/const.ts @@ -1 +1,9 @@ -export const STYLUS_TESTNET_V2_CHAIN_ID = '0xcb6bab'; +export const STYLUS_TESTNET_V2_CHAIN = { + chainId: '0xcb6bab', + chainName: 'Stylus testnet (v2)', +}; + +export const ARBITRUM_SEPOLIA_CHAIN = { + chainId: '0x66eee', + chainName: 'Arbitrum Sepolia (Testnet)', +};