cclp-project / cclp-contracts

cCLP Contracts
MIT License
2 stars 2 forks source link

non default payable #15

Closed ajunge closed 5 years ago

ajunge commented 5 years ago

So if someone by mistake sends ETH to our contract it will be rejected

Vulturio commented 5 years ago

What about this? from Solidity 0.5 : https://solidity.readthedocs.io/en/v0.5.0/contracts.html

Furthermore, this function is executed whenever the contract receives plain Ether (without data). Additionally, in order to receive Ether, the fallback function must be marked payable. If no such function exists, the contract cannot receive Ether through regular transactions.

By the way, I make the clasic non payable fallback and test here; https://github.com/UncleVultur/cclp-contracts/tree/fallback

ajunge commented 5 years ago

Makes. Sense. Did you add it to any PR?

Vulturio commented 5 years ago

Makes. Sense. Did you add it to any PR?

Yes, to this https://github.com/cclp-project/cclp-contracts/pull/18