Please, how to make a transaction from Brownie to a smart contract which has a receive function like so:
address payable public destination;
event ForwarderDeposited(address from, uint256 value, bytes data);
receive() external payable {
destination.transfer(msg.value);
emit ForwarderDeposited(msg.sender, msg.value, msg.data);
}
In, for example some test that could look like:
def test_recieve():
# Arrange
account = accounts[0]
sender = accounts[1]
# Act
forwarder = Forwarder.deploy({"from": account})
txn = forwarder.receive(5, {"from": sender})
txn.wait(1)
# Assert
assert forwarder.destination().balance() == 5
Throws error: AttributeError: Contract 'Forwarder' object has no attribute 'receive'