73 lines
2.6 KiB
Solidity
73 lines
2.6 KiB
Solidity
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
pragma solidity >=0.7.0 <0.9.0;
|
|
|
|
// For compatibility, we're keeping the same function names as in the original Curve code, including the mixed-case
|
|
// naming convention.
|
|
// solhint-disable func-name-mixedcase
|
|
// solhint-disable func-param-name-mixedcase
|
|
|
|
interface ILiquidityGauge {
|
|
// solhint-disable-next-line var-name-mixedcase
|
|
event RelativeWeightCapChanged(uint256 new_relative_weight_cap);
|
|
|
|
/**
|
|
* @notice Returns BAL liquidity emissions calculated during checkpoints for the given user.
|
|
* @param user User address.
|
|
* @return uint256 BAL amount to issue for the address.
|
|
*/
|
|
function integrate_fraction(address user) external view returns (uint256);
|
|
|
|
/**
|
|
* @notice Record a checkpoint for a given user.
|
|
* @param user User address.
|
|
* @return bool Always true.
|
|
*/
|
|
function user_checkpoint(address user) external returns (bool);
|
|
|
|
/**
|
|
* @notice Returns true if gauge is killed; false otherwise.
|
|
*/
|
|
function is_killed() external view returns (bool);
|
|
|
|
/**
|
|
* @notice Kills the gauge so it cannot mint BAL.
|
|
*/
|
|
function killGauge() external;
|
|
|
|
/**
|
|
* @notice Unkills the gauge so it can mint BAL again.
|
|
*/
|
|
function unkillGauge() external;
|
|
|
|
/**
|
|
* @notice Sets a new relative weight cap for the gauge.
|
|
* The value shall be normalized to 1e18, and not greater than MAX_RELATIVE_WEIGHT_CAP.
|
|
* @param relativeWeightCap New relative weight cap.
|
|
*/
|
|
function setRelativeWeightCap(uint256 relativeWeightCap) external;
|
|
|
|
/**
|
|
* @notice Gets the relative weight cap for the gauge.
|
|
*/
|
|
function getRelativeWeightCap() external view returns (uint256);
|
|
|
|
/**
|
|
* @notice Returns the gauge's relative weight for a given time, capped to its relative weight cap attribute.
|
|
* @param time Timestamp in the past or present.
|
|
*/
|
|
function getCappedRelativeWeight(uint256 time) external view returns (uint256);
|
|
}
|