-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The receive() function must be declared as external and payable:
https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function
For example, the following contracts should not pass typechecking:
contract C {
receive() public payable { }
}contract C {
receive() external { }
}Additionally, the receive() function cannot take parameters. For example the following contract should not pass type checking:
contract C {
receive(int x) external payable { }
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request