all files / contracts/interfaces/utils/ IPriceVerifier.sol

100% Statements 0/0
100% Branches 0/0
100% Functions 0/0
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60                                                                                                                       
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.6;
 
 
/**
 * @title IPriceVerifier
 * @author solace.fi
 * @notice Verifies token price.
*/
interface IPriceVerifier {
 
    /***************************************
    EVENTS
    ***************************************/
 
    /// @notice Emitted when a price signer is added.
    event PriceSignerAdded(address signer);
 
    /// @notice Emitted when a price signer is removed.
    event PriceSignerRemoved(address signer);
 
    /***************************************
    VIEW FUNCTIONS
    ***************************************/
 
    /**
     * @notice Verifies `SOLACE` price data.
     * @param token The token to verify price.
     * @param price The `SOLACE` price in wei(usd).
     * @param deadline The deadline for the price.
     * @param signature The `SOLACE` price signature.
    */
    function verifyPrice(address token, uint256 price, uint256 deadline, bytes calldata signature) external view returns (bool);
 
    /**
     * @notice Checks whether given signer is an authorized signer or not.
     * @param signer The price signer address to check.
     * @return bool True if signer is a authorized signer.
    */
    function isPriceSigner(address signer) external view returns (bool);
 
    /***************************************
    GOVERNANCE FUNCTIONS
    ***************************************/
 
    /**
     * @notice Adds a new price signer.
     * Can only be called by the current [**governor**](/docs/protocol/governance).
     * @param signer The signer to add.
    */
    function addPriceSigner(address signer) external;
 
    /**
     * @notice Removes a price signer.
     * Can only be called by the current [**governor**](/docs/protocol/governance).
     * @param signer The signer to remove.
    */
    function removePriceSigner(address signer) external;
}