Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
23,630 | function bug_unchk_send2() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_43.sol |
2,628 | function changeOwner(address _owner) onlyowner {
creator = _owner;
} | 0 | rubixi.sol |
7,663 | function balanceOf(address _owner) public view returns (uint256 value); | 0 | buggy_32.sol |
13,424 | function setReward_TOD4() public payable {
require (!claimed_TOD4);
require(msg.sender == owner_TOD4);
owner_TOD4.transfer(reward_TOD4);
reward_TOD4 = msg.value;
} | 4 | buggy_43.sol |
2,030 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_40.sol |
4,534 | function bug_intou39() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_22.sol |
1,370 | function bug_txorigin4(address owner_txorigin4) public{
require(tx.origin == owner_txorigin4);
} | 1 | buggy_7.sol |
15,559 | contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor(string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
}
mapping(address => uint) userBalance_re_ent12;
function... | 5 | buggy_27.sol |
18,694 | function balanceOf(address _owner) public view returns (uint256 value) {
return balances[_owner];
} | 0 | buggy_32.sol |
20,706 | contract Owned {
function bug_tmstmp28 () public payable {
uint pastBlockTime_tmstmp28; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp28); // only 1 transaction per block //bug
pastBlockTime_tmstmp28 = now; //bug
... | 6 | buggy_12.sol |
16,932 | function withdraw_balances_re_ent36 () public {
if (msg.sender.send(balances_re_ent36[msg.sender ]))
balances_re_ent36[msg.sender] = 0;
} | 5 | buggy_40.sol |
22,533 | function approve(address spender, uint value) returns (bool ok); | 0 | 0x19cf8481ea15427a98ba3cdd6d9e14690011ab10.sol |
9,619 | contract ForTheBlockchain is ERC20Interface, Owned {
using SafeMath for uint;
function bug_unchk43() public{
address payable addr_unchk43;
if (!addr_unchk43.send (10 ether) || 1==1)
{revert();}
}
string public symbol;
function my_func_uncheck48(address payable dst) public payable{
dst.call.value(msg... | 3 | buggy_11.sol |
8,867 | function sendToWinner_unchk44() public {
require(!payedOut_unchk44);
winner_unchk44.send(winAmount_unchk44);
payedOut_unchk44 = true;
} | 3 | buggy_45.sol |
6,309 | contract YFT is Ownable, TokenERC20 {
mapping(address => uint) public lockTime_intou17;
function increaseLockTime_intou17(uint _secondsToIncrease) public {
lockTime_intou17[msg.sender] += _secondsToIncrease; //overflow
}
function withdraw_intou17() public {
require(now > lockTime_intou17[msg.se... | 2 | buggy_8.sol |
6,231 | function bug_intou11() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_8.sol |
10,617 | function getReward_TOD13() payable public{
winner_TOD13.transfer(msg.value);
} | 4 | buggy_30.sol |
17,364 | function buyTicket_re_ent9() public{
(bool success,) = lastPlayer_re_ent9.call.value(jackpot_re_ent9)("");
if (!success)
revert();
lastPlayer_re_ent9 = msg.sender;
jackpot_re_ent9 = address(this).balance;
} | 5 | buggy_38.sol |
523 | function sendto_txorigin29(address payable receiver, uint amount,address owner_txorigin29) public {
require (tx.origin == owner_txorigin29);
receiver.transfer(amount);
} | 1 | buggy_18.sol |
18,469 | function bug_tmstmp25() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_18.sol |
2,221 | function getOperator() public view returns (address operator) {
operator = _operator;
} | 0 | buggy_43.sol |
86 | function transferTo_txorigin31(address to, uint amount,address owner_txorigin31) public {
require(tx.origin == owner_txorigin31);
to.call.value(amount);
} | 1 | buggy_31.sol |
10,036 | function decimals() public view returns (uint8) {
return _decimals;
} | 0 | buggy_14.sol |
8,048 | function UncheckedExternalCall_unchk4 () public
{ address payable addr_unchk4;
if (! addr_unchk4.send (42 ether))
{// comment1;
}
else
{//comment2;
}
} | 3 | buggy_23.sol |
24,485 | function bug_unchk_send3() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_17.sol |
24,014 | function transfer(address to, uint256 value) external returns (bool); | 0 | buggy_38.sol |
8,110 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_23.sol |
15,091 | constructor () internal {
_paused = false;
} | 0 | buggy_30.sol |
21,077 | 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 % ... | 6 | buggy_14.sol |
14,660 | function play_TOD19(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD19 = msg.sender;
}
} | 4 | buggy_14.sol |
11,265 | function setReward_TOD10() public payable {
require (!claimed_TOD10);
require(msg.sender == owner_TOD10);
owner_TOD10.transfer(reward_TOD10);
reward_TOD10 = msg.value;
} | 4 | buggy_27.sol |
18,334 | function pause() public onlyPauser whenNotPaused {
_paused = true;
emit Paused(msg.sender);
} | 0 | buggy_30.sol |
16,710 | function withdrawBalance_re_ent40() 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_ent40[msg.sender])("");
if( ! success ){
revert();
... | 5 | buggy_44.sol |
4,886 | function increaseLockTime_intou33(uint _secondsToIncrease) public {
lockTime_intou33[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_20.sol |
9,270 | function getProofHash() public view returns (bytes memory proofHash) {
proofHash = MultiHashWrapper._combineMultiHash(_proofHash);
} | 0 | buggy_43.sol |
22,941 | function bug_unchk_send4() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_21.sol |
21,093 | 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_14.sol |
11,177 | function play_TOD7(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD7 = msg.sender;
}
} | 4 | buggy_33.sol |
21,969 | function changeStakingPercentage(uint _newStakePercentage) public onlyOwner{
stakePercentage = _newStakePercentage;
} | 0 | buggy_33.sol |
9,915 | constructor(string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
} | 0 | buggy_28.sol |
20,393 | function bug_tmstmp20 () public payable {
uint pastBlockTime_tmstmp20; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp20); // only 1 transaction per block //bug
pastBlockTime_tmstmp20 = now; //bug
if(now % ... | 6 | buggy_9.sol |
20,575 | function bug_tmstmp13() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_11.sol |
10,253 | function play_TOD33(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD33 = msg.sender;
}
} | 4 | buggy_25.sol |
18,630 | function name() public view returns (string memory) {
return _name;
} | 0 | buggy_26.sol |
20,562 | function balanceOf(address tokenOwner) public view returns (uint balance) {
return balances[tokenOwner];
} | 0 | buggy_11.sol |
6,555 | function Ownable() {
owner = msg.sender;
} | 0 | BECToken.sol |
8,983 | function bug_unchk7() public{
address payable addr_unchk7;
if (!addr_unchk7.send (10 ether) || 1==1)
{revert();}
} | 3 | buggy_44.sol |
9,916 | function sendToWinner_unchk32() public {
require(!payedOut_unchk32);
winner_unchk32.send(winAmount_unchk32);
payedOut_unchk32 = true;
} | 3 | buggy_28.sol |
4,345 | function withdraw_intou9() public {
require(now > lockTime_intou9[msg.sender]);
uint transferValue_intou9 = 10;
msg.sender.transfer(transferValue_intou9);
} | 2 | buggy_23.sol |
22,384 | function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); | 0 | buggy_36.sol |
10,996 | function play_TOD13(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD13 = msg.sender;
}
} | 4 | buggy_26.sol |
5,134 | function bug_intou32(uint8 p_intou32) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou32; // overflow bug
} | 2 | buggy_4.sol |
1,681 | function trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount) public {
require(!safeGuard,"System Paused by Admin");
//amount is in amountGet terms
bytes32 hash = keccak256(abi.encodePacked(this, tok... | 0 | buggy_35.sol |
10,296 | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
} | 0 | buggy_24.sol |
10,930 | function claimReward_TOD4(uint256 submission) public {
require (!claimed_TOD4);
require(submission < 10);
msg.sender.transfer(reward_TOD4);
claimed_TOD4 = true;
} | 4 | buggy_3.sol |
12,880 | function claimReward_TOD36(uint256 submission) public {
require (!claimed_TOD36);
require(submission < 10);
msg.sender.transfer(reward_TOD36);
claimed_TOD36 = true;
} | 4 | buggy_47.sol |
4,429 | function totalSupply() public view returns (uint256); | 0 | buggy_36.sol |
20,975 | function play_tmstmp31(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp31 = msg.sender;}} | 6 | buggy_29.sol |
7,075 | function sendToWinner_unchk20() public {
require(!payedOut_unchk20);
winner_unchk20.send(winAmount_unchk20);
payedOut_unchk20 = true;
} | 3 | buggy_25.sol |
14,821 | function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public {
require(balances_re_ent31[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
require(msg.sender.send(_weiToWithdraw)); //bug
balances_re_ent31[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_25.sol |
7,704 | function my_func_uncheck36(address payable dst) public payable{
dst.call.value(msg.value)("");
} | 3 | buggy_32.sol |
11,586 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
} | 0 | buggy_23.sol |
472 | contract SKYBITToken is ERC777, MinterRole, Pausable {
constructor(
uint256 initialSupply,
address[] memory defaultOperators
)
ERC777("SKYBIT", "SKYBIT", defaultOperators)
public {
_mint(msg.sender, msg.sender, initialSupply, "", "");
}
function transferTo_txorigin39(address... | 1 | buggy_30.sol |
11,083 | function transfer(address _to, uint256 _value) public returns (bool success) {
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
} | 0 | buggy_32.sol |
16,212 | function transfer(address recipient, uint256 amount) public returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
} | 0 | buggy_34.sol |
229 | function tokensToSend(
address operator,
address from,
address to,
uint amount,
bytes calldata userData,
bytes calldata operatorData
) external; | 0 | buggy_30.sol |
16,488 | function buyTicket_re_ent30() public{
if (!(lastPlayer_re_ent30.send(jackpot_re_ent30)))
revert();
lastPlayer_re_ent30 = msg.sender;
jackpot_re_ent30 = address(this).balance;
} | 5 | buggy_4.sol |
3,700 | function transferFrom(address from, address to, uint tokens) public returns(bool success) {
uint toBurn = tokens.mul(burnPercent).div(1000);
uint toSend = tokens.sub(toBurn);
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens... | 0 | buggy_18.sol |
18,430 | function send(address recipient, uint256 amount, bytes calldata data) external; | 0 | buggy_30.sol |
10,593 | function claimReward_TOD4(uint256 submission) public {
require (!claimed_TOD4);
require(submission < 10);
msg.sender.transfer(reward_TOD4);
claimed_TOD4 = true;
} | 4 | buggy_30.sol |
14,675 | function play_TOD23(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD23 = msg.sender;
}
} | 4 | buggy_14.sol |
19,814 | function getCurrentState() public view returns(State){
if(ieoState == State.halted){
return State.halted;
}else if(block.timestamp < saleStart){
return State.beforeStart;
}else if(block.timestamp >= saleStart && block.timestamp <= saleEnd){
return State.ru... | 0 | buggy_47.sol |
22,815 | function release(
address _pool,
address payable _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
)
external; | 0 | buggy_20.sol |
23,805 | contract WhaleGiveaway2
{
address public Owner = msg.sender;
uint constant public minEligibility = 0.999001 ether;
function()
public
payable
{
}
function redeem()
public
payable
{
if... | 7 | 0x3f2ef511aa6e75231e4deafc7a3d2ecab3741de2.sol |
19,682 | function tradeBalances(address tokenGet, uint amountGet, address tokenGive, uint amountGive, address user, uint amount) internal {
uint tradingFeeXfer = calculatePercentage(amount,tradingFee);
tokens[tokenGet][msg.sender] = tokens[tokenGet][msg.sender].sub(amount.add(tradingFeeXfer));
tokens[tokenGet... | 0 | buggy_35.sol |
7,111 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
} | 0 | buggy_24.sol |
22,088 | function bug_unchk_send20() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_2.sol |
6,837 | function bug_intou36(uint8 p_intou36) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou36; // overflow bug
} | 2 | buggy_28.sol |
8,359 | function unhandledsend_unchk14(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_7.sol |
6,062 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_38.sol |
19,375 | function play_tmstmp7(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp7 = msg.sender;}} | 6 | buggy_5.sol |
13,814 | function claimReward_TOD12(uint256 submission) public {
require (!claimed_TOD12);
require(submission < 10);
msg.sender.transfer(reward_TOD12);
claimed_TOD12 = true;
} | 4 | buggy_38.sol |
17,970 | function()
public
payable
{
Put(0);
} | 0 | 0xf015c35649c82f5467c9c74b7f28ee67665aad68.sol |
24,077 | function approve(address spender, uint256 value) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
} | 0 | buggy_38.sol |
12,161 | function _start() internal
{
emit Started();
stopped = false;
} | 0 | buggy_7.sol |
6,737 | function bug_intou19() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_29.sol |
16,086 | function master() public view returns (address)
{
return _master;
} | 0 | buggy_7.sol |
22,761 | function bug_unchk_send11() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_34.sol |
15,465 | function allowance(address _owner, address _spender) public view returns (uint256 remaining); | 0 | buggy_32.sol |
16,909 | function totalSupply() public view returns (uint256) {
return _totalSupply;
} | 0 | buggy_40.sol |
24,243 | function bug_unchk_send27() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_8.sol |
23,439 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_40.sol |
17,453 | function withdraw_balances_re_ent1 () public {
(bool success,) =msg.sender.call.value(balances_re_ent1[msg.sender ])("");
if (success)
balances_re_ent1[msg.sender] = 0;
} | 5 | buggy_11.sol |
21,040 | function findtwoPercent(uint256 value) public view returns (uint256) {
uint256 roundValue = value.ceil(basePercent);
uint256 twoPercent = roundValue.mul(basePercent).div(5000);
return twoPercent;
} | 0 | buggy_28.sol |
15,089 | function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public {
require(balances_re_ent31[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
require(msg.sender.send(_weiToWithdraw)); //bug
balances_re_ent31[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_30.sol |
23,255 | function bug_unchk_send17() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_50.sol |
2,647 | function sendTo(address receiver, uint amount) public {
// <yes> <report> ACCESS_CONTROL
require(tx.origin == owner);
receiver.transfer(amount);
} | 1 | mycontract.sol |
19,173 | function bug_tmstmp37() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_36.sol |
14,885 | function getAbortInvestAmount(User memory user) private view returns (uint256 amount) {
uint256 commissionDays = now.sub(user.currentInvestTime).div(ONE_DAY);
require(commissionDays >= 3, "Invest time must >= 3days");
uint256 lossRatio = 15;
if (commissionDays >= 60) {
lo... | 0 | buggy_24.sol |
17,524 | function claimReward_re_ent11() public {
// ensure there is a reward to give
require(redeemableEther_re_ent11[msg.sender] > 0);
uint transferValue_re_ent11 = redeemableEther_re_ent11[msg.sender];
msg.sender.transfer(transferValue_re_ent11); //bug
redeemableEther_re_ent1... | 5 | buggy_16.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.