Skip to main content
Post Closed as "Duplicate" by Ismael, Richard Horrocks, eth
added 102 characters in body
Source Link

Using Solidity 0.4.18. If I send ether to a payable function, and the function does some of its stuff, and then throws (via require), what happens to the ether that was sent to it? Does the ether stay in the contract?

Edit: I know that "throw" reverts transactions - I wanted to know whether "require" does the same.

Using Solidity 0.4.18. If I send ether to a payable function, and the function does some of its stuff, and then throws (via require), what happens to the ether that was sent to it? Does the ether stay in the contract?

Using Solidity 0.4.18. If I send ether to a payable function, and the function does some of its stuff, and then throws (via require), what happens to the ether that was sent to it? Does the ether stay in the contract?

Edit: I know that "throw" reverts transactions - I wanted to know whether "require" does the same.

Source Link

What happens when a payable function throws

Using Solidity 0.4.18. If I send ether to a payable function, and the function does some of its stuff, and then throws (via require), what happens to the ether that was sent to it? Does the ether stay in the contract?