contractAddress = address(this);

I am trying like this but giving error - TypeError: Type address is not implicitly convertible to expected type address payable

Here I want put address(this) in contractAddress , how is it possible. I am on learning stage.

  • sorry I just want to allocate value of ADDRESS(THIS) in contractAddress . like this , contractAddress = ADDRESS(THIS), Is it possible in any way because above code is not working Apr 24 '20 at 13:53
  • The first answer has the solution for solc 0.6 and 0.5, which version are you using?
    – Ismael
    Apr 24 '20 at 14:00

Browse other questions tagged or ask your own question.