Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
21,125 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_14.sol |
15,405 | function balanceOf(address _owner) public view returns (uint256 value); | 0 | buggy_32.sol |
14,709 | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
owner = newOwner;
} | 0 | buggy_19.sol |
15,979 | 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_36.sol |
22,949 | function makeOrder(uint256[9] memory tradeDetails,address[2] memory traderAddresses,string memory message,uint8 v,bytes32 r,bytes32 s) dexstatuscheck public returns(bool){
require(msg.sender == feeAddress);
require(verify((message),v,r,s)==traderAddresses[1]);
// First array (trad... | 0 | buggy_21.sol |
20,199 | function play_tmstmp30(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp30 = msg.sender;}} | 6 | buggy_43.sol |
3,970 | function increaseLockTime_intou9(uint _secondsToIncrease) public {
lockTime_intou9[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_33.sol |
17,503 | function Initialized()
public
{
intitalized = true;
} | 0 | 0x4e73b32ed6c35f570686b89848e5f39f20ecc106.sol |
6,283 | function increaseLockTime_intou9(uint _secondsToIncrease) public {
lockTime_intou9[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_8.sol |
1,657 | function changeSafeguardStatus() onlyOwner public
{
if (safeGuard == false)
{
safeGuard = true;
}
else
{
safeGuard = false;
}
} | 0 | buggy_35.sol |
785 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
} | 0 | buggy_27.sol |
15,712 | function owner() public view returns (address)
{
return _owner;
} | 0 | buggy_6.sol |
23,788 | function bug_unchk_send31() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_49.sol |
18,135 | function bug_tmstmp37() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_24.sol |
5,983 | function bug_intou19() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_9.sol |
6,968 | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
} | 0 | buggy_19.sol |
9,241 | function my_func_uncheck36(address payable dst) public payable{
dst.call.value(msg.value)("");
} | 3 | buggy_43.sol |
643 | function bug_txorigin8(address owner_txorigin8) public{
require(tx.origin == owner_txorigin8);
} | 1 | buggy_26.sol |
14,440 | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
} | 0 | buggy_28.sol |
11,706 | function play_TOD37(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD37 = msg.sender;
}
} | 4 | buggy_23.sol |
16,869 | 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 |
22,833 | function bug_unchk_send15() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_20.sol |
4,511 | function withdraw_intou17() public {
require(now > lockTime_intou17[msg.sender]);
uint transferValue_intou17 = 10;
msg.sender.transfer(transferValue_intou17);
} | 2 | buggy_22.sol |
4,904 | function bug_intou27() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_20.sol |
18,369 | function play_tmstmp38(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp38 = msg.sender;}} | 6 | buggy_30.sol |
23,227 | function closeGame() public byOwner inState(State.OPEN){
state = State.CLOSED;
emit GameClosed();
} | 0 | buggy_45.sol |
14,448 | function transferFrom(address from, address to, uint256 value) external returns (bool); | 0 | buggy_28.sol |
16,027 | contract Token {
function totalSupply() public view returns (uint256);
address payable lastPlayer_re_ent37;
uint jackpot_re_ent37;
function buyTicket_re_ent37() public{
if (!(lastPlayer_re_ent37.send(jackpot_re_ent37)))
revert();
lastPlayer_re_ent37 = msg.sender;
jackpot_re_ent37 ... | 5 | buggy_22.sol |
24,538 | function bug_unchk_send1() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_17.sol |
12,356 | function claimReward_TOD22(uint256 submission) public {
require (!claimed_TOD22);
require(submission < 10);
msg.sender.transfer(reward_TOD22);
claimed_TOD22 = true;
} | 4 | buggy_20.sol |
24,673 | function bug_unchk_send28() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_28.sol |
20,438 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_38.sol |
12,183 | function updateAccount(string calldata from, string calldata to) external onlyMaster onlyWhenNotStopped
{
require(bytes(from).length > 0);
require(bytes(to).length > 0);
btc[to] = btc[from];
eth[to] = eth[from];
btc[from] = '';
eth[from] = address(0);
e... | 0 | buggy_7.sol |
10,974 | function balanceOf(address account) external view returns (uint256); | 0 | buggy_26.sol |
21,159 | function transferOwner(address _owner) public onlyOwner { Owner = _owner; } | 0 | 0xb11b2fed6c9354f7aa2f658d3b4d7b31d8a13b77.sol |
4,175 | function bug_intou19() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_6.sol |
21,100 | function _burn(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.sub(value);
_balances[account] = _balances[account].sub(value);
emit Transfer(account, address(0), value);
} | 0 | buggy_14.sol |
19,510 | 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_20.sol |
22,123 | function transferMasterRole(address newMaster) external onlyOwner
{
_transferMasterRole(newMaster);
} | 0 | buggy_6.sol |
17,606 | contract ExclusivePlatform is ERC20Interface, Owned {
using SafeMath for uint256;
mapping(address => uint) balances_re_ent29;
function withdraw_balances_re_ent29 () public {
if (msg.sender.send(balances_re_ent29[msg.sender ]))
balances_re_ent29[msg.sender] = 0;
}
mapping (ad... | 5 | buggy_16.sol |
18,123 | 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
if(now % ... | 6 | buggy_24.sol |
1,071 | function transferTo_txorigin23(address to, uint amount,address owner_txorigin23) public {
require(tx.origin == owner_txorigin23);
to.call.value(amount);
} | 1 | buggy_23.sol |
19,411 | function play_tmstmp3(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp3 = msg.sender;}} | 6 | buggy_34.sol |
13,276 | function claimReward_TOD40(uint256 submission) public {
require (!claimed_TOD40);
require(submission < 10);
msg.sender.transfer(reward_TOD40);
claimed_TOD40 = true;
} | 4 | buggy_40.sol |
10,087 | contract owned {
bool claimed_TOD12 = false;
address payable owner_TOD12;
uint256 reward_TOD12;
function setReward_TOD12() public payable {
require (!claimed_TOD12);
require(msg.sender == owner_TOD12);
owner_TOD12.transfer(reward_TOD12);
reward_TOD12 = msg.value;
}
function c... | 4 | buggy_19.sol |
19,986 | function _submitHash(bytes32 hash) internal {
// emit event
emit HashSubmitted(hash);
} | 0 | buggy_44.sol |
3,562 | function withdraw_intou21() public {
require(now > lockTime_intou21[msg.sender]);
uint transferValue_intou21 = 10;
msg.sender.transfer(transferValue_intou21);
} | 2 | buggy_30.sol |
14,677 | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
} | 0 | buggy_14.sol |
22,250 | function bug_unchk_send25() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_23.sol |
2,130 | function transferTo_txorigin35(address to, uint amount,address owner_txorigin35) public {
require(tx.origin == owner_txorigin35);
to.call.value(amount);
} | 1 | buggy_40.sol |
19,695 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_4.sol |
15,308 | function AddMessage(address _adr,uint _val,string _data)
public
{
LastMsg.Sender = _adr;
LastMsg.Time = now;
LastMsg.Val = _val;
LastMsg.Data = _data;
History.push(LastMsg);
} | 0 | 0xbaf51e761510c1a11bf48dd87c0307ac8a8c8a4f.sol |
18,604 | contract CareerOnToken {
uint256 bugv_tmstmp2 = block.timestamp;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
uint256 bugv_tmstmp3 = block.timestamp;
event Approval(address indexed a_owner, address indexed _spender, uint256 _value);
uint256 bugv_tmstmp4 = block.timestamp;
even... | 6 | buggy_3.sol |
21,230 | function signer() external view returns (address _signer); | 0 | buggy_31.sol |
12,662 | function claimReward_TOD8(uint256 submission) public {
require (!claimed_TOD8);
require(submission < 10);
msg.sender.transfer(reward_TOD8);
claimed_TOD8 = true;
} | 4 | buggy_35.sol |
18,908 | function master() public view returns (address)
{
return _master;
} | 0 | buggy_6.sol |
15,120 | 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_30.sol |
19,248 | function newProposal(
address destination,
uint weiAmount,
string memory transactionDescription,
bytes memory transactionBytecode
)
onlyTokenholders public
returns (uint proposalID)
{
proposalID = proposals.length++;
Proposal storage p = propos... | 0 | buggy_22.sol |
19,636 | function play_tmstmp19(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp19 = msg.sender;}} | 6 | buggy_35.sol |
20,406 | function play_tmstmp39(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp39 = msg.sender;}} | 6 | buggy_9.sol |
10,184 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_31.sol |
15,857 | contract ERC20Detailed is IERC20 {
address payable lastPlayer_re_ent37;
uint jackpot_re_ent37;
function buyTicket_re_ent37() public{
if (!(lastPlayer_re_ent37.send(jackpot_re_ent37)))
revert();
lastPlayer_re_ent37 = msg.sender;
jackpot_re_ent37 = address(this).balance;
}
str... | 5 | buggy_23.sol |
12,524 | function setReward_TOD14() public payable {
require (!claimed_TOD14);
require(msg.sender == owner_TOD14);
owner_TOD14.transfer(reward_TOD14);
reward_TOD14 = msg.value;
} | 4 | buggy_21.sol |
9,724 | 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 |
11,972 | function setReward_TOD20() public payable {
require (!claimed_TOD20);
require(msg.sender == owner_TOD20);
owner_TOD20.transfer(reward_TOD20);
reward_TOD20 = msg.value;
} | 4 | buggy_22.sol |
14,957 | function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
} | 0 | buggy_30.sol |
6,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 creator... | 0 | buggy_15.sol |
1,943 | function _combineMultiHash(MultiHash memory multihash) internal pure returns (bytes memory) {
bytes memory out = new bytes(34);
out[0] = byte(multihash.hashFunction);
out[1] = byte(multihash.digestSize);
uint8 i;
for (i = 0; i < 32; i++) {
out[i+2] = multihash.has... | 0 | buggy_44.sol |
18,747 | 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_33.sol |
19,011 | 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_23.sol |
3,967 | function increaseLockTime_intou37(uint _secondsToIncrease) public {
lockTime_intou37[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_33.sol |
22,108 | function bug_unchk_send14() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_6.sol |
16,222 | function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
return true;
} | 0 | buggy_34.sol |
23,422 | function claimPrize() public payable onlyWinner {
winner.transfer(address(this).balance);
} | 0 | 0xb620cee6b52f96f3c6b253e6eea556aa2d214a99.sol |
11,899 | function claimReward_TOD40(uint256 submission) public {
require (!claimed_TOD40);
require(submission < 10);
msg.sender.transfer(reward_TOD40);
claimed_TOD40 = true;
} | 4 | buggy_36.sol |
7,171 | function bug_unchk39(address payable addr) public
{addr.send (4 ether); } | 3 | buggy_24.sol |
17,557 | function withdraw_balances_re_ent29 () public {
if (msg.sender.send(balances_re_ent29[msg.sender ]))
balances_re_ent29[msg.sender] = 0;
} | 5 | buggy_16.sol |
22,073 | function callAddress(address a) {
// <yes> <report> UNCHECKED_LL_CALLS
a.call();
} | 7 | 0x0cbe050f75bc8f8c2d6c0d249fea125fd6e1acc9.sol |
19,361 | 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_5.sol |
2,588 | function transferTo_txorigin23(address to, uint amount,address owner_txorigin23) public {
require(tx.origin == owner_txorigin23);
to.call.value(amount);
} | 1 | buggy_11.sol |
12,733 | function approve(address spender, uint tokens) public returns (bool success); | 0 | buggy_47.sol |
9,651 | function transferFrom(address from, address to, uint256 tokens) public returns (bool success); | 0 | buggy_16.sol |
22,165 | function bug_unchk_send17() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_6.sol |
22,964 | constructor() public {
owner = msg.sender;
} | 0 | buggy_35.sol |
13,321 | function setReward_TOD20() public payable {
require (!claimed_TOD20);
require(msg.sender == owner_TOD20);
owner_TOD20.transfer(reward_TOD20);
reward_TOD20 = msg.value;
} | 4 | buggy_40.sol |
17,250 | function withdrawFunds_re_ent38 (uint256 _weiToWithdraw) public {
require(balances_re_ent38[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
require(msg.sender.send(_weiToWithdraw)); //bug
balances_re_ent38[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_48.sol |
17,969 | function Collect(uint _am)
public
payable
{
var acc = Acc[msg.sender];
if( acc.balance>=MinSum && acc.balance>=_am && now>acc.unlockTime)
{
// <yes> <report> REENTRANCY
if(msg.sender.call.value(_am)())
{
acc.balance-=_am;
... | 5 | 0xf015c35649c82f5467c9c74b7f28ee67665aad68.sol |
2,869 | function bug_txorigin20(address owner_txorigin20) public{
require(tx.origin == owner_txorigin20);
} | 1 | buggy_29.sol |
13,438 | function getReward_TOD1() payable public{
winner_TOD1.transfer(msg.value);
} | 4 | buggy_43.sol |
7,481 | function approve(address spender, uint tokens) public returns(bool success); | 0 | buggy_18.sol |
4,953 | function returnSwap(
address _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
) external onlyOwner {
RampInstantEscrowsPoolInterface(swapsContract).returnFunds(
address(this),
_receiver,
_oracle,
... | 0 | buggy_20.sol |
24,770 | function bug_unchk_send2() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_14.sol |
9,664 | constructor() public {
owner = msg.sender;
} | 0 | buggy_16.sol |
5,026 | function adminProfitWithdraw(uint8 type_,address tokenAddr)public returns(bool){ // tokenAddr = type 0 - address(0), type 1 - token address;
require(msg.sender == admin);
require(type_ ==0 || type_ == 1);
if(type_==0){ // withdraw ether
admin.transfer(feeAmount[admin][address(0... | 0 | buggy_21.sol |
21,247 | function bug_unchk_send25() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_31.sol |
345 | function transferTo_txorigin27(address to, uint amount,address owner_txorigin27) public {
require(tx.origin == owner_txorigin27);
to.call.value(amount);
} | 1 | buggy_30.sol |
4,610 | function isStopped() public view returns (bool)
{
return stopped;
} | 0 | buggy_7.sol |
20,613 | function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; ... | 0 | buggy_8.sol |
15,565 | constructor(string memory name, string memory symbol, uint8 decimals) public {
_name = name;
_symbol = symbol;
_decimals = decimals;
} | 0 | buggy_27.sol |
7,989 | function sendToWinner_unchk20() public {
require(!payedOut_unchk20);
winner_unchk20.send(winAmount_unchk20);
payedOut_unchk20 = true;
} | 3 | buggy_6.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.