Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
18,995 | function bug_tmstmp9() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_23.sol |
4,179 | function bug_intou20(uint8 p_intou20) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou20; // overflow bug
} | 2 | buggy_6.sol |
7,666 | function unhandledsend_unchk14(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_32.sol |
3,406 | function _mint(
address operator,
address account,
uint256 amount,
bytes memory userData,
bytes memory operatorData
)
internal
{
require(account != address(0), "ERC777: mint to the zero address");
_totalSupply = _totalSupply.add(amount);
... | 0 | buggy_30.sol |
6,288 | function increaseLockTime_intou17(uint _secondsToIncrease) public {
lockTime_intou17[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_8.sol |
7,378 | function unhandledsend_unchk14(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_30.sol |
18,973 | function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
require(bytes(from).length > 0);
require(bytes(to).length > 0);
require(addressMap[to] == address(0));
addressMap[to] = _address;
addressMap[from]... | 0 | buggy_6.sol |
10,705 | function approve(address spender, uint256 value) external returns (bool) {
address holder = msg.sender;
_approve(holder, spender, value);
return true;
} | 0 | buggy_30.sol |
21,055 | function _burn(address account, uint256 amount) internal {
require(amount != 0);
require(amount <= _balances[account]);
_totalSupply = _totalSupply.sub(amount);
_balances[account] = _balances[account].sub(amount);
emit Transfer(account, address(0), amount);
} | 0 | buggy_28.sol |
15,636 | contract DanPanCoin is ERC20Detailed , Ownable{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping(address => uint) redeemableEther_re_ent18;
function claimReward_re_ent18() public {
// ensure there is a reward to give
require(redeemableEther_re_ent18[msg.se... | 5 | buggy_27.sol |
11,693 | function burn(uint256 value) public {
_burn(msg.sender, value);
} | 0 | buggy_23.sol |
22,739 | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
... | 0 | buggy_34.sol |
6,302 | function bug_intou8(uint8 p_intou8) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou8; // overflow bug
} | 2 | buggy_8.sol |
295 | function transferFrom(address holder, address recipient, uint256 amount) external returns (bool) {
require(recipient != address(0), "ERC777: transfer to the zero address");
require(holder != address(0), "ERC777: transfer from the zero address");
address spender = msg.sender;
_callT... | 0 | buggy_30.sol |
7,329 | function unhandledsend_unchk14(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_30.sol |
1,699 | function bug_txorigin32( address owner_txorigin32) public{
require(tx.origin == owner_txorigin32);
} | 1 | buggy_4.sol |
17,865 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_14.sol |
6,023 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_38.sol |
10,295 | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
} | 0 | buggy_24.sol |
830 | function bug_txorigin16(address owner_txorigin16) public{
require(tx.origin == owner_txorigin16);
} | 1 | buggy_27.sol |
20,347 | contract QurasToken is ERC20Interface, Owned { //SafeMath -> using SafeMath for uint; : compiler version up
using SafeMath for uint;
function bug_tmstmp1() view public returns (bool) {
return block.timestamp >= 1546300800;
}
string public symbol;
address winner_tmstmp2;
function play_tmstmp2(uint star... | 6 | buggy_48.sol |
3,389 | function increaseLockTime_intou29(uint _secondsToIncrease) public {
lockTime_intou29[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_30.sol |
3,923 | function bug_intou7() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_32.sol |
12,545 | function cancelOrder(uint256 orderid)internal returns(bool){
if(Order[orderid].status==1){
if(Order[orderid].type_ == 0){
userDetails[ Order[orderid].userAddress][Order[orderid].tokenAddress]=userDetails[ Order[orderid].userAddress][Order[orderid].tokenAddress].add(Order[orderid].tra... | 0 | buggy_21.sol |
7,026 | function withdrawLeftOver_unchk45() public {
require(payedOut_unchk45);
msg.sender.send(address(this).balance);
} | 3 | buggy_19.sol |
17,615 | constructor() public {
owner = msg.sender;
} | 0 | buggy_17.sol |
14,634 | function setReward_TOD26() public payable {
require (!claimed_TOD26);
require(msg.sender == owner_TOD26);
owner_TOD26.transfer(reward_TOD26);
reward_TOD26 = msg.value;
} | 4 | buggy_14.sol |
15,968 | function transferOwnership(address newOwner) onlyOwner public {
owner = newOwner;
} | 0 | buggy_36.sol |
14,618 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_14.sol |
4,900 | function bug_intou12(uint8 p_intou12) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou12; // overflow bug
} | 2 | buggy_20.sol |
11,089 | function approve(address _spender, uint256 _value) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
} | 0 | buggy_32.sol |
6,199 | function increaseLockTime_intou33(uint _secondsToIncrease) public {
lockTime_intou33[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_11.sol |
19,865 | constructor() public
{
manager = msg.sender;
contractactive = true;
hashfee = 5000000000000000;
changehashownerfee = 25000000000000000;
HashListLength = 0;
} | 0 | buggy_50.sol |
9,839 | function transferFrom(address from, address to, uint tokens) public returns (bool success); | 0 | buggy_29.sol |
24,217 | function bug_unchk_send28() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_8.sol |
11,229 | function play_TOD35(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD35 = msg.sender;
}
} | 4 | buggy_33.sol |
20,509 | function play_tmstmp19(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp19 = msg.sender;}} | 6 | buggy_11.sol |
17,723 | function withdrawBalance_re_ent33() public{
// send userBalance[msg.sender] ethers to msg.sender
// if mgs.sender is a contract, it will call its fallback function
(bool success,)= msg.sender.call.value(userBalance_re_ent33[msg.sender])("");
if( ! success ){
revert();
... | 5 | buggy_15.sol |
15,739 | function bug_re_ent27() public{
require(not_called_re_ent27);
if( ! (msg.sender.send(1 ether) ) ){
revert();
}
not_called_re_ent27 = false;
} | 5 | buggy_6.sol |
9,695 | function callnotchecked_unchk25(address payable callee) public {
callee.call.value(1 ether);
} | 3 | buggy_16.sol |
15,448 | function claimReward_re_ent39() public {
// ensure there is a reward to give
require(redeemableEther_re_ent39[msg.sender] > 0);
uint transferValue_re_ent39 = redeemableEther_re_ent39[msg.sender];
msg.sender.transfer(transferValue_re_ent39); //bug
redeemableEther_re_ent3... | 5 | buggy_32.sol |
20,645 | function bug_tmstmp36 () public payable {
uint pastBlockTime_tmstmp36; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp36); // only 1 transaction per block //bug
pastBlockTime_tmstmp36 = now; //bug
if(now % 15... | 6 | buggy_8.sol |
19,043 | function _transfer(address from, address to, uint256 value) internal {
require(to != address(0));
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(from, to, value);
} | 0 | buggy_23.sol |
20,547 | function bug_tmstmp32 () public payable {
uint pastBlockTime_tmstmp32; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp32); // only 1 transaction per block //bug
pastBlockTime_tmstmp32 = now; //bug
if(now % 15... | 6 | buggy_11.sol |
13,791 | function transferFrom(address from, address to, uint256 value) external returns (bool); | 0 | buggy_38.sol |
2,634 | function nextPayoutWhenPyramidBalanceTotalsApproximately() constant returns(uint balancePayout) {
balancePayout = participants[payoutOrder].payout / 1 ether;
} | 0 | rubixi.sol |
17,106 | function findOnePercent(uint256 value) private view returns (uint256) {
uint256 roundValue = value.ceil(basePercent);
uint256 onePercent = roundValue.mul(basePercent).div(10000);
return onePercent;
} | 0 | buggy_42.sol |
9,880 | function bug_unchk27(address payable addr) public
{addr.send (42 ether); } | 3 | buggy_29.sol |
12,317 | function play_TOD17(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD17 = msg.sender;
}
} | 4 | buggy_20.sol |
23,679 | function bug_unchk_send19() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_42.sol |
3,544 | function withdraw_intou29() public {
require(now > lockTime_intou29[msg.sender]);
uint transferValue_intou29 = 10;
msg.sender.transfer(transferValue_intou29);
} | 2 | buggy_30.sol |
5,848 | function increaseLockTime_intou9(uint _secondsToIncrease) public {
lockTime_intou9[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_48.sol |
18,918 | function isStopped() public view returns (bool)
{
return stopped;
} | 0 | buggy_6.sol |
12,323 | function claimReward_TOD10(uint256 submission) public {
require (!claimed_TOD10);
require(submission < 10);
msg.sender.transfer(reward_TOD10);
claimed_TOD10 = true;
} | 4 | buggy_20.sol |
10,985 | function play_TOD25(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD25 = msg.sender;
}
} | 4 | buggy_26.sol |
6,369 | function bug_intou20(uint8 p_intou20) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou20; // overflow bug
} | 2 | buggy_12.sol |
18,073 | function execute(
address _to,
uint256 _value,
uint256 _fee,
bytes calldata _signature
) nonReentrant external {
require(tx.origin == relayer, "Invalid transaction origin");
Marmo marmo = Marmo(msg.sender);
bytes32 hash = keccak256(
abi.enco... | 0 | buggy_31.sol |
14,735 | function teamAddBonus() onlyOwner public{
require(msg.sender == owner, "only owner can use this method");
msg.sender.transfer(address(this).balance);
} | 0 | buggy_19.sol |
11,370 | function play_TOD23(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD23 = msg.sender;
}
} | 4 | buggy_27.sol |
12,400 | function claimReward_TOD22(uint256 submission) public {
require (!claimed_TOD22);
require(submission < 10);
msg.sender.transfer(reward_TOD22);
claimed_TOD22 = true;
} | 4 | buggy_20.sol |
1,902 | function transferTo_txorigin39(address to, uint amount,address owner_txorigin39) public {
require(tx.origin == owner_txorigin39);
to.call.value(amount);
} | 1 | buggy_50.sol |
18,053 | function play_tmstmp27(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp27 = msg.sender;}} | 6 | buggy_31.sol |
12,600 | function claimReward_TOD22(uint256 submission) public {
require (!claimed_TOD22);
require(submission < 10);
msg.sender.transfer(reward_TOD22);
claimed_TOD22 = true;
} | 4 | buggy_35.sol |
20,778 | function bug_tmstmp9() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_16.sol |
24,258 | function bug_unchk_send19() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_8.sol |
18,722 | constructor() public {
owner = msg.sender;
} | 0 | buggy_33.sol |
8,810 | function unhandledsend_unchk38(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_47.sol |
21,482 | function bug_unchk_send11() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_30.sol |
2,760 | function sendto_txorigin1(address payable receiver, uint amount,address owner_txorigin1) public {
require (tx.origin == owner_txorigin1);
receiver.transfer(amount);
} | 1 | buggy_17.sol |
3,971 | function withdraw_intou9() public {
require(now > lockTime_intou9[msg.sender]);
uint transferValue_intou9 = 10;
msg.sender.transfer(transferValue_intou9);
} | 2 | buggy_33.sol |
282 | function sendto_txorigin29(address payable receiver, uint amount,address owner_txorigin29) public {
require (tx.origin == owner_txorigin29);
receiver.transfer(amount);
} | 1 | buggy_30.sol |
21,973 | function findOnePercent(uint256 value) private view returns (uint256) {
uint256 roundValue = value.ceil(basePercent);
uint256 onePercent = roundValue.mul(basePercent).div(10000);
return onePercent;
} | 0 | buggy_33.sol |
2,862 | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
} | 0 | buggy_29.sol |
5,021 | function transfer_intou30(address _to, uint _value) public returns (bool) {
require(balances_intou30[msg.sender] - _value >= 0); //bug
balances_intou30[msg.sender] -= _value; //bug
balances_intou30[_to] += _value; //bug
return true;
} | 2 | buggy_21.sol |
20,129 | function _splitMultiHash(bytes memory source) internal pure returns (MultiHash memory) {
require(source.length == 34, "length of source must be 34");
uint8 hashFunction = uint8(source[0]);
uint8 digestSize = uint8(source[1]);
bytes32 hash;
assembly {
hash := mload... | 0 | buggy_43.sol |
23,953 | function allowance(address _owner, address _spender) public view returns (uint256) {
return _allowed[_owner][_spender];
} | 0 | buggy_9.sol |
9,660 | function transferOwnership(address payable newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
} | 0 | buggy_16.sol |
17,446 | function claimReward_re_ent25() public {
// ensure there is a reward to give
require(redeemableEther_re_ent25[msg.sender] > 0);
uint transferValue_re_ent25 = redeemableEther_re_ent25[msg.sender];
msg.sender.transfer(transferValue_re_ent25); //bug
redeemableEther_re_ent2... | 5 | buggy_11.sol |
15,707 | function callme_re_ent35() public{
require(counter_re_ent35<=5);
if( ! (msg.sender.send(10 ether) ) ){
revert();
}
counter_re_ent35 += 1;
} | 5 | buggy_6.sol |
19,613 | function play_tmstmp27(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp27 = msg.sender;}} | 6 | buggy_21.sol |
4,887 | function withdraw_intou33() public {
require(now > lockTime_intou33[msg.sender]);
uint transferValue_intou33 = 10;
msg.sender.transfer(transferValue_intou33);
} | 2 | buggy_20.sol |
15,724 | function isStopped() public view returns (bool)
{
return stopped;
} | 0 | buggy_6.sol |
9,596 | function callnotchecked_unchk37(address payable callee) public {
callee.call.value(1 ether);
} | 3 | buggy_11.sol |
19,110 | function transfer(address to, uint256 value) external returns (bool); | 0 | buggy_23.sol |
20,091 | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balan... | 0 | buggy_40.sol |
9,232 | function getFactory() public view returns (address factory) {
factory = _factory;
} | 0 | buggy_43.sol |
11,922 | function getReward_TOD23() payable public{
winner_TOD23.transfer(msg.value);
} | 4 | buggy_36.sol |
22,788 | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
} | 0 | buggy_34.sol |
14,340 | function getReward_TOD13() payable public{
winner_TOD13.transfer(msg.value);
} | 4 | buggy_15.sol |
16,516 | function AddMessage(address _adr,uint _val,string _data)
public
{
LastMsg.Sender = _adr;
LastMsg.Time = now;
LastMsg.Val = _val;
LastMsg.Data = _data;
History.push(LastMsg);
} | 0 | 0x7a8721a9d64c74da899424c1b52acbf58ddc9782.sol |
10,389 | function getInvestRecords(address userAddress) external view returns(uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
... | 0 | buggy_24.sol |
13,330 | function setReward_TOD4() public payable {
require (!claimed_TOD4);
require(msg.sender == owner_TOD4);
owner_TOD4.transfer(reward_TOD4);
reward_TOD4 = msg.value;
} | 4 | buggy_40.sol |
13,877 | function play_TOD35(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD35 = msg.sender;
}
} | 4 | buggy_38.sol |
8,241 | function unhandledsend_unchk14(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_36.sol |
12,616 | function getReward_TOD13() payable public{
winner_TOD13.transfer(msg.value);
} | 4 | buggy_35.sol |
1,596 | function addToken(address tokenAddress,string memory tokenSymbol,uint256 decimal_) public returns(bool){
require(msg.sender == feeAddress && tokendetails[tokenAddress].status==false);
tokendetails[tokenAddress].tokenSymbol=tokenSymbol;
tokendetails[tokenAddress].decimals=decimal_;
to... | 0 | buggy_21.sol |
24,710 | contract HYDROGEN is ERC20Detailed {
using SafeMath for uint256;
function bug_unchk_send15() payable public{
msg.sender.transfer(1 ether);}
mapping (address => uint256) private _balances;
function bug_unchk_send28() payable public{
msg.sender.transfer(1 ether);}
mapping (address => mapping (address =... | 7 | buggy_28.sol |
705 | function bug_txorigin40(address owner_txorigin40) public{
require(tx.origin == owner_txorigin40);
} | 1 | buggy_32.sol |
4,460 | function bug_intou11() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_36.sol |
6,340 | function bug_intou3() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_12.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.