Files
assetxContracts/contracts/ytLp/tokens/WUSD.sol

60 lines
1.7 KiB
Solidity
Raw Normal View History

2025-12-18 13:07:35 +08:00
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
/**
* @title WUSD
* @notice Wrapped USD - ERC20代币
*/
contract WUSD is Initializable, ERC20Upgradeable, UUPSUpgradeable, OwnableUpgradeable {
2025-12-23 14:05:41 +08:00
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
2025-12-18 13:07:35 +08:00
/**
* @notice
* @param _name
* @param _symbol
*/
function initialize(string memory _name, string memory _symbol) external initializer {
__ERC20_init(_name, _symbol);
__UUPSUpgradeable_init();
__Ownable_init(msg.sender);
}
/**
* @notice owner可调用
* @param newImplementation
*/
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
/**
* @notice
* @param _to
* @param _amount
*/
function mint(address _to, uint256 _amount) external onlyOwner {
_mint(_to, _amount);
}
/**
* @notice
* @param _from
* @param _amount
*/
function burn(address _from, uint256 _amount) external onlyOwner {
_burn(_from, _amount);
}
/**
* @dev
*/
uint256[50] private __gap;
}