@@ -35609,7 +35609,7 @@ import { JsonRpcProvider } from 'ethers';
3560935609export const PASSET_HUB_CONFIG = {
3561035610 name: 'Passet Hub',
3561135611 rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io/', // Passet Hub testnet RPC
35612- chainId: 420420421 , // Passet Hub testnet chainId
35612+ chainId: 420420422 , // Passet Hub testnet chainId
3561335613 blockExplorer: 'https://blockscout-passet-hub.parity-testnet.parity.io/',
3561435614};
3561535615
@@ -35677,7 +35677,7 @@ import { Contract } from 'ethers';
3567735677import { getProvider } from './ethers';
3567835678import StorageABI from '../../abis/Storage.json';
3567935679
35680- export const CONTRACT_ADDRESS = '0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29 ';
35680+ export const CONTRACT_ADDRESS = '0x58053f0e8ede1a47a1af53e43368cd04ddcaf66f ';
3568135681
3568235682export const CONTRACT_ABI = StorageABI;
3568335683
@@ -35701,7 +35701,7 @@ Next, let's create a component to handle wallet connections. Create a new file c
3570135701'use client';
3570235702
3570335703import React, { useState, useEffect } from 'react';
35704- import { ASSET_HUB_CONFIG } from '../utils/ethers';
35704+ import { PASSET_HUB_CONFIG } from '../utils/ethers';
3570535705
3570635706const WalletConnect = ({ onConnect }) => {
3570735707 const [account, setAccount] = useState(null);
@@ -35776,7 +35776,7 @@ const WalletConnect = ({ onConnect }) => {
3577635776 setChainId(currentChainId);
3577735777
3577835778 // Prompt user to switch networks if needed
35779- if (currentChainId !== ASSET_HUB_CONFIG .chainId) {
35779+ if (currentChainId !== PASSET_HUB_CONFIG .chainId) {
3578035780 await switchNetwork();
3578135781 }
3578235782
@@ -35791,7 +35791,7 @@ const WalletConnect = ({ onConnect }) => {
3579135791 try {
3579235792 await window.ethereum.request({
3579335793 method: 'wallet_switchEthereumChain',
35794- params: [{ chainId: `0x${ASSET_HUB_CONFIG .chainId.toString(16)}` }],
35794+ params: [{ chainId: `0x${PASSET_HUB_CONFIG .chainId.toString(16)}` }],
3579535795 });
3579635796 } catch (switchError) {
3579735797 // Error 4902 means the chain hasn't been added to MetaMask
@@ -35801,10 +35801,10 @@ const WalletConnect = ({ onConnect }) => {
3580135801 method: 'wallet_addEthereumChain',
3580235802 params: [
3580335803 {
35804- chainId: `0x${ASSET_HUB_CONFIG .chainId.toString(16)}`,
35805- chainName: ASSET_HUB_CONFIG .name,
35806- rpcUrls: [ASSET_HUB_CONFIG .rpc],
35807- blockExplorerUrls: [ASSET_HUB_CONFIG .blockExplorer],
35804+ chainId: `0x${PASSET_HUB_CONFIG .chainId.toString(16)}`,
35805+ chainName: PASSET_HUB_CONFIG .name,
35806+ rpcUrls: [PASSET_HUB_CONFIG .rpc],
35807+ blockExplorerUrls: [PASSET_HUB_CONFIG .blockExplorer],
3580835808 },
3580935809 ],
3581035810 });
@@ -35844,7 +35844,7 @@ const WalletConnect = ({ onConnect }) => {
3584435844 >
3584535845 Disconnect
3584635846 </button>
35847- {chainId !== ASSET_HUB_CONFIG .chainId && (
35847+ {chainId !== PASSET_HUB_CONFIG .chainId && (
3584835848 <button
3584935849 onClick={switchNetwork}
3585035850 className="mt-3 w-full bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded-lg transition"
@@ -36264,7 +36264,7 @@ const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io')
3626436264
3626536265// Configure the Passet Hub chain
3626636266export const passetHub = {
36267- id: 420420421 ,
36267+ id: 420420422 ,
3626836268 name: 'Passet Hub',
3626936269 network: 'passet-hub',
3627036270 nativeCurrency: {
0 commit comments