i had a local host 8545 account and accidentally deleted it but i have no idea how to get it back. and it just keeps saying Could not fetch chain ID. Is your RPC URL correct? and im just on a pc
-
Localhost means you are running some node localy on your device ? are you using hardhat or ganache or have a local ethereum node?– Majd TLCommented Nov 16, 2021 at 11:08
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.– Community BotCommented Nov 17, 2021 at 0:45
1 Answer
The localhost network is use to connect to a local node or a local fork (run with Hardhat or Ganache).
If you want to get it back, you can add it in your metamask networks : https://metamask.zendesk.com/hc/en-us/articles/360043227612-How-to-add-a-custom-network-RPC.
You need to specify the ChainId according to the blockchain you want to interact with (1 for Ethereum, 56 for BSC, 137 for Polygon...).
If you don't wan't to connect to a local network, you don't need to add it back, you can just use a public RPC to connect your wallet to the blockchain you want.
-
thank you, it still doesnt work when. it was a localhost but when i try connect it it just keeps saying Could not fetch chain ID. Is your RPC URL correct? do u have any idea how to fix that? amd if i use one it says that it is already used by the eth main network Commented Nov 16, 2021 at 12:46
-
okay weird thing i saw logged in on metamask on firefox i still have the local host but i cant acces it?! Commented Nov 16, 2021 at 12:54
-
Which network do you want to connect to ? Do you have a local node or fork that you want to connect to, or do you only want to connect to eth mainnet ? If you want to connect to a ganache fork, use 1337 as ChainId and localhost:8545 as RPC URL. For the eth mainnet, add a public rpc url in the RPC field and use the ChainId 1.– MaxCommented Nov 16, 2021 at 13:53
-
i keep trying to go to my local host 8545 wallet but it just keeps on loading and i cant acces it Commented Nov 16, 2021 at 16:32
-