Facing an issue with the url to make Rpc while deploying the contract

VS code terminal:

JsonRpcProvider {}
Deploying the contract………
JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)
Error: connect ECONNREFUSED 127.0.0.1:7545
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
errno: -4078,
code: ‘ECONNREFUSED’,
syscall: ‘connect’,
address: ‘127.0.0.1’,
port: 7545
}
const provider = new ethers.JsonRpcProvider(“http://127.0.0.1:7545”); //there is an issue with the url passed but its the same url as Rpc server from ganache.

I have passed the Rpc server url from ganache to the JsonRpcProvider , but am facing an issue with the url.
Please fix this

Leave a Comment