Skip to main content

Try it Live

Run Hardfork examples in the interactive playground

    Usage Patterns

    Version Detection

    Check for newer versions:

    Feature Availability

    Check for features beyond a certain version:

    Network Configuration

    Validate forward compatibility:

    Chronological Ordering

    Uses chronological deployment order:

    Strict Inequality

    Important: isAfter returns false when versions are equal:
    For “greater than or equal”, use isAtLeast or gte:

    Performance

    Time Complexity: O(1) - Array index comparison Typical Time: ~10-20ns per call

    See Also

    • isAtLeast - Check if greater than or equal
    • isBefore - Check if strictly less than
    • gt - Alias for isAfter (greater than)
    • gte - Greater than or equal