fix dropsV2

This commit is contained in:
owen05
2021-06-30 21:26:03 +08:00
parent fa5faaee39
commit bcdef561cf
2 changed files with 34 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ contract InitializableMintableERC20 is InitializableOwnable {
emit Transfer(address(0), _creator, _initSupply);
}
function transfer(address to, uint256 amount) public returns (bool) {
function transfer(address to, uint256 amount) public virtual returns (bool) {
require(to != address(0), "TO_ADDRESS_IS_EMPTY");
require(amount <= balances[msg.sender], "BALANCE_NOT_ENOUGH");
@@ -60,7 +60,7 @@ contract InitializableMintableERC20 is InitializableOwnable {
address from,
address to,
uint256 amount
) public returns (bool) {
) public virtual returns (bool) {
require(to != address(0), "TO_ADDRESS_IS_EMPTY");
require(amount <= balances[from], "BALANCE_NOT_ENOUGH");
require(amount <= allowed[from][msg.sender], "ALLOWANCE_NOT_ENOUGH");
@@ -72,7 +72,7 @@ contract InitializableMintableERC20 is InitializableOwnable {
return true;
}
function approve(address spender, uint256 amount) public returns (bool) {
function approve(address spender, uint256 amount) public virtual returns (bool) {
allowed[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;