37 lines
1020 B
Solidity
37 lines
1020 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.20;
|
|
|
|
import "@openzeppelin-contracts/token/ERC20/extensions/ERC20Permit.sol";
|
|
|
|
import "./interfaces/IFTSO.sol";
|
|
import "./types/GhostAccessControlled.sol";
|
|
|
|
contract Fatso is ERC20Permit, IFTSO, GhostAccessControlled {
|
|
constructor(address _authority)
|
|
ERC20("Fatso", "FTSO")
|
|
ERC20Permit("Fatso")
|
|
GhostAccessControlled(IGhostAuthority(_authority))
|
|
{}
|
|
|
|
function decimals() public pure override returns (uint8) {
|
|
return 9;
|
|
}
|
|
|
|
function mint(address account, uint256 amount) external override onlyVault {
|
|
_mint(account, amount);
|
|
}
|
|
|
|
function burn(uint256 amount) external override {
|
|
_burn(msg.sender, amount);
|
|
}
|
|
|
|
function burnFrom(address account, uint256 amount) external override {
|
|
_burnFrom(account, amount);
|
|
}
|
|
|
|
function _burnFrom(address account, uint256 amount) internal {
|
|
_spendAllowance(account, _msgSender(), amount);
|
|
_burn(account, amount);
|
|
}
|
|
}
|