{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/contracts/core/connext/libraries/Encoding.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "library Encoding {\n  // ============ Constants ============\n\n  bytes private constant NIBBLE_LOOKUP = \"0123456789abcdef\";\n\n  // ============ Internal Functions ============\n\n  /**\n   * @notice Encode a uint32 in its DECIMAL representation, with leading\n   * zeroes.\n   * @param _num The number to encode\n   * @return _encoded The encoded number, suitable for use in abi.\n   * encodePacked\n   */\n  function decimalUint32(uint32 _num) internal pure returns (uint80 _encoded) {\n    uint80 ASCII_0 = 0x30;\n    // all over/underflows are impossible\n    // this will ALWAYS produce 10 decimal characters\n    for (uint8 i = 0; i < 10; i += 1) {\n      _encoded |= ((_num % 10) + ASCII_0) << (i * 8);\n      _num = _num / 10;\n    }\n  }\n\n  /**\n   * @notice Encodes the uint256 to hex. `first` contains the encoded top 16 bytes.\n   * `second` contains the encoded lower 16 bytes.\n   * @param _bytes The 32 bytes as uint256\n   * @return _firstHalf The top 16 bytes\n   * @return _secondHalf The bottom 16 bytes\n   */\n  function encodeHex(uint256 _bytes) internal pure returns (uint256 _firstHalf, uint256 _secondHalf) {\n    for (uint8 i = 31; i > 15; i -= 1) {\n      uint8 _b = uint8(_bytes >> (i * 8));\n      _firstHalf |= _byteHex(_b);\n      if (i != 16) {\n        _firstHalf <<= 16;\n      }\n    }\n    // abusing underflow here =_=\n    unchecked {\n      for (uint8 i = 15; i < 255; i -= 1) {\n        uint8 _b = uint8(_bytes >> (i * 8));\n        _secondHalf |= _byteHex(_b);\n        if (i != 0) {\n          _secondHalf <<= 16;\n        }\n      }\n    }\n  }\n\n  /**\n   * @notice Returns the encoded hex character that represents the lower 4 bits of the argument.\n   * @param _byte The byte\n   * @return _char The encoded hex character\n   */\n  function _nibbleHex(uint8 _byte) private pure returns (uint8 _char) {\n    uint8 _nibble = _byte & 0x0f; // keep bottom 4, 0 top 4\n    _char = uint8(NIBBLE_LOOKUP[_nibble]);\n  }\n\n  /**\n   * @notice Returns a uint16 containing the hex-encoded byte.\n   * @param _byte The byte\n   * @return _encoded The hex-encoded byte\n   */\n  function _byteHex(uint8 _byte) private pure returns (uint16 _encoded) {\n    _encoded |= _nibbleHex(_byte >> 4); // top 4 bits\n    _encoded <<= 8;\n    _encoded |= _nibbleHex(_byte); // lower 4 bits\n  }\n}"
}