HasNoTokens.sol 775 B

12345678910111213141516171819202122232425262728
  1. pragma solidity ^0.4.24;
  2. import "./CanReclaimToken.sol";
  3. /**
  4. * @title Contracts that should not own Tokens
  5. * @author Remco Bloemen <remco@2π.com>
  6. * @dev This blocks incoming ERC223 tokens to prevent accidental loss of tokens.
  7. * Should tokens (any ERC20Basic compatible) end up in the contract, it allows the
  8. * owner to reclaim the tokens.
  9. */
  10. contract HasNoTokens is CanReclaimToken {
  11. /**
  12. * @dev Reject all ERC223 compatible tokens
  13. * @param _from address The address that is transferring the tokens
  14. * @param _value uint256 the amount of the specified token
  15. * @param _data Bytes The data passed from the caller.
  16. */
  17. function tokenFallback(address _from, uint256 _value, bytes _data) external pure {
  18. _from;
  19. _value;
  20. _data;
  21. revert();
  22. }
  23. }