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;
}
Last updated