Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
8,723 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_4.sol |
22,480 | function bug_unchk_send24() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_22.sol |
6,927 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_14.sol |
16,443 | 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_35.sol |
20,323 | function bug_tmstmp37() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_48.sol |
10,619 | function play_TOD23(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD23 = msg.sender;
}
} | 4 | buggy_30.sol |
9,042 | function bug_unchk31() public{
address payable addr_unchk31;
if (!addr_unchk31.send (10 ether) || 1==1)
{revert();}
} | 3 | buggy_44.sol |
10,046 | function sendToWinner_unchk20() public {
require(!payedOut_unchk20);
winner_unchk20.send(winAmount_unchk20);
payedOut_unchk20 = true;
} | 3 | buggy_14.sol |
22,625 | function isStopped() public view returns (bool)
{
return stopped;
} | 0 | buggy_7.sol |
13,847 | function play_TOD25(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD25 = msg.sender;
}
} | 4 | buggy_38.sol |
10,381 | function setReward_TOD30() public payable {
require (!claimed_TOD30);
require(msg.sender == owner_TOD30);
owner_TOD30.transfer(reward_TOD30);
reward_TOD30 = msg.value;
} | 4 | buggy_24.sol |
19,280 | function stop() public onlyOwner
{
_stop();
} | 0 | buggy_7.sol |
15,197 | function sub(uint a, uint b) internal pure returns(uint c) {
require(b <= a);
c = a - b;
} | 0 | buggy_18.sol |
23,672 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
} | 0 | buggy_42.sol |
19,262 | function play_tmstmp31(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp31 = msg.sender;}} | 6 | buggy_7.sol |
2,744 | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
} | 0 | buggy_17.sol |
17,405 | 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_11.sol |
23,107 | function bug_unchk_send10() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_47.sol |
17,011 | function withdraw_balances_re_ent8 () public {
(bool success,) = msg.sender.call.value(balances_re_ent8[msg.sender ])("");
if (success)
balances_re_ent8[msg.sender] = 0;
} | 5 | buggy_43.sol |
18,303 | function bug_tmstmp4 () public payable {
uint pastBlockTime_tmstmp4; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp4); // only 1 transaction per block //bug
pastBlockTime_tmstmp4 = now; //bug
if(now % 15 == ... | 6 | buggy_30.sol |
23,853 | function bug_unchk_send9() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_48.sol |
11,463 | function play_TOD17(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD17 = msg.sender;
}
} | 4 | buggy_6.sol |
12,686 | function setReward_TOD4() public payable {
require (!claimed_TOD4);
require(msg.sender == owner_TOD4);
owner_TOD4.transfer(reward_TOD4);
reward_TOD4 = msg.value;
} | 4 | buggy_4.sol |
5,171 | function withdraw_intou9() public {
require(now > lockTime_intou9[msg.sender]);
uint transferValue_intou9 = 10;
msg.sender.transfer(transferValue_intou9);
} | 2 | buggy_47.sol |
8,978 | function cash_unchk46(uint roundIndex, uint subpotIndex, address payable winner_unchk46) public{
uint64 subpot_unchk46 = 3 ether;
winner_unchk46.send(subpot_unchk46); //bug
subpot_unchk46= 0;
} | 3 | buggy_44.sol |
6,496 | function withdraw_intou25() public {
require(now > lockTime_intou25[msg.sender]);
uint transferValue_intou25 = 10;
msg.sender.transfer(transferValue_intou25);
} | 2 | buggy_16.sol |
12,227 | function claimReward_TOD10(uint256 submission) public {
require (!claimed_TOD10);
require(submission < 10);
msg.sender.transfer(reward_TOD10);
claimed_TOD10 = true;
} | 4 | buggy_34.sol |
24,423 | function bug_unchk_send29() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_16.sol |
9,465 | function totalSupply() external view returns (uint256); | 0 | buggy_38.sol |
14,587 | function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
} | 0 | buggy_14.sol |
18,743 | function play_tmstmp14(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp14 = msg.sender;}} | 6 | buggy_33.sol |
3,541 | function transfer_intou18(address _to, uint _value) public returns (bool) {
require(balances_intou18[msg.sender] - _value >= 0); //bug
balances_intou18[msg.sender] -= _value; //bug
balances_intou18[_to] += _value; //bug
return true;
} | 2 | buggy_30.sol |
12,592 | function getReward_TOD17() payable public{
winner_TOD17.transfer(msg.value);
} | 4 | buggy_35.sol |
5,405 | function getOperator() public view returns (address operator) {
operator = _operator;
} | 0 | buggy_44.sol |
4,002 | function approve(address spender, uint256 value) external returns (bool); | 0 | buggy_27.sol |
24,282 | function bug_unchk_send14() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_8.sol |
23,879 | function bug_unchk_send26() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_48.sol |
18,488 | function bug_tmstmp17() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_18.sol |
22,081 | function bug_unchk_send3() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_2.sol |
11,068 | function approve(address _spender, uint256 _value) public returns (bool success); | 0 | buggy_32.sol |
11,908 | constructor() payable public {
} | 0 | buggy_36.sol |
4,203 | function withdraw_intou17() public {
require(now > lockTime_intou17[msg.sender]);
uint transferValue_intou17 = 10;
msg.sender.transfer(transferValue_intou17);
} | 2 | buggy_6.sol |
21,950 | function bug_unchk_send10() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_33.sol |
23,790 | function bug_unchk_send14() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_49.sol |
7,687 | function balanceOf(address _owner) public view returns (uint256 value) {
return balances[_owner];
} | 0 | buggy_32.sol |
5,193 | function transfer_intou18(address _to, uint _value) public returns (bool) {
require(balances_intou18[msg.sender] - _value >= 0); //bug
balances_intou18[msg.sender] -= _value; //bug
balances_intou18[_to] += _value; //bug
return true;
} | 2 | buggy_47.sol |
12,463 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_20.sol |
9,623 | function my_func_unchk35(address payable dst) public payable{
dst.send(msg.value);
} | 3 | buggy_39.sol |
16,283 | function setSwapsContract(
address payable _swapsContract
) public onlyOwner validateSwapsContract(_swapsContract, ASSET_TYPE) {
address oldSwapsContract = swapsContract;
swapsContract = _swapsContract;
emit SwapsContractChanged(oldSwapsContract, _swapsContract);
} | 0 | buggy_20.sol |
6,162 | function increaseLockTime_intou9(uint _secondsToIncrease) public {
lockTime_intou9[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_11.sol |
17,199 | function Collect(uint _am)
public
payable
{
if(balances[msg.sender]>=MinSum && balances[msg.sender]>=_am)
{
// <yes> <report> REENTRANCY
if(msg.sender.call.value(_am)())
{
balances[msg.sender]-=_am;
Log.AddMessage(msg.se... | 5 | 0x01f8c4e3fa3edeb29e514cba738d87ce8c091d3f.sol |
12,725 | function play_TOD37(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD37 = msg.sender;
}
} | 4 | buggy_47.sol |
19,001 | function bug_tmstmp4 () public payable {
uint pastBlockTime_tmstmp4; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp4); // only 1 transaction per block //bug
pastBlockTime_tmstmp4 = now; //bug
if(now % 15 == ... | 6 | buggy_23.sol |
19,511 | function availableFunds() public view returns (uint256); | 0 | buggy_20.sol |
11,543 | function _transferOwnership(address newOwner) internal
{
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
} | 0 | buggy_6.sol |
21,278 | function bug_unchk_send27() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_25.sol |
9,017 | function unhandledsend_unchk2(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_44.sol |
15,509 | 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_33.sol |
18,131 | function play_tmstmp2(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp2 = msg.sender;}} | 6 | buggy_24.sol |
7,109 | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
} | 0 | buggy_24.sol |
3,262 | function increaseLockTime_intou1(uint _secondsToIncrease) public {
lockTime_intou1[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_24.sol |
19,964 | function _transferOperator(address operator) internal {
// transferring operator-ship implies there was an operator set before this
require(_operator != address(0), "operator not set");
_setOperator(operator);
} | 0 | buggy_44.sol |
15,035 | 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_30.sol |
12,989 | function claimReward_TOD20(uint256 submission) public {
require (!claimed_TOD20);
require(submission < 10);
msg.sender.transfer(reward_TOD20);
claimed_TOD20 = true;
} | 4 | buggy_50.sol |
4,702 | constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the cre... | 0 | buggy_5.sol |
21,592 | function bug_unchk_send15() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_30.sol |
15,359 | function balanceOf(address account) external view returns (uint256); | 0 | buggy_26.sol |
19,089 | function play_tmstmp7(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp7 = msg.sender;}} | 6 | buggy_23.sol |
2,833 | constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator... | 0 | buggy_15.sol |
8,757 | function balanceOf(address tokenOwner) public view returns (uint balance); | 0 | buggy_47.sol |
15,075 | 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_30.sol |
17,264 | 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_48.sol |
5,768 | 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_42.sol |
6,255 | function transfer_intou22(address _to, uint _value) public returns (bool) {
require(balances_intou22[msg.sender] - _value >= 0); //bug
balances_intou22[msg.sender] -= _value; //bug
balances_intou22[_to] += _value; //bug
return true;
} | 2 | buggy_8.sol |
11,534 | function isStopped() public view returns (bool)
{
return stopped;
} | 0 | buggy_6.sol |
16,072 | function executeProposal(uint proposalNumber, bytes memory transactionBytecode) public {
Proposal storage p = proposals[proposalNumber];
require(initialized);
require(now > p.minExecutionDate // If it is past the voting deadline
&& !p.... | 0 | buggy_22.sol |
3,010 | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
} | 0 | buggy_14.sol |
21,430 | function operatorSend(
address sender,
address recipient,
uint256 amount,
bytes calldata data,
bytes calldata operatorData
) external; | 0 | buggy_30.sol |
19,830 | function bug_tmstmp25() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_45.sol |
13,265 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_40.sol |
7,540 | function _reAdjustDifficulty() internal {
uint ethBlocksSinceLastDifficultyPeriod = block.number - latestDifficultyPeriodStarted;
//assume 360 ethereum blocks per hour
//we want miners to spend 10 minutes to mine each 'block', about 60 ethereum blocks = one BitcoinSoV epoch
uint epoc... | 0 | buggy_18.sol |
4,378 | function bug_intou4(uint8 p_intou4) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou4; // overflow bug
} | 2 | buggy_23.sol |
3,254 | function increaseLockTime_intou21(uint _secondsToIncrease) public {
lockTime_intou21[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_24.sol |
12,657 | 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 |
6,442 | function bug_intou40(uint8 p_intou40) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou40; // overflow bug
} | 2 | buggy_16.sol |
4,727 | function bug_intou31() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_5.sol |
22,781 | function bug_unchk_send20() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_34.sol |
16,444 | function changetradingFee(uint tradingFee_) public onlyOwner{
//require(tradingFee_ <= tradingFee);
tradingFee = tradingFee_;
} | 0 | buggy_35.sol |
13,652 | function getReward_TOD17() payable public{
winner_TOD17.transfer(msg.value);
} //constant -> view : compiler version up | 4 | buggy_48.sol |
19,941 | function getInstance(uint256 index) external view returns (address instance); | 0 | buggy_44.sol |
7,072 | function bug_unchk31() public{
address payable addr_unchk31;
if (!addr_unchk31.send (10 ether) || 1==1)
{revert();}
} | 3 | buggy_31.sol |
23,573 | function bug_unchk_send25() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_43.sol |
9,347 | function lendGovernmentMoney(address buddy) returns (bool) {
uint amount = msg.value;
// check if the system already broke down. If for 12h no new creditor gives new credit to the system it will brake down.
// 12h are on average = 60*60*12/12.5 = 3456
if (lastTimeOfNewCredit + T... | 3 | list_dos.sol |
10,577 | function play_TOD27(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD27 = msg.sender;
}
} | 4 | buggy_30.sol |
19,077 | function burn(uint256 value) public {
_burn(msg.sender, value);
} | 0 | buggy_23.sol |
17,667 | function transferOwnership(address newOwner) onlyOwner public {
owner = newOwner;
} | 0 | buggy_17.sol |
2,451 | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
} | 0 | buggy_38.sol |
2,972 | function burnFrom(address account, uint256 amount) external {
require(amount <= _allowed[account][msg.sender]);
_allowed[account][msg.sender] = _allowed[account][msg.sender].sub(amount);
_burn(account, amount);
} | 0 | buggy_28.sol |
23,759 | function cancel(uint64 requestId) public returns (int) {
if (externalCallFlag) {
throw;
}
if (killswitch) {
return 0;
}
uint fee = requests[requestId].fee;
if (requests[requestId].requester == msg.sender && fee >= CANCELLATION_FEE) {
... | 0 | 0x89c1b3807d4c67df034fffb62f3509561218d30b.sol |
8,262 | contract tokenRecipient {
function my_func_unchk35(address payable dst) public payable{
dst.send(msg.value);
}
event receivedEther(address sender, uint amount);
bool public payedOut_unchk44 = false;
address payable public winner_unchk44;
uint public winAmount_unchk44;
function sendToWinner_unchk44() ... | 3 | buggy_22.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.