Skip to content

Instantly share code, notes, and snippets.

View chrisheseltine's full-sized avatar
🏠
Currently accepting new contracts

Christopher Heseltine chrisheseltine

🏠
Currently accepting new contracts
View GitHub Profile
@chrisheseltine
chrisheseltine / web3-solc-contract-compile-deploy.js
Created February 21, 2018 12:09 — 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);