msg.value & payable functions
Payable functions
Say you want to make a call to another contract's payable function and transfer ETH:
calls someFunction on targetAddress contract
sends amount of ETH
this works if someFunction is a payable function
Calling payable functions
From Vault, we call the payable function
deposit
, and pass msg.value within thevalue
field
Last updated