Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mekong support #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions core/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func NetworkFromString(n string) Network {
return PraterNetwork
case string(HoleskyNetwork):
return HoleskyNetwork
case string(MekongNetwork):
return MekongNetwork
case string(MainNetwork):
return MainNetwork
default:
Expand All @@ -36,6 +38,8 @@ func (n Network) GenesisForkVersion() phase0.Version {
return phase0.Version{0x00, 0x00, 0x10, 0x20}
case HoleskyNetwork:
return phase0.Version{0x01, 0x01, 0x70, 0x00}
case MekongNetwork:
return phase0.Version{0x10, 0x58, 0x55, 0x57}
case MainNetwork:
return phase0.Version{0, 0, 0, 0}
default:
Expand All @@ -54,6 +58,9 @@ func (n Network) GenesisValidatorsRoot() phase0.Root {
case HoleskyNetwork:
rootBytes, _ := hex.DecodeString("9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1")
copy(genValidatorsRoot[:], rootBytes)
case MekongNetwork:
rootBytes, _ := hex.DecodeString("5c074f81fbc78dc7ba47460572a4286fffe989e9921abfd50791e01e4044d274")
copy(genValidatorsRoot[:], rootBytes)
case MainNetwork:
rootBytes, _ := hex.DecodeString("4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95")
copy(genValidatorsRoot[:], rootBytes)
Expand All @@ -72,6 +79,8 @@ func (n Network) DepositContractAddress() string {
return "0xff50ed3d0ec03ac01d4c79aad74928bff48a7b2b"
case HoleskyNetwork:
return "0x4242424242424242424242424242424242424242"
case MekongNetwork:
return "0x4242424242424242424242424242424242424242"
case MainNetwork:
return "0x00000000219ab540356cBB839Cbe05303d7705Fa"
default:
Expand All @@ -94,6 +103,8 @@ func (n Network) MinGenesisTime() uint64 {
return 1616508000
case HoleskyNetwork:
return 1695902400
case MekongNetwork:
return 1738603800 + 60 // genesis delay
case MainNetwork:
return 1606824023
default:
Expand Down Expand Up @@ -148,6 +159,9 @@ const (
// HoleskyNetwork represents the Holesky test network.
HoleskyNetwork Network = "holesky"

// MekongNetwork represents the Mekong test network.
MekongNetwork Network = "mekong"

// MainNetwork represents the main network.
MainNetwork Network = "mainnet"
)