error: transact to CampaignFactory.createCampaign errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value. Debug the transaction to get more information.
code:
function createCampaign(uint deposit, address ll) public payable{
// dpst = deposit;
require(msg.value > (40*deposit)/100 wei);
address newCampaign = address((new Campaign).value(msg.value)(deposit, ll, token_address, 1));
token_instance.setAllowance(deposit, token_holder, newCampaign);
deployedCampaigns.push(newCampaign);
}
Campaign constructor declaration:
constructor (uint depositInWei, address ll, address addressOfTokenUsed, uint weiCostOfEachToken) public payable{
require
statements until you find out which one causes the problem. The text about "payable constructor" is just a guess and usually you can ignore that part.