I’ve been trying to use the JsonRpcProvider
but it’s displaying an error message.
here is the code.
const INFURA_ID = "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5";
const provider = new ethers.providers.JsonRpcProvider(
`https://mainnet.infura.io/v3/${INFURA_ID}`
);
I was expecting it to fetch details of from etherscan
2
Answers
The value "0x952…e5" doesn’t appear to be an Infura ID; instead, it looks more like a blockchain address. Make sure you are using the appropriate Infura project ID.
Try,
Anyway "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5" seems like an address. You may copy the id again pn your dashboard.