0

My question is simple If I want to send some ether to someone in remix like

contract Sender {
  function send(address _receiver) payable {
    _receiver.send(msg.value);
  }
}
  • Metamask asks me as a sender to confirm the transaction and thus simply send the amount to receiver without even asking him/her.

How can I make receiver accept the transaction ?

1 Answer 1

1

As long as the receiver is a payable address (i.e. a regular Ethereum account or a smart contract with a payable fallback function), they will automatically accept it.

Why do you think the receiver would not accept it, or what use case would there be for a receiver to reject a transaction?

2
  • Is it not true both receiver and sender sign the transaction first to be recorded in blockchain ? Commented Jan 5, 2019 at 12:11
  • 2
    No, only the sender signs the transaction, there is no reason for the receiver to sign as it has nothing to prove.
    – Jaime
    Commented Jan 5, 2019 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.