1

What the theory behind using msg.value instead of this.balance
when e.g withdrawing contributed funds from a contract?

E.g

wallet.transfer(this.balance);
wallet.transfer(msg.value);
6

msg.value is the amount of ETH sent to a payable public method in a contract.

this.balance is the amount of ETH stored in the contract.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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