Dataset Viewer
Auto-converted to Parquet Duplicate
source_idx
int64
0
28k
contract_name
stringlengths
1
53
func_name
stringlengths
0
76
⌀
masked_contract
stringlengths
60
27.5k
func_body
stringlengths
4
9.95k
func_body_removed_comment
stringlengths
4
9.41k
deepseek_output
stringlengths
0
939
file_source_idx
stringlengths
1
5
source_code
stringlengths
133
1.24M
compile_info
stringlengths
0
5.93k
0
DataDump
postData
contract DataDump is Owned { event DataDumped(address indexed _recipient, string indexed _topic, bytes32 _dataHash); function DataDump() {} function postData(address recipient, string topic, bytes32 data) onlyOwner() {<FILL_FUNCTION_BODY>} }
DataDumped(recipient, topic, data);
DataDumped(recipient, topic, data);
DataDumped(recipient, topic, data);
72010
pragma solidity ^0.4.11; contract Owned { address public owner; modifier onlyOwner() { if (isOwner(msg.sender)) _; } modifier ifOwner(address sender) { if (isOwner(sender)) _; } function Owned() { owner = msg.sender; } function isOwner(address addr) public returns(bool) { ...
<COMPILED_SUCCESSFULLY>
1
SolidusToken
disablePurchasing
contract SolidusToken { address owner = msg.sender; bool public purchasingAllowed = true; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalContribution = 0; uint256 public totalSupply = 0; uint256 public total...
require(msg.sender == owner); purchasingAllowed = false;
require(msg.sender == owner); purchasingAllowed = false;
require(msg.sender == owner); purchasingAllowed = false;
57317
pragma solidity ^0.4.15; contract SolidusToken { address owner = msg.sender; bool public purchasingAllowed = true; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalContribution = 0; uint256 public totalSupply = ...
<COMPILED_SUCCESSFULLY>
2
HegicERCPool
send
contract HegicERCPool is IERCLiquidityPool, Ownable, ERC20("Hegic DAI LP Token", "writeDAI"){ using SafeMath for uint256; uint public lockedAmount; mapping(address => uint) private lastProvideBlock; IERC20 public override token; /* * @return _token DAI Address */ ...
require(lockedAmount >= amount, "Pool: Insufficient locked funds"); lockedAmount -= amount; require( token.transfer(to, amount), "Insufficient funds" );
require(lockedAmount >= amount, "Pool: Insufficient locked funds"); lockedAmount -= amount; require( token.transfer(to, amount), "Insufficient funds" );
require(amount <= availableBalance(), "Pool: Insufficient unlocked funds"); to.transfer(amount);
83271
pragma solidity ^0.6.6; library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among ...
<COMPILED_SUCCESSFULLY>
3
WrappedToken
burnFrom
contract WrappedToken is SecureContract, ERC20 { bytes32 public constant _MINTTO = keccak256("_MINTTO"); bytes32 public constant _BURNFROM = keccak256("_BURNFROM"); bytes32 public constant _BRIDGE_TX = keccak256("_BRIDGE_TX"); event Wrap(address indexed user, uint256 amount); event Unwrap(add...
require(hasRole(_BURNFROM, msg.sender), "WrappedToken: burnFrom - Permission denied"); _burn(user, amount); emit Burn(user, amount, msg.sender);
require(hasRole(_BURNFROM, msg.sender), "WrappedToken: burnFrom - Permission denied"); _burn(user, amount); emit Burn(user, amount, msg.sender);
require(hasRole(_BURNFROM, msg.sender), "WrappedToken: burnFrom - Permission denied"); _burn(user, amount); emit Burn(user, amount, msg.sender);
80658
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implem...
<COMPILED_SUCCESSFULLY>
4
BitcoinAlliance
transferFrom
contract BitcoinAlliance is ERC20Detailed { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string constant tokenName = "BitcoinAlliance"; string constant tokenSymbol = "BTCAE"; uint8 constant tokenDeci...
require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(to != address(0)); _balances[from] = _balances[from].sub(value); uint256 tokensToBurn = findPercent(value); uint256 tokensToTransfer = value.sub(tokensToBurn); _balances[to] = _balances[to]...
require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(to != address(0)); _balances[from] = _balances[from].sub(value); uint256 tokensToBurn = findPercent(value); uint256 tokensToTransfer = value.sub(tokensToBurn); _balances[to] = _balances[to].add(token...
require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(to != address(0)); uint256 tokensToBurn = findPercent(value); uint256 tokensToTransfer = value.sub(tokensToBurn); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(tokens...
9311
/** * Bitcoin Alliance * There will be 3 lucky winners, each 1ETH reward * Hold the top 10 BTCAE, 20ETH will be distributed proportionally. */ pragma solidity ^0.5.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint2...
contracts/sample.sol:155:52: ParserError: Expected ',' but got '}' _balances[to] = _balances[to].add(tokensToTrans} ^
5
VGCToken
addTRA
contract VGCToken is Ownable { using SafeMath for uint; // Triggered when tokens are transferred. event Transfer(address indexed _from, address indexed _to, uint256 _value); // Triggered whenever approve(address _spender, uint256 _value) is called. event Approval(address indexed _owner, address indexed ...
teamBalanceMap[_address] = true;
teamBalanceMap[_address] = true;
_address].add(_value); Transfer(this, _address, _value); } function sendBountyBalance (address _address, uint _value) public{ require(bountyBalanceMap[msg.sender]); bountyBalance = bountyBalance.sub(_value); balances[this] = balances[this].sub(_value); balances[_address] = balances[_address].ad...
38564
pragma solidity ^0.4.19; /*standart library for uint */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0 || b == 0){ return 0; } uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b...
contracts/sample.sol:230:64: ParserError: Expected ';' but got ']' function addTRA (address _address) public onlyOwner {_address].add(_value); ^
6
CoinvestToken
token_escape
contract CoinvestToken is SafeMath { address public maintainer; address public icoContract; // icoContract is needed to allow it to transfer tokens during crowdsale. uint256 public lockupEndTime; // lockupEndTime is needed to determine when users may start transferring. bool public ERC223...
CoinvestToken lostToken = CoinvestToken(_tokenContract); uint256 stuckTokens = lostToken.balanceOf(address(this)); lostToken.transfer(maintainer, stuckTokens);
CoinvestToken lostToken = CoinvestToken(_tokenContract); uint256 stuckTokens = lostToken.balanceOf(address(this)); lostToken.transfer(maintainer, stuckTokens);
} /** * @dev An allowed address can approve tokens to be transferred from another's address. * @param _spender The address to which the tokens will be transferred. * @param _amount The amount of tokens to be transferred. **/ function approve(address _spender, uint _amount) externa...
39667
pragma solidity ^0.4.9; /* * Contract that is working with ERC223 tokens */ contract ContractReceiver { function tokenFallback(address _from, uint _value, bytes _data) public; } /** * ERC223 token by Dexaran * * https://github.com/Dexaran/ERC223-tokens */ /* https://github.com/Lykk...
contracts/sample.sol:225:5: DeclarationError: Function with same name and arguments defined twice. function approve(address _spender, uint256 _amount) ^ (Relevant source part starts here and spans across multiple lines). contracts/sample.sol:249:5: Other declaration is here: function approve(address _spend...
7
Ownable
transferOwnership
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender;...
require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner;
require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner;
require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner;
52694
pragma solidity ^0.4.21; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function tra...
<COMPILED_SUCCESSFULLY>
8
RatingStore
set
"contract RatingStore {\n\r\n struct Score {\r\n bool exists;\r\n int cumulativeSco(...TRUNCATED)
"\r\n if (!scores[target].exists) {\r\n scores[target] = Score(true, 0, 0);\r\n (...TRUNCATED)
"\n if (!scores[target].exists) {\n scores[target] = Score(true, 0, 0);\n }(...TRUNCATED)
scores[target] = Score(true, cumulative, total);
46506
"pragma solidity ^0.4.11;\n\r\n/* Copyright 2017 GoInto, LLC\r\n\r\n Licensed under the Apache L(...TRUNCATED)
<COMPILED_SUCCESSFULLY>
9
iETHBuyBack
setiETHSwapRate
"contract iETHBuyBack is Ownable {\n using SafeMath for uint256;\r\n\r\n IERC20 public constan(...TRUNCATED)
iETHSwapRate = _newRate;
iETHSwapRate = _newRate;
iETHSwapRate = _newRate;
6623
"/**\n * Copyright 2017-2020, bZeroX, LLC <https://bzx.network/>. All Rights Reserved.\r\n * License(...TRUNCATED)
<COMPILED_SUCCESSFULLY>
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
22