diff --git a/cmd/main.go b/cmd/main.go index c675d45..8dd4935 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -96,7 +96,7 @@ func main() { eventsWatcherService := services.NewEventsWatcherService(veboAdapter, csModuleAdapter, csFeeDistributorAdapter, notifierAdapter) distributionLogUpdatedScannerService := services.NewDistributionLogUpdatedEventScanner(storageAdapter, notifierAdapter, executionAdapter, csFeeDistributorImplAdapter, networkConfig.CsFeeDistributorBlockDeployment, networkConfig.CSModuleTxReceipt) validatorExitRequestScannerService := services.NewValidatorExitRequestEventScanner(storageAdapter, notifierAdapter, veboAdapter, executionAdapter, beaconchainAdapter, networkConfig.VeboBlockDeployment, networkConfig.CSModuleTxReceipt) - validatorEjectorService := services.NewValidatorEjectorService(storageAdapter, notifierAdapter, exitValidatorAdapter, beaconchainAdapter) + validatorEjectorService := services.NewValidatorEjectorService(networkConfig.BeaconchaUrl, storageAdapter, notifierAdapter, exitValidatorAdapter, beaconchainAdapter) pendingHashesLoaderService := services.NewPendingHashesLoader(storageAdapter, notifierAdapter, ipfsAdapter, networkConfig.MinGenesisTime) // relaysCheckerService := services.NewRelayCronService(relaysAllowedAdapter, relaysUsedAdapter, notifierAdapter) diff --git a/internal/application/services/validatorEjector.go b/internal/application/services/validatorEjector.go index 32a25d1..3736086 100644 --- a/internal/application/services/validatorEjector.go +++ b/internal/application/services/validatorEjector.go @@ -11,6 +11,7 @@ import ( ) type ValidatorEjector struct { + beaconchaUrl string storagePort ports.StoragePort notifierPort ports.NotifierPort exitValidatorPort ports.ExitValidator @@ -18,8 +19,9 @@ type ValidatorEjector struct { servicePrefix string } -func NewValidatorEjectorService(storagePort ports.StoragePort, notifierPort ports.NotifierPort, exitValidatorPort ports.ExitValidator, beaconchainPort ports.Beaconchain) *ValidatorEjector { +func NewValidatorEjectorService(beaconchaUrl string, storagePort ports.StoragePort, notifierPort ports.NotifierPort, exitValidatorPort ports.ExitValidator, beaconchainPort ports.Beaconchain) *ValidatorEjector { return &ValidatorEjector{ + beaconchaUrl, storagePort, notifierPort, exitValidatorPort, @@ -176,7 +178,7 @@ func (ve *ValidatorEjector) EjectValidator() error { if validatorStatus == domain.StatusActiveExiting || validatorStatus == domain.StatusExitedUnslashed || validatorStatus == domain.StatusExitedSlashed { logger.InfoWithPrefix(ve.servicePrefix, "Validator %s has entered the exit queue", exitRequest.Event.ValidatorIndex) - message = fmt.Sprintf("- 🚪 Validator %s has entered the exit queue automatically, no manual action required", exitRequest.Event.ValidatorIndex) + message = fmt.Sprintf("- 🚪 Validator %s has entered the exit queue automatically, no manual action required. See details here: %s/validator/%s", exitRequest.Event.ValidatorIndex, ve.beaconchaUrl, exitRequest.Event.ValidatorIndex) if err := ve.notifierPort.SendNotification(message); err != nil { logger.ErrorWithPrefix(ve.servicePrefix, "Error sending exit notification", err) } diff --git a/internal/config/config_loader.go b/internal/config/config_loader.go index de03eee..579a258 100644 --- a/internal/config/config_loader.go +++ b/internal/config/config_loader.go @@ -21,6 +21,7 @@ type Config struct { CSMStakingModuleID *big.Int EtherscanURL string BeaconchainURL string + BeaconchaUrl string CSMUIURL string ApiPort uint64 @@ -153,6 +154,7 @@ func LoadNetworkConfig() (Config, error) { CSMStakingModuleID: big.NewInt(4), EtherscanURL: "https://holesky.etherscan.io", BeaconchainURL: beaconchainURL, + BeaconchaUrl: "https://holesky.beaconcha.in", CSMUIURL: "https://csm.testnet.fi", ApiPort: apiPort, CORS: parseCORS(corsEnv, []string{"http://ui.lido-csm-holesky.dappnode", "http://my.dappnode"}), @@ -191,6 +193,7 @@ func LoadNetworkConfig() (Config, error) { CSMStakingModuleID: big.NewInt(3), EtherscanURL: "https://etherscan.io", BeaconchainURL: beaconchainURL, + BeaconchaUrl: "https://beaconcha.in", CSMUIURL: "https://csm.lido.fi", ApiPort: apiPort, CORS: parseCORS(corsEnv, []string{"http://ui.lido-csm-mainnet.dappnode", "http://my.dappnode"}),