-
Notifications
You must be signed in to change notification settings - Fork 171
/
Reserve.sol
39 lines (28 loc) · 956 Bytes
/
Reserve.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
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.5.0 <0.7.0;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./ReserveInterface.sol";
import "../prize-pool/PrizePoolInterface.sol";
/// @title Interface that allows a user to draw an address using an index
contract Reserve is OwnableUpgradeable, ReserveInterface {
event ReserveRateMantissaSet(uint256 rateMantissa);
uint256 public rateMantissa;
constructor () public {
__Ownable_init();
}
function setRateMantissa(
uint256 _rateMantissa
)
external
onlyOwner
{
rateMantissa = _rateMantissa;
emit ReserveRateMantissaSet(rateMantissa);
}
function withdrawReserve(address prizePool, address to) external onlyOwner returns (uint256) {
return PrizePoolInterface(prizePool).withdrawReserve(to);
}
function reserveRateMantissa(address) external view override returns (uint256) {
return rateMantissa;
}
}