2018-05-08 02:38:01 +00:00
|
|
|
pragma solidity ^0.4.23;
|
|
|
|
|
|
|
|
import "./StandardToken.sol";
|
2018-08-15 15:14:13 +00:00
|
|
|
import './ApprovalReceiver.sol';
|
2018-05-08 02:38:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @notice ERC20Token for test scripts, can be minted by anyone.
|
|
|
|
*/
|
|
|
|
contract TestToken is StandardToken {
|
2018-08-14 19:30:26 +00:00
|
|
|
|
2018-05-08 02:38:01 +00:00
|
|
|
constructor() public { }
|
|
|
|
|
|
|
|
/**
|
2018-08-14 19:30:26 +00:00
|
|
|
* @notice any caller can mint any `_amount`
|
2018-05-08 02:38:01 +00:00
|
|
|
* @param _amount how much to be minted
|
|
|
|
*/
|
|
|
|
function mint(uint256 _amount) public {
|
|
|
|
mint(msg.sender, _amount);
|
|
|
|
}
|
2018-08-14 19:30:26 +00:00
|
|
|
|
2018-08-15 15:14:13 +00:00
|
|
|
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
|
|
|
|
assert(approve(_spender, _value));
|
|
|
|
return ApprovalReceiver(_spender).receiveApproval(msg.sender, _value, this, _extraData);
|
2018-08-14 19:30:26 +00:00
|
|
|
}
|
|
|
|
|
2018-05-08 02:38:01 +00:00
|
|
|
}
|