current position:Home>Write the code in and still can't get the address. Is it related to my network? I've been using metamask reponste3 to test the network, but the local network 8545 can't be connected

Write the code in and still can't get the address. Is it related to my network? I've been using metamask reponste3 to test the network, but the local network 8545 can't be connected

2022-02-03 20:50:53 Q & A of Denglian community




Take the answer 1:

Run the page window.ethereum.enable when , MetaMask An authorization confirmation dialog box will pop up ( Did it pop up ?) This step has nothing to do with your network , When you authorize , According to your code, the log should output :

dsq00:....

In addition, we need to ensure that MetaMask The linked network is consistent with when you deploy the contract .
In this environment , The front-end code will link MetaMask The node of , Therefore, the directly connected nodes in the code can not be handled .




copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032050517725.html

Random recommended