Issue of Network, From Ethers.js Part of the Video #1367
-
Hey so I've been doing the 5th chapter of the video, got to the point where it was going to be the deployment of "deoploy.js" but,
The code I've written is const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
const provider = new ethers.providers.JsonRpcProvider(
"HTTP://127.0.0.1:7545"
);
const wallet = new ethers.Wallet(
"55c157b5706250c2f855cb723fc7751e7e3f938f852ca540ffd9194e1b23c3e8",
provider
);
const abi = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.abi", "utf-8");
const binary = fs.readFileSync(
"./SimpleStorage_sol_SimpleStorage.bin",
"utf-8"
);
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);
}); Can somone explain what's going on! |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Jul 28, 2022
Replies: 2 comments 5 replies
-
Make a repo, I will look into it |
Beta Was this translation helpful? Give feedback.
2 replies
-
@ArkX69 See this discussion all working solutions are mentioned here #286 . |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
alymurtazamemon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ArkX69 See this discussion all working solutions are mentioned here #286 .