Try it Live
Run Hardfork examples in the interactive playground
Operator-Style API
gt mimics the > operator for clearer code:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check if hardfork is strictly greater than target (alias for isAfter)
gt mimics the > operator for clearer code:
import { CANCUN, LONDON } from 'tevm'
// Operator-style (reads like > operator)
if (CANCUN.gt(LONDON)) {
// ...
}
// Equivalent semantic form
if (CANCUN.isAfter(LONDON)) {
// ...
}
import { Hardfork, CANCUN } from 'tevm'
const fork = Hardfork(config.hardfork)
if (fork.gt(CANCUN)) {
console.warn("Running unknown post-Cancun hardfork")
}
import { Hardfork, PRAGUE } from 'tevm'
function isExperimental(fork: BrandedHardfork): boolean {
return fork.gt(PRAGUE)
}
LONDON (11) < MERGE (14) < SHANGHAI (15) < CANCUN (16) < PRAGUE (17)
import { CANCUN } from 'tevm'
CANCUN.gt(CANCUN) // false - not strictly greater
Was this page helpful?
