proc/worker/client.go
func (w *Worker) ClientAfterOfferingPopUp(job *data.Job) error {
	logger := w.logger.Add("method", "ClientAfterOfferingPopUp", "job", job)

	ethLog, err := w.ethLog(logger, job)
	if err != nil {
		return err
	}

	logger = logger.Add("ethLog", ethLog)

	logOfferingPopUp, err := extractLogOfferingPopUp(logger, ethLog)
	if err != nil {
		return err
	}

	offering := data.Offering{}
	hash := data.HexFromBytes(logOfferingPopUp.offeringHash.Bytes())
	err = w.db.FindOneTo(&offering, "hash", hash)
	if err == sql.ErrNoRows {
		// New offering.
		return w.clientRetrieveAndSaveOffering(logger, job,
			ethLog.Block, logOfferingPopUp.somcType,
			logOfferingPopUp.somcData, logOfferingPopUp.agentAddr,
			logOfferingPopUp.offeringHash, logOfferingPopUp.currentSupply)
	}
	if err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	// Existing offering, just update offering status.
	offering.BlockNumberUpdated = ethLog.Block
	offering.Status = data.OfferPoppedUp

	return w.saveRecord(logger, w.db.Querier, &offering)
}
func (w *Worker) ClientAfterOfferingPopUp(job *data.Job) error {
	logger := w.logger.Add("method", "ClientAfterOfferingPopUp", "job", job)

	ethLog, err := w.ethLog(logger, job)
	if err != nil {
		return err
	}

	logger = logger.Add("ethLog", ethLog)

	logOfferingPopUp, err := extractLogOfferingPopUp(logger, ethLog)
	if err != nil {
		return err
	}

	offering := data.Offering{}
	hash := data.HexFromBytes(logOfferingPopUp.offeringHash.Bytes())
	err = w.db.FindOneTo(&offering, "hash", hash)
	if err == sql.ErrNoRows {
		// New offering.
		return w.clientRetrieveAndSaveOffering(logger, job,
			ethLog.Block, logOfferingPopUp.somcType,
			logOfferingPopUp.somcData, logOfferingPopUp.agentAddr,
			logOfferingPopUp.offeringHash, logOfferingPopUp.currentSupply)
	}
	if err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	// Existing offering, just update offering status.
	offering.BlockNumberUpdated = ethLog.Block
	offering.Status = data.OfferPoppedUp

	return w.saveRecord(logger, w.db.Querier, &offering)
}
// ClientAfterOfferingPopUp updates offering in db or retrieves from somc
// if new.