converted if() throw convention to require()/assert()/revert()

This commit is contained in:
Peter Murray
2017-07-09 13:57:43 -04:00
committed by Francisco Giordano
parent f3867f8477
commit 18581f138f
17 changed files with 87 additions and 132 deletions

View File

@ -3,7 +3,7 @@ pragma solidity ^0.4.11;
import "./Ownable.sol";
import "../token/ERC20Basic.sol";
/**
/**
* @title Contracts that should not own Tokens
* @author Remco Bloemen <remco@2π.com>
* @dev This blocks incoming ERC23 tokens to prevent accidental loss of tokens.
@ -12,14 +12,14 @@ import "../token/ERC20Basic.sol";
*/
contract HasNoTokens is Ownable {
/**
/**
* @dev Reject all ERC23 compatible tokens
* @param from_ address The address that is transferring the tokens
* @param value_ uint256 the amount of the specified token
* @param data_ Bytes The data passed from the caller.
*/
function tokenFallback(address from_, uint256 value_, bytes data_) external {
throw;
revert();
}
/**