SafeCast160

Git Source

Functions

toUint160

Safely casts uint256 to uint160

function toUint160(uint256 value) internal pure returns (uint160);

Parameters

NameTypeDescription
valueuint256The uint256 to be cast

Errors

UnsafeCast

Thrown when a valude greater than type(uint160).max is cast to uint160

error UnsafeCast();