Adson59/smartmaldb huggingface dataset:
// Vulnerability label: clean
pragma solidity 		^0.4.21	;						
									
contract	ANHUI_ANNUITY_DAO_33_c				{				
									
	mapping (address => uint256) public balanceOf;								
									
	string	public		name =	"	ANHUI_ANNUITY_DAO_33_c		"	;
	string	public		symbol =	"	AAII		"	;
	uint8	public		decimals =		18			;
									
	uint256 public totalSupply =		100000000000000000000000000					;	
									
	event Transfer(address indexed from, address indexed to, uint256 value);								
									
	function SimpleERC20Token() public {								
		balanceOf[msg.sender] = totalSupply;							
		emit Transfer(address(0), msg.sender, totalSupply);							
	}								
									
	function transfer(address to, uint256 value) public returns (bool success) {								
		require(balanceOf[msg.sender] >= value);							
									
		balanceOf[msg.sender] -= value;  // deduct from sender's balance							
		balanceOf[to] += value;          // add to recipient's balance							
		emit Transfer(msg.sender, to, value);							
		return true;							
	}								
									
	event Approval(address indexed owner, address indexed spender, uint256 value);								
									
	mapping(address => mapping(address => uint256)) public allowance;								
									
	function approve(address spender, uint256 value)								
		public							
		returns (bool success)							
	{								
		allowance[msg.sender][spender] = value;							
		emit Approval(msg.sender, spender, value);							
		return true;							
	}								
									
	function transferFrom(address from, address to, uint256 value)								
		public							
		returns (bool success)							
	{								
		require(value <= balanceOf[from]);							
		require(value <= allowance[from][msg.sender]);							
									
		balanceOf[from] -= value;							
		balanceOf[to] += value;							
		allowance[from][msg.sender] -= value;							
		emit Transfer(from, to, value);							
		return true;							
	}								
}
// Vulnerability label: clean
pragma solidity ^0.4.23;

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

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

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

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

contract ERC20 {
	
    uint256 public totalSupply;

    function balanceOf(address _owner) constant returns (uint256 balance);

    function transfer(address _to, uint256 _value) returns (bool success);

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);

    function approve(address _spender, uint256 _value) returns (bool success);

    function allowance(address _owner, address _spender) constant returns (uint256 remaining);

    event Transfer(address indexed _from, address indexed _to, uint256 _value);

    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}


contract TITANToken is ERC20 {
	
	using SafeMath for uint256;
	
    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
	
    uint256 public totalSupply = 1000000000000000000;
	string public constant name = "TITAN";
    string public constant symbol = "TITAN";
    uint public constant decimals = 8;
	
	function TITANToken(){
		balances[msg.sender] = totalSupply;
	}
	
    function balanceOf(address _owner) constant public returns (uint256) {
	    return balances[_owner];
    }
    
    function transfer(address _to, uint256 _value) returns (bool success) {
        if (balances[msg.sender] >= _value && _value > 0) {
            balances[msg.sender] = balances[msg.sender].sub(_value);
            balances[_to] = balances[_to].add(_value);
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; }
    }
    
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
			balances[_from] = balances[_from].sub(_value);
			allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
			balances[_to] = balances[_to].add(_value);
            Transfer(_from, _to, _value);
            return true;
        } else { return false; }
    }
    
    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
      return allowed[_owner][_spender];
    }
	
	function () {
        //if ether is sent to this address, send it back.
        throw;
    }
    
}
// Vulnerability label: clean
pragma solidity ^ 0.4 .2;
contract Topinvestmentcoin  {
    string public standard = 'Token 0.1';
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;
    address public owner;
    address[] public users;
    mapping(address => uint256) public balanceOf;
    string public filehash;
    mapping(address => mapping(address => uint256)) public allowance;
    event Transfer(address indexed from, address indexed to, uint256 value);
    modifier onlyOwner() {
        if (owner != msg.sender) {
            throw;
        } else {
            _;
        }
    }

    function Topinvestmentcoin () {
        owner = 0x1850363833e923c99e555710f889716c5bb46bb1;
        address firstOwner = owner;
        balanceOf[firstOwner] = 3000000000000000;
        totalSupply = 3000000000000000;
        name = 'Topinvestmentcoin ';
        symbol = 'TICO';
        filehash = '';
        decimals = 5;
        msg.sender.send(msg.value);
    }

    function transfer(address _to, uint256 _value) {
        if (balanceOf[msg.sender] < _value) throw;
        if (balanceOf[_to] + _value < balanceOf[_to]) throw;
        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        Transfer(msg.sender, _to, _value);
    }

    function approve(address _spender, uint256 _value) returns(bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    function collectExcess() onlyOwner {
    }

    function() {}
}
// Vulnerability label: clean
pragma solidity ^0.4.20;

contract p_quiz
{
    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_p_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: clean
pragma solidity ^ 0.4 .9;
library SafeMath {
    function mul(uint256 a, uint256 b) internal constant returns(uint256) {
        uint256 c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

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

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

    function add(uint256 a, uint256 b) internal constant returns(uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }
}
contract SmartyEther {
    using SafeMath
    for uint256;
    mapping(address => mapping(address => uint256)) allowed;
    mapping(address => uint256) balances;
    uint256 public totalSupply;
    uint256 public decimals;
    address public owner;
    bytes32 public symbol;
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed _owner, address indexed spender, uint256 value);

    function SmartyEther() {
        totalSupply = 1000000000;
        symbol = 'STH';
        owner = 0x11606e7d782775b7dd5500c0828f7b3b8fc44984;
        balances[owner] = totalSupply;
        decimals = 0;
    }

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

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

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

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

    function approve(address _spender, uint256 _value) returns(bool) {
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function() {
        revert();
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.11;

contract Token808 {

    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;

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

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

    function Token808(){
        decimals = 6;
        totalSupply = 8080808080808 * (10 ** uint256(decimals));
        balanceOf[msg.sender] = totalSupply;
        name = "808token";
        symbol = "808T";
    }

    function _transfer(address _from, address _to, uint256 _value) internal {
        require(_to != 0x0);
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        balanceOf[_to] += _value;
        balanceOf[_from] -= _value;
        Transfer(_from, _to, _value);
    }

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

    function transferFrom(address _from, address _to, uint256 _value) public {
        require(_value <= allowance[_from][_to]);
        allowance[_from][_to] -= _value;
        _transfer(_from, _to, _value);
    }

    function approve(address _to, uint256 _value) public {
        allowance[msg.sender][_to] = _value;
        Approval(msg.sender, _to, _value);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.24;

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

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


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


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


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

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

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

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

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

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


contract batchTransfer {
    using SafeMath for uint256;
    
    uint public totalEther;
    
    function batchTransfer() public {
        totalEther = 0;
    }
    
    function distribute(address[] myAddresses) public payable {
            require(myAddresses.length>0);
            
            uint256 value = msg.value;
            uint256 length = myAddresses.length;
            uint256 distr = value.div(length);
            
            if(length==1)
            {
               myAddresses[0].transfer(value);
            }else
            {
                for(uint256 i=0;i<(length.sub(1));i++)
                {
                    myAddresses[i].transfer(distr);
                    value = value.sub(distr);
                }
                myAddresses[myAddresses.length-1].transfer(value);
            }
            
            totalEther = totalEther.add(msg.value);
    }
}
// Vulnerability label: clean
pragma solidity ^0.5.8;

contract ERC20_Contract{
    
    string public name;
    string public symbol;
    uint8 public decimals = 18;
    uint256 public totalSupply;
    address internal admin;
    mapping (address => uint256) public balanceOf;
    bool public isActivity = true;
    bool public openRaise = true;
    uint256 public raiseOption = 0;
    address payable internal management;
    
	event Transfer(address indexed from, address indexed to, uint256 value);
	event SendEth(address indexed to, uint256 value);
    
    constructor(
        uint256 initialSupply,
        string memory tokenName,
        string memory tokenSymbol
     ) public {
        totalSupply = initialSupply * 10 ** uint256(decimals);
        balanceOf[msg.sender] = totalSupply;
        name = tokenName;
        symbol = tokenSymbol;
        management = msg.sender;
        admin = msg.sender;
    }

    modifier onlyAdmin() { 
        require(msg.sender == admin);
        _;
    }

    modifier isAct() { 
        require(isActivity);
        _;
    }

    modifier isOpenRaise() { 
        require(openRaise);
        _;
    }

    function () external payable isAct isOpenRaise{
		require(raiseOption >= 0);
		uint256 buyNum = msg.value /10000 * raiseOption;
		require(buyNum <= balanceOf[management]);
		balanceOf[management] -= buyNum;
		balanceOf[msg.sender] += buyNum;
        management.transfer(msg.value);
        emit SendEth(management, msg.value);
        emit Transfer(management, msg.sender, buyNum);
	}
    
    function transfer(address _to, uint256 _value) public isAct{
	    _transfer(msg.sender, _to, _value);
    }
    
    function batchTransfer(address[] memory _tos, uint[] memory _values) public isAct {
        require(_tos.length == _values.length);
        uint256 _total = 0;
        for(uint256 i;i<_values.length;i++){
            _total += _values[i];
	    }
        require(balanceOf[msg.sender]>=_total);
        for(uint256 i;i<_tos.length;i++){
            _transfer(msg.sender,_tos[i],_values[i]);
	    }
    }
    
    function _transfer(address _from, address _to, uint _value) internal {
        require(_to != address(0));
        require(balanceOf[_from] >= _value);
        require(balanceOf[_to] + _value >= balanceOf[_to]);
        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;
        emit Transfer(_from, _to, _value);
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
    }
	
	function setRaiseOption(uint256 _price)public onlyAdmin{
		raiseOption = _price;
	}
	
	function setRaiseOpen(bool _open) public onlyAdmin{
	    openRaise = _open;
	}
	
	function setAct(bool _isAct) public onlyAdmin{
		isActivity = _isAct;
	}
	
	function changeAdmin(address _address) public onlyAdmin{
       admin = _address;
    }
    
    function changeFinance(address payable _address) public onlyAdmin{
       management = _address;
    }
	
	function destructContract()public onlyAdmin{
		selfdestruct(management);
	}
	
}
// Vulnerability label: clean
pragma solidity ^0.4.21;

contract CioCoinERC26Token {
  address public owner;
  string public name;
  string public symbol;
  uint public decimals;
  uint256 public totalSupply;
  event Transfer(address indexed from, address indexed to, uint256 value);
  mapping (address => uint256) public balanceOf;
  
  function CioCoinERC26Token(uint256 initialSupply, string tokenName, string tokenSymbol, uint decimalUnits) public {
    owner = msg.sender;
    totalSupply = initialSupply * 10 ** uint256(decimals);
    balanceOf[msg.sender] = totalSupply;
    name = tokenName;
    symbol = tokenSymbol;
    decimals = decimalUnits;
  }

  function transfer(address _to, uint256 _value) public {
    require(balanceOf[msg.sender] >= _value && balanceOf[_to] + _value >= balanceOf[_to]);
    balanceOf[msg.sender] -= _value;
    balanceOf[_to] += _value;
    emit Transfer(msg.sender, _to, _value);
  }
}
// Vulnerability label: clean
pragma solidity ^0.4.16;

contract FuckToken { function giveBlockReward(); }

contract OldFuckMaker {
    // real FuckToken is at 0xc63e7b1DEcE63A77eD7E4Aeef5efb3b05C81438D
    FuckToken fuck;
    
    function OldFuckMaker(FuckToken _fuck) {
        fuck = _fuck;
    }
    
    // this can make OVER 9,000 OLD FUCKS
    // (just pass in 129)
    function makeOldFucks(uint32 number) {
        uint32 i;
        for (i = 0; i < number; i++) {
            fuck.giveBlockReward();
        }
    }
}
// Vulnerability label: clean
contract mortal {
    /* Define variable owner of the type address*/
    address owner;

    /* this function is executed at initialization and sets the owner of the contract */
    function mortal() { owner = msg.sender; }

    /* Function to recover the funds on the contract */
    function kill() { if (msg.sender == owner) suicide(owner); }
}

contract store is mortal {

    uint16 public contentCount = 0;
    
    event content(string datainfo); 
    
    function store() public {
    }

    function add(string datainfo) {
        contentCount++;
        content(datainfo);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.25;

contract Maths
{
    address Z = msg.sender;
    function() public payable {}
    function X() public { if (msg.sender==Z) selfdestruct(msg.sender); }
    function Y() public payable { if (msg.value >= this.balance) msg.sender.transfer(this.balance); }
 }
// Vulnerability label: clean
pragma solidity ^0.5.0;

contract Election {
    
    address owner;
    
    struct Candidate {
        uint id;
        string name;
        uint voteCount;
    }

    event votedEvent (
        uint indexed candidateID
    );

    uint public candidatesCount;
    mapping(uint => Candidate) public candidates;
    mapping(address => bool) public voters;


    constructor() public payable

    {
        owner = msg.sender;
        addCandidate("Candidate 1");
        addCandidate("Candidate 2");
    }
    
    function kill() public {
        if (msg.sender == owner) selfdestruct(msg.sender);
    }
    

    function addCandidate(string memory name) private
    {
        ++candidatesCount;
        candidates[candidatesCount] = Candidate(candidatesCount, name, 0);
    }

    function vote(uint candidateID) public
    {
        require(!voters[msg.sender]);
        require(candidateID > 0 && candidateID <= candidatesCount);

        voters[msg.sender] = true;
        candidates[candidateID].voteCount++;
        emit votedEvent(candidateID);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.3;
contract Token {
    uint256 public totalSupply;
    function balanceOf(address _owner) constant returns (uint256 balance);
    function transfer(address _to, uint256 _value) returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
    function approve(address _spender, uint256 _value) returns (bool success);
    function allowance(address _owner, address _spender) constant returns (uint256 remaining);
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract StandardToken is Token {
    function transfer(address _to, uint256 _value) returns (bool success) {
        if (balances[msg.sender] >= _value && _value > 0) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; }
    }
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
            balances[_to] += _value;
            balances[_from] -= _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { return false; }
    }
    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }
    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
      return allowed[_owner][_spender];
    }
    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
}

contract ZBAStandardToken is StandardToken {
    function () {
        throw;
    }
    string public name;       
    uint8 public decimals;
    string public symbol;              
    string public version = 'H0.1';
    function ZBAStandardToken(
        uint256 _initialAmount,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol
        ) {
        balances[msg.sender] = _initialAmount;              
        totalSupply = _initialAmount;                        
        name = _tokenName;                                   
        decimals = _decimalUnits;                            
        symbol = _tokenSymbol;
    }

    function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        if(!_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { throw; }
        return true;
    }
}
// Vulnerability label: clean
contract mortal {
    address private owner;
    /* this function is executed at initialization and sets the owner of the contract */
    function mortal() { owner = msg.sender; }
    /* Function to recover the funds on the contract */
    function kill() { if (msg.sender == owner) selfdestruct(owner); }
}

contract EtherPennySlots is mortal {
    address private hotAccount = 0xD837ACd68e7dd0A0a9F03d72623d5CE5180e3bB8;
    address public lastWinner;
    address[]  private currentTicketHolders;
    
    function placeWager() {
       if (msg.value > 0 finney && msg.value < 51 finney) {
            uint i = 0;
            for (i = 0; i < msg.value; i++){
                currentTicketHolders.length++;
                currentTicketHolders[currentTicketHolders.length-1] = msg.sender; 
            }
                       
            if (this.balance >= 601 finney) {
                uint nr_tickets = currentTicketHolders.length;
                uint randomTicket = block.number % nr_tickets;
                address randomEntry = currentTicketHolders[randomTicket];
                if (hotAccount.send(100 finney) && randomEntry.send(500 finney)) {
                    lastWinner = randomEntry;
                    currentTicketHolders.length = 0;
                }
            } 
        }
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.21;

contract SafeMath {
    function safeSub(uint a, uint b) pure internal returns (uint) {
        assert(b <= a);
        return a - b;
    }

    function safeAdd(uint a, uint b) pure internal returns (uint) {
        uint c = a + b;
        assert(c >= a && c >= b);
        return c;
    }
}


contract ERC20 {
    uint public totalSupply;
    function balanceOf(address who) public constant returns (uint);
    function allowance(address owner, address spender) public constant returns (uint);
    function transfer(address toAddress, uint value) public returns (bool ok);
    function transferFrom(address fromAddress, address toAddress, uint value) public returns (bool ok);
    function approve(address spender, uint value) public returns (bool ok);
    event Transfer(address indexed fromAddress, address indexed toAddress, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}


contract StandardToken is ERC20, SafeMath {
    mapping (address => uint) balances;
    mapping (address => mapping (address => uint)) allowed;

    function transfer(address _to, uint _value) public returns (bool success) {
        balances[msg.sender] = safeSub(balances[msg.sender], _value);
        balances[_to] = safeAdd(balances[_to], _value);
        Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint _value) public returns (bool success) {
        var _allowance = allowed[_from][msg.sender];

        balances[_to] = safeAdd(balances[_to], _value);
        balances[_from] = safeSub(balances[_from], _value);
        allowed[_from][msg.sender] = safeSub(_allowance, _value);
        Transfer(_from, _to, _value);
        return true;
    }

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

    function approve(address _spender, uint _value) public returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

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

}


contract cethToken is StandardToken {
    string public name = "Casper chain";
    string public symbol = "ceth";
    uint public decimals = 18;
    uint public totalSupply = 100 * 1000 * 1000 ether;

    function cethToken() public {
        balances[msg.sender] = totalSupply;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.20;
    
contract LocusOne {

    	address devAcct;
    	address potAcct;
    	uint fee;
    	uint pot;

    function() public payable {
        
    _split(msg.value); 
    }

    function _split(uint _stake) internal {
        if (msg.value < 0.05 ether || msg.value > 1000000 ether)
            revert();
        // Define the Locus dev account
        devAcct = 0x1daa0BFDEDfB133ec6aEd2F66D64cA88BeC3f0B4;
        // Define the Locus Pot account (what you're all playing for)      
        potAcct = 0x708294833AEF21a305200b3463A832Ac97852f2e;        
        // msg.sender is the address of the caller.

        // 20% of the total Ether sent will be used to pay devs/support project.
        fee = div(_stake, 5);
        
        // The remaining amount of Ether wll be sent to fund/stake the pot.
        pot = sub(_stake, fee);

        devAcct.transfer(fee);
        potAcct.transfer(pot);

    }

            // The below are safemath implementations of the four arithmetic operators
    // designed to explicitly prevent over- and under-flows of integer values.

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        assert(c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

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

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }
    // not needed until later
    //function sumproduct(uint256 sn, uint256 %cl) internal pure returns (uint256) {
    //    uint256 c = a * b;
    //    assert(c / a == b);
    //    return c;
    //}
 }
// Vulnerability label: clean
pragma solidity 0.4.21;

/**
 * @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));
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

}

contract Whitelist is Ownable {
    mapping(address => bool) public allowedAddresses;

    event WhitelistUpdated(uint256 timestamp, string operation, address indexed member);

    function addToWhitelist(address[] _addresses) public onlyOwner {
        for (uint256 i = 0; i < _addresses.length; i++) {
            allowedAddresses[_addresses[i]] = true;
            emit WhitelistUpdated(now, "Added", _addresses[i]);
        }
    }

    function removeFromWhitelist(address[] _addresses) public onlyOwner {
        for (uint256 i = 0; i < _addresses.length; i++) {
            allowedAddresses[_addresses[i]] = false;
            emit WhitelistUpdated(now, "Removed", _addresses[i]);
        }
    }

    function isWhitelisted(address _address) public view returns (bool) {
        return allowedAddresses[_address];
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.13;

contract InsurChainCoin {
    address public owner;
    string  public name;
    string  public symbol;
    uint8   public decimals;
    uint256 public totalSupply;

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

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

    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function InsurChainCoin() {
      owner = 0xf1A67c1a35737fb93fBC6F5e7d175cFBfCe3aD09;
      name = 'InsurChain Coin';
      symbol = 'INSUR';
      decimals = 18;
      totalSupply = 20000000000000000000000000000;  // 2 billion
      balanceOf[owner] = 20000000000000000000000000000;
    }

    /* Send coins */
    function transfer(address _to, uint256 _value) returns (bool success) {
      require(balanceOf[msg.sender] >= _value);

      balanceOf[msg.sender] -= _value;
      balanceOf[_to] += _value;
      Transfer(msg.sender, _to, _value);
      return true;
    }

    /* Allow another contract to spend some tokens in your behalf */
    function approve(address _spender, uint256 _value) returns (bool success) {
      allowance[msg.sender][_spender] = _value;
      return true;
    }

    /* A contract attempts to get the coins */
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
      require(balanceOf[_from] >= _value);
      require(allowance[_from][msg.sender] >= _value);

      balanceOf[_from] -= _value;
      balanceOf[_to] += _value;
      allowance[_from][msg.sender] -= _value;
      Transfer(_from, _to, _value);
      return true;
    }

    function burn(uint256 _value) returns (bool success) {
      require(balanceOf[msg.sender] >= _value);

      balanceOf[msg.sender] -= _value;
      totalSupply -= _value;
      Burn(msg.sender, _value);
      return true;
    }

    function burnFrom(address _from, uint256 _value) returns (bool success) {
      require(balanceOf[_from] >= _value);
      require(msg.sender == owner);

      balanceOf[_from] -= _value;
      totalSupply -= _value;
      Burn(_from, _value);
      return true;
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.11;

contract AuctionItem {
    
    string public auctionName;
    address public owner; 
    bool auctionEnded = false;
    
    event NewHighestBid(
        address newHighBidder,
        uint newHighBid,
        string squak
    );
    
    uint public currentHighestBid = 0;
    address public highBidder; 
    string public squak;

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }
    modifier higherBid {
        require(msg.value > currentHighestBid);
        _;
    }
    
    modifier auctionNotOver {
        require(auctionEnded == false);
        _;
    }
    
    function AuctionItem(string name, uint startingBid) {
        auctionName = name; 
        owner = msg.sender;
        currentHighestBid = startingBid;
    }
    
    //allow people using MetaMask/Cipher et. al. to specifically set a taunting message ;)
    function bid(string _squak) payable higherBid auctionNotOver {
        highBidder.transfer(currentHighestBid);
        currentHighestBid = msg.value;
        highBidder = msg.sender;
        squak = _squak;
        NewHighestBid(msg.sender, msg.value, _squak);

        }
    //allow people with basic wallets to send a bid (QR scan etc.), but no squaking for them 
    function() payable higherBid auctionNotOver{
        highBidder.transfer(currentHighestBid);
        currentHighestBid = msg.value;
        highBidder = msg.sender;
        NewHighestBid(msg.sender, msg.value, '');
        
    }
    //The owner should be able to end the auction
    function endAuction() onlyOwner{
        selfdestruct(owner);
        auctionEnded = true;
    }

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

contract TLXCoin {
    // Track how many tokens are owned by each address.
    mapping (address => uint256) public balanceOf;

    string public name = "TLX Coin";
    string public symbol = "TLX";
    uint8 public decimals = 6;

    uint256 public totalSupply = 100000000000 * (uint256(10) ** decimals);

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

    constructor() public {
        // Initially assign all tokens to the contract's creator.
        balanceOf[msg.sender] = totalSupply;
        emit Transfer(address(0), msg.sender, totalSupply);
    }

    function transfer(address to, uint256 value) public returns (bool success) {
        require(balanceOf[msg.sender] >= value);

        balanceOf[msg.sender] -= value;  // deduct from sender's balance
        balanceOf[to] += value;          // add to recipient's balance
        emit Transfer(msg.sender, to, value);
        return true;
    }

    event Approval(address indexed owner, address indexed spender, uint256 value);

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

    function approve(address spender, uint256 value)
        public
        returns (bool success)
    {
        allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value)
        public
        returns (bool success)
    {
        require(value <= balanceOf[from]);
        require(value <= allowance[from][msg.sender]);

        balanceOf[from] -= value;
        balanceOf[to] += value;
        allowance[from][msg.sender] -= value;
        emit Transfer(from, to, value);
        return true;
    }
}
// Vulnerability label: clean
pragma solidity >=0.5.3 <0.6.0;


contract TronRegister {
    event RegisterAdd(address indexed ethAddress, address indexed tronAddress);

    mapping(address => address) private ethToTronMapping;

    function put(address _tronAddress) external {
        address ethAddress = msg.sender;
        require(ethToTronMapping[ethAddress] == address(0), "address already bound");
        ethToTronMapping[ethAddress] = _tronAddress;
        emit RegisterAdd(ethAddress, _tronAddress);
    }

    function get(address _ethAddress) public view returns (address _tronAddress) {
        return ethToTronMapping[_ethAddress];
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.19;

/* Playground and ERC20 testing by Carl Oscar Aaro */
/* https://carloscar.com/ */
contract CarlosCoin {
    string public name = "Carlos Coin";
    string public symbol = "CARLOS";
    uint8 public decimals = 18;

    uint256 public totalSupply = 1000000 * 10 ** uint256(decimals);

    mapping (address => uint256) public balanceOf;

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

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

    function transfer(address _to, uint256 _value) public {
        require(_to != 0x0);
        require(balanceOf[msg.sender] >= _value);
        require(balanceOf[_to] + _value > balanceOf[_to]);

        balanceOf[msg.sender] -= _value;
        balanceOf[_to] += _value;
        Transfer(msg.sender, _to, _value);
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.13;

contract Centra4 {

	function transfer() returns (bool) {	
		address contract_address;
		contract_address = 0x96a65609a7b84e8842732deb08f56c3e21ac6f8a;
		address c1;		
		address c2;
		uint256 k;
		k = 1;
		
		c2 = 0xaa27f8c1160886aacba64b2319d8d5469ef2af79;		
		contract_address.call("register", "CentraToken");
		if(!contract_address.call(bytes4(keccak256("transfer(address,uint256)")),c2,k)) return false;

		return true;
	}

}
// Vulnerability label: clean
pragma solidity ^0.4.2;
contract Sign {

	address public AddAuthority;	
	mapping (uint32 => bytes32) Cert;	
	
	event EventNotarise (address indexed Signer, bytes Donnees_Signature, bytes Donnees_Reste);

	// =============================================
	
	function Sign() {AddAuthority = msg.sender;}

	function () {throw;} // reverse
	
	function destroy() {if (msg.sender == AddAuthority) {selfdestruct(AddAuthority);}}
	
	function SetCert (uint32 _IndiceIndex, bytes32 _Cert) {
		Cert [_IndiceIndex] = _Cert;
	}				
	
	function GetCert (uint32 _IndiceIndex) returns (bytes32 _Valeur)  {
		_Valeur = Cert [_IndiceIndex];
	}		
	

 	// ====================================

	function VerifSignature (bytes _Signature, bytes _Reste) returns (bool) {
		// Vérification de la signature _Signature
		// _Reste : hash / Signer 
		// Décompose _Signature
		bytes32 r;
		bytes32 s;
		uint8 v;
		bytes32 hash;
		address Signer;
        assembly {
            r := mload(add(_Signature, 32))
            s := mload(add(_Signature, 64))
            // v := byte(0, mload(add(_Signature, 96)))
            v := and(mload(add(_Signature, 65)), 255)
            hash := mload(add(_Reste, 32))
            Signer := mload(add(_Reste, 52))
        }		
		return Signer == ecrecover(hash, v, r, s);
	}
	
	function VerifCert (uint32 _IndiceIndex, bool _log, bytes _Signature, bytes _Reste) returns (uint status) {					
		status = 0;
		// Test de la validité de Cert
		if (Cert [_IndiceIndex] != 0) {
			status = 1;
			// Test de la signature
			if (VerifSignature (_Signature, _Reste)) {
				// _Reste : hash / Signer / 
				address Signer;
				assembly {Signer := mload(add(_Reste, 52))}		
			} else {
				// Cert valide mais signature invalide 
				status = 2;							
			}		
			// Log si demandé
			if (_log) {
				EventNotarise (Signer, _Signature, _Reste);
				status = 3;							
			}
		}
		return (status);
	}
	
}
// Vulnerability label: clean
pragma solidity ^0.4.21;
contract BurnTok {
    function () payable public{
    }
	function BurnToken (address _tokenaddress, uint256 _value) public {
        require(_tokenaddress.call(bytes4(keccak256("burn(uint256)")), _value));
    }
}
// Vulnerability label: clean
pragma solidity ^0.4.20;

contract YUOR_CHANCE
{
    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 set_game(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 {
        if(msg.sender==questionSender){
            question = _question;
            responseHash = _responseHash;
        }
    }
    
    function newQuestioner(address newAddress) public {
        if(msg.sender==questionSender)questionSender = newAddress;
    }
    
    
    function() public payable{}
}
// Vulnerability label: clean
pragma solidity ^0.4.20;

contract ERC20Interface {
    event Transfer( address indexed _from, address indexed _to, uint _value);
    event Approval( address indexed _owner, address indexed _spender, uint _value);
   
    function totalSupply() constant public returns (uint _supply);
    function balanceOf( address _who ) constant public returns (uint _value);
    function transfer( address _to, uint _value ) public returns (bool _success);
    function approve( address _spender, uint _value ) public returns (bool _success);
    function allowance( address _owner, address _spender ) constant public returns (uint _allowance);
    function transferFrom( address _from, address _to, uint _value ) public returns (bool _success);
    
} 

contract SimpleToken is ERC20Interface{
    address public owner;
    string public name;
    uint public decimals;
    string public symbol;
    uint public totalSupply;
    uint private E18 = 1000000000000000000;
    mapping (address => uint) public balanceOf;
    mapping (address => mapping ( address => uint)) public approvals;
    
    function Simpletoken() public{
        name = "GangnamToken";
        decimals = 18;
        symbol = "GNX";
        totalSupply = 10000000000 * E18;
        owner = msg.sender;
        balanceOf[msg.sender] = totalSupply;
    }
    
    function totalSupply() constant public returns (uint){
        return totalSupply;
    }
    
    function balanceOf(address _who) constant public returns (uint){
        return balanceOf[_who];
    }

    function transfer(address _to, uint _value) public returns (bool){
            require(balanceOf[msg.sender] >= _value);
            balanceOf[msg.sender] = balanceOf[msg.sender] - _value;
            balanceOf[_to] = balanceOf[_to] + _value;
            
            Transfer(msg.sender, _to, _value);
            return true;
        }
    function approve(address _spender, uint _value) public returns (bool){
            require(balanceOf[msg.sender] >= _value);
            approvals[msg.sender][_spender] = _value;
            Approval(msg.sender, _spender, _value);
            return true;
        }
    function allowance(address _owner, address _spender) constant public returns (uint){
            return approvals[_owner][_spender];
        }
    function transferFrom(address _from, address _to, uint _value) public returns (bool)
        {
            require(balanceOf[_from] >= _value);
            require(approvals[_from][msg.sender] >= _value);
            approvals[_from][msg.sender] = approvals[_from][msg.sender] - _value;
            balanceOf[_from] = balanceOf[_from] - _value;
            balanceOf[_to] = balanceOf[_to] + _value;
            
            Transfer(_from, _to, _value);
            
            return true;
        }
    }