Unnamed: 0 int64 1 24.8k | func stringlengths 26 42.8k | target int64 0 7 | project stringlengths 9 47 |
|---|---|---|---|
11,116 | function play_TOD35(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD35 = msg.sender;
}
} | 4 | buggy_32.sol |
3,085 | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
} | 0 | buggy_19.sol |
8,573 | function unhandledsend_unchk2(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_20.sol |
1,513 | function returnSwap(
address _receiver,
address _oracle,
bytes calldata _assetData,
bytes32 _paymentDetailsHash
) external onlyOwner {
RampInstantEscrowsPoolInterface(swapsContract).returnFunds(
address(this),
_receiver,
_oracle,
... | 0 | buggy_20.sol |
9,378 | function balanceOf(address tokenOwner) public view returns (uint balance); | 0 | buggy_48.sol |
3,874 | function balanceOf(address _owner) public view returns (uint256 value); | 0 | buggy_32.sol |
21,569 | function transfer(address recipient, uint256 amount) external returns (bool) {
require(recipient != address(0), "ERC777: transfer to the zero address");
address from = msg.sender;
_callTokensToSend(from, from, recipient, amount, "", "");
_move(from, from, recipient, amount, "", ""... | 0 | buggy_30.sol |
1,713 | function balanceOf(address who) public view returns (uint256) {
return balances[who];
} | 0 | buggy_4.sol |
2,108 | function bug_txorigin20(address owner_txorigin20) public{
require(tx.origin == owner_txorigin20);
} | 1 | buggy_40.sol |
1,978 | function withdrawAll_txorigin22(address payable _recipient,address owner_txorigin22) public {
require(tx.origin == owner_txorigin22);
_recipient.transfer(address(this).balance);
} | 1 | buggy_44.sol |
7,127 | 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_24.sol |
13,140 | function getReward_TOD1() payable public{
winner_TOD1.transfer(msg.value);
} | 4 | buggy_44.sol |
20,484 | 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_38.sol |
17,676 | 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_17.sol |
2,173 | function getSaltyInstance(bytes calldata, bytes32 salt) external view returns (address instance); | 0 | buggy_43.sol |
10,891 | function setReward_TOD30() public payable {
require (!claimed_TOD30);
require(msg.sender == owner_TOD30);
owner_TOD30.transfer(reward_TOD30);
reward_TOD30 = msg.value;
} | 4 | buggy_18.sol |
22,730 | function bug_unchk_send14() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_5.sol |
2,483 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_38.sol |
20,974 | function withdrawFunds(uint256 withdrawAmount) external onlyContractOwner {
owner.transfer(withdrawAmount);
} | 0 | buggy_29.sol |
24,810 | function bug_unchk_send14() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_14.sol |
17,724 | contract MD{
// Public variables of the token
bool not_called_re_ent20 = true;
function bug_re_ent20() public{
require(not_called_re_ent20);
if( ! (msg.sender.send(1 ether) ) ){
revert();
}
not_called_re_ent20 = false;
}
string public name;
mapping(address => u... | 5 | buggy_15.sol |
23,314 | 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 |
16,440 | function calculatePercentage(uint256 PercentOf, uint256 percentTo ) internal pure returns (uint256)
{
uint256 factor = 10000;
require(percentTo <= factor);
uint256 c = PercentOf.mul(percentTo).div(factor);
return c;
} | 0 | buggy_35.sol |
7,475 | function balanceOf(address tokenOwner) public view returns(uint balance); | 0 | buggy_18.sol |
13,563 | function getReward_TOD17() payable public{
winner_TOD17.transfer(msg.value);
} | 4 | buggy_42.sol |
16,659 | function collectOwnerWinnings() public byOwner inState(State.OWNER_WIN){
selfdestruct(owner);
} | 0 | buggy_45.sol |
12,782 | function claimReward_TOD38(uint256 submission) public {
require (!claimed_TOD38);
require(submission < 10);
msg.sender.transfer(reward_TOD38);
claimed_TOD38 = true;
} | 4 | buggy_47.sol |
933 | function sendto_txorigin17(address payable receiver, uint amount,address owner_txorigin17) public {
require (tx.origin == owner_txorigin17);
receiver.transfer(amount);
} | 1 | buggy_6.sol |
11,636 | function setReward_TOD8() public payable {
require (!claimed_TOD8);
require(msg.sender == owner_TOD8);
owner_TOD8.transfer(reward_TOD8);
reward_TOD8 = msg.value;
} | 4 | buggy_23.sol |
9,397 | 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_48.sol |
13,444 | function claimReward_TOD30(uint256 submission) public {
require (!claimed_TOD30);
require(submission < 10);
msg.sender.transfer(reward_TOD30);
claimed_TOD30 = true;
} | 4 | buggy_43.sol |
24,410 | constructor() public {
owner = msg.sender;
} | 0 | buggy_16.sol |
12,145 | function getReward_TOD19() payable public{
winner_TOD19.transfer(msg.value);
} | 4 | buggy_7.sol |
23,737 | function WithdrawToken(address token, uint256 amount,address to)
public
onlyOwner
{
// <yes> <report> UNCHECKED_LL_CALLS
token.call(bytes4(sha3("transfer(address,uint256)")),to,amount);
} | 7 | 0x39cfd754c85023648bf003bea2dd498c5612abfa.sol |
19,452 | function play_tmstmp23(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp23 = msg.sender;}} | 6 | buggy_34.sol |
18,382 | function play_tmstmp6(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp6 = msg.sender;}} | 6 | buggy_30.sol |
16,144 | function _start() internal
{
emit Started();
stopped = false;
} | 0 | buggy_7.sol |
17,955 | 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 |
9,070 | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); | 0 | buggy_40.sol |
1,289 | function withdrawAll_txorigin38(address payable _recipient,address owner_txorigin38) public {
require(tx.origin == owner_txorigin38);
_recipient.transfer(address(this).balance);
} | 1 | buggy_22.sol |
11,798 | function play_TOD31(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD31 = msg.sender;
}
} | 4 | buggy_23.sol |
8,958 | 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 |
8,951 | function withdrawBal_unchk17 () public{
uint64 Balances_unchk17 = 0;
msg.sender.send(Balances_unchk17);} | 3 | buggy_44.sol |
5,024 | function withdraw(uint8 type_,address tokenaddr,uint256 amount) dexstatuscheck public returns(bool) {
require(type_ ==0 || type_ == 1);
if(type_==0){ // withdraw ether
require(tokenaddr == address(0));
require(amount>0 && amount <= userDetails[msg.sender][address(0)] && withdrawfe... | 0 | buggy_21.sol |
15,552 | function withdrawBalance_re_ent12() public{
// send userBalance[msg.sender] ethers to msg.sender
// if mgs.sender is a contract, it will call its fallback function
if( ! (msg.sender.send(userBalance_re_ent12[msg.sender]) ) ){
revert();
}
userBalance_re_ent12[msg.sende... | 5 | buggy_27.sol |
10,871 | function claimReward_TOD20(uint256 submission) public {
require (!claimed_TOD20);
require(submission < 10);
msg.sender.transfer(reward_TOD20);
claimed_TOD20 = true;
} | 4 | buggy_18.sol |
24,468 | function withdrawForeignTokens(address tokenAddress) onlyOwner public returns (bool) {
ERC20Interface token = ERC20Interface(tokenAddress);
uint256 amount = token.balanceOf(address(this));
return token.transfer(owner, amount);
} | 0 | buggy_16.sol |
6,935 | function increaseLockTime_intou25(uint _secondsToIncrease) public {
lockTime_intou25[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_14.sol |
3,565 | 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 |
10,791 | function getReward_TOD31() payable public{
winner_TOD31.transfer(msg.value);
} | 4 | buggy_18.sol |
5,141 | function bug_intou8(uint8 p_intou8) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou8; // overflow bug
} | 2 | buggy_4.sol |
13,066 | function hasActiveOperator() public view returns (bool ok) {
return _status;
} | 0 | buggy_44.sol |
8,090 | function bug_unchk39(address payable addr) public
{addr.send (4 ether); } | 3 | buggy_23.sol |
18,115 | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
} | 0 | buggy_24.sol |
18,142 | function getAbortInvestAmount(User memory user) private view returns (uint256 amount) {
uint256 commissionDays = now.sub(user.currentInvestTime).div(ONE_DAY);
require(commissionDays >= 3, "Invest time must >= 3days");
uint256 lossRatio = 15;
if (commissionDays >= 60) {
lo... | 0 | buggy_24.sol |
6,994 | function unhandledsend_unchk38(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_19.sol |
10,491 | function operatorBurn(address account, uint256 amount, bytes calldata data, bytes calldata operatorData) external {
require(isOperatorFor(msg.sender, account), "ERC777: caller is not an operator for holder");
_burn(msg.sender, account, amount, data, operatorData);
} | 0 | buggy_30.sol |
11,298 | function balanceOf(address who) external view returns (uint256); | 0 | buggy_27.sol |
886 | constructor() public {
root = msg.sender;
owners[root] = root;
} | 0 | multiowned_vulnerable.sol |
24,105 | function TokenSender(address _token) {
token = Token(_token);
} | 0 | 0xec329ffc97d75fe03428ae155fc7793431487f63.sol |
15,832 | function totalSupply() external view returns (uint256); | 0 | buggy_23.sol |
13,414 | function getInstanceCreator(address instance) external view returns (address creator); | 0 | buggy_43.sol |
16,915 | function allowance(address owner, address spender) public view returns (uint256) {
return _allowances[owner][spender];
} | 0 | buggy_40.sol |
12,043 | function claimReward_TOD14(uint256 submission) public {
require (!claimed_TOD14);
require(submission < 10);
msg.sender.transfer(reward_TOD14);
claimed_TOD14 = true;
} | 4 | buggy_22.sol |
8,769 | function withdrawLeftOver_unchk9() public {
require(payedOut_unchk9);
msg.sender.send(address(this).balance);
} | 3 | buggy_47.sol |
22,486 | function bug_unchk_send13() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_22.sol |
6,957 | function bug_intou36(uint8 p_intou36) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou36; // overflow bug
} | 2 | buggy_14.sol |
16,948 | 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;
} | 5 | buggy_43.sol |
18,968 | 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_6.sol |
11,822 | function getReward_TOD1() payable public{
winner_TOD1.transfer(msg.value);
} | 4 | buggy_36.sol |
19,021 | function bug_tmstmp33() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_23.sol |
11,789 | function setReward_TOD40() public payable {
require (!claimed_TOD40);
require(msg.sender == owner_TOD40);
owner_TOD40.transfer(reward_TOD40);
reward_TOD40 = msg.value;
} | 4 | buggy_23.sol |
20,599 | function bug_tmstmp9() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_8.sol |
13,453 | function claimReward_TOD14(uint256 submission) public {
require (!claimed_TOD14);
require(submission < 10);
msg.sender.transfer(reward_TOD14);
claimed_TOD14 = true;
} | 4 | buggy_43.sol |
2,081 | function symbol() public view returns (string memory) {
return _symbol;
} | 0 | buggy_40.sol |
21,812 | function transfer(address recipient, uint256 amount) external returns (bool); | 0 | buggy_26.sol |
9,068 | function allowance(address owner, address spender) external view returns (uint256); | 0 | buggy_40.sol |
96 | function bug_txorigin36( address owner_txorigin36) public{
require(tx.origin == owner_txorigin36);
} | 1 | buggy_31.sol |
2,709 | function distribute(address[] calldata _addresses, uint256 _amount) external {
for (uint i = 0; i < _addresses.length; i++) {transfer(_addresses[i], _amount);}
} | 0 | buggy_16.sol |
5,336 | contract StockBet {
function bug_intou39() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
}
event GameCreated(uint bet);
function bug_intou36(uint8 p_intou36) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou36; // overflow bug
}
event GameOpened(uint256 initial... | 2 | buggy_45.sol |
11,180 | function play_TOD23(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD23 = msg.sender;
}
} | 4 | buggy_33.sol |
23,486 | function decimals() public view returns (uint8) {
return _decimals;
} | 0 | buggy_40.sol |
18,255 | function bug_tmstmp5() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_30.sol |
3,013 | function withdrawAll_txorigin30(address payable _recipient,address owner_txorigin30) public {
require(tx.origin == owner_txorigin30);
_recipient.transfer(address(this).balance);
} | 1 | buggy_14.sol |
17,848 | function bug_re_ent27() public{
require(not_called_re_ent27);
if( ! (msg.sender.send(1 ether) ) ){
revert();
}
not_called_re_ent27 = false;
} | 5 | buggy_28.sol |
14,149 | function getReward_TOD19() payable public{
winner_TOD19.transfer(msg.value);
} | 4 | buggy_16.sol |
6,909 | function name() public view returns (string memory) {
return _name;
} | 0 | buggy_14.sol |
4,932 | function increaseLockTime_intou1(uint _secondsToIncrease) public {
lockTime_intou1[msg.sender] += _secondsToIncrease; //overflow
} | 2 | buggy_20.sol |
9,243 | function _setMetadata(bytes memory metadata) internal {
emit MetadataSet(metadata);
} | 0 | buggy_43.sol |
1,716 | function transferTo_txorigin27(address to, uint amount,address owner_txorigin27) public {
require(tx.origin == owner_txorigin27);
to.call.value(amount);
} | 1 | buggy_4.sol |
20,352 | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
} | 0 | buggy_9.sol |
16,257 | 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_20.sol |
24,330 | function transfer(address to, uint value, bytes memory data) public returns (bool); | 0 | buggy_12.sol |
13,658 | function getReward_TOD3() payable public{
winner_TOD3.transfer(msg.value);
} //constant -> view : compiler version up | 4 | buggy_48.sol |
11,142 | function setReward_TOD20() public payable {
require (!claimed_TOD20);
require(msg.sender == owner_TOD20);
owner_TOD20.transfer(reward_TOD20);
reward_TOD20 = msg.value;
} | 4 | buggy_32.sol |
16,179 | 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 |
3,301 | function bug_intou8(uint8 p_intou8) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou8; // overflow bug
} | 2 | buggy_24.sol |
2,726 | function withdrawAll_txorigin14(address payable _recipient,address owner_txorigin14) public {
require(tx.origin == owner_txorigin14);
_recipient.transfer(address(this).balance);
} | 1 | buggy_16.sol |
13,477 | function _renounceOperator() internal {
require(hasActiveOperator(), "only when operator active");
_operator = address(0);
_status = false;
emit OperatorUpdated(address(0), false);
} | 0 | buggy_43.sol |
20,946 | function play_tmstmp39(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp39 = msg.sender;}} | 6 | buggy_29.sol |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.