ether to a SC?
msg.sender
Will it work if I add return msg.sender inside a payable function?
What is the task? You know the sender who made the tx. Looks like you need to use the Event in order to listen to this data.
I'm trying to improve myself on solidity. I just want to send half of the ethereum sent to the address of the person who sent ethereum to the contract.
If yes, you just need update your payable function and call call{} func inside. msg.sender.call{value: msg.value / 2}(“”)
it doesn't matter, for now it's just enough to work
Обсуждают сегодня