diff --git a/validator/accounts/accounts_exit.go b/validator/accounts/accounts_exit.go index a3b0a162e..01caed6c1 100644 --- a/validator/accounts/accounts_exit.go +++ b/validator/accounts/accounts_exit.go @@ -171,11 +171,15 @@ func displayExitInfo(rawExitedKeys [][]byte, trimmedExitedKeys []string) { } func formatBeaconChaURL(key []byte) string { - // TODO: Add URLs for PulseChain explorer. baseURL := "https://%sbeaconcha.in/validator/%s" + pulseChainURL := "https://%s.pulsechain.com/validator/%s" keyWithout0x := hexutil.Encode(key)[2:] switch env := params.BeaconConfig().ConfigName; env { + case params.PulseChainName: + return fmt.Sprintf(pulseChainURL, "beacon", keyWithout0x) + case params.PulseChainTestnetV4Name: + return fmt.Sprintf(pulseChainURL, "beacon.v4.testnet", keyWithout0x) case params.PraterName, params.GoerliName: return fmt.Sprintf(baseURL, "prater.", keyWithout0x) case params.HoleskyName: diff --git a/validator/accounts/accounts_exit_test.go b/validator/accounts/accounts_exit_test.go index 6d9fd98fb..572601235 100644 --- a/validator/accounts/accounts_exit_test.go +++ b/validator/accounts/accounts_exit_test.go @@ -39,6 +39,14 @@ func TestDisplayExitInfo(t *testing.T) { params.BeaconConfig().ConfigName = params.SepoliaName displayExitInfo([][]byte{key}, []string{string(key)}) assert.LogsContain(t, logHook, "https://sepolia.beaconcha.in/validator/3078313233343536") + + params.BeaconConfig().ConfigName = params.PulseChainName + displayExitInfo([][]byte{key}, []string{string(key)}) + assert.LogsContain(t, logHook, "https://beacon.pulsechain.com/validator/3078313233343536") + + params.BeaconConfig().ConfigName = params.PulseChainTestnetV4Name + displayExitInfo([][]byte{key}, []string{string(key)}) + assert.LogsContain(t, logHook, "https://beacon.v4.testnet.pulsechain.com/validator/3078313233343536") } func TestDisplayExitInfo_NoKeys(t *testing.T) {