-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDummyToken.sol
More file actions
29 lines (20 loc) · 820 Bytes
/
DummyToken.sol
File metadata and controls
29 lines (20 loc) · 820 Bytes
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
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
import "./owner/Operator.sol";
contract DummyToken is ERC20Burnable, Operator {
constructor() public ERC20("DummyToken", "DUMMY") {}
function mint(address recipient_, uint256 amount_) public onlyOperator returns (bool) {
uint256 balanceBefore = balanceOf(recipient_);
_mint(recipient_, amount_);
super.burnFrom(recipient_, amount_);
uint256 balanceAfter = balanceOf(recipient_);
return balanceAfter > balanceBefore;
}
function burn(uint256 amount) public override {
super.burn(amount);
}
function burnFrom(address account, uint256 amount) public override onlyOperator {
super.burnFrom(account, amount);
}
}