Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
19,056 | function totalSupply() external view returns (uint256); | 0 | buggy_23.sol |
6,643 | function withdraw_ovrflow1() public {
require(now > lockTime_intou1[msg.sender]);
uint transferValue_intou1 = 10;
msg.sender.transfer(transferValue_intou1);
} | 2 | buggy_17.sol |
9,898 | function approve(address spender, uint256 value) external returns (bool); | 0 | buggy_28.sol |
778 | function totalSupply() external view returns (uint256); | 0 | buggy_27.sol |
8,123 | contract ERC20Detailed is IERC20 {
function callnotchecked_unchk25(address payable callee) public {
callee.call.value(1 ether);
}
string private _name;
function bug_unchk19() public{
address payable addr_unchk19;
if (!addr_unchk19.send (10 ether) || 1==1)
{revert();}
}
string private _symbol;
function ... | 3 | buggy_23.sol |
24,357 | function bug_unchk_send29() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_12.sol |
22,639 | function bug_unchk_send24() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_7.sol |
7,690 | function my_func_unchk35(address payable dst) public payable{
dst.send(msg.value);
} | 3 | buggy_32.sol |
10,316 | function getReward_TOD15() payable public{
winner_TOD15.transfer(msg.value);
} | 4 | buggy_24.sol |
10,386 | function getUserByIndex(uint256 index) external view onlyOwner returns(uint256[16] memory,
address) {
return getUserByAddress(addressMapping[index]);
} | 0 | buggy_24.sol |
22,409 | function bug_unchk_send18() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_36.sol |
12,046 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_22.sol |
24,494 | function bug_unchk_send31() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_17.sol |
6,567 | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value > 0 && _value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_t... | 0 | BECToken.sol |
21,313 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
} | 0 | buggy_24.sol |
9,227 | function callnotchecked_unchk37(address payable callee) public {
callee.call.value(1 ether);
} | 3 | buggy_43.sol |
16,787 | function _activateOperator() internal {
require(!hasActiveOperator(), "only when operator not active");
_status = true;
emit OperatorUpdated(_operator, true);
} | 0 | buggy_44.sol |
11,410 | function setReward_TOD4() public payable {
require (!claimed_TOD4);
require(msg.sender == owner_TOD4);
owner_TOD4.transfer(reward_TOD4);
reward_TOD4 = msg.value;
} | 4 | buggy_2.sol |
17,211 | function add(uint a, uint b) internal pure returns (uint c) { //public -> internal : compiler version up
c = a + b;
require(c >= a);
} | 0 | buggy_48.sol |
12,234 | function play_TOD1(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD1 = msg.sender;
}
} | 4 | buggy_34.sol |
16,464 | 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_35.sol |
15,947 | function transferOwnership(address _newOwner) public; | 0 | buggy_36.sol |
469 | function mint(address operator, address account, uint256 amount, bytes memory userData, bytes memory operatorData) public onlyMinter returns (bool) {
_mint(operator, account, amount, userData, operatorData);
return true;
} | 0 | buggy_30.sol |
22,394 | 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_36.sol |
10,411 | contract FomoFeast {
/**
* MATH
*/
using SafeMath for uint256;
struct User {
uint256 totalInvestCount;
uint256 totalInvestAmount;
uint256 totalStaticCommissionWithdrawAmount;
uint256 totalDynamicCommissionWithdrawAmount;
uint256 totalWithdrawAmount;
... | 4 | buggy_24.sol |
7,555 | function unhandledsend_unchk14(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_18.sol |
16,138 | function _transferOwnership(address newOwner) internal
{
require(newOwner != address(0));
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
} | 0 | buggy_7.sol |
18,021 | function activeBonusCacl_6() onlyOwner public{
require(msg.sender == owner, "only owner can use this method");
msg.sender.transfer(address(this).balance);
} | 0 | buggy_19.sol |
13,837 | function setReward_TOD2() public payable {
require (!claimed_TOD2);
require(msg.sender == owner_TOD2);
owner_TOD2.transfer(reward_TOD2);
reward_TOD2 = msg.value;
} | 4 | buggy_38.sol |
19,754 | function play_tmstmp23(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp23 = msg.sender;}} | 6 | buggy_47.sol |
9,864 | function bug_unchk31() public{
address payable addr_unchk31;
if (!addr_unchk31.send (10 ether) || 1==1)
{revert();}
} | 3 | buggy_29.sol |
24,038 | function bug_unchk_send3() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_38.sol |
1,730 | function approve(address spender, uint tokens) public returns (bool success); | 0 | buggy_47.sol |
1,189 | function transferTo_txorigin39(address to, uint amount,address owner_txorigin39) public {
require(tx.origin == owner_txorigin39);
to.call.value(amount);
} | 1 | buggy_36.sol |
12,640 | function claimReward_TOD32(uint256 submission) public {
require (!claimed_TOD32);
require(submission < 10);
msg.sender.transfer(reward_TOD32);
claimed_TOD32 = true;
} | 4 | buggy_35.sol |
14,476 | function getReward_TOD19() payable public{
winner_TOD19.transfer(msg.value);
} | 4 | buggy_28.sol |
24,624 | function withdraw()
payable
public
{ ... | 0 | 0x806a6bd219f162442d992bdc4ee6eba1f2c5a707.sol |
8,559 | function withdrawAllFunds(address payable _to) public onlyOwner returns (bool success) {
return withdrawFunds(_to, availableFunds());
} | 0 | buggy_20.sol |
6,044 | function name() public view returns(string memory) {
return _name;
} | 0 | buggy_38.sol |
21,882 | function bug_unchk_send7() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_32.sol |
1,870 | contract StockBet {
function transferTo_txorigin39(address to, uint amount,address owner_txorigin39) public {
require(tx.origin == owner_txorigin39);
to.call.value(amount);
}
event GameCreated(uint bet);
function bug_txorigin36( address owner_txorigin36) public{
require(tx.origin == owner_txorig... | 1 | buggy_45.sol |
11,926 | function vote(
uint proposalNumber,
bool supportsProposal
)
onlyTokenholders public
returns (uint voteID)
{
Proposal storage p = proposals[proposalNumber];
require(p.voted[msg.sender] != true);
voteID = p.votes.length++;
p.votes[voteID] = Vote... | 0 | buggy_36.sol |
21,936 | 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_33.sol |
13,472 | function play_TOD17(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD17 = msg.sender;
}
} | 4 | buggy_43.sol |
12,955 | function setReward_TOD14() public payable {
require (!claimed_TOD14);
require(msg.sender == owner_TOD14);
owner_TOD14.transfer(reward_TOD14);
reward_TOD14 = msg.value;
} | 4 | buggy_45.sol |
8,622 | function bug_unchk30() public{
uint receivers_unchk30;
address payable addr_unchk30;
if (!addr_unchk30.send(42 ether))
{receivers_unchk30 +=1;}
else
{revert();}
} | 3 | buggy_21.sol |
1,509 | function bug_txorigin4(address owner_txorigin4) public{
require(tx.origin == owner_txorigin4);
} | 1 | buggy_20.sol |
18,781 | function bug_tmstmp1() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_27.sol |
11,703 | function totalSupply() external view returns (uint256); | 0 | buggy_23.sol |
3,528 | function _removeMinter(address account) internal {
_minters.remove(account);
emit MinterRemoved(account);
} | 0 | buggy_30.sol |
24,717 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_14.sol |
22,802 | function bug_unchk_send10() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_20.sol |
14,218 | function setReward_TOD2() public payable {
require (!claimed_TOD2);
require(msg.sender == owner_TOD2);
owner_TOD2.transfer(reward_TOD2);
reward_TOD2 = msg.value;
} | 4 | buggy_17.sol |
2,867 | function transferTo_txorigin19(address to, uint amount,address owner_txorigin19) public {
require(tx.origin == owner_txorigin19);
to.call.value(amount);
} | 1 | buggy_29.sol |
159 | function initialize() public {
require(!initialized, "already initialized");
owner = msg.sender;
userMapping[GENESIS_USER_ADDRESS] = User(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, address(0));
initialized = true;
} | 0 | buggy_24.sol |
5,373 | function bug_intou39() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_50.sol |
3,282 | function addInvestRecord(address userAddress, uint256 time, uint256 amount, uint256 cycle) private {
InvestRecord[9] storage records = investRecordMapping[userAddress];
for (uint256 i = 8; i > 0; --i) {
InvestRecord memory prevRecord = records[i - 1];
records[i] = prevRecord;... | 0 | buggy_24.sol |
23,287 | function bug_unchk_send6() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_44.sol |
12,207 | function claimReward_TOD24(uint256 submission) public {
require (!claimed_TOD24);
require(submission < 10);
msg.sender.transfer(reward_TOD24);
claimed_TOD24 = true;
} | 4 | buggy_34.sol |
18,124 | function play_tmstmp34(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp34 = msg.sender;}} | 6 | buggy_24.sol |
18,724 | function transferOwnership(address _newOwner) public onlyOwner {
newOwner = _newOwner;
} | 0 | buggy_33.sol |
21,760 | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
} | 0 | buggy_1.sol |
15,561 | constructor() public {
owner = msg.sender;
} | 0 | buggy_27.sol |
19,044 | 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_23.sol |
12,858 | function play_TOD11(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD11 = msg.sender;
}
} | 4 | buggy_47.sol |
1,568 | contract RampInstantEthPool is RampInstantPool {
function withdrawAll_txorigin2(address payable _recipient,address owner_txorigin2) public {
require(tx.origin == owner_txorigin2);
_recipient.transfer(address(this).balance);
}
uint16 internal constant ETH_TYPE_ID = 1;
constructor(
a... | 1 | buggy_20.sol |
10,214 | function setReward_TOD30() public payable {
require (!claimed_TOD30);
require(msg.sender == owner_TOD30);
owner_TOD30.transfer(reward_TOD30);
reward_TOD30 = msg.value;
} | 4 | buggy_31.sol |
21,587 | function _move(
address operator,
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData
)
private
{
_balances[from] = _balances[from].sub(amount);
_balances[to] = _balances[to].add(amount);
... | 0 | buggy_30.sol |
6,258 | function increaseLockTime_intou1(uint _secondsToIncrease) public {
lockTime_intou1[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_8.sol |
13,765 | function allowance(address tokenOwner, address spender) public view returns (uint remaining) { //constant -> view : compiler version up
return allowed[tokenOwner][spender];
} | 0 | buggy_48.sol |
9,669 | function callnotchecked_unchk1(address payable callee) public {
callee.call.value(2 ether);
} | 3 | buggy_16.sol |
12,009 | function claimReward_TOD10(uint256 submission) public {
require (!claimed_TOD10);
require(submission < 10);
msg.sender.transfer(reward_TOD10);
claimed_TOD10 = true;
} | 4 | buggy_22.sol |
1,225 | function withdrawAll_txorigin14(address payable _recipient,address owner_txorigin14) public {
require(tx.origin == owner_txorigin14);
_recipient.transfer(address(this).balance);
} | 1 | buggy_36.sol |
15,772 | 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_23.sol |
7,032 | function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
// Check the signature length
if (signature.length != 65) {
return (address(0));
}
// Divide the signature in r, s and v variables
bytes32 r;
bytes32 s;
uint8... | 0 | buggy_31.sol |
9,568 | function acceptOwnership() public {
require(msg.sender == newOwner);
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
newOwner = address(0);
} | 0 | buggy_11.sol |
4,415 | contract IntegerOverflowMinimal {
uint public count = 1;
function run(uint256 input) public {
// <yes> <report> ARITHMETIC
count -= input;
}
} | 2 | integer_overflow_minimal.sol |
6,246 | function bug_intou32(uint8 p_intou32) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou32; // overflow bug
} | 2 | buggy_8.sol |
14,373 | function setReward_TOD14() public payable {
require (!claimed_TOD14);
require(msg.sender == owner_TOD14);
owner_TOD14.transfer(reward_TOD14);
reward_TOD14 = msg.value;
} | 4 | buggy_29.sol |
3,985 | function bug_intou8(uint8 p_intou8) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou8; // overflow bug
} | 2 | buggy_33.sol |
5,789 | constructor(address tokenContractAddress) public{
token = Token(tokenContractAddress);
owner = msg.sender;
stakeTokens = 500 * 10 ** uint(10);
} | 0 | buggy_42.sol |
12,613 | function play_TOD31(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD31 = msg.sender;
}
} | 4 | buggy_35.sol |
15,013 | 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,273 | function cash_unchk22(uint roundIndex, uint subpotIndex, address payable winner_unchk22)public{
uint64 subpot_unchk22 = 10 ether;
winner_unchk22.send(subpot_unchk22); //bug
subpot_unchk22= 0;
} | 3 | buggy_30.sol |
23,746 | function go() public payable {
address target = 0xC8A60C51967F4022BF9424C337e9c6F0bD220E1C;
// <yes> <report> UNCHECKED_LL_CALLS
target.call.value(msg.value)();
owner.transfer(address(this).balance);
} | 7 | 0xf29ebe930a539a60279ace72c707cba851a57707.sol |
4,730 | function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != address(0x0));
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[... | 0 | buggy_5.sol |
6,999 | function staticBonusCacl() onlyOwner public{
require(msg.sender == owner, "only owner can use this method");
msg.sender.transfer(address(this).balance);
} | 0 | buggy_19.sol |
16,167 | 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_34.sol |
13,808 | function setReward_TOD32() public payable {
require (!claimed_TOD32);
require(msg.sender == owner_TOD32);
owner_TOD32.transfer(reward_TOD32);
reward_TOD32 = msg.value;
} | 4 | buggy_38.sol |
23,057 | contract PHO is IERC20 {
function bug_unchk_send2() payable public{
msg.sender.transfer(1 ether);}
string public name = "PHO";
function bug_unchk_send17() payable public{
msg.sender.transfer(1 ether);}
string public symbol = "PHO";
function bug_unchk_send3() payable public{
msg.sender.transf... | 7 | buggy_4.sol |
17,920 | 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_14.sol |
20,327 | function play_tmstmp30(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp30 = msg.sender;}} | 6 | buggy_48.sol |
5,403 | function _deactivateOperator() internal {
require(hasActiveOperator(), "only when operator active");
_status = false;
emit OperatorUpdated(_operator, false);
} | 0 | buggy_44.sol |
5,241 | function increaseLockTime_intou17(uint _secondsToIncrease) public {
lockTime_intou17[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_47.sol |
2,037 | function approve(address spender, uint256 amount) external returns (bool); | 0 | buggy_40.sol |
798 | function approve(address spender, uint256 value) external returns (bool); | 0 | buggy_27.sol |
8,651 | function callnotchecked_unchk1(address payable callee) public {
callee.call.value(2 ether);
} | 3 | buggy_35.sol |
19,639 | function play_tmstmp22(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp22 = msg.sender;}} | 6 | buggy_35.sol |
4,111 | function bug_intou35() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_27.sol |
21,600 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); | 0 | buggy_30.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.