Skip to content

Instantly share code, notes, and snippets.

@ianmonkuk
Created February 24, 2017 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ianmonkuk/8d2b9cb91f5eb4fb5d8880dc3eb0556b to your computer and use it in GitHub Desktop.
Save ianmonkuk/8d2b9cb91f5eb4fb5d8880dc3eb0556b to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="./app.js"></script>
<script>
window.onload = function() {
console.log( "Account" + web3.eth.accounts[2] );
MetaCoin.deployed().then(function(instance) {
return instance.getBalance.call(web3.eth.accounts[2]);
}).then( function(balance) {
document.body.innerHTML = document.body.innerHTML + " balance " + balance;
});
MetaCoin.deployed().then(function(instance) {
return instance.getOriginAddress.call();
}).then( function(originAddress) {
document.body.innerHTML = document.body.innerHTML + "<br>Origin Address " + originAddress;
});
};
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment