diff --git a/master_key_test.go b/master_key_test.go index 67bf586..bdd4627 100644 --- a/master_key_test.go +++ b/master_key_test.go @@ -29,12 +29,19 @@ func TestMasterKey(t *testing.T) { buf, err = master.DeriveChild(fmt.Sprintf("m/%v", i)) assert.Nil(t, err) + cred, err = NewCredential(buf, 0, nil, PyrmontSetting) assert.Nil(t, err) text, err = cred.MarshalText() assert.Nil(t, err) t.Log("pyrmont:", string(text)) + cred, err = NewCredential(buf, 0, nil, HoleskySetting) + assert.Nil(t, err) + text, err = cred.MarshalText() + assert.Nil(t, err) + t.Log("holesky:", string(text)) + buf.Destroy() } } diff --git a/settings.go b/settings.go index 9b4923d..ffcf543 100644 --- a/settings.go +++ b/settings.go @@ -16,12 +16,14 @@ const ( MAINNET = "mainnet" PYRMONT = "pyrmont" PRATER = "prater" + HOLESKY = "holesky" ) var ( MainnetSetting BaseChainSetting PyrmontSetting BaseChainSetting PraterSetting BaseChainSetting + HoleskySetting BaseChainSetting ) func init() { @@ -35,4 +37,8 @@ func init() { // Eth2 testnet (spec v1.0.1) PraterSetting.ETH2_NETWORK_NAME = PRATER binary.BigEndian.PutUint32(PraterSetting.GENESIS_FORK_VERSION[:], 0x00001020) + + // Holesky setting + HoleskySetting.ETH2_NETWORK_NAME = HOLESKY + binary.BigEndian.PutUint32(HoleskySetting.GENESIS_FORK_VERSION[:], 0x01017000) }