This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const solc = require('solc'); | |
const Web3 = require('web3'); | |
// Connect to local Ethereum node | |
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
// Compile the source code | |
const input = fs.readFileSync('Token.sol'); | |
const output = solc.compile(input.toString(), 1); |