Human Standard Token ABI
A simple node module that exports the Ethereum ABI for ERC 20 compatible tokens.
Requires the web3 API to be available, either by initailizing it yourself, or using a web3-injecting Javascript environment, like Geth, MetaMask, or Mist.
Usage
var abi =var token = web3ethvar addr = web3ethaccounts0// Get the token nametokenname// Get the token symboltokensymboltokentotalSupplytokenbalanceOfvar value = '100' // Base 10, accounts for decimals.token
Run the example
First install http-server
(npm install -g http-server
).
Then run it in this folder: http-server
.
Then visit that port, probably something like: http://localhost:8080/example
.
Rebuild the example
If you edit example/index.js
, you'll have to rebuild by running npm run build
.