cryptozombies-lesson-code icon indicating copy to clipboard operation
cryptozombies-lesson-code copied to clipboard

Update zombiehelper.sol

Open 4samad opened this issue 3 years ago • 1 comments

the address needs to be payable to receive eth.

4samad avatar Jul 05 '22 20:07 4samad

Hi ! It seems there might be a misunderstanding regarding the use of the payable modifier in the owner() function. In Solidity, the address type is implicitly payable, which means it can send and receive Ether by default. That's why the _owner address can be used with the .transfer() function without explicitly marking it as payable. So, even though the owner() function is not explicitly marked as payable, the _owner address can still be used to transfer Ether.

xyz899 avatar Aug 08 '23 12:08 xyz899