embark-area-51/script_test.js

14 lines
329 B
JavaScript
Raw Normal View History

var Web3 = require('web3');
web3 = new Web3();
2017-12-05 23:14:46 +00:00
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
EmbarkJS = require('./js/embark.js');
MyToken = require('./test_app/dist/js/mytoken.js');
console.log(MyToken.address);
MyToken.balanceOf(web3.eth.accounts[0]).then((x) => console.log(x.toNumber()));