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

Validators

// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.24 and less than 0.9.0
pragma solidity ^0.8.24;


/**
 * @title IValidators
 * @dev Interface for managing validators in a decentralized system.
 * Validators are responsible for verifying the integrity and validity of actions within the system.
 */
interface IValidators {
    /// @notice Emitted when funds are deposited via fallback or receive function.
    /// @param sender The address of the sender who deposited the funds.
    /// @param amount The amount of funds deposited.
    event FundsReceived(address indexed sender, uint256 amount);
    

    /**
     * @dev Emitted when a new validator is assigned.
     * @param validator The address of the newly assigned validator.
     */
    event ValidatorAssigned(address indexed validator);

    /**
     * @dev Emitted when a validator is removed.
     * @param validator The address of the validator that was removed.
     */
    event ValidatorRemoved(address indexed validator);

    /**
     * @notice Assigns a new validator to the system.
     * @dev Adds a new address to the list of active validators.
     * @param validator The address to be assigned as a validator.
     */
    function assignValidator(address validator) external;

    /**
     * @notice Removes a validator from the system.
     * @dev Removes an address from the list of active validators.
     * @param validator The address of the validator to be removed.
     */
    function removeValidator(address validator) external;

    /**
     * @notice Checks if an address is a validator.
     * @dev Returns true if the given address is an active validator, false otherwise.
     * @param validator The address to check.
     * @return bool True if the address is an active validator, false otherwise.
     */
    function isValidator(address validator) external view returns (bool);
}
PreviousTreasuryNextRewards

Last updated 1 year ago