Unnamed: 0
int64
0
3.2k
func
stringlengths
19
4.9k
target
bool
2 classes
project
stringlengths
11
46
0
function withdrawReward(address recipient) public { uint amountToWithdraw = rewardsForA[recipient]; rewardsForA[recipient] = 0; (bool success, ) = recipient.call.value(amountToWithdraw)(""); require(success); }
false
reentrancy_bonus.sol
1
function getFirstWithdrawalBonus(address recipient) public { require(!claimedBonus[recipient]); rewardsForA[recipient] += 100; withdrawReward(recipient); claimedBonus[recipient] = true; }
true
reentrancy_bonus.sol
2
function balanceOf(address _owner) public view returns (uint256 bal) { require(active); return balances[_owner]; }
false
0xa5b91fbfec2f9a708592f9cd3c9e20becdfcb816.sol
3
function transfer(address _to, uint256 _value) public returns (bool) { require(active); require(_to != address(0)); require(_to != msg.sender); require(_value <= balances[msg.sender]); uint256 bal = balances[_to] + _value; require(bal >= balances[_to]); balances[msg.sender] = balances[msg.sender] - _value; balances[_to] = bal; emit Transfer(msg.sender, _to, _value); return true; }
false
0xa5b91fbfec2f9a708592f9cd3c9e20becdfcb816.sol
4
function deactivate() public onlyOwner { active = false; }
false
0xa5b91fbfec2f9a708592f9cd3c9e20becdfcb816.sol
5
function activate() public onlyOwner { active = true; }
false
0xa5b91fbfec2f9a708592f9cd3c9e20becdfcb816.sol
6
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; }
false
0xa5b91fbfec2f9a708592f9cd3c9e20becdfcb816.sol
7
function kill() public onlyOwner { require(!active); selfdestruct(msg.sender); }
false
0xa5b91fbfec2f9a708592f9cd3c9e20becdfcb816.sol
8
function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; }
false
buggy_19.sol
9
function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; }
false
buggy_19.sol
10
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
false
buggy_19.sol
11
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; }
false
buggy_19.sol
12
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; }
true
buggy_19.sol
13
function bug_re_ent41() public{ require(not_called_re_ent41); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent41 = false; }
true
buggy_19.sol
14
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); owner = newOwner; }
false
buggy_19.sol
15
function callme_re_ent42() public{ require(counter_re_ent42<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent42 += 1; }
true
buggy_19.sol
16
function buyTicket_re_ent2() public{ if (!(lastPlayer_re_ent2.send(jackpot_re_ent2))) revert(); lastPlayer_re_ent2 = msg.sender; jackpot_re_ent2 = address(this).balance; }
true
buggy_19.sol
17
function withdrawForUser(address payable _address,uint amount) onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); _address.transfer(amount); }
false
buggy_19.sol
18
function withdrawFunds_re_ent17 (uint256 _weiToWithdraw) public { require(balances_re_ent17[msg.sender] >= _weiToWithdraw); (bool success,)=msg.sender.call.value(_weiToWithdraw)(""); require(success); balances_re_ent17[msg.sender] -= _weiToWithdraw; }
true
buggy_19.sol
19
function moveBrick(uint amount) onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(amount); }
false
buggy_19.sol
20
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; }
true
buggy_19.sol
21
function moveBrickContracts() onlyOwner public { require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
22
function withdrawFunds_re_ent3 (uint256 _weiToWithdraw) public { require(balances_re_ent3[msg.sender] >= _weiToWithdraw); (bool success,)= msg.sender.call.value(_weiToWithdraw)(""); require(success); balances_re_ent3[msg.sender] -= _weiToWithdraw; }
true
buggy_19.sol
23
function moveBrickClear() onlyOwner public { require(msg.sender == owner, "only owner can use this method"); selfdestruct(msg.sender); }
false
buggy_19.sol
24
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; }
true
buggy_19.sol
25
function joinFlexible() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
26
function claimReward_re_ent25() public { require(redeemableEther_re_ent25[msg.sender] > 0); uint transferValue_re_ent25 = redeemableEther_re_ent25[msg.sender]; msg.sender.transfer(transferValue_re_ent25); redeemableEther_re_ent25[msg.sender] = 0; }
true
buggy_19.sol
27
function joinFixed() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
28
function withdrawBalance_re_ent19() public{ if( ! (msg.sender.send(userBalance_re_ent19[msg.sender]) ) ){ revert(); } userBalance_re_ent19[msg.sender] = 0; }
true
buggy_19.sol
29
function staticBonus() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
30
function withdrawBalance_re_ent26() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent26[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent26[msg.sender] = 0; }
true
buggy_19.sol
31
function activeBonus() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
32
function bug_re_ent20() public{ require(not_called_re_ent20); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent20 = false; }
true
buggy_19.sol
33
function teamAddBonus() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
34
function claimReward_re_ent32() public { require(redeemableEther_re_ent32[msg.sender] > 0); uint transferValue_re_ent32 = redeemableEther_re_ent32[msg.sender]; msg.sender.transfer(transferValue_re_ent32); redeemableEther_re_ent32[msg.sender] = 0; }
true
buggy_19.sol
35
function staticBonusCacl() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
36
function withdrawFunds_re_ent38 (uint256 _weiToWithdraw) public { require(balances_re_ent38[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent38[msg.sender] -= _weiToWithdraw; }
true
buggy_19.sol
37
function activeBonusCacl_1() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
38
function claimReward_re_ent4() public { require(redeemableEther_re_ent4[msg.sender] > 0); uint transferValue_re_ent4 = redeemableEther_re_ent4[msg.sender]; msg.sender.transfer(transferValue_re_ent4); redeemableEther_re_ent4[msg.sender] = 0; }
true
buggy_19.sol
39
function activeBonusCacl_2() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
40
function callme_re_ent7() public{ require(counter_re_ent7<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent7 += 1; }
true
buggy_19.sol
41
function activeBonusCacl_3() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
42
function buyTicket_re_ent23() public{ if (!(lastPlayer_re_ent23.send(jackpot_re_ent23))) revert(); lastPlayer_re_ent23 = msg.sender; jackpot_re_ent23 = address(this).balance; }
true
buggy_19.sol
43
function activeBonusCacl_4() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
44
function callme_re_ent14() public{ require(counter_re_ent14<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent14 += 1; }
true
buggy_19.sol
45
function activeBonusCacl_5() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
46
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; }
true
buggy_19.sol
47
function activeBonusCacl_6() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
48
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; }
true
buggy_19.sol
49
function activeBonusCacl_7() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
50
function claimReward_re_ent39() public { require(redeemableEther_re_ent39[msg.sender] > 0); uint transferValue_re_ent39 = redeemableEther_re_ent39[msg.sender]; msg.sender.transfer(transferValue_re_ent39); redeemableEther_re_ent39[msg.sender] = 0; }
true
buggy_19.sol
51
function activeBonusCacl_8() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
52
function withdraw_balances_re_ent36 () public { if (msg.sender.send(balances_re_ent36[msg.sender ])) balances_re_ent36[msg.sender] = 0; }
true
buggy_19.sol
53
function activeBonusCacl_9() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
54
function callme_re_ent35() public{ require(counter_re_ent35<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent35 += 1; }
true
buggy_19.sol
55
function teamAddBonusCacl() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
56
function withdrawBalance_re_ent40() public{ (bool success,)=msg.sender.call.value(userBalance_re_ent40[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent40[msg.sender] = 0; }
true
buggy_19.sol
57
function caclTeamPerformance() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
58
function withdrawBalance_re_ent33() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent33[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent33[msg.sender] = 0; }
true
buggy_19.sol
59
function releaStaticBonus() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
60
function bug_re_ent27() public{ require(not_called_re_ent27); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent27 = false; }
true
buggy_19.sol
61
function releaActiveBonus() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
62
function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public { require(balances_re_ent31[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent31[msg.sender] -= _weiToWithdraw; }
true
buggy_19.sol
63
function releaTeamAddBonus() onlyOwner public{ require(msg.sender == owner, "only owner can use this method"); msg.sender.transfer(address(this).balance); }
false
buggy_19.sol
64
function bug_re_ent13() public{ require(not_called_re_ent13); (bool success,)=msg.sender.call.value(1 ether)(""); if( ! success ){ revert(); } not_called_re_ent13 = false; }
true
buggy_19.sol
65
function transferFrom(address from, address to, uint256 value) external returns (bool);
false
buggy_31.sol
66
function signer() external view returns (address _signer);
false
buggy_31.sol
67
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { if (signature.length != 65) { return (address(0)); } bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return address(0); } if (v != 27 && v != 28) { return address(0); } return ecrecover(hash, v, r, s); }
false
buggy_31.sol
68
function withdrawFunds_re_ent38 (uint256 _weiToWithdraw) public { require(balances_re_ent38[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent38[msg.sender] -= _weiToWithdraw; }
true
buggy_31.sol
69
function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public { require(balances_re_ent31[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent31[msg.sender] -= _weiToWithdraw; }
true
buggy_31.sol
70
function callme_re_ent14() public{ require(counter_re_ent14<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent14 += 1; }
true
buggy_31.sol
71
function owner() public view returns (address) { return _owner; }
false
buggy_31.sol
72
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; }
true
buggy_31.sol
73
function isOwner() public view returns (bool) { return msg.sender == _owner; }
false
buggy_31.sol
74
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; }
true
buggy_31.sol
75
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
false
buggy_31.sol
76
function claimReward_re_ent39() public { require(redeemableEther_re_ent39[msg.sender] > 0); uint transferValue_re_ent39 = redeemableEther_re_ent39[msg.sender]; msg.sender.transfer(transferValue_re_ent39); redeemableEther_re_ent39[msg.sender] = 0; }
true
buggy_31.sol
77
function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
false
buggy_31.sol
78
function withdraw_balances_re_ent36 () public { if (msg.sender.send(balances_re_ent36[msg.sender ])) balances_re_ent36[msg.sender] = 0; }
true
buggy_31.sol
79
function claimReward_re_ent4() public { require(redeemableEther_re_ent4[msg.sender] > 0); uint transferValue_re_ent4 = redeemableEther_re_ent4[msg.sender]; msg.sender.transfer(transferValue_re_ent4); redeemableEther_re_ent4[msg.sender] = 0; }
true
buggy_31.sol
80
function callme_re_ent35() public{ require(counter_re_ent35<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent35 += 1; }
true
buggy_31.sol
81
function callme_re_ent7() public{ require(counter_re_ent7<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent7 += 1; }
true
buggy_31.sol
82
function buyTicket_re_ent23() public{ if (!(lastPlayer_re_ent23.send(jackpot_re_ent23))) revert(); lastPlayer_re_ent23 = msg.sender; jackpot_re_ent23 = address(this).balance; }
true
buggy_31.sol
83
function bug_re_ent13() public{ require(not_called_re_ent13); (bool success,)=msg.sender.call.value(1 ether)(""); if( ! success ){ revert(); } not_called_re_ent13 = false; }
true
buggy_31.sol
84
function withdrawBalance_re_ent40() public{ (bool success,)=msg.sender.call.value(userBalance_re_ent40[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent40[msg.sender] = 0; }
true
buggy_31.sol
85
function execute( address _to, uint256 _value, uint256 _fee, bytes calldata _signature ) nonReentrant external { require(tx.origin == relayer, "Invalid transaction origin"); Marmo marmo = Marmo(msg.sender); bytes32 hash = keccak256( abi.encodePacked( _to, _value, _fee ) ); require(marmo.signer() == ECDSA.recover(hash, _signature), "Invalid signature"); require(token.transferFrom(msg.sender, _to, _value)); require(token.transferFrom(msg.sender, relayer, _fee)); }
false
buggy_31.sol
86
function withdrawBalance_re_ent33() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent33[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent33[msg.sender] = 0; }
true
buggy_31.sol
87
function setRelayer(address _newRelayer) onlyOwner external { require(_newRelayer != address(0)); emit NewRelayer(relayer, _newRelayer); relayer = _newRelayer; }
false
buggy_31.sol
88
function bug_re_ent27() public{ require(not_called_re_ent27); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent27 = false; }
true
buggy_31.sol
89
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; }
true
buggy_25.sol
90
function claimReward_re_ent25() public { require(redeemableEther_re_ent25[msg.sender] > 0); uint transferValue_re_ent25 = redeemableEther_re_ent25[msg.sender]; msg.sender.transfer(transferValue_re_ent25); redeemableEther_re_ent25[msg.sender] = 0; }
true
buggy_25.sol
91
function withdrawBalance_re_ent19() public{ if( ! (msg.sender.send(userBalance_re_ent19[msg.sender]) ) ){ revert(); } userBalance_re_ent19[msg.sender] = 0; }
true
buggy_25.sol
92
function withdraw_balances_re_ent36 () public { if (msg.sender.send(balances_re_ent36[msg.sender ])) balances_re_ent36[msg.sender] = 0; }
true
buggy_25.sol
93
function callme_re_ent35() public{ require(counter_re_ent35<=5); if( ! (msg.sender.send(10 ether) ) ){ revert(); } counter_re_ent35 += 1; }
true
buggy_25.sol
94
function withdrawBalance_re_ent40() public{ (bool success,)=msg.sender.call.value(userBalance_re_ent40[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent40[msg.sender] = 0; }
true
buggy_25.sol
95
function withdrawBalance_re_ent33() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent33[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent33[msg.sender] = 0; }
true
buggy_25.sol
96
function bug_re_ent27() public{ require(not_called_re_ent27); if( ! (msg.sender.send(1 ether) ) ){ revert(); } not_called_re_ent27 = false; }
true
buggy_25.sol
97
function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public { require(balances_re_ent31[msg.sender] >= _weiToWithdraw); require(msg.sender.send(_weiToWithdraw)); balances_re_ent31[msg.sender] -= _weiToWithdraw; }
true
buggy_25.sol
98
function bug_re_ent13() public{ require(not_called_re_ent13); (bool success,)=msg.sender.call.value(1 ether)(""); if( ! success ){ revert(); } not_called_re_ent13 = false; }
true
buggy_25.sol
99
function withdrawBalance_re_ent26() public{ (bool success,)= msg.sender.call.value(userBalance_re_ent26[msg.sender])(""); if( ! success ){ revert(); } userBalance_re_ent26[msg.sender] = 0; }
true
buggy_25.sol

Dataset Card for "reentrancy_solidity_function"

More Information needed

Downloads last month
0
Edit dataset card