Am Getting this error while deploying contract from my loca. #6195
Replies: 2 comments
-
hello bro: |
Beta Was this translation helpful? Give feedback.
-
In my case I use the "WSL (UBUNTU) in my "VS Code", therfore to solve this problem.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is my code.
const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
// compile them in our code
// compile them separately
// http://127.0.0.1:7545
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:7545");
const wallet = new ethers.Wallet(
"0x358dbca4e4bfc0bb7b9a4cfdee7c8dea8ec4c0c4a87fbc724867cb9d4b064575",
provider
);
const abi = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.abi", "utf8");
const binary = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.bin", "utf8");
}
main()
.then(()=> PerformanceMeasure.exit(0))
.catch((error)=> {
console.log(error, "Error");
process.exit(1);
})
and am getting this error
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: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 7545
} Error
Beta Was this translation helpful? Give feedback.
All reactions