Git Source

Functions

_uintToBool

converts a uint256 to a bool

function _uintToBool(uint256 _x) internal pure returns (bool _ans);

Parameters

NameTypeDescription
_xuint256the uint256 to convert

_boolToUint

converts a bool to an uint256

function _boolToUint(bool _x) internal pure returns (uint256 _ans);

Parameters

NameTypeDescription
_xboolthe bool to convert

_uintToAddr

converts a uint256 to an address

function _uintToAddr(uint256 _x) internal pure returns (address _ans);

Parameters

NameTypeDescription
_xuint256the uint256 to convert

_uintToBytes

converts a uint256 to a bytes

function _uintToBytes(uint256 _x) internal pure returns (bytes memory _ans);

Parameters

NameTypeDescription
_xuint256the uint256 to convert

_extractStringData

Helper function to extract the actual string data from an ABI-encoded string

function _extractStringData(bytes memory _encodedString) internal pure returns (bytes memory);

Parameters

NameTypeDescription
_encodedStringbytesThe ABI-encoded string to extract the data from

Returns

NameTypeDescription
<none>bytesstringData The extracted string data (length + content)

_extractDynamicArrayData

Extracts a dynamic array (length + values with their lengths) from ABI-encoded data

function _extractDynamicArrayData(bytes memory _encodedArray) internal pure returns (bytes memory _result);

Parameters

NameTypeDescription
_encodedArraybytesThe ABI-encoded array data

Returns

NameTypeDescription
_resultbytesThe extracted array data