I have the following constructor:
constructor(address _payee) public {
payer = msg.sender;
payee = _payee;
}
And this function in my JavaScript tests:
beforeEach(async () => {
contract = await Contract.new(payee);
});
However, I get an error:
Error: Contract contract constructor expected 1 arguments, received 2
I made sure I cleared the build
folder and I had recompiled the contracts with truffle compile --all
before.
How can I pass msg.sender
and payee
? There are no problems with these constructor params when deploying the contract using the migrations deployer.
Using ganache 1.2.1
and truffle 4.1.13
.