Questions tagged [receive]

`receive` is a keyword that was introduced in Solidity 0.6.x that is used as a fallback function that is only able to receive ether.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

Contract address payable issue

If i remove payable from: then i get this error with my receive function. Not sure how to fix this. I have an erc20 token contract that has a receive function and this contract inherits from it, that'...
0
votes
0answers
33 views

Failing to send() 1 wei from one contract to another

The following code is supposed to send 1 wei from the current contract to a newly created contract. The recipient contract gets created successfully and the sending contract has a positive balance, ...
0
votes
1answer
67 views

Transfer money between contracts

I'm quite new at smart contracts/Solidity, which I'm learning for a postgraduate course. In one of the assignments, we have to implement a little competitive game (something like the game of Seven ...
4
votes
1answer
3k views

What is the receive keyword in solidity?

Solidity has a receive keyword. What is it and how do I use it?