-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathMockTribalChief.sol
58 lines (50 loc) · 1.6 KB
/
MockTribalChief.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
pragma solidity ^0.8.0;
pragma solidity ^0.8.0;
contract MockTribalChief {
/// @dev allocation points of the pool
uint120 public poolAllocPoints;
/// @dev Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint;
/// @dev Amount of tribe to give out per block
uint256 private tribalChiefTribePerBlock;
constructor(
uint256 _tribalChiefTribePerBlock,
uint256 _totalAllocPoint,
uint120 _poolAllocPoints
) {
tribalChiefTribePerBlock = _tribalChiefTribePerBlock;
poolAllocPoints = _poolAllocPoints;
totalAllocPoint = _totalAllocPoint;
}
function poolInfo(
uint256 /* _index*/
)
external
view
returns (
uint256,
uint256,
uint128,
uint120,
bool
)
{
return (0, 0, 0, poolAllocPoints, false);
}
/// @notice Calculates and returns the `amount` of TRIBE per block.
function tribePerBlock() public view returns (uint256) {
return tribalChiefTribePerBlock;
}
/// @notice set the total alloc points
function setTotalAllocPoint(uint256 newTotalAllocPoint) external {
totalAllocPoint = newTotalAllocPoint;
}
/// @notice set the pool alloc points
function setPoolAllocPoints(uint120 newPoolAllocPoint) external {
poolAllocPoints = newPoolAllocPoint;
}
/// @notice set the tribe per block
function setTribePerBlock(uint256 newTribePerBlock) external {
tribalChiefTribePerBlock = newTribePerBlock;
}
}