Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ ./node_modules/.bin/truffle migrate --network ganache
$ ./node_modules/.bin/truffle console --network ganache
truffle(ganache)> SimpleToken.deployed().then(instance => token = instance)
truffle(ganache)> token.name()
'Tooploox'
truffle(ganache)> token.balanceOf(web3.eth.accounts[0]).then(n => n.toString())
'21000000000000000000000000'
truffle(ganache)> token.transfer(web3.eth.accounts[1], 100 * 10 ** 18)
{ tx: '0xe3133864da05500277f881fb5bb8b29f98ffd26ad1ffcc70544e3023e8d7fc90', ... }
truffle(ganache)> token.balanceOf(web3.eth.accounts[0]).then(n => n.toString())
'20999900000000000000000000'
truffle(ganache)> token.balanceOf(web3.eth.accounts[1]).then(n => n.toString())
'100000000000000000000'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.