2

I have a truffle 2_deploy_contracts.js something like this :

const sample = artifacts.require('./Sample.sol');

module.exports = function(deployer) {
  deployer
    .then(()=>deployer.deploy(Sample, 0x0))
};

Sample contract require address to be passed. This was worked at truffle version ^4.1.14 but after I upgraded truffle version to Truffle v5.0.5 (core: 5.0.5), it fail with this error message below:

2_deploy_contracts.js
=====================

   Deploying 'Sample'
   ---------------------------
Error:  *** Deployment Failed ***

"Sample" -- invalid address (arg="_address", coderType="address", value=0).

  • Please share your Sample contract (or at least the constructor of this contract). – goodvibration Feb 25 at 7:53
  • If you are trying to pass 0x0 as an address to your constructor, why bother passing the parameter at all? – Iftifar Taz Feb 25 at 18:07

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.