Skip to main content

Try it Live

Run Hardfork examples in the interactive playground

    Chronological Order

    Returns hardforks in deployment order:

    Usage Patterns

    Feature Matrix Generation

    Generate complete feature matrix:

    Iterate All Hardforks

    Process each hardfork:

    Find Feature Introduction

    Find when feature was introduced:

    Network Configuration

    Get supported hardfork range:

    Sorting

    Sort hardforks chronologically:

    Comparison with allNames

    allIds():
    • Returns BrandedHardfork[] constants
    • Type-safe, can call methods directly
    • Better for programmatic use
    allNames():
    • Returns string[] names
    • Better for display/UI
    • Requires parsing back to hardfork

    Performance

    Time Complexity: O(n) where n = number of hardforks (19) Typical Time: ~100-200ns (returns pre-allocated array)

    See Also

    • allNames - Get hardfork names as strings
    • range - Get hardforks between two versions
    • compare - Sort hardforks chronologically