LibSanitize

Git Source

This library helps sanitizing inputs.

Functions

notZeroAddress

Internal utility to sanitize an address and ensure its value is not 0.

function notZeroAddress(address addressValue) internal pure;

Parameters

NameTypeDescription
addressValueaddressThe address to verify

notNullValue

Internal utility to sanitize an uint256 value and ensure its value is not 0.

function notNullValue(uint256 value) internal pure;

Parameters

NameTypeDescription
valueuint256The value to verify

notInvalidBps

Internal utility to sanitize a bps value and ensure it's <= 100%.

function notInvalidBps(uint256 value) internal pure;

Parameters

NameTypeDescription
valueuint256The bps value to verify

notEmptyString

Internal utility to sanitize a string value and ensure it's not empty.

function notEmptyString(string memory stringValue) internal pure;

Parameters

NameTypeDescription
stringValuestringThe string value to verify