Skip to content

Instantly share code, notes, and snippets.

var solc = require('solc');
var fs = require('fs');
var Web3 = require('web3');
const assert = require('assert');
var web3;
if(typeof web3 !== 'undefined')
web3 = new Web3(web3.currentProvider);
else
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:4000/"));
contract Bank {
address owner;
mapping (address => uint) balances;
function init() returns(bool){
owner = tx.origin;