StackAsk is a community where developers ask questions, share answers and learn from each others real-world experience, so every solved problem helps the next person who runs into it.
module.exports = { networks: { development: { host: "localhost", port: 8545, network_id: "*", gas: 0, from: "0x3c31b4b9d6c24bad29498f99aaa6914231362c7f" } }, compilers: { solc: { version: "0.7.6" } } };
const ERC20 = artifacts.require("ERC20"); module.exports = function (deployer) { const tokenName = 'My First Coin'; const tokenSymbol = 'MFC'; const tokenDecimals = 1; deployer.deploy( ERC20, 10000, tokenName, tokenDecimals, tokenSymbol, { gasPrice: 0 } ); };
let contract = await ERC20.deployed() contract.totalSupply() contract.transfer("0xf6de26f382078d34446b133fd54191fe49c77273", 1000) contract.balanceOf("0xf6de26f382078d34446b133fd54191fe49c77273")
truffle(development)> contract.totalSupply() BN { negative: 0, words: [ 10000, ], length: 1, red: null } truffle(development)> contract.transfer("0xf6de26f382078d34446b133fd54191fe49c77273", 1000) .... truffle(development)> contract.balanceOf("0xf6de26f382078d34446b133fd54191fe49c77273") BN { negative: 0, words: [ 1000, ], length: 1, red: null }
2.2K Point(s)
1.2K Point(s)
313 Point(s)
178 Point(s)
138 Point(s)
Input your email to receive reset password link, or if you remember your password, you can click