/
cToken.sol
47 lines (42 loc) · 1.11 KB
/
cToken.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
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;
import "./ERC20.sol";
import "./ERC20Detailed.sol";
import "./Owned.sol";
import "./State.sol";
import "./Pausable.sol";
contract CToken is Owned, State, Pausable, ERC20, ERC20Detailed {
/**
* @notice Construct a new STableToken
*/
constructor(address _associatedContract)
public
Owned(msg.sender)
State(_associatedContract)
ERC20Detailed("cToken", "cToken", 8)
{}
/**
* @notice Only associatedContract can do it
* @param receiver The address be sended
* @param amount The number of token be sended
*/
function mint(address receiver, uint256 amount)
external
notPaused
onlyAssociatedContract
{
_mint(receiver, amount);
}
/**
* @notice Only associatedContract can do it
* @param account The address of holder
* @param amount The number of token be burned
*/
function burn(address account, uint256 amount)
external
notPaused
onlyAssociatedContract
{
_burn(account, amount);
}
}