This file contains hidden or 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
| 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/")); |
This file contains hidden or 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
| contract Bank { | |
| address owner; | |
| mapping (address => uint) balances; | |
| function init() returns(bool){ | |
| owner = tx.origin; |
NewerOlder