Solidity API
AddressBytes
This library provides utility functions to convert between address
and bytes
.
InvalidBytesLength
error InvalidBytesLength(bytes bytesAddress)
toAddress
function toAddress(bytes bytesAddress) internal pure returns (address addr)
Converts a bytes address to an address type.
Parameters
Name |
Type |
Description |
bytesAddress |
bytes |
The bytes representation of an address |
Return Values
Name |
Type |
Description |
addr |
address |
The converted address |
toBytes
function toBytes(address addr) internal pure returns (bytes bytesAddress)
Converts an address to bytes.
Parameters
Name |
Type |
Description |
addr |
address |
The address to be converted |
Return Values
Name |
Type |
Description |
bytesAddress |
bytes |
The bytes representation of the address |