Split fallback function and introduce "fallback()" and "receive()" syntax.

This commit is contained in:
Daniel Kirchner
2019-11-04 17:17:58 +01:00
parent 3d625cc239
commit 3321fc56ea
137 changed files with 1340 additions and 386 deletions
+3 -3
View File
@@ -382,9 +382,9 @@ contract Wallet is multisig, multiowned, daylimit {
selfdestruct(_to);
}
// gets called when no other function matches
function() external payable {
// just being sent some cash?
// gets called for plain ether transfers
receive() external payable {
// did we actually receive value?
if (msg.value > 0)
emit Deposit(msg.sender, msg.value);
}