I have have many examples and in the 2_deploy_contracts.js providing simple arguments like address, string is all good.

However I am trying to deploy this example and it has a MintableToken _token as an argument. How do I provide that in 2_deploy_contracts.js?

  • For contracts you have to send the contract address.
    – Ismael
    Feb 24, 2018 at 6:01

1 Answer 1


You can either deploy setting a variable to the contract instance via await, or neater still, use the .then method of the promise to chain the deployments, giving you access to the instance (and so the address) in the deployment of your second contract.

const contractOne = artifacts.require('ContractOne')
    , contractTwo = artifacts.require('ContractTwo')

module.exports = deployer => 
    .then(contOne => deployer.deploy(contractTwo, contOne.address))

And so here, contractOne would be your mintable token contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.