Can you please help me out how to explicitly convert address to address payable as i am using solidity compiler above 0.5 its asking me to have address payable when i use transfer().

  • Didn't you ask the same question yesterday? Which was marked duplicate to this, have you looked at solution over there ? – sp4c3 Feb 1 '19 at 6:52
  • yes but it is not yet resolved and i followed documentation yet the issue exist. – Prasanth A S Feb 1 '19 at 6:58
  • Why do you need to convert to payable, is there a problem in declaring them as payable from start ? – sp4c3 Feb 1 '19 at 7:01
  • yeah i made a game which involves 3 user to bet and the bet amount will be hold in contract and after winner is selected, I will transfer the amount from contract to winner's address. For this transfer() i need to convert winners address to address payable. I am assigning winner's address to address payable variable its not working. And i converted the address using address(uint160(address)) not working. – Prasanth A S Feb 1 '19 at 7:07
  • If you believe your problem is definitely different from the other questions, please edit the question to include your code, tell us what you have already done that was mentioned in the other, why that didn't work, and why your question is different. – Rosco Kalis Feb 1 '19 at 15:15