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

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

module.exports = function(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:


   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). Feb 25 '19 at 7:53
  • If you are trying to pass 0x0 as an address to your constructor, why bother passing the parameter at all? Feb 25 '19 at 18:07
  • Facing the same issue. The only difference is that I get my value = undefined
    – mzaidi
    Apr 9 at 7:59

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.