ens-usernames/contracts/token/TestToken.sol

31 lines
742 B
Solidity
Raw Normal View History

pragma solidity ^0.4.24;
2018-05-07 23:38:01 -03:00
import "./StandardToken.sol";
import "./ApproveAndCallFallBack.sol";
2018-05-07 23:38:01 -03:00
/**
* @notice ERC20Token for test scripts, can be minted by anyone.
*/
contract TestToken is StandardToken {
2018-05-07 23:38:01 -03:00
constructor() public { }
/**
* @notice any caller can mint any `_amount`
2018-05-07 23:38:01 -03:00
* @param _amount how much to be minted
*/
function mint(uint256 _amount) public {
mint(msg.sender, _amount);
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
external
returns (bool success)
{
approve(msg.sender, _spender, _value);
ApproveAndCallFallBack(_spender).receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
2018-05-07 23:38:01 -03:00
}