Package com.norswap.nanoeth.versions
Enum EthereumVersion
- All Implemented Interfaces:
- Serializable,- Comparable<EthereumVersion>,- Constable
public enum EthereumVersion extends Enum<EthereumVersion>
Enumeration of Ethereum's "versions": the hard forks that were rolled out during the chain's
 history.
 
Note that the CONSTANTINOPLE fork also includes the St-Petersburg hard fork at the
 same block height, which removes EIP-1283, which was only rolled out on the testnets.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants Enum Constant Description BERLINBYZANTIUMCONSTANTINOPLEDAO_FORKFRONTIERFRONTIER_THAWINGHOMESTEADISTANBULLONDONMUIR_GLACIERPETERSBURGSPURIOUS_DRAGONTANGERINE_WHISTLE
- 
Field SummaryFields Modifier and Type Field Description intstartBlockBlock height where the fork took effect.
- 
Method SummaryModifier and Type Method Description booleancontains(int blockHeight)Returns true iff the given block height is "within" this version: after or on its start block, but before the start block of the next version.booleancontains(Natural blockHeight)Returns true if the given block height is "within" this version: after or on its start block, but before the start block of the next version.booleanisFuture()Returns true iff the current block height (Context.blockHeight) is lower than the initial block height (startBlock) of this version.booleanisPast()Returns true iff the current block height (Context.blockHeight) is higher or equal than the initial block height (startBlock) of this version.booleanstartsBefore(int blockHeight)Returns true iff the start block of this version is before the given block height.booleanstartsBefore(Natural blockHeight)Returns true iff the start block of this version is before the given block height.static EthereumVersionvalueOf(String name)Returns the enum constant of this type with the specified name.static EthereumVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
- 
Enum Constant Details- 
FRONTIER
- 
FRONTIER_THAWING
- 
HOMESTEAD
- 
DAO_FORK
- 
TANGERINE_WHISTLE
- 
SPURIOUS_DRAGON
- 
BYZANTIUM
- 
CONSTANTINOPLE
- 
PETERSBURG
- 
ISTANBUL
- 
MUIR_GLACIER
- 
BERLIN
- 
LONDON
 
- 
- 
Field Details- 
startBlockpublic final int startBlockBlock height where the fork took effect.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
 
- 
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
isFuturepublic boolean isFuture()Returns true iff the current block height (Context.blockHeight) is lower than the initial block height (startBlock) of this version.
- 
isPastpublic boolean isPast()Returns true iff the current block height (Context.blockHeight) is higher or equal than the initial block height (startBlock) of this version.
- 
startsBeforepublic boolean startsBefore(int blockHeight)Returns true iff the start block of this version is before the given block height.
- 
startsBeforeReturns true iff the start block of this version is before the given block height.
- 
containspublic boolean contains(int blockHeight)Returns true iff the given block height is "within" this version: after or on its start block, but before the start block of the next version.
- 
containsReturns true if the given block height is "within" this version: after or on its start block, but before the start block of the next version.
 
-