I'm developing a dapp with the truffle suite and now I'm running into a problem. Everything is working locally in the ganache instance.
My contract should disallow direct payments to the contract, so my constructor looks like:
/**
* @dev Disallow payments to this contract directly
*/
constructor() public {
revert("No direct payments");
}
But now the Deploy by truffle reverts with the given message.
Removing the line where the constructor is reverting and everything works fine. The contract is deployed and tested. The contracts are deployed like this:
var SecondPriceAuction = artifacts.require("./VickreyAuctionHouse.sol");
module.exports = function(deployer) {
deployer.deploy(SecondPriceAuction);
};
Any ideas how to deploy a contract, that does not allow calling the constructor.
My contract should disallow direct payments to the contract, so my constructor looks like:
- seriously??? How exactly is that supposed to disallow payments to the contract??? It disallows the deployment of the contract altogether!!! (and yes, for the sake of sarcasm I guess you could say that a non-existing contract cannot be paid to).