Cast Uint To Address In Solidity

[Solved] Cast Uint To Address In Solidity | Solidity - Code Explorer | yomemimo.com
Question : cast uint to address in solidity

Answered by : anxious-alligator-bx1nkddr8shy

uint num = 10;
// first cast uint256 to uint160 then cast to address
address addressFromUint = address(uint160(num));

Source : https://stackoverflow.com/a/70601505/10261711 | Last Update : Wed, 01 Jun 22

Answers related to cast uint to address in solidity

Code Explorer Popular Question For Solidity