@@ -35569,7 +35569,7 @@ import { JsonRpcProvider } from 'ethers';
3556935569export const PASSET_HUB_CONFIG = {
3557035570 name: 'Passet Hub',
3557135571 rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io/', // Passet Hub testnet RPC
35572- chainId: 420420421 , // Passet Hub testnet chainId
35572+ chainId: 420420422 , // Passet Hub testnet chainId
3557335573 blockExplorer: 'https://blockscout-passet-hub.parity-testnet.parity.io/',
3557435574};
3557535575
@@ -35637,7 +35637,7 @@ import { Contract } from 'ethers';
3563735637import { getProvider } from './ethers';
3563835638import StorageABI from '../../abis/Storage.json';
3563935639
35640- export const CONTRACT_ADDRESS = '0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29 ';
35640+ export const CONTRACT_ADDRESS = '0x58053f0e8ede1a47a1af53e43368cd04ddcaf66f ';
3564135641
3564235642export const CONTRACT_ABI = StorageABI;
3564335643
@@ -35661,7 +35661,7 @@ Next, let's create a component to handle wallet connections. Create a new file c
3566135661'use client';
3566235662
3566335663import React, { useState, useEffect } from 'react';
35664- import { ASSET_HUB_CONFIG } from '../utils/ethers';
35664+ import { PASSET_HUB_CONFIG } from '../utils/ethers';
3566535665
3566635666const WalletConnect = ({ onConnect }) => {
3566735667 const [account, setAccount] = useState(null);
@@ -35736,7 +35736,7 @@ const WalletConnect = ({ onConnect }) => {
3573635736 setChainId(currentChainId);
3573735737
3573835738 // Prompt user to switch networks if needed
35739- if (currentChainId !== ASSET_HUB_CONFIG .chainId) {
35739+ if (currentChainId !== PASSET_HUB_CONFIG .chainId) {
3574035740 await switchNetwork();
3574135741 }
3574235742
@@ -35751,7 +35751,7 @@ const WalletConnect = ({ onConnect }) => {
3575135751 try {
3575235752 await window.ethereum.request({
3575335753 method: 'wallet_switchEthereumChain',
35754- params: [{ chainId: `0x${ASSET_HUB_CONFIG .chainId.toString(16)}` }],
35754+ params: [{ chainId: `0x${PASSET_HUB_CONFIG .chainId.toString(16)}` }],
3575535755 });
3575635756 } catch (switchError) {
3575735757 // Error 4902 means the chain hasn't been added to MetaMask
@@ -35761,10 +35761,10 @@ const WalletConnect = ({ onConnect }) => {
3576135761 method: 'wallet_addEthereumChain',
3576235762 params: [
3576335763 {
35764- chainId: `0x${ASSET_HUB_CONFIG .chainId.toString(16)}`,
35765- chainName: ASSET_HUB_CONFIG .name,
35766- rpcUrls: [ASSET_HUB_CONFIG .rpc],
35767- blockExplorerUrls: [ASSET_HUB_CONFIG .blockExplorer],
35764+ chainId: `0x${PASSET_HUB_CONFIG .chainId.toString(16)}`,
35765+ chainName: PASSET_HUB_CONFIG .name,
35766+ rpcUrls: [PASSET_HUB_CONFIG .rpc],
35767+ blockExplorerUrls: [PASSET_HUB_CONFIG .blockExplorer],
3576835768 },
3576935769 ],
3577035770 });
@@ -35804,7 +35804,7 @@ const WalletConnect = ({ onConnect }) => {
3580435804 >
3580535805 Disconnect
3580635806 </button>
35807- {chainId !== ASSET_HUB_CONFIG .chainId && (
35807+ {chainId !== PASSET_HUB_CONFIG .chainId && (
3580835808 <button
3580935809 onClick={switchNetwork}
3581035810 className="mt-3 w-full bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded-lg transition"
@@ -36224,7 +36224,7 @@ const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io')
3622436224
3622536225// Configure the Passet Hub chain
3622636226export const passetHub = {
36227- id: 420420421 ,
36227+ id: 420420422 ,
3622836228 name: 'Passet Hub',
3622936229 network: 'passet-hub',
3623036230 nativeCurrency: {
0 commit comments