HasNoTokens.sol 770 B

12345678910111213141516171819202122232425262728
  1. pragma solidity ^0.4.23;
  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 {
  18. from_;
  19. value_;
  20. data_;
  21. revert();
  22. }
  23. }