Created
February 24, 2017 10:12
-
-
Save ianmonkuk/8d2b9cb91f5eb4fb5d8880dc3eb0556b to your computer and use it in GitHub Desktop.
This file contains 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
<!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