-
-
Save MichalZalecki/b6d55c0f7103a7b5a53de20019d148d8 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
$ ./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