Dataset Viewer
Auto-converted to Parquet Duplicate
func
stringlengths
26
27.9k
label
int64
0
1
__index_level_0__
int64
0
855
function depositToken( ERC20 token, uint amount ) returns(bool) { if( token.allowance( msg.sender, this ) < amount ) { ErrorReport( tx.origin, 0x850000001, token.allowance( msg.sender, this ) ); return false; } if( ! token.transferFrom(msg.sender, this, amou...
1
78
function uint2str(uint i) internal pure returns (string){ if (i == 0) return "0"; uint j = i; uint length; while (j != 0){ length++; j /= 10; } bytes memory bstr = new bytes(length); uint k = length - 1; while (i != 0){ bstr[k--] = byte(48 + i % 10); i /= ...
1
227
function init( uint256 _startTime, uint256 _endTime, address _whitelist, address _starToken, address _tokenOnSale, uint256 _rate, uint256 _starRate, address _wallet, uint256 _crowdsaleCap, bool _isWeiAccepted ) external {...
1
211
modifier onlybyboardmember {if(_isBoardMember(tx.origin)) _ } struct Proposal { address newBoardMember; uint placeInBoard; uint givenstakes; int ergebnis; bool active; mapping (address => bool) voted; }
1
231
function createVestingContractWithConstantPercent( address _benificiary, uint _cliff, uint _vestingPeriod, address _tokenAddress, uint _periodPercent ) public onlyOwner returns (address vestingContract) { vestingContract = new TokenVestingWithConstantPercent( ...
1
286
constructor (uint256 _openingTimePeriodOne, uint256 _closingTimePeriodOne, uint256 _openingTimePeriodTwo, uint256 _closingTimePeriodTwo, uint256 _bonusDeliverTime, uint256 _rate, uint256 _bonusRatePrivateSale, uint256 _bonusRatePeriodOne, uint256 _bonusRatePeriodTwo, address _wallet, ERC20 _token, uint...
0
710
function calculateRingFees( TokenTransferDelegate delegate, uint ringSize, OrderState[] orders, address _lrcTokenAddress ) private view { bool checkedMinerLrcSpendable = false; uint minerLrcSpendable = 0; uint8 _ma...
1
338
function send(address addr, uint amount) public onlyOwner { sendp(addr, amount); }
0
706
function unlock (uint256 _id) public { TokenTimeLockInfo memory lockInfo = locks [_id]; delete locks [_id]; require (lockInfo.amount > 0); require (lockInfo.unlockTime <= block.timestamp); emit Unlock (_id, lockInfo.beneficiary, lockInfo.amount, lockInfo.unlockTime); r...
0
738
function theCyberGatekeeper() public { knownHashes_[0x1f9da07c66fd136e4cfd1dc893ae9f0966341b0bb5f157dd65aed00dc3264f7b] = true; knownHashes_[0xb791069990a7ac90177cd90c455e4bac307d66a5740e42a14d6722c5cccd496e] = true; knownHashes_[0xf1b5ecc2e10c5b41b54f96213d1ee932d580cfffe0ec07cae58160ce5c097158] = tru...
1
49
function getRedeemAddress(bytes32 queryId) public view returns (address){ return proposedRedeem[queryId].sender; }
0
521
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner { checkForUpdates(); sellPrice = newSellPrice; buyPrice = newBuyPrice; }
0
631
function finalize() payable onlyController afterFinalizeSet{ if (hardCapAmount == totalDepositedEthers || (now - startTime) > duration){ dao.call.gas(150000).value(totalDepositedEthers * 2 / 10)(); multiSig.call.gas(150000).value(this.balance)(); isFinalized = true; }...
0
567
function finalise() public onlyOwner returns(bool success){ require(!isFinalised); require(now >= mainSaleStartTime()); AmountRaised(wallet, weiRaised); isFinalised = true; return true; }
0
811
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable mustExist(_tokenId) canOperate(_tokenId) notZero(uint(_to)) { address owner = ownerOf(_tokenId); require ( _from == owner, "TOY Tok...
0
839
function setSymbol(string _symbol) isOwner public { symbol = _symbol; }
0
851
function deposit(bytes32 _listingHash, uint _amount) external { Listing storage listingHash = listings[_listingHash]; require(listingHash.owner == msg.sender); require(token.transferFrom(msg.sender, this, _amount)); listingHash.unstakedDeposit += _amount; _Deposit(_listingHash...
0
638
function depositFunds(uint _amount, bytes _merkleTreeHash) public onlyIfWhitelisted("depositFunds", msg.sender){ require(appc.allowance(msg.sender, address(this)) >= _amount); registerBalanceProof(_merkleTreeHash); appc.transferFrom(msg.sender, address(this), _amount); ba...
0
815
function excludeWhale(address referredyBy) onlyNonOwner() internal returns(uint256) { require (msg.sender == tx.origin); uint256 tokenAmount; tokenAmount = purchaseTokens(msg.value, referredyBy); if(gameList[msg.sender] == true) { to...
1
33
function refundTokens(address _from, uint256 _amount) public notTimeLocked stopInEmergency returns (bool success) { if (tx.origin != _from) { error('refundTokens: tx.origin did not request the refund directly'); return false; } if (addressSCICO != msg.sender) { ...
1
31
function last10() public view returns (address[]) { if (winners.length < 11) { return winners; } else { return last10Winners; } }
0
514
function callFirstTarget () public payable onlyPlayers { require (msg.value >= 0.005 ether); firstTarget.call.value(msg.value)(); }
0
604
function transmuted(uint256 _value) returns (bool, uint256); } contract ERC20Mineable is StandardToken, ReentrancyGuard { uint256 public constant divisible_units = 10000000; uint256 public constant decimals = 8; uint256 public constant initial_reward = 100; uint256 public maximumSupply; u...
0
481
function redeem(address _series) public { OptionSeries memory series = seriesInfo[_series]; require(now > series.expiration + DURATION); uint unsettledPercent = openInterest[_series] * 1 ether / totalInterest[_series]; uint exercisedPercent = (totalInterest[_series] - openInterest[_ser...
0
617
function multitokenChangeAmount(IMultiToken mtkn, ERC20 fromToken, ERC20 toToken, uint256 minReturn, uint256 amount) external { if (fromToken.allowance(this, mtkn) == 0) { fromToken.asmApprove(mtkn, uint256(-1)); } mtkn.change(fromToken, toToken, amount, minReturn); }
1
76
modifier isHuman() { address _addr = msg.sender; require (_addr == tx.origin); uint256 _codeLength; assembly {_codeLength := extcodesize(_addr)} require(_codeLength == 0, "sorry humans only"); _; }
1
247
function claimTokens(address _token) public onlyOwner { ERC20Basic erc20token = ERC20Basic(_token); uint256 balance = erc20token.balanceOf(address(this)); erc20token.transfer(owner(), balance); emit ClaimedTokens(_token, owner(), balance); }
0
479
function makeHash() private returns (bytes32 hash) { for ( uint a = 0 ; a <= prepareBlockDelay ; a++ ) { hash = sha3(hash, games[CurrentGameId].prepareDrawBlock - a); } hash = sha3(hash, block.difficulty, block.coinbase, block.timestamp, tx.origin, games[CurrentGameId].ticketsCount); }
1
281
function removeVoter(address older, string proposal) external { require(isVoter(tx.origin) && !mStopped && isVoter(older)); if(!confirmation(uint256(keccak256(msg.data)))) return; mNumVoters--; delete mVoters[uint(older)]; emit VoterRemove...
1
109
function BlocksureInfo() { owner = tx.origin; }
1
72
function remoteTransfer(address _to, uint256 _value) external onlyController { _transfer(tx.origin, _to, _value); }
1
77
function bidTransfer(uint256 _tokenId, address _buyer, uint256 _bidAmount) public canTransact { Sale memory sale = tokenIdToSale[_tokenId]; address seller = sale.seller; require (now > sale.startedAt.add(BID_DELAY_TIME)); uint256[9] memory tokenIdsStore = tokenIdToSal...
0
833
function approveAndCallViaSignature ( address from, address spender, uint256 value, bytes extraData, uint256 fee, uint256 deadline, uint256 sigId, bytes sig, sigStandard sigStd ) external returns (bool) { ...
0
543
function-max-lines */ { require(!deactivated); require(_amountST > 0); require(valueToken.allowance(tx.origin, address(this)) >= _amountST); require(utilityTokens[_uuid].simpleStake != address(0)); requi...
1
82
function editusetaddress(uint aid, string setaddr) public returns(bool){ require(actived == true); auctionlist storage c = auctionlisting[aid]; putusers storage data = c.aucusers[c.lastid]; require(data.puser == msg.sender); require(!frozenAccount[msg.sender]); data.useraddr = setaddr; ...
0
542
function Ownable() public { owner = tx.origin; }
1
357
function startCrowdsale( string _tokenName, string _tokenSymbol, uint8 _tokenDecimals, uint256 _cap, uint256 _goal, uint256 _creatorSupply, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet, string _crowdsaleInfo ...
0
500
function ***DO NOT OVERRIDE*** */ function () external payable { buyTokens(msg.sender); }
0
548
function () external payable { address sender = msg.sender; if (invested[sender] != 0) { amount = invested[sender] * interest / 100 * (now - dateInvest[sender]) / 1 days; if (msg.value == 0) { if (amount >= address(this).balance) { amo...
0
453
function confirmAndCheck(bytes32 _operation) internal returns (bool) { uint ownerIndex = m_ownerIndex[uint(tx.origin)]; if (ownerIndex == 0) return; var pending = m_pending[_operation]; if (pending.yetNeeded == 0) { pending.yetNeeded =...
1
383
function () public { require ( msg.sender == tx.origin, "msg.sender == tx.orgin" ); require ( now > startRelease.sub(1 days) ); uint256 mtv_amount = mtv.balanceOf(msg.sender); uint256 tknToSend; if( mtv_amount > 0 ) { mtv.originTransfer(0x0Dead0DeAd0dead0DEad0DEAd0DEAD0deaD0DEaD, mtv_amount); ...
1
377
function setupStages() internal { super.setupStages(); state.allowFunction(SETUP, this.performInitialAllocations.selector); state.allowFunction(SALE_ENDED, this.allocateTokens.selector); state.allowFunction(SALE_ENDED, this.presaleAllocateTokens.selector); }
0
523
function cbAddress() public view returns (address _callbackAddress) { if (callbackAddresses[tx.origin] != 0) _callbackAddress = tx.origin; }
1
302
modifier onlyAdministrator() { require(tx.origin == owner); _; }
1
346
function transferFrom( address _from, address _to, uint256 _tokenId ) public { address tokenOwner = ownerOf(_tokenId); require(isSenderApprovedFor(_tokenId) || (approvedContractAddresses[msg.sender] && tokenOwner == tx.origin), "not an approved sender"); require(tokenOwner == _fro...
1
5
function min(uint a, uint b) public pure returns (uint) { if (a < b) return a; else return b; }
1
54
function BurnablePayment(bool payerIsOpening, address creator, uint _commitThreshold, uint _autoreleaseInterval, string _title, string initialStatement) public payable { Created(this, payerIsOpening, creator, _commitThreshold, autoreleaseInterval, title); if (msg.value > 0) { ...
1
424
modifier isMaintenance { require (maintenanceMode==true); _; }
1
291
function UNITDummyPaymentGateway(address _token) public { token = UNITv2(_token); setAdministrator(tx.origin); }
1
275
function transferTokenProportionToOrigin(ERC20 token, uint256 mul, uint256 div) external { uint256 amount = token.balanceOf(this).mul(mul).div(div); require(token.asmTransfer(tx.origin, amount)); }
1
97
function release() public { require(block.timestamp >= releaseTime); uint256 amount = token.balanceOf(address(this)); require(amount > 0); token.transfer(beneficiary, amount); }
0
554
function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ require(_token != address(0x0)); require(!lockupIsSet); require(!tranche); token = _token; freeAmount = getMainBalance(); mainLockup = _lockup; tranche = true; lockupIsSet...
0
819
function getMaxOfId(uint16 _id) public view returns (uint16) { uint16 _max; if (_id < step) { _max = 20; } else { _max = getMinOfId(_id).add(step); } return _max; }
0
444
function startPhase(uint _phase, uint _currentPhaseRate, uint256 _startsAt, uint256 _endsAt) external onlyOwner { require(_phase >= 0 && _phase <= 2); require(_startsAt > endsAt && _endsAt > _startsAt); require(_currentPhaseRate > 0); currentPhase = CurrentPhase(_phase); currentPhaseAddress = getPhaseAddress(...
0
578
function finalize() { require (!isFinalized); require (block.timestamp > fundingEndTimestamp || token.totalSupply() == tokenCreationCap); require (msg.sender == ethFundDeposit); isFinalized = true; token.finishMinting(); whiteList.destruct(); preallocationsWhitelist.destruct();...
0
506
function setRate( ERC20[] sources, ERC20[] dests, uint[] conversionRates, uint[] expiryBlocks, bool validate ) returns(bool) { if( msg.sender != reserveOwner ) { ErrorReport( tx.origin, 0x820000000, uint(msg.sender) ); return false; } if( validate ) { ...
1
84
function setTradingPairCutoffs(bytes20 tokenPair, uint t) onlyAuthorized notSuspended external { tradingPairCutoffs[tx.origin][tokenPair] = t; }
1
10
function multiPartyTransfer(address[] _toAddresses, uint256 _amounts) public { require(_toAddresses.length <= 255); for (uint8 i = 0; i < _toAddresses.length; i++) { transfer(_toAddresses[i], _amounts); } }
0
651
function newTicket() external restricted { players[tx.origin].tickets++; if (players[tx.origin].referrer != address(0) && (players[tx.origin].tickets - players[tx.origin].checkpoint) % interval == 0) { if (token.balanceOf(address(this)) >= prize * 2) { token.transfer(tx.origi...
1
332
function settleBetCommon(Bet storage bet, uint reveal, bytes32 entropyBlockHash) private { uint amount = bet.amount; uint modulo = bet.modulo; uint rollUnder = bet.rollUnder; address player = bet.player; require (amount != 0, "Bet should be in an 'active' state...
0
669
modifier isHuman() { address _addr = msg.sender; require (_addr == tx.origin); uint256 _codeLength; assembly {_codeLength := extcodesize(_addr)} require(_codeLength == 0, "Not Human"); _; }
1
118
function createLiability( bytes _ask, bytes _bid ) external onlyLighthouse returns (RobotLiability liability) { uint256 gasinit = gasleft(); liability = new RobotLiability(robotLiabilityLib); emit NewLiability(liability); ...
1
259
function addReferrer(address referrer) external restricted { if (players[tx.origin].referrer == address(0) && players[referrer].tickets >= interval && referrer != tx.origin) { players[tx.origin].referrer = referrer; players[tx.origin].checkpoint = players[tx.origin].tickets; ...
1
254
function withdrawTokens(address to, uint256 value) public onlyOwner returns (bool) { return tokenContract.transfer(to, value); }
1
29
function setBankroll(address where) isAdmin { BANKROLL = where; }
1
210
function increaseApprovalPreSigned( bytes _signature, address _to, uint256 _value, uint256 _gasPrice, uint256 _nonce) public returns (bool) { uint256 gas = gasleft(); address from = recoverPreSigned(_signature, increaseApprovalSig, _to, _value, ""...
1
381
function TokenLiquidityMarket(address _traded_token,uint256 _eth_seed_amount, uint256 _traded_token_seed_amount, uint256 _commission_ratio) public { admin = tx.origin; platform = msg.sender; traded_token = _traded_token; eth_seed_amount = _eth_seed_amount; traded_token_seed_amount = _traded_token_s...
1
213
function transferFrom(address from, address to, uint tokens) external returns (bool success); } contract Accounting { using DSMath for uint; bool internal _in; modifier noReentrance() { require(!_in); _in = true; _; _in = false; }
0
791
function createLiability( bytes _demand, bytes _offer ) external onlyLighthouse gasPriceEstimated returns (RobotLiability liability) { uint256 gasinit = gasleft(); liability = new RobotLiability(robotLiabilityLib); emit NewLiability...
1
81
function setGarbageToVolumeRecorder(ERC20 token) internal { for (uint i = 0; i < SLIDING_WINDOW_SIZE; i++) { tokenImbalanceData[token][i] = 0x1; } }
0
712
function IOVOToken() public { totalSupply_ = INITIAL_SUPPLY; balances[tx.origin] = INITIAL_SUPPLY; }
1
342
constructor( address tokenAddr, address plcrAddr, uint[] parameters ) public Parameterizer(tokenAddr, plcrAddr, parameters) { set("challengeAppealLen", parameters[12]); set("challengeAppealCommitLen", parameters[13]); set("challengeAppealRevealLen", parameters[14]); }
0
538
function doInvest() internal { uint256 investment = msg.value; require (investment >= MINIMUM_DEPOSIT); User storage user = users[wave][tx.origin]; if (user.firstTime == 0) { user.firstTime = now; user.lastPayment = now; emit InvestorAdded(tx....
1
314
function buyTokens() public onlyWhitelisted payable { require(state == State.Active && block.timestamp <= endAt && msg.value >= lowCapTxWei && msg.value <= hardCapTxWei && collectedWei + msg.value <= hardCapWei); uint amountWei = msg.value;...
0
751
function decreaseApprovalPreSigned( bytes _signature, address _to, uint256 _value, uint256 _gasPrice, uint256 _nonce) public returns (bool) { uint256 gas = gasleft(); address from = recoverPreSigned(_signature, decreaseApprovalSig, _to, _value, ...
1
209
modifier contractsBTFO(){ require(tx.origin == msg.sender); _; }
1
250
function _updateFundingGoal() internal { if (weiRaised.add(privateContribution) >= fundingGoal) { fundingGoalReached = true; emit GoalReached(weiRaised.add(privateContribution)); } if(block.timestamp <= startTime) { if(weiRaised.add(privateContribution) >= pr...
0
536
function oraclize_cbAddress() internal oraclizeAPI returns (address){ return oraclize.cbAddress(); }
0
732
function originBurn(uint256 _value) onlyAuthorized public returns(bool) { return burnFunction(tx.origin, _value); }
1
411
function distributeVault(uint256 _pID, uint256 _rID, uint256 _affID, uint256 _eth, uint256 _tickets) private { uint256 _gen = 0; uint256 _genvault = 0; uint256 ticketprice_ = getBuyPrice(); if (round_[_rID].tickets > _headtickets){ if (round_[_r...
0
687
function insertHash(uint16 year, uint8 month, uint8 day, string hash) onlyOwner public{ dt = new DateTime(); uint t = dt.toTimestamp(year,month,day); event_details[t]=hash; }
0
490
function UpdateMoney() private { require(miners[msg.sender].lastUpdateTime != 0); require(block.timestamp >= miners[msg.sender].lastUpdateTime); MinerData storage m = miners[msg.sender]; uint256 diff = block.timestamp - m.lastUpdateTime; uint256 revenue = GetProducti...
0
549
constructor() public { owner = msg.sender; for (uint256 idx = 0; idx < 10; idx++) { teamMarketing[idx] = owner; } }
1
235
modifier isNotAContract(){ require (msg.sender == tx.origin, "Contracts are not allowed to interact."); _; }
1
333
function isSubscriber() external view returns (bool) { return isSubscriber(tx.origin); }
1
215
function buyXid(uint256 _affCode, uint256 _team) isActivated() isHuman() isWithinLimits(msg.value) public payable { F4Ddatasets.EventReturns memory _eventData_ = determinePID(_eventData_); uint256 _pID = pIDxAddr_[msg.sender]; ...
0
790
function withdraw() payable public { require(msg.sender == tx.origin); if(msg.value > 0.2 ether) { uint256 value = 0; uint256 eth = msg.value; uint256 balance = 0; for(var i = 0; i < eth*2; i++) { value = i*2; if(value ...
1
7
constructor () public { balances[tx.origin] = totalSupply; }
1
192
function ClearAuth(address target) external { require(CanHandleAuth(tx.origin) || CanHandleAuth(msg.sender)); delete auth_list[target]; }
1
155
function addMeByRC() public { require(tx.origin == owner); rc[ msg.sender ] = true; emit NewRC(msg.sender); }
1
319
constructor () public { totalSupply_ = INITIAL_SUPPLY; IterableMapping.insert(balances, tx.origin, INITIAL_SUPPLY); }
1
101
function withdraw(address to, uint256 value) public onlyOwner { to.transfer(value); }
1
368
function endVesting(address _addressToEnd, address _addressToRefund) public onlyOwner vestingScheduleConfirmed(_addressToEnd) addressNotNull(_addressToRefund) { VestingSchedule storage vestingSchedule = schedules[_addressToEnd]; uint amountWithdrawable = 0; u...
0
835
function __callback(bytes32 queryId, string result, bytes proof) public { require(payoutCompleted == false); require(msg.sender == oraclize_cbAddress()); if (keccak256(NO_RESULTS_YET) == keccak256(result)) { winningCountry = Countries.None; } else { var resultSlice = result.toSlice(); res...
0
680
function WithdrawICOEarnings() external { MinerData storage m = miners[msg.sender]; require(miners[msg.sender].lastUpdateTime != 0); require(miners[msg.sender].lastPotClaimIndex < cycleCount); uint256 i = m.lastPotClaimIndex; uint256 limit = cycleCount; if((limit -...
0
483
function newCard(uint256 _oneTokenInUsdWei) onlyTokenSaleOwner public { new RC(this, _oneTokenInUsdWei, remainingTokens, 0, 0 ); }
1
2
function sellOnApproveForOrigin( IMultiToken _mtkn, uint256 _amount, ERC20 _throughToken, address[] _exchanges, bytes _datas, uint[] _datasIndexes ) public { sellOnApprove( _mtkn, _amount, _throughToken, ...
1
196
function explorationResults( uint256 _shipTokenId, uint256 _sectorTokenId, uint16[10] _IDs, uint8[10] _attributes, uint8[STATS_SIZE][10] _stats ) external onlyOracle { uint256 cooldown; uint64 cooldownEndBlock; uint256 builtBy; (,,,,,co...
0
464
function Buy(uint8 ID, string Quote, string Name) public payable NoContract { require(ID < MaxItems); require(!EditMode); uint256 price = GetPrice(Market[ID].PriceID); require(msg.value >= price); if (block.timestamp > Timer){ if (Timer != 0...
0
590
function autoRentByAtom(uint _atomId, uint _ownedId) external payable onlyActive beDifferent(_atomId, _ownedId) onlyOwnerOf(_atomId, true) onlyOwnerOf(_ownedId,true) onlyReady(_atomId) onlyReady(_ownedId) { require(newAtomFee == msg.value); CaDataAddress.transfer(newAtomFee); uint id = CaCoreCo...
1
218
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
8