async process(block, event) {
    if (!this.config.marketplace) {
      return null
    }

    const details = await this._getDetails(block, event)

    // On both listing and offer event, index the listing.
    // Notes:
    //  - Reason for also re-indexing on offer event is that the listing data includes
    // list of all events relevant to the listing.
    //  - We index both in DB and ES. DB is the ground truth for data and
    // ES is used for full-text search use cases.
    await this._indexListing(block, event, details)

    // On offer event, index the offer in the DB.
    if (isOfferEvent(event.event)) {
      await this._indexOffer(block, event, details)
    }

    if (this.config.growth) {
      await this._recordGrowthEvent(block, event, details)
    }

    return details
  }
/**
   * Main entry point for the MarketplaceHandler.
   * @param block
   * @param event
   * @returns {Promise<
   *    {listing: Listing, seller: User}|
   *    {listing: Listing, offer: Offer, seller: User, buyer: User}>}
   */
Main entry point for the MarketplaceHandler.
Main entry point for the MarketplaceHandler .
async process(block, event) {
    if (!this.config.marketplace) {
      return null
    }
    const details = await this._getDetails(block, event)
    await this._indexListing(block, event, details)
    if (isOfferEvent(event.event)) {
      await this._indexOffer(block, event, details)
    }
    if (this.config.growth) {
      await this._recordGrowthEvent(block, event, details)
    }
    return details
  }
async process ( block , event ) { if ( ! this . config . marketplace ) { return null } const details = await this . _getDetails ( block , event ) await this . _indexListing ( block , event , details ) if ( isOfferEvent ( event . event ) ) { await this . _indexOffer ( block , event , details ) } if ( this . config . growth ) { await this . _recordGrowthEvent ( block , event , details ) } return details }
Main entry point for the MarketplaceHandler.
Main entry point for the MarketplaceHandler .
// On both listing and offer event, index the listing. // Notes: //  - Reason for also re-indexing on offer event is that the listing data includes // list of all events relevant to the listing. //  - We index both in DB and ES. DB is the ground truth for data and // ES is used for full-text search use cases. // On offer event, index the offer in the DB.