OpenZeppelin Forum
Casting an address to string Solidity 8.0
Support
Contracts
frangio
March 9, 2022, 9:26pm
3
You can use our Strings library like this:
Strings.toHexString(uint256(uint160(msg.sender)), 20);
show post in topic
Related topics
Topic
Replies
Views
Activity
Gas cost difference between storing/accessing addresses natively compared to converting them to bytes32 or uin256
Smart Contracts
4
714
December 11, 2021
Bytes32 to Address String
Smart Contracts
1
2562
June 17, 2022
Solidity 0.6: change address(f) to f.address for f being of external function type
General
8
787
December 11, 2019
TypeError: Explicit type conversion not allowed from "uint256" to "address". Need some help
Smart Contracts
erc20
2
1148
May 26, 2023
Checksum an Ethereum address
Support
1
1072
February 27, 2020