@chainsafe/lodestar-config
Advanced tools
Comparing version 0.38.0-dev.86b95a731d to 0.38.0-dev.97702a2af3
@@ -1,9 +0,20 @@ | ||
import { GENESIS_EPOCH, ForkName, SLOTS_PER_EPOCH } from "@chainsafe/lodestar-params"; | ||
import { GENESIS_EPOCH, ForkName, SLOTS_PER_EPOCH, ForkSeq } from "@chainsafe/lodestar-params"; | ||
import { ssz } from "@chainsafe/lodestar-types"; | ||
export * from "./types.js"; | ||
export function createIForkConfig(config) { | ||
const phase0 = { name: ForkName.phase0, epoch: GENESIS_EPOCH, version: config.GENESIS_FORK_VERSION }; | ||
const altair = { name: ForkName.altair, epoch: config.ALTAIR_FORK_EPOCH, version: config.ALTAIR_FORK_VERSION }; | ||
const phase0 = { | ||
name: ForkName.phase0, | ||
seq: ForkSeq.phase0, | ||
epoch: GENESIS_EPOCH, | ||
version: config.GENESIS_FORK_VERSION, | ||
}; | ||
const altair = { | ||
name: ForkName.altair, | ||
seq: ForkSeq.altair, | ||
epoch: config.ALTAIR_FORK_EPOCH, | ||
version: config.ALTAIR_FORK_VERSION, | ||
}; | ||
const bellatrix = { | ||
name: ForkName.bellatrix, | ||
seq: ForkSeq.bellatrix, | ||
epoch: config.BELLATRIX_FORK_EPOCH, | ||
@@ -35,2 +46,5 @@ version: config.BELLATRIX_FORK_VERSION, | ||
}, | ||
getForkSeq(slot) { | ||
return this.getForkInfo(slot).seq; | ||
}, | ||
getForkVersion(slot) { | ||
@@ -37,0 +51,0 @@ return this.getForkInfo(slot).version; |
@@ -1,5 +0,6 @@ | ||
import { ForkName } from "@chainsafe/lodestar-params"; | ||
import { ForkName, ForkSeq } from "@chainsafe/lodestar-params"; | ||
import { allForks, Epoch, Slot, Version } from "@chainsafe/lodestar-types"; | ||
export interface IForkInfo { | ||
name: ForkName; | ||
seq: ForkSeq; | ||
epoch: Epoch; | ||
@@ -22,2 +23,4 @@ version: Version; | ||
getForkName(slot: Slot): ForkName; | ||
/** Get the hard-fork sequence number at a given slot */ | ||
getForkSeq(slot: Slot): ForkSeq; | ||
/** Get the hard-fork version at a given slot */ | ||
@@ -24,0 +27,0 @@ getForkVersion(slot: Slot): Version; |
{ | ||
"name": "@chainsafe/lodestar-config", | ||
"version": "0.38.0-dev.86b95a731d", | ||
"version": "0.38.0-dev.97702a2af3", | ||
"description": "Chain configuration required for lodestar", | ||
@@ -69,7 +69,7 @@ "author": "ChainSafe Systems", | ||
"dependencies": { | ||
"@chainsafe/lodestar-params": "0.38.0-dev.86b95a731d", | ||
"@chainsafe/lodestar-types": "0.38.0-dev.86b95a731d", | ||
"@chainsafe/lodestar-params": "0.38.0-dev.97702a2af3", | ||
"@chainsafe/lodestar-types": "0.38.0-dev.97702a2af3", | ||
"@chainsafe/ssz": "^0.9.2" | ||
}, | ||
"gitHead": "bb20e1e7f742211d658807d76948503b4621bb5c" | ||
"gitHead": "0b7c94926785c7cea4e1467583ad8fcc965c2081" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66008
716
+ Added@chainsafe/lodestar-params@0.38.0-dev.97702a2af3(transitive)
+ Added@chainsafe/lodestar-types@0.38.0-dev.97702a2af3(transitive)
- Removed@chainsafe/lodestar-params@0.38.0-dev.86b95a731d(transitive)
- Removed@chainsafe/lodestar-types@0.38.0-dev.86b95a731d(transitive)