Skip to content

Instantly share code, notes, and snippets.

View timothyylim's full-sized avatar
🇳🇴
Loading...

Timothy Lim timothyylim

🇳🇴
Loading...
View GitHub Profile
@timothyylim
timothyylim / web3-solc-contract-compile-deploy.js
Created February 24, 2018 08:55 — forked from tomconte/web3-solc-contract-compile-deploy.js
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
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);