cryptozombies-lesson-code
cryptozombies-lesson-code copied to clipboard
Update zombiehelper.sol
the address needs to be payable to receive eth.
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.