Receive
Receive()
Receive is a special function in Solidity that allows contracts to receive funds from external accounts.
It cannot have arguments.
It cannot return data.
It has
external
visibility and is markedpayable
Examples
Use receive()
to accept ether:
The receive function can also be used to accept tokens:
Last updated