> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Hardfork.isAtLeast

> Check if hardfork is at least a target version (greater than or equal)

<Card title="Try it Live" icon="play" href="https://playground.tevm.sh?example=primitives/hardfork.ts">
  Run Hardfork examples in the interactive playground
</Card>

<Tabs />

## Chronological Ordering

Hardforks are ordered chronologically by deployment date:

```
FRONTIER (0) < HOMESTEAD (1) < DAO (2) < ... < CANCUN (16) < PRAGUE (17)
```

Comparison uses array index lookup, making it O(1) constant time.

## Usage Patterns

### Feature Gating

Check minimum version requirements:

```typescript theme={null}
import { Hardfork, LONDON } from 'tevm'

const fork = Hardfork(config.hardfork)

if (!fork.isAtLeast(LONDON)) {
  throw new Error("EIP-1559 requires London or later")
}

// Safe to use EIP-1559 features
```

### Network Configuration

Validate network compatibility:

```typescript theme={null}
import { Hardfork, SHANGHAI } from 'tevm'

function validateNetworkConfig(clientFork: BrandedHardfork, networkFork: BrandedHardfork) {
  if (!clientFork.isAtLeast(networkFork)) {
    throw new Error(
      `Client must support at least ${Hardfork.toString(networkFork)}, ` +
      `but only supports ${Hardfork.toString(clientFork)}`
    )
  }
}

validateNetworkConfig(SHANGHAI, LONDON)  // OK
validateNetworkConfig(LONDON, SHANGHAI)  // Throws error
```

### Transaction Type Selection

Select appropriate transaction format:

```typescript theme={null}
import { Hardfork, LONDON, CANCUN } from 'tevm'

function selectTxType(fork: BrandedHardfork): number {
  if (fork.isAtLeast(CANCUN)) {
    return 3  // Blob transaction
  }
  if (fork.isAtLeast(LONDON)) {
    return 2  // EIP-1559
  }
  return 0  // Legacy
}
```

## EIP References

Common minimum version checks:

| Feature           | Minimum Version | EIP                                                 |
| ----------------- | --------------- | --------------------------------------------------- |
| EIP-1559 base fee | London          | [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) |
| PUSH0 opcode      | Shanghai        | [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855) |
| Blob transactions | Cancun          | [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) |
| Transient storage | Cancun          | [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153) |
| Proof of Stake    | Merge           | [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675) |

## Performance

**Time Complexity:** O(1) - Array index comparison

**Typical Time:** \~10-20ns per call

## See Also

* [isBefore](/primitives/hardfork/is-before) - Check if strictly less than
* [isAfter](/primitives/hardfork/is-after) - Check if strictly greater than
* [compare](/primitives/hardfork/compare) - Three-way comparison
* [gte](/primitives/hardfork/gte) - Alias for isAtLeast
