update customERC20
This commit is contained in:
21
contracts/external/ERC20/CustomERC20.sol
vendored
21
contracts/external/ERC20/CustomERC20.sol
vendored
@@ -119,16 +119,6 @@ contract CustomERC20 is InitializableOwnable {
|
||||
emit Transfer(sender, recipient, amount);
|
||||
}
|
||||
|
||||
|
||||
//=================== Ownable ======================
|
||||
function mint(address user, uint256 value) external onlyOwner {
|
||||
require(isMintable, "NOT_MINTABEL_TOKEN");
|
||||
balances[user] = balances[user].add(value);
|
||||
totalSupply = totalSupply.add(value);
|
||||
emit Mint(user, value);
|
||||
emit Transfer(address(0), user, value);
|
||||
}
|
||||
|
||||
function burn(uint256 value) external {
|
||||
require(isMintable, "NOT_MINTABEL_TOKEN");
|
||||
require(balances[msg.sender] >= value, "VALUE_NOT_ENOUGH");
|
||||
@@ -139,6 +129,17 @@ contract CustomERC20 is InitializableOwnable {
|
||||
emit Transfer(msg.sender, address(0), value);
|
||||
}
|
||||
|
||||
//=================== Ownable ======================
|
||||
function mint(address user, uint256 value) external onlyOwner {
|
||||
require(isMintable, "NOT_MINTABEL_TOKEN");
|
||||
require(user == _OWNER_, "NOT_OWNER");
|
||||
|
||||
balances[user] = balances[user].add(value);
|
||||
totalSupply = totalSupply.add(value);
|
||||
emit Mint(user, value);
|
||||
emit Transfer(address(0), user, value);
|
||||
}
|
||||
|
||||
function changeTeamAccount(address newTeam) external onlyOwner {
|
||||
require(tradeFeeRatio > 0, "NOT_TRADE_FEE_TOKEN");
|
||||
emit ChangeTeam(team,newTeam);
|
||||
|
||||
Reference in New Issue
Block a user