-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathIUtilityManager.sol
105 lines (77 loc) · 4.41 KB
/
IUtilityManager.sol
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {bHermesBoost} from "../tokens/bHermesBoost.sol";
import {bHermesGauges} from "../tokens/bHermesGauges.sol";
import {bHermesVotes as ERC20Votes} from "../tokens/bHermesVotes.sol";
/**
* @title Utility Tokens Manager Contract.
* @author Maia DAO (https://github.com/Maia-DAO)
* @notice When implemented, this contract allows for the management
* of bHermes utility tokens.
*/
interface IUtilityManager {
/*//////////////////////////////////////////////////////////////
UTILITY MANAGER STATE
//////////////////////////////////////////////////////////////*/
/// @notice bHermes Underlying Token responsible for allocating gauge weights.
function gaugeWeight() external view returns (bHermesGauges);
/// @notice bHermes Underlying Token for user boost accounting.
function gaugeBoost() external view returns (bHermesBoost);
/// @notice bHermes Underlying Token which grants governance rights.
function governance() external view returns (ERC20Votes);
/// @notice Mapping of different user's bHermes Gauge Weight withdrawn from vault.
function userClaimedWeight(address) external view returns (uint256);
/// @notice Mapping of different user's bHermes Boost withdrawn from vault.
function userClaimedBoost(address) external view returns (uint256);
/// @notice Mapping of different user's bHermes Governance withdrawn from vault.
function userClaimedGovernance(address) external view returns (uint256);
/*///////////////////////////////////////////////////////////////
UTILITY TOKENS LOGIC
//////////////////////////////////////////////////////////////*/
/// @notice Forfeits the same amounts of multiple utility tokens.
function forfeitMultiple(uint256 amount) external;
/// @notice Forfeits multiple amounts of multiple utility tokens.
function forfeitMultipleAmounts(uint256 weight, uint256 boost, uint256 _governance) external;
/// @notice Forfeits amounts of weight utility token.
/// @param amount The amount to send to partner manager
function forfeitWeight(uint256 amount) external;
/// @notice Forfeits amounts of boost utility token.
/// @param amount The amount to send to partner manager
function forfeitBoost(uint256 amount) external;
/// @notice Forfeits amounts of governance utility token.
/// @param amount The amount to send to partner manager
function forfeitGovernance(uint256 amount) external;
/// @notice Claims the same amounts of multiple utility tokens.
function claimMultiple(uint256 amount) external;
/// @notice Claims multiple amounts of multiple utility tokens.
function claimMultipleAmounts(uint256 weight, uint256 boost, uint256 _governance) external;
/// @notice Claims amounts of weight utility token.
/// @param amount The amount to send to partner manager
function claimWeight(uint256 amount) external;
/// @notice Claims amounts of boost utility token.
/// @param amount The amount to send to partner manager
function claimBoost(uint256 amount) external;
/// @notice Claims amounts of governance utility token.
/// @param amount The amount to send to partner manager
function claimGovernance(uint256 amount) external;
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
/// @notice Emitted when a user forfeits weight.
event ForfeitWeight(address indexed user, uint256 amount);
/// @notice Emitted when a user forfeits boost.
event ForfeitBoost(address indexed user, uint256 amount);
/// @notice Emitted when a user forfeits governance.
event ForfeitGovernance(address indexed user, uint256 amount);
/// @notice Emitted when a user claims weight.
event ClaimWeight(address indexed user, uint256 amount);
/// @notice Emitted when a user claims boost.
event ClaimBoost(address indexed user, uint256 amount);
/// @notice Emitted when a user claims governance.
event ClaimGovernance(address indexed user, uint256 amount);
/*///////////////////////////////////////////////////////////////
ERRORS
//////////////////////////////////////////////////////////////*/
/// @notice Insufficient vault shares for action.
error InsufficientShares();
}