-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address.toPayable() #1771
Comments
Yeah, in Solidity 0.5, this is one of the breaking changes, but for some developers including myself, we just use like this |
|
@pokcup It is really hard for me to understand your words, could you please use the English? |
@pokcup ยินดีต้อนรับ! Please write in English when communicating over this medium :) |
Would the solution be a function like this within Address.sol ?
|
🧐 Motivation
As seen in this StackOverflow question, there's no easy (reasonable) way to convert an
address
into anaddress payable
. This was confirmed by the Solidity team on gitter. We should provide a simple wrapper for this ugly conversion.📝 Details
This would simply be a new
internal pure
function inAddress
, that takes anaddress
and returnsaddress payable
. In order to do the conversion, we must first cast the address type intouint160
.The text was updated successfully, but these errors were encountered: