1

The code itself is fine and therefore compiles successfully. However when you try to deploy the contract in 2_deploy_contracts.js it gives an error. Your contract requires one constructor argument uint8 _numProposals which you need to provide in 2_deploy_contracts.js. So instead of something like deployer.deploy(A) you need something like deployer.deploy(A, ...


1

I had the same issue and found that by using console.log(accounts) in seed-exhcange.js only one account was making it to this point. So I checked truffle-config.js with some console.log() throughout. I found that I had put a space after the comma between my PRIVATE_KEYS in the .env file. After removing that space everything worked great.


Only top voted, non community-wiki answers of a minimum length are eligible