HasNoTokens.sol 801 B

1234567891011121314151617181920212223242526272829303132333435
  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(
  18. address _from,
  19. uint256 _value,
  20. bytes _data
  21. )
  22. external
  23. pure
  24. {
  25. _from;
  26. _value;
  27. _data;
  28. revert();
  29. }
  30. }