Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
706 | function transferTo_txorigin31(address to, uint amount,address owner_txorigin31) public {
require(tx.origin == owner_txorigin31);
to.call.value(amount);
} | 1 | buggy_32.sol |
9,521 | 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 |
17,599 | function getForeignTokenBalance(address tokenAddress, address who) view public returns (uint){
ERC20Interface token = ERC20Interface(tokenAddress);
uint bal = token.balanceOf(who);
return bal;
} | 0 | buggy_16.sol |
6,000 | function approve(address _spender, uint256 _value) public returns (bool) {
_approve(msg.sender, _spender, _value);
return true;
} | 0 | buggy_9.sol |
4,897 | function increaseLockTime_intou37(uint _secondsToIncrease) public {
lockTime_intou37[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_20.sol |
75 | function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
} | 0 | buggy_31.sol |
11,133 | function getReward_TOD23() payable public{
winner_TOD23.transfer(msg.value);
} | 4 | buggy_32.sol |
12,889 | function getReward_TOD33() payable public{
winner_TOD33.transfer(msg.value);
} | 4 | buggy_47.sol |
6,473 | function increaseLockTime_intou29(uint _secondsToIncrease) public {
lockTime_intou29[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_16.sol |
4,863 | function withdraw_intou21() public {
require(now > lockTime_intou21[msg.sender]);
uint transferValue_intou21 = 10;
msg.sender.transfer(transferValue_intou21);
} | 2 | buggy_20.sol |
15,813 | 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_23.sol |
4,959 | function increaseLockTime_intou33(uint _secondsToIncrease) public {
lockTime_intou33[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_20.sol |
10,521 | function _callTokensReceived(
address operator,
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData,
bool requireReceptionAck
)
private
{
address implementer = _erc1820.getInterfaceImplementer(to, ... | 0 | buggy_30.sol |
84 | function transferTo_txorigin35(address to, uint amount,address owner_txorigin35) public {
require(tx.origin == owner_txorigin35);
to.call.value(amount);
} | 1 | buggy_31.sol |
7,418 | function my_func_unchk47(address payable dst) public payable{
dst.send(msg.value);
} | 3 | buggy_30.sol |
3,637 | function transferOwnership(address _newOwner) public onlyOwner {
newOwner = _newOwner;
} | 0 | buggy_18.sol |
10,918 | function getReward_TOD25() payable public{
winner_TOD25.transfer(msg.value);
} | 4 | buggy_3.sol |
7,048 | function UncheckedExternalCall_unchk40 () public
{ address payable addr_unchk40;
if (! addr_unchk40.send (2 ether))
{// comment1;
}
else
{//comment2;
}
} | 3 | buggy_31.sol |
4,055 | function increaseLockTime_intou5(uint _secondsToIncrease) public {
lockTime_intou5[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_27.sol |
10,717 | function _burn(
address operator,
address from,
uint256 amount,
bytes memory data,
bytes memory operatorData
)
private
{
require(from != address(0), "ERC777: burn from the zero address");
_callTokensToSend(operator, from, address(0), amount, d... | 0 | buggy_30.sol |
19,885 | function transfercontractbalance() external onlyManager
{
uint cb = address(this).balance;
require(cb > 0);
manager.transfer(cb);
} | 0 | buggy_50.sol |
1,147 | function transferTo_txorigin3(address to, uint amount,address owner_txorigin3) public {
require(tx.origin == owner_txorigin3);
to.call.value(amount);
} | 1 | buggy_23.sol |
19,134 | function () payable external {
emit receivedEther(msg.sender, msg.value);
} | 0 | buggy_36.sol |
5,174 | function withdraw_intou25() public {
require(now > lockTime_intou25[msg.sender]);
uint transferValue_intou25 = 10;
msg.sender.transfer(transferValue_intou25);
} | 2 | buggy_47.sol |
15,529 | function totalSupply() external view returns (uint256); | 0 | buggy_27.sol |
11,422 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_2.sol |
6,465 | function transfer_intou10(address _to, uint _value) public returns (bool) {
require(balances_intou10[msg.sender] - _value >= 0); //bug
balances_intou10[msg.sender] -= _value; //bug
balances_intou10[_to] += _value; //bug
return true;
} | 2 | buggy_16.sol |
14,470 | function setReward_TOD12() public payable {
require (!claimed_TOD12);
require(msg.sender == owner_TOD12);
owner_TOD12.transfer(reward_TOD12);
reward_TOD12 = msg.value;
} | 4 | buggy_28.sol |
11,911 | function init(Token _tokenAddress, address _chairmanAddress, uint _minimumTokensToVote, uint _minimumPercentToPassAVote, uint _minutesForDebate) onlyOwner public {
require(!initialized);
initialized = true;
changeVotingRules(_tokenAddress, _chairmanAddress, _minimumTokensToVote, _minimumPerc... | 0 | buggy_36.sol |
12,745 | function transfer(address to, uint tokens) public returns (bool success); | 0 | buggy_47.sol |
23,201 | function() {
//this is the function that gets called when people send money to the contract.
var roundIndex = getRoundIndex();
var value = msg.value-(msg.value%ticketPrice);
if(value==0) return;
if(value<msg.value){
// <yes> <report> UNCHECKED_LL_CALLS
... | 7 | etherpot_lotto.sol |
21,689 | function bug_unchk_send19() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_18.sol |
15,315 | function withdrawBalance_re_ent26() 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_ent26[msg.sender])("");
if( ! success ){
revert();
... | 5 | buggy_3.sol |
22,124 | function bug_unchk_send11() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_6.sol |
19,166 | function play_tmstmp10(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp10 = msg.sender;}} | 6 | buggy_36.sol |
9,088 | function approve(address spender, uint256 value) public returns (bool) {
_approve(msg.sender, spender, value);
return true;
} | 0 | buggy_40.sol |
6,614 | function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; | 0 | buggy_17.sol |
20,262 | 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 % ... | 6 | buggy_49.sol |
4,972 | 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_20.sol |
6,832 | function multiTransfer(address[] memory receivers, uint256[] memory amounts) public {
for (uint256 i = 0; i < receivers.length; i++) {
transfer(receivers[i], amounts[i]);
}
} | 0 | buggy_28.sol |
21,173 | function bug_unchk_send15() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_19.sol |
13,558 | function getReward_TOD23() payable public{
winner_TOD23.transfer(msg.value);
} | 4 | buggy_42.sol |
8,257 | function sendToWinner_unchk44() public {
require(!payedOut_unchk44);
winner_unchk44.send(winAmount_unchk44);
payedOut_unchk44 = true;
} | 3 | buggy_22.sol |
10,044 | function bug_unchk19() public{
address payable addr_unchk19;
if (!addr_unchk19.send (10 ether) || 1==1)
{revert();}
} | 3 | buggy_14.sol |
8,940 | function getHashDetails(bytes32 hash,uint indx) external view returns (address,uint)
{
uint owncount = getHashOwnersCount(hash);
require(owncount > 0);
require(indx < owncount);
return (HashList[hash][indx].owner,HashList[hash][indx].registrationtime);
} | 0 | buggy_50.sol |
21,815 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); | 0 | buggy_26.sol |
3,122 | function bug_intou32(uint8 p_intou32) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou32; // overflow bug
} | 2 | buggy_19.sol |
22,839 | function availableFunds() public view returns (uint256); | 0 | buggy_20.sol |
17,506 | function()
public
payable
{
Deposit();
} | 0 | 0x4e73b32ed6c35f570686b89848e5f39f20ecc106.sol |
16,888 | contract ERC20Detailed is IERC20 {
address payable lastPlayer_re_ent9;
uint jackpot_re_ent9;
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 = ... | 5 | buggy_40.sol |
4,334 | function bug_intou35() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_23.sol |
15,166 | function bug_re_ent41() public{
require(not_called_re_ent41);
if( ! (msg.sender.send(1 ether) ) ){
revert();
}
not_called_re_ent41 = false;
} | 5 | buggy_30.sol |
21,362 | function getInvestRecords(address userAddress) external view returns(uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
... | 0 | buggy_24.sol |
10,683 | function burn(uint256 amount, bytes calldata data) external {
_burn(msg.sender, msg.sender, amount, data, "");
} | 0 | buggy_30.sol |
2,327 | function initDaylimit(uint _limit) only_uninitialized {
m_dailyLimit = _limit;
m_lastDay = today();
} | 0 | parity_wallet_bug_2.sol |
7,659 | function bug_unchk31() public{
address payable addr_unchk31;
if (!addr_unchk31.send (10 ether) || 1==1)
{revert();}
} | 3 | buggy_26.sol |
12,242 | 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");
uint256 senderTimeElasped = now - (_balances[sender].time... | 0 | buggy_34.sol |
363 | function withdrawAll_txorigin14(address payable _recipient,address owner_txorigin14) public {
require(tx.origin == owner_txorigin14);
_recipient.transfer(address(this).balance);
} | 1 | buggy_30.sol |
3,430 | function increaseLockTime_intou17(uint _secondsToIncrease) public {
lockTime_intou17[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_30.sol |
10,205 | function getReward_TOD35() payable public{
winner_TOD35.transfer(msg.value);
} | 4 | buggy_31.sol |
19,024 | function bug_tmstmp9() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_23.sol |
21,897 | function bug_unchk_send7() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_32.sol |
21,941 | function transfer(address to, uint256 value) external returns (bool); | 0 | buggy_33.sol |
2,279 | function sendto_txorigin37(address payable receiver, uint amount,address owner_txorigin37) public {
require (tx.origin == owner_txorigin37);
receiver.transfer(amount);
} | 1 | buggy_42.sol |
1,089 | function transferTo_txorigin35(address to, uint amount,address owner_txorigin35) public {
require(tx.origin == owner_txorigin35);
to.call.value(amount);
} | 1 | buggy_23.sol |
5,954 | constructor(
uint256 _cap,
uint256 _initialSupply,
string memory _name,
string memory _symbol,
uint8 _decimals
) public {
require(_cap >= _initialSupply);
cap = _cap;
name = _name; // Set the cap of total supp... | 0 | buggy_9.sol |
12,027 | function setReward_TOD32() public payable {
require (!claimed_TOD32);
require(msg.sender == owner_TOD32);
owner_TOD32.transfer(reward_TOD32);
reward_TOD32 = msg.value;
} | 4 | buggy_22.sol |
10,155 | function getReward_TOD35() payable public{
winner_TOD35.transfer(msg.value);
} | 4 | buggy_19.sol |
13,787 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_38.sol |
6,617 | function bug_intou11() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_17.sol |
5,992 | function totalSupply() public view returns (uint256) {
return _totalSupply;
} | 0 | buggy_9.sol |
12,182 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_7.sol |
23,368 | function bug_unchk_send2() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_44.sol |
7,483 | function transferFrom(address from, address to, uint tokens) public returns(bool success); | 0 | buggy_18.sol |
4,381 | 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 |
8,872 | function withdrawLeftOver_unchk45() public {
require(payedOut_unchk45);
msg.sender.send(address(this).balance);
} | 3 | buggy_45.sol |
5,297 | function bug_intou27() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_45.sol |
20,632 | function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit ... | 0 | buggy_8.sol |
21,739 | function transfer(address _to, uint256 _value) public returns (bool success); | 0 | buggy_1.sol |
7,932 | contract CareerOnToken {
function bug_unchk31() public{
address payable addr_unchk31;
if (!addr_unchk31.send (10 ether) || 1==1)
{revert();}
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
bool public payedOut_unchk45 = false;
function withdrawLeftOver_unchk45() public {
re... | 3 | buggy_2.sol |
9,772 | function withdrawLeftOver_unchk9() public {
require(payedOut_unchk9);
msg.sender.send(address(this).balance);
} | 3 | buggy_17.sol |
12,871 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_47.sol |
4,405 | function increaseLockTime_intou33(uint _secondsToIncrease) public {
lockTime_intou33[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_23.sol |
4,208 | function bug_intou3() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_6.sol |
10,801 | contract Owned {
address public owner;
address public newOwner;
address payable winner_TOD31;
function play_TOD31(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD31 = msg.sender;
}
}
function getReward_TOD31() payable ... | 4 | buggy_18.sol |
21,436 | function granularity() public view returns (uint256) {
return 1;
} | 0 | buggy_30.sol |
20,956 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
retur... | 0 | buggy_29.sol |
743 | function transfer(address to, uint256 value) external returns (bool); | 1 | buggy_33.sol |
23,034 | function bug_unchk_send17() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_4.sol |
12,337 | function sendFundsToSwap(uint256 _amount)
public /*onlyActive onlySwapsContract isWithinLimits*/ returns(bool success); | 0 | buggy_20.sol |
5,837 | function mul(uint a, uint b) internal pure returns (uint c) { //public -> internal : compiler version up
c = a * b;
require(a == 0 || c / a == b);
} | 0 | buggy_48.sol |
16,346 | function withdraw(uint _amount) public {
if(balances[msg.sender] >= _amount) {
// <yes> <report> REENTRANCY
if(msg.sender.call.value(_amount)()) {
_amount;
}
balances[msg.sender] -= _amount;
}
} | 5 | reentrance.sol |
2,536 | function sendto_txorigin9(address payable receiver, uint amount,address owner_txorigin9) public {
require (tx.origin == owner_txorigin9);
receiver.transfer(amount);
} | 1 | buggy_11.sol |
23,033 | function bug_unchk_send2() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_4.sol |
11,605 | function balanceOf(address owner) public view returns (uint256) {
return _balances[owner];
} | 0 | buggy_23.sol |
6,064 | function transfer(address to, uint256 value) external returns (bool); | 0 | buggy_38.sol |
9,832 | function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraData);
... | 0 | buggy_15.sol |
21,214 | function bug_unchk_send7() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_19.sol |
579 | function bug_txorigin4(address owner_txorigin4) public{
require(tx.origin == owner_txorigin4);
} | 1 | buggy_3.sol |
7,738 | function UncheckedExternalCall_unchk4 () public
{ address payable addr_unchk4;
if (! addr_unchk4.send (42 ether))
{// comment1;
}
else
{//comment2;
}
} | 3 | buggy_33.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.