contract IsContract {
    /*
    * NOTE: this should NEVER be used for authentication
    * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).
    *
    * This is only intended to be used as a sanity check that an address is actually a contract,
    * RATHER THAN an address not being a contract.
    */
    function isContract(address _target) internal view returns (bool) {
        if (_target == address(0)) {
            return false;
        }

        uint256 size;
        assembly { size := extcodesize(_target) }
        return size > 0;
    }
}
function isContract(address _target) internal view returns (bool) {
    if (_target == address(0)) {
        return false;
    }

    uint256 size;
    assembly { size := extcodesize(_target) }
    return size > 0;
}

/*
 * NOTE: this should NEVER be used for authentication
 * (see pitfalls: https://github.com/fergarrui/ethereum-security/tree/master/contracts/extcodesize).
 *
 * This is only intended to be used as a sanity check that an address is actually a contract,
 * RATHER THAN an address not being a contract.
 */