Skip to content

Instantly share code, notes, and snippets.

@TOMOAKI12345
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save TOMOAKI12345/8ce3a5733afc39c484f0 to your computer and use it in GitHub Desktop.

Select an option

Save TOMOAKI12345/8ce3a5733afc39c484f0 to your computer and use it in GitHub Desktop.
https://www.ethereum.org/token created token contract check.
var tokenABI = [{"constant":false,"inputs":[{"name":"receiver","type":"address"},{"name":"amount","type":"uint256"}],"name":"sendCoin","outputs":[{"name":"sufficient","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"coinBalanceOf","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"inputs":[{"name":"supply","type":"uint256"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"},{"indexed":false,"name":"receiver","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"CoinTransfer","type":"event"}]
var tokenContract =eth.contract(tokenABI);
// this is the token address created
var token = tokenContract.at('0x33e98638ea7f2c2fd83731528fb53802af395d13')
// token balance
> token.coinBalanceOf.call('0x4b0c6f0297cee4b551b6fab3277067b64b238990')
'7'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment