Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cast uint to address in solidity

uint num = 10;
// first cast uint256 to uint160 then cast to address
address addressFromUint = address(uint160(num));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cast #uint #address #solidity
ADD COMMENT
Topic
Name
9+7 =