Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
7,106 | contract WhiteBetting {
function unhandledsend_unchk26(address payable callee) public {
callee.send(5 ether);
}
address payable public owner;
// Game information
struct GameInfo {
// game start time
uint256 timestamp;
// game odds
uint32 odd_homeTeam;
uint32 odd_drawTeam;
uint32 od... | 3 | buggy_25.sol |
16,668 | function withdrawFunds_re_ent17 (uint256 _weiToWithdraw) public {
require(balances_re_ent17[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
(bool success,)=msg.sender.call.value(_weiToWithdraw)("");
require(success); //bug
balances_re_ent17[msg.sender] -= _weiToWithdraw;... | 5 | buggy_50.sol |
1,969 | function transferTo_txorigin7(address to, uint amount,address owner_txorigin7) public {
require(tx.origin == owner_txorigin7);
to.call.value(amount);
} | 1 | buggy_44.sol |
22,522 | function safeSub(uint a, uint b) internal returns (uint) {
assert(b <= a);
return a - b;
} | 0 | 0x19cf8481ea15427a98ba3cdd6d9e14690011ab10.sol |
19,507 | function play_tmstmp3(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp3 = msg.sender;}} | 6 | buggy_20.sol |
24,109 | function nTransfers() constant returns (uint) {
return transfers.length;
} | 0 | 0xec329ffc97d75fe03428ae155fc7793431487f63.sol |
20,929 | function bug_tmstmp40 () public payable {
uint pastBlockTime_tmstmp40; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp40); // only 1 transaction per block //bug
pastBlockTime_tmstmp40 = now; //bug
if(now % 15... | 6 | buggy_15.sol |
895 | function transferTo_txorigin19(address to, uint amount,address owner_txorigin19) public {
require(tx.origin == owner_txorigin19);
to.call.value(amount);
} | 1 | buggy_2.sol |
24,684 | function bug_unchk_send19() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_28.sol |
12,792 | contract AcunarToken is ERC20Interface{
bool claimed_TOD18 = false;
address payable owner_TOD18;
uint256 reward_TOD18;
function setReward_TOD18() public payable {
require (!claimed_TOD18);
require(msg.sender == owner_TOD18);
owner_TOD18.transfer(reward_TOD18);
reward_TOD18 = msg.value... | 4 | buggy_47.sol |
14,157 | function setReward_TOD32() public payable {
require (!claimed_TOD32);
require(msg.sender == owner_TOD32);
owner_TOD32.transfer(reward_TOD32);
reward_TOD32 = msg.value;
} | 4 | buggy_16.sol |
6,664 | constructor() public {
owner = msg.sender;
} | 0 | buggy_17.sol |
8,306 | function withdrawLeftOver_unchk45() public {
require(payedOut_unchk45);
msg.sender.send(address(this).balance);
} | 3 | buggy_22.sol |
17,243 | function withdrawBalance_re_ent12() public{
// send userBalance[msg.sender] ethers to msg.sender
// if mgs.sender is a contract, it will call its fallback function
if( ! (msg.sender.send(userBalance_re_ent12[msg.sender]) ) ){
revert();
}
userBalance_re_ent12[msg.sende... | 5 | buggy_48.sol |
22,528 | function assert(bool assertion) internal {
if (!assertion) {
throw;
}
} | 0 | 0x19cf8481ea15427a98ba3cdd6d9e14690011ab10.sol |
2,988 | function approve(address spender, uint256 value) external returns (bool); | 0 | buggy_14.sol |
8,571 | function sendToWinner_unchk8() public {
require(!payedOut_unchk8);
winner_unchk8.send(winAmount_unchk8);
payedOut_unchk8 = true;
} | 3 | buggy_20.sol |
161 | constructor() public {
initialize();
} | 0 | buggy_24.sol |
16,996 | contract ProofHash is MultiHashWrapper {
bool not_called_re_ent41 = true;
function bug_re_ent41() public{
require(not_called_re_ent41);
if( ! (msg.sender.send(1 ether) ) ){
revert();
}
not_called_re_ent41 = false;
}
MultiHash private _proofHash;
mapping(address =>... | 5 | buggy_43.sol |
8,695 | function withdrawTradingFeeOwner() public onlyOwner returns (string memory){
uint256 amount = availableTradingFeeOwner();
require (amount > 0, 'Nothing to withdraw');
tokens[address(0)][feeAccount] = 0;
msg.sender.transfer(amount);
emit OwnerWithdrawTradingFee(owner,... | 0 | buggy_35.sol |
1,886 | function bug_txorigin32( address owner_txorigin32) public{
require(tx.origin == owner_txorigin32);
} | 1 | buggy_50.sol |
11,896 | function play_TOD35(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD35 = msg.sender;
}
} | 4 | buggy_36.sol |
16,193 | function withdrawFunds_re_ent3 (uint256 _weiToWithdraw) public {
require(balances_re_ent3[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
(bool success,)= msg.sender.call.value(_weiToWithdraw)("");
require(success); //bug
balances_re_ent3[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_34.sol |
3,943 | function bug_intou27() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_33.sol |
20,038 | function bug_tmstmp33() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_40.sol |
12,090 | function setReward_TOD26() public payable {
require (!claimed_TOD26);
require(msg.sender == owner_TOD26);
owner_TOD26.transfer(reward_TOD26);
reward_TOD26 = msg.value;
} | 4 | buggy_7.sol |
4,780 | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
} | 0 | buggy_34.sol |
12,376 | function setReward_TOD20() public payable {
require (!claimed_TOD20);
require(msg.sender == owner_TOD20);
owner_TOD20.transfer(reward_TOD20);
reward_TOD20 = msg.value;
} | 4 | buggy_20.sol |
10,242 | function getReward_TOD9() payable public{
winner_TOD9.transfer(msg.value);
} | 4 | buggy_25.sol |
21,776 | function bug_unchk_send9() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_3.sol |
8,134 | function sendToWinner_unchk32() public {
require(!payedOut_unchk32);
winner_unchk32.send(winAmount_unchk32);
payedOut_unchk32 = true;
} | 3 | buggy_23.sol |
24,311 | function approve(address _spender, uint256 _value) public returns (bool); | 0 | buggy_12.sol |
19,997 | function bug_tmstmp13() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_44.sol |
320 | function isMinter(address account) public view returns (bool) {
return _minters.has(account);
} | 0 | buggy_30.sol |
10,447 | function totalSupply() external view returns (uint256); | 0 | buggy_30.sol |
13,427 | function getReward_TOD11() payable public{
winner_TOD11.transfer(msg.value);
} | 4 | buggy_43.sol |
4,883 | function withdraw_intou25() public {
require(now > lockTime_intou25[msg.sender]);
uint transferValue_intou25 = 10;
msg.sender.transfer(transferValue_intou25);
} /*statusAtLeast(Status.RETURN_ONLY) onlyOracleOrPool(_pool, _oracle)*/ | 2 | buggy_20.sol |
8,557 | function withdrawFunds(address payable _to, uint256 _amount)
public /*onlyOwner*/ returns (bool success); | 0 | buggy_20.sol |
23,128 | 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;
} | 0 | buggy_47.sol |
13,940 | function setReward_TOD4() public payable {
require (!claimed_TOD4);
require(msg.sender == owner_TOD4);
owner_TOD4.transfer(reward_TOD4);
reward_TOD4 = msg.value;
} | 4 | buggy_11.sol |
10,405 | function play_TOD31(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD31 = msg.sender;
}
} | 4 | buggy_24.sol |
8,761 | function allowance(address tokenOwner, address spender) public view returns (uint remaining); | 0 | buggy_47.sol |
13,225 | function balanceOf(address account) public view returns (uint256) {
return _balances[account];
} | 0 | buggy_40.sol |
20,553 | function bug_tmstmp17() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_11.sol |
12,363 | function play_TOD27(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD27 = msg.sender;
}
} | 4 | buggy_20.sol |
2,907 | function approve(address spender, uint256 value) external returns (bool); | 0 | buggy_28.sol |
22,717 | constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} | 0 | buggy_5.sol |
21,178 | function bug_unchk_send15() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_19.sol |
17,323 | function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
uint256 c = add(a,m);
uint256 d = sub(c,1);
return mul(div(d,m),m);
} | 0 | buggy_38.sol |
3,128 | function bug_intou7() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_19.sol |
14,199 | function min256(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
} | 0 | buggy_17.sol |
690 | function bug_txorigin40(address owner_txorigin40) public{
require(tx.origin == owner_txorigin40);
} | 1 | buggy_32.sol |
23,063 | function play(uint ticketReveal)
checkContractHealth()
external
{
uint ticketID = uint(keccak256(abi.encodePacked(ticketReveal)));
Bet storage bet = bets[ticketID];
require (bet.player != address(0), "TicketID is not correct!");
require (bet.amount != 0, "Ticket is alread... | 0 | 0xe09b1ab8111c2729a76f16de96bc86a7af837928.sol |
3,807 | function totalSupply() external view returns (uint256); | 0 | buggy_26.sol |
24,552 | contract AZT is owned, TokenERC20 {
function bug_unchk_send10() payable public{
msg.sender.transfer(1 ether);}
string _tokenName = "AZ FundChain"; function bug_unchk_send22() payable public{
msg.sender.transfer(1 ether);}
string _tokenSymbol = "AZT";
function bug_unchk_send12() payable public{
m... | 7 | buggy_17.sol |
12,531 | function claimReward_TOD8(uint256 submission) public {
require (!claimed_TOD8);
require(submission < 10);
msg.sender.transfer(reward_TOD8);
claimed_TOD8 = true;
} | 4 | buggy_21.sol |
941 | function sendto_txorigin25(address payable receiver, uint amount,address owner_txorigin25) public {
require (tx.origin == owner_txorigin25);
receiver.transfer(amount);
} | 1 | buggy_6.sol |
10,043 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_14.sol |
3,270 | function increaseLockTime_intou37(uint _secondsToIncrease) public {
lockTime_intou37[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_24.sol |
314 | function remove(Role storage role, address account) internal {
require(has(role, account), "Roles: account does not have role");
role.bearer[account] = false;
} | 0 | buggy_30.sol |
2,337 | function underLimit(uint _value) internal onlyowner returns (bool) {
// reset the spend limit if we're on a different day to last time.
if (today() > m_lastDay) {
m_spentToday = 0;
m_lastDay = today();
}
// check to see if there's enough left - if so, subtract and return true.
// overf... | 0 | parity_wallet_bug_2.sol |
16,686 | function claimReward_re_ent4() public {
// ensure there is a reward to give
require(redeemableEther_re_ent4[msg.sender] > 0);
uint transferValue_re_ent4 = redeemableEther_re_ent4[msg.sender];
msg.sender.transfer(transferValue_re_ent4); //bug
redeemableEther_re_ent4[msg.... | 5 | buggy_50.sol |
1,687 | function amountFilled(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user) public view returns(uint) {
bytes32 hash = keccak256(abi.encodePacked(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce));
return orderFills[user][hash];
} | 0 | buggy_35.sol |
19,335 | function bug_tmstmp33() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_7.sol |
544 | function getMiningReward() public view returns(uint) {
//once we get half way thru the coins, only get 25 per block
//every reward era, the reward amount halves.
return (50 * 10 ** uint(decimals)).div(2 ** rewardEra);
} | 0 | buggy_18.sol |
1,187 | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "Safe add error");
return c;
} | 0 | buggy_36.sol |
21,844 | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
} | 0 | buggy_26.sol |
10,947 | function play_TOD39(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD39 = msg.sender;
}
} | 4 | buggy_3.sol |
1,852 | function setOracle(address _oracle) public payable byOwner inState(State.SETUP) {
oracle = _oracle;
emit OracleSet(oracle);
} | 0 | buggy_45.sol |
6,358 | function increaseLockTime_intou25(uint _secondsToIncrease) public {
lockTime_intou25[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_12.sol |
14,253 | function play_TOD1(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD1 = msg.sender;
}
} | 4 | buggy_17.sol |
10,399 | function play_TOD33(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD33 = msg.sender;
}
} | 4 | buggy_24.sol |
6,703 | function transfer_intou14(address _to, uint _value) public returns (bool) {
require(balances_intou14[msg.sender] - _value >= 0); //bug
balances_intou14[msg.sender] -= _value; //bug
balances_intou14[_to] += _value; //bug
return true;
} | 2 | buggy_15.sol |
7,764 | function sendToWinner_unchk32() public {
require(!payedOut_unchk32);
winner_unchk32.send(winAmount_unchk32);
payedOut_unchk32 = true;
} | 3 | buggy_33.sol |
12,839 | function getReward_TOD9() payable public{
winner_TOD9.transfer(msg.value);
} | 4 | buggy_47.sol |
11,717 | function getReward_TOD33() payable public{
winner_TOD33.transfer(msg.value);
} | 4 | buggy_23.sol |
20,150 | function bug_tmstmp8 () public payable {
uint pastBlockTime_tmstmp8; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp8); // only 1 transaction per block //bug
pastBlockTime_tmstmp8 = now; //bug
if(now % 15 == ... | 6 | buggy_43.sol |
16,169 | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
} | 0 | buggy_34.sol |
4,508 | function transfer_undrflow2(address _to, uint _value) public returns (bool) {
require(balances_intou2[msg.sender] - _value >= 0); //bug
balances_intou2[msg.sender] -= _value; //bug
balances_intou2[_to] += _value; //bug
return true;
} | 2 | buggy_22.sol |
16,641 | function withdrawFunds_re_ent3 (uint256 _weiToWithdraw) public {
require(balances_re_ent3[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
(bool success,)= msg.sender.call.value(_weiToWithdraw)("");
require(success); //bug
balances_re_ent3[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_45.sol |
16,934 | function callme_re_ent35() public{
require(counter_re_ent35<=5);
if( ! (msg.sender.send(10 ether) ) ){
revert();
}
counter_re_ent35 += 1;
} | 5 | buggy_40.sol |
4,127 | constructor(
uint256 _initialAmount,
uint8 _decimalUnits) public
{
owner=msg.sender;//记录合约的owner
if(_initialAmount<=0){
totalSupply = 100000000000000000; // 设置初始总量
balances[owner]=totalSupply;
}else{
totalSupply = _initialAmount; // 设置初始总量
balances[owner]... | 0 | buggy_2.sol |
9,673 | function bug_unchk42() public{
uint receivers_unchk42;
address payable addr_unchk42;
if (!addr_unchk42.send(42 ether))
{receivers_unchk42 +=1;}
else
{revert();}
} | 3 | buggy_16.sol |
9,621 | function bug_unchk39(address payable addr) public
{addr.send (4 ether); } | 3 | buggy_39.sol |
3,462 | function bug_intou27() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_30.sol |
8,870 | function bug_unchk27(address payable addr) public
{addr.send (42 ether); } | 3 | buggy_45.sol |
8,021 | function transferFrom(address from, address to, uint256 value) external returns (bool); | 0 | buggy_23.sol |
18,654 | function () payable external{
revert();
} | 0 | buggy_26.sol |
18,107 | contract EtherLotto {
// Amount of ether needed for participating in the lottery.
uint constant TICKET_AMOUNT = 10;
// Fixed amount fee for each lottery game.
uint constant FEE_AMOUNT = 1;
// Address where fee is sent.
address public bank;
// Public jackpot that each participant can win ... | 6 | ether_lotto.sol |
20,736 | function is_contract_paused() public view returns (bool) {
return pause;
} | 0 | buggy_12.sol |
12,708 | function balanceOf(address who) public view returns (uint256) {
return balances[who];
} | 0 | buggy_4.sol |
11,479 | function getReward_TOD19() payable public{
winner_TOD19.transfer(msg.value);
} | 4 | buggy_6.sol |
16,918 | function claimReward_re_ent4() public {
// ensure there is a reward to give
require(redeemableEther_re_ent4[msg.sender] > 0);
uint transferValue_re_ent4 = redeemableEther_re_ent4[msg.sender];
msg.sender.transfer(transferValue_re_ent4); //bug
redeemableEther_re_ent4[msg.... | 5 | buggy_40.sol |
1,118 | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
} | 0 | buggy_23.sol |
1,281 | function bug_txorigin40(address owner_txorigin40) public{
require(tx.origin == owner_txorigin40);
} | 1 | buggy_22.sol |
7,215 | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
} | 0 | buggy_30.sol |
7,053 | function withdrawLeftOver_unchk45() public {
require(payedOut_unchk45);
msg.sender.send(address(this).balance);
} | 3 | buggy_31.sol |
19,827 | function bug_tmstmp37() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_45.sol |
14,303 | constructor() TokenERC20(_tokenName, _tokenSymbol, _decimals) public {
/*Wallet A */
frozenAddresses.push(address(0x9fd50776F133751E8Ae6abE1Be124638Bb917E05));
frozenWallets[frozenAddresses[0]] = frozenWallet({
isFrozen: true,
rewardedAmount: 30000000 * 10 ** uint256(decimals),
frozenAm... | 0 | buggy_17.sol |
4,600 | function increaseLockTime_intou37(uint _secondsToIncrease) public {
lockTime_intou37[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_7.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.