First Question:

// Stage deploying A before B

This is found on the truffle website. It says stage deploying A before B. So this must mean that deploying B will start after A has been deployed. If that's the case, why does truffle say that we can also use promises ? and how is it possible to deploy A before B without promise since transactions don't return immediate answer ?

Second question:

var NppToken = artifacts.require("./NppToken.sol");
var CrowdSale = artifacts.require("./CrowdSale.sol");

module.exports = function(deployer, network, accounts) {
  deployer.deploy(CrowdSale, NppToken.address);

This is my deployer script. I still think that this is a mistake... The reason being is that, if I change something in NppToken and in CrowdSale, and run truffle migrate --reset, what will happen is it will use the old NppToken.address because we are not awaiting for the new address that is available after deployer.deploy(NppToken) ends. Don't you agree ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.