-
| When I run  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("0x8b139fab3dce3a137d3110cdab10bde02ef0415e29b7be5611d5a71a1ce843de", provider);
    const abi=fs.readFileSync("./storage_sol_SimpleStorage.abi", "utf8");
    const binary = fs.readFileSync("./storage_sol_SimpleStorage.bin","utf8");
    const contractFactory = new ethers.ContractFactory(abi, binary, wallet);
    console.log("Deploying, please wait.....");
    const contract =await contractFactory.deploy(); //wait for contract to deploy
    console.log(contract);
} | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            ansh3108
          
      
      
        Nov 17, 2024 
      
    
    Replies: 1 comment
-
| Haha, Fixed by adding this block of code after referring to the specific github repo of the lesson! main()
    .then(() => process.exit(0))
    .catch((error) => {
        console.error(error)
        process.exit(1)
    }) Thanks | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        ansh3108
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Haha, Fixed by adding this block of code after referring to the specific github repo of the lesson!
Thanks