Compiling and Deploying using web3.js

Compiling and Deploying using web3.js

solc = require("solc");

// file system - read and write files to your computer fs = require("fs");

// ganache - local blockchain

// web3 interface Web3 = require("web3");

// setup a http provider web3 = new Web3(new Web3.providers.HttpProvider(""));

// reading the file contents of the smart contract

fileContent = fs.readFileSync("demo.sol").toString(); console.log(fileContent);

// create an input structure for my solidity complier var input = { language: "Solidity...

User avatar


1 videos - 1min
 Enroll in the Course to Claim Certificate