-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugVerified to be an issue.Verified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.v6Issues regarding v6Issues regarding v6
Description
Ethers Version
6.13.2
Search Terms
No response
Describe the Problem
JsonRpcProvider failed to detect the network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)
getting this error on the server on my local machine it is working fine
network:- polygon-amoy
infuraUrl:- https://polygon-amoy.infura.io/v3/${myPrivateKey}
Code Snippet
const contractInstance = async (privateKey, address, abi) => {
try {
const wallet = new ethers.Wallet(privateKey);
const provider = new ethers.JsonRpcProvider(
process.env.INFURA_PROVIDER_URL
);
const connectedWallet = wallet.connect(provider);
const contract = new ethers.Contract(address, abi, connectedWallet);
return contract;
} catch (error) {
console.log(error);
}
};
Contract ABI
No response
Errors
No response
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli)
Environment (Other)
No response
dominictobias-bullish
Metadata
Metadata
Assignees
Labels
bugVerified to be an issue.Verified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.v6Issues regarding v6Issues regarding v6