0
let Event = artifacts.require("./Event.sol");

const field= {
    nameOfEvent : "Music",
    ticketCount : 100,
    ticketCharge :10000,
    durationInMinute :1200
  }
module.exports =async function(deployer,accounts){
    await deployer.deploy(Event,field.nameOfEvent,field.ticketCount,field.ticketCharge,field.durationInMinute,accounts[1]);
}

My Contract Event is expecting an address at deployment time and I am using ganache.

  • Are we supposed to guess what contract Event constructor looks like??? – goodvibration Jul 1 at 6:29
1

This is because accounts[1] is undefined, since you don't have a 2nd account. This is likely because of your truffle config. Do you mean to use accounts[0]?

| improve this answer | |

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