0x00000002 / staking-app

MIT License
0 stars 0 forks source link

No fallback function in Fee.sol #17

Open ryu9827 opened 6 years ago

ryu9827 commented 6 years ago

Suggest to add a fallback function in the Fee.sol

0x00000002 commented 6 years ago

Great suggestion! Could you please add a couple of words to explain how someone could benefit from having such function?

ryu9827 commented 6 years ago

We can place a event log in the fallback function. If someone send ETH to this contract accidentally, it emits an event log recording who send his ETH and how many. Then we can send the ETH back if we want.

Janther commented 6 years ago

Even better, have a function () { revert(); } so not only we don't have to write logs, we give everything automatically back.