-
Notifications
You must be signed in to change notification settings - Fork 8
/
MINTR.sol
40 lines (31 loc) · 1.24 KB
/
MINTR.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
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.15;
import {OlympusERC20Token as OHM} from "src/external/OlympusERC20.sol";
import "src/Kernel.sol";
/// @notice Wrapper for minting and burning functions of OHM token.
contract OlympusMinter is Module {
OHM public immutable ohm;
/*//////////////////////////////////////////////////////////////
MODULE INTERFACE
//////////////////////////////////////////////////////////////*/
constructor(Kernel kernel_, address ohm_) Module(kernel_) {
ohm = OHM(ohm_);
}
/// @inheritdoc Module
function KEYCODE() public pure override returns (Keycode) {
return toKeycode("MINTR");
}
/// @inheritdoc Module
function VERSION() external pure override returns (uint8 major, uint8 minor) {
return (1, 0);
}
/*//////////////////////////////////////////////////////////////
CORE LOGIC
//////////////////////////////////////////////////////////////*/
function mintOhm(address to_, uint256 amount_) public permissioned {
ohm.mint(to_, amount_);
}
function burnOhm(address from_, uint256 amount_) public permissioned {
ohm.burnFrom(from_, amount_);
}
}