// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.18; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "../utils/SomaContractUpgradeable.sol"; import "../SecurityTokens/extensions/ERC20Security.sol"; /** * @title SOMA Earn IOU Token. * @author SOMA.finance * @notice IOU token for the SomaEarn contract. */ contract SomaEarnToken is OwnableUpgradeable, ERC20Security { /** * @notice The associated Pool ID of the contract. */ bytes32 public poolId; /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } /** * @notice Initializer of the contract. * @param _poolId The pool ID of the contract. */ function initialize(bytes32 _poolId) external initializer { __Ownable_init_unchained(); // customizable name and symbol and decimals? __ERC20Security_init("SOMA", "Soma IOU Token", "s-iou"); poolId = _poolId; } /** * @notice Mints `amount` tokens to `to`. * @param to The address to receive the minted tokens. * @param amount The amount of tokens to mint. * @custom:requirement The function caller must be the owner of the contract. */ function mint(address to, uint256 amount) external onlyOwner { _mint(to, amount); } /** * @notice Burns `amount` tokens from `from`. * @param from The address to burn the tokens. * @param amount The amount of tokens to burn. * @custom:requirement The function caller must be the owner of the contract. */ function burn(address from, uint256 amount) external onlyOwner { _burn(from, amount); } /** * @notice Updates the required privileges of the contract. * @param newRequiredPrivileges The new required privileges of the contract. * @custom:requirement The function caller must be the owner of the contract. */ function updateRequiredPrivileges(bytes32 newRequiredPrivileges) external virtual override onlyOwner returns (bool) { _updateRequiredPrivileges(newRequiredPrivileges); return true; } }