LayerMarket Protocol
  • Welcome
  • Getting Started
    • Quick Links
    • How to use
    • Table of contents
    • Introduction
  • Key Features
    • Seller KYC Verification
    • Comprehensive Marketplace
    • Gasless Product Listings
    • Secure Payment & Escrow
    • Product Verification
    • Dispute Management
    • Search & Reviews
    • Activity Earnings
  • Contracts
    • Fees
    • Products
    • PurchaseEscrow
    • RatingsReviews
    • Treasury
    • Validators
    • Rewards
    • Addresses
  • Expansion Strategy
    • Overview
    • Digital Products
    • Physical Goods
    • Strategic Partnerships
    • Services
  • Utility Token Design
    • Overview
    • Locking
    • Governance
    • Fee Discounts
    • Fee Distribution
    • Exclusive Access
  • Conclusion
    • Overview
  • Support
    • Contact Us
Powered by GitBook
On this page
  1. Contracts

RatingsReviews

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

/**
 * @title IRatingsReviews
 * @dev Interface for managing ratings and reviews for sellers in a decentralized marketplace.
 */
interface IRatingsReviews {

    /**
     * @dev Emitted when a review is submitted.
     * @param seller The address of the seller being reviewed.
     * @param buyer The address of the buyer submitting the review.
     * @param rating The rating given by the buyer.
     */
    event ReviewSubmitted(address indexed seller, address indexed buyer, uint256 indexed rating);

    /**
     * @dev Emitted when the rewards address is updated.
     * @param newAddress The new rewards address.
     */
    event RewardsAddressUpdated(address indexed newAddress);

    /**
     * @notice Submits a rating and review for a seller.
     * @param seller The address of the seller being reviewed.
     * @param rating The rating given by the buyer.
     */
    function submitRatingAndReview(address seller, uint256 rating) external;

    /**
     * @notice Retrieves the average rating for a seller.
     * @param seller The address of the seller.
     * @return averageRating The average rating of the seller.
     */
    function getAverageRating(address seller) external view returns (uint256);

    /**
     * @notice Updates the rewards address.
     * @param newAddress The new rewards address.
     */
    function updateRewardsAddress(address newAddress) external;
}
PreviousPurchaseEscrowNextTreasury

Last updated 11 months ago