caelum0x 2b68bde5d5 Predikt: full Polymarket-style prediction market — web + mobile + on-chain + bots
Working tree is now the canonical repo. Off-chain play-money + trustless on-chain
(FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution,
mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 23:29:50 +03:00

608 B

SemVerLib

Library for comparing SemVers.

Comparison

cmp(bytes32,bytes32)

function cmp(bytes32 a, bytes32 b) internal pure returns (int256 result)

Returns -1 if a < b, 0 if a == b, 1 if a > b.
For efficiency, this is a forgiving, non-reverting parser:

  • Early returns if a strict order can be determined.
  • Skips the first byte if it is v (case insensitive).
  • If a strict order cannot be determined, returns 0.
    To convert a regular string to a small string (bytes32), use LibString.toSmallString.