原创<br> VNT:打造开发者友好的下一代公链基础设施( 九 )

// live network, but not for any other networks like testing and development.

// When we're deploying to the live network we want it to use that address, but in

// testing and development we need to deploy a version of our own. Instead of writing

// a bunch of conditionals, we can simply use the overwrite key.

deployer.deploy(SomeDependency, {overwrite: false});

因此还可以使用这个工具进行调试与单元测试。

var ERC20 = artifacts.require("../contracts/Erc20.c")

module.exports = function (deployer, a) {

deployer.deploy(ERC20, "1000000", "bitcoin", "BTC").then(function (instance) {

deploy = instance;

return deploy.GetTotalSupply()

推荐阅读