Compiling and Deploying using web3.js
Contents

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("http://127.0.0.1:7545"));

// 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

Congratulations

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