-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbHermesBoost.sol
36 lines (28 loc) · 1.02 KB
/
bHermesBoost.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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Ownable} from "solady/auth/Ownable.sol";
import {ERC20} from "solmate/tokens/ERC20.sol";
import {ERC20Boost} from "@ERC20/ERC20Boost.sol";
import {IbHermesUnderlying} from "../interfaces/IbHermesUnderlying.sol";
/**
* @title bHermesBoost: Earns rights to boosted Hermes yield
* @author Maia DAO (https://github.com/Maia-DAO)
* @notice An ERC20 with an embedded attachment mechanism to
* keep track of boost allocations to gauges.
*/
contract bHermesBoost is ERC20Boost, IbHermesUnderlying {
/// @inheritdoc IbHermesUnderlying
address public immutable bHermes;
constructor(address _owner) ERC20("bHermes Boost", "bHERMES-B", 18) {
_initializeOwner(_owner);
bHermes = msg.sender;
}
/// @inheritdoc IbHermesUnderlying
function mint(address to, uint256 amount) external onlybHermes {
_mint(to, amount);
}
modifier onlybHermes() {
if (msg.sender != bHermes) revert NotbHermes();
_;
}
}