-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUSDZ.sol
53 lines (43 loc) · 1.21 KB
/
USDZ.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
48
49
50
51
52
53
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import './interfaces/IUSDZ.sol';
contract USDZ is ERC20, IUSDZ {
// contract with permission to mint/burn tokens
address public controller;
constructor(
address _controller,
string memory _name,
string memory _symbol
) ERC20(_name, _symbol) {
controller = _controller;
}
function mint(address _account, uint256 _amount)
external
override
onlyController()
{
_mint(_account, _amount);
emit Mint(_account, _amount);
}
function burn(address _account, uint256 _amount)
external
override
onlyController()
{
_burn(_account, _amount);
emit Burn(_account, _amount);
}
// Matching USDC's 6 decimals as USDZ will be pegged to USDC
function decimals() public view virtual override returns (uint8) {
return 6;
}
modifier onlyController() {
require(msg.sender == controller, "only controller has permission");
_;
}
}
contract TestFuzz is USDZ {
function echindna_testpass() public view returns (bool) {
return true;
} }