Skip to content

Commit

Permalink
Test myToken
Browse files Browse the repository at this point in the history
  • Loading branch information
dcb9 committed Aug 9, 2018
1 parent f7aef15 commit 4680f2d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion playground/migrations/3_deploy_myToken.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var MyToken = artifacts.require("./MyToken.sol");

module.exports = function(deployer) {
deployer.deploy(MyToken, [10]);
deployer.deploy(MyToken, [9999999999999], {from: "0x7926223070547d2d15b2ef5e7383e541c338ffe9"});
};
15 changes: 15 additions & 0 deletions playground/truffle-myToken-commands.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var token
var acc1 = "0x7926223070547d2d15b2ef5e7383e541c338ffe9"
var acc2 = "0x3a895d2af552600f1f585425318c13a5aa25f01a"

MyToken.deployed().then(function(i) { token = i })

token.totalSupply().then(function(res) { console.log(res.toNumber()) })

token.balanceOf(acc1).then(function(res) { console.log(res.toNumber()) })

token.balanceOf(acc2).then(function(res) { console.log(res.toNumber()) })

token.mint(acc1, 100)

token.transfer(acc2, 10, {from: acc1})
12 changes: 1 addition & 11 deletions playground/truffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,9 @@ module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
port: 23889,
network_id: "*",
from: "0xd617b07d7ede55244246a807d22aa5e705e13301"
},
qtum: {
host: "127.0.0.1",
port: 33889,
network_id: "*",
// acc1 =
from: "0x7926223070547d2d15b2ef5e7383e541c338ffe9",
// acc2 = "0x3a895d2af552600f1f585425318c13a5aa25f01a"

// gas: ,
gasPrice: "0x64"
}
}
Expand Down

0 comments on commit 4680f2d

Please sign in to comment.