diff --git a/core/eth/reader.go b/core/eth/reader.go index bf5aa5bb0d..bbb5e3bcb1 100644 --- a/core/eth/reader.go +++ b/core/eth/reader.go @@ -166,16 +166,18 @@ func (t *Reader) updateContractBindings(blsOperatorStateRetrieverAddr, eigenDASe return err } + var contractSocketRegistry *socketreg.ContractSocketRegistry socketRegistryAddr, err := contractIRegistryCoordinator.SocketRegistry(&bind.CallOpts{}) if err != nil { - t.logger.Error("Failed to fetch SocketRegistry address", "err", err) - return err - } - - contractSocketRegistry, err := socketreg.NewContractSocketRegistry(socketRegistryAddr, t.ethClient) - if err != nil { - t.logger.Error("Failed to fetch SocketRegistry contract", "err", err) - return err + t.logger.Warn("Failed to fetch SocketRegistry address", "err", err) + // TODO: don't panic until there is socket registry deployment + // return err + } else { + contractSocketRegistry, err = socketreg.NewContractSocketRegistry(socketRegistryAddr, t.ethClient) + if err != nil { + t.logger.Error("Failed to fetch SocketRegistry contract", "err", err) + return err + } } t.bindings = &ContractBindings{ @@ -678,6 +680,9 @@ func (t *Reader) GetReservationWindow(ctx context.Context) (uint32, error) { } func (t *Reader) GetOperatorSocket(ctx context.Context, operatorId core.OperatorID) (string, error) { + if t.bindings.SocketRegistry == nil { + return "", errors.New("socket registry not enabled") + } socket, err := t.bindings.SocketRegistry.GetOperatorSocket(&bind.CallOpts{ Context: ctx, }, [32]byte(operatorId))