Skip to content

Commit

Permalink
feat(ethereum): add holesky constants (#1)
Browse files Browse the repository at this point in the history
Signed-off-by: Mehdi Bechiri <[email protected]>
  • Loading branch information
cebidhem authored Jan 16, 2024
1 parent 3357114 commit 61a94d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ethereum/consensus/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var (
PraterForkVersion = beaconcommon.Version{0x00, 0x00, 0x10, 0x20}
SepoliaForkVersion = beaconcommon.Version{0x90, 0x00, 0x00, 0x69}
RopstenForkVersion = beaconcommon.Version{0x80, 0x00, 0x00, 0x69}
HoleskyForkVersion = beaconcommon.Version{0x01, 0x01, 0x70, 0x00}
)

var forkVersions = map[string]beaconcommon.Version{
Expand All @@ -19,13 +20,15 @@ var forkVersions = map[string]beaconcommon.Version{
"goerli": PraterForkVersion, // we add goerli to facilitate correspondance with exec layer
"sepolia": SepoliaForkVersion,
"ropsten": RopstenForkVersion,
"holesky": HoleskyForkVersion,
}

var networks = map[string]string{
MainnetForkVersion.String(): "mainnet",
PraterForkVersion.String(): "prater",
SepoliaForkVersion.String(): "sepolia",
RopstenForkVersion.String(): "ropsten",
HoleskyForkVersion.String(): "holesky",
}

func ForkVersion(network string) (beaconcommon.Version, error) {
Expand Down
3 changes: 3 additions & 0 deletions ethereum/execution/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var (
RopstenChainID = "3"
GoerliChainID = "5"
SepoliaChainID = "11155111"
HoleskyChainID = "17000"
)

var chainIds = map[string]string{
Expand All @@ -15,13 +16,15 @@ var chainIds = map[string]string{
"goerli": GoerliChainID,
"sepolia": SepoliaChainID,
"ropsten": RopstenChainID,
"holesky": HoleskyChainID,
}

var networks = map[string]string{
MainnetChainID: "mainnet",
GoerliChainID: "goerli",
SepoliaChainID: "sepolia",
RopstenChainID: "ropsten",
HoleskyChainID: "holesky",
}

func ChainID(network string) (string, error) {
Expand Down

0 comments on commit 61a94d8

Please sign in to comment.