ens-usernames/contracts/token/TestToken.sol
Ricardo Guilherme Schmidt 3d37a0a1c9
Update to use embark 6.0.0 (#99)
* trim trailing spaces

* update to embark 4.0.2

* bump to solc 0.5.4

* use .selector

* use solidity function selector

* update to embark 6.0.0

* use mocks instead of "instanceOf" tool+tests fix

* update to solidity 0.5.11

* update to solidity 0.5.11

* add spdx license identifiers

* update ENS contracts

* natspec fix return values
2020-07-24 19:16:01 -03:00

34 lines
795 B
Solidity

// SPDX-License-Identifier: CC0-1.0
pragma solidity 0.5.11;
import "./StandardToken.sol";
import "./ApproveAndCallFallBack.sol";
/**
* @notice ERC20Token for test scripts, can be minted by anyone.
*/
contract TestToken is StandardToken {
constructor() public { }
/**
* @notice any caller can mint any `_amount`
* @param _amount how much to be minted
*/
function mint(uint256 _amount) public {
mint(msg.sender, _amount);
}
function approveAndCall(address _spender, uint256 _value, bytes calldata _extraData)
external
returns (bool success)
{
approve(msg.sender, _spender, _value);
ApproveAndCallFallBack(_spender).receiveApproval(msg.sender, _value, address(this), _extraData);
return true;
}
}