0

I have question related to transactions. Is is possible to verify transaction by sender and receiver. For example user A want to send money to user B. User A create transaction, digitaly signed. Miners/validator verify transaction and that mean that user A sending some money to user B. But what if user B is not willing to accept this money? Is there some way to ask user B do you want this money to accept (mybee through contract ..)?

2
  • it works like a bank, if you send money to some account, it will be registered no matter you want it or not
    – Nulik
    Commented Aug 27, 2021 at 15:15
  • Is it possible for smart contracts to accept transaction (sending money) only if there is conformation from recipient? Is that revert() function?
    – explorer
    Commented Aug 28, 2021 at 6:17

1 Answer 1

1

You can use revert() or require(msg.value == 0) in your fallback function for rejecting coming Ethers. But anyways somebody send Ether to you with selfdestruct() function. It is a way to forcefully send ether. In EOAs there is no way to rejecting coming money.

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.