Skip to content
Discussion options

You must be logged in to vote

Actually, in the newer versions of solidity to send some money to the address, we need to make the address payable
Hence the correct code is following here:
payable(msg.sender).transfer(address(this).balance);

Replies: 2 comments 14 replies

Comment options

You must be logged in to vote
12 replies
@Noveleader
Comment options

@cromewar
Comment options

@JohnEMagee
Comment options

@Noveleader
Comment options

@Noveleader
Comment options

Comment options

You must be logged in to vote
2 replies
@cromewar
Comment options

@Noveleader
Comment options

Answer selected by Noveleader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants