Lesson 5: "Deploying, please wait....." taking forever to deploy. Please help. #5020
Answered
by
alymurtazamemon
IshanShirodkar
asked this question in
Q&A
-
const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
const provider = new ethers.providers.JsonRpcProvider(
"HTTP://172.20.96.1:7545"
);
const wallet = new ethers.Wallet(
"0x1db5f58ae3f12fa6736307585b2deeb4ff75d836574c2be9d974f6caa1131e10",
provider
);
const abi = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.abi", "utf8");
const binary = fs.readFileSync(
"./SimpleStorage_sol_SimpleStorage.bin",
"utf8"
);
const contractFactory = new ethers.ContractFactory(abi, binary, wallet);
console.log("Deploying, please wait...");
const contract = await contractFactory.deploy();
console.log(contract);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
}); The above code is showing no output after deploying. The only thing visible is "Deploying, please wait...". Please tell me if i have made any mistake... |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Mar 6, 2023
Replies: 1 comment 12 replies
-
@IshanShirodkar Are your Ganache Node running? |
Beta Was this translation helpful? Give feedback.
12 replies
Answer selected by
IshanShirodkar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@IshanShirodkar Are your Ganache Node running?