0
const ethers = require("ethers");
const fs = require("fs-extra");

async function main() {
  const provider = new ethers.providers.JsonRpcProvider("http://172.27.128.1:7545");
  const wallet = new ethers.Wallet(
    "0xfd7bf02a67d502d4cbc887d44c1980bfa60eea4352e3812a838ccd633eb52e99",
    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);

After executing the this console.log("Deploying, please wait..."); it is stuck, nothing is happen.

help me please...

1
  • Is the RPC provider running?
    – Ismael
    Commented Dec 29, 2023 at 21:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.