mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Split fallback function and introduce "fallback()" and "receive()" syntax.
This commit is contained in:
@@ -88,8 +88,8 @@ contract MultiSigWallet {
|
||||
_;
|
||||
}
|
||||
|
||||
/// @dev Fallback function allows to deposit ether.
|
||||
function()
|
||||
/// @dev Receive function allows to deposit ether.
|
||||
receive()
|
||||
external
|
||||
payable
|
||||
{
|
||||
|
||||
@@ -275,7 +275,7 @@ contract ico is safeMath {
|
||||
require( msg.sender.send(_val) );
|
||||
}
|
||||
|
||||
function () external payable {
|
||||
receive () external payable {
|
||||
/*
|
||||
Callback function. Simply calls the buy function as a beneficiary and there is no affiliate address.
|
||||
If they call the contract without any function then this process will be taken place.
|
||||
|
||||
@@ -140,6 +140,6 @@ contract module {
|
||||
require( msg.sender == moduleHandlerAddress );
|
||||
_;
|
||||
}
|
||||
function() external payable {
|
||||
receive() external payable {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user