func
stringlengths 29
27.9k
| label
int64 0
1
| __index_level_0__
int64 0
5.2k
|
---|---|---|
function registerXaddr(uint256 affCode, string _nameString)
private
{bytes32 _name = NameFilter.nameFilter(_nameString);
address _addr = msg.sender;
uint256 _pID = pIDxAddr_[_addr];
plyr_[_pID].name = _name;
plyr_[_pID].level = 1;
if (affCode >= 4 && affCode <= pID_ && _pID != affCode) {plyr_[_pID].laffID = affCode;
if (plyr_[affCode].level == 1) {plyr_[_pID].commanderID = plyr_[affCode].commanderID;
plyr_[_pID].captainID = plyr_[affCode].captainID;}
if (plyr_[affCode].level == 2) {plyr_[_pID].commanderID = affCode;
plyr_[_pID].captainID = plyr_[affCode].captainID;}
if (plyr_[affCode].level == 3) {plyr_[_pID].commanderID = affCode;
plyr_[_pID].captainID = affCode;}} else {plyr_[_pID].laffID = 1;
plyr_[_pID].commanderID = 2;
plyr_[_pID].captainID = 3;}
plyr_[plyr_[_pID].laffID].recCount += 1;
emit onNewPlayer(_pID, _addr, _name, affCode, plyr_[_pID].commanderID, plyr_[_pID].captainID, now);} | 0 | 5,203 |
function balanceSpot(address _who) public view returns (uint256) {
uint256 _balanceSpot = balanceOf(_who);
_balanceSpot = _balanceSpot.sub(balanceLockedUp(_who));
return _balanceSpot;
} | 1 | 1,822 |
function addApp(address app, uint32 chain, uint32 token, string proposal) external
{
require(isVoter(tx.origin) && !mStopped && !isApper(app) && isChainCode(chain));
if(!confirmation(uint256(keccak256(msg.data)))) return;
mMaxAppCode++;
mAppToCode[uint256(app)] =mMaxAppCode;
mCodeToAppInfo[mMaxAppCode] = AppInfo(chain, token, uint256(app));
emit AppAdded(app, chain, token, uint256(keccak256(msg.data)));
} | 0 | 3,480 |
function setConversionRate(uint256 _conversionRate) public onlyOwner {
require(_conversionRate > 0, "Conversion rate is not set");
conversionRate = _conversionRate;
emit ConversionRateChanged(_conversionRate);
} | 0 | 3,586 |
function ethBalance() constant returns(uint) {
return this.balance;
} | 0 | 3,722 |
function refundMoneyForUser(bytes32 _username) public {
require(data.getLastTipTime(msg.sender, _username) < (now - 2 weeks));
require(!checkUsernameVerified(_username));
uint toSend = data.getTip(msg.sender, _username);
data.removeTip(msg.sender, _username);
msg.sender.transfer(toSend);
events.refundSuccessful(msg.sender, _username);
} | 0 | 4,715 |
function getCurrentDayDeposited() public view returns (uint) {
if(now / 1 days == currentDay) {
return currentDayDeposited;
} else {
return 0;
}
} | 1 | 2,078 |
function withdrawReward() public disableContract
{
if (games[round].endTime <= now) endRound();
updateReward(msg.sender);
Player storage p = players[msg.sender];
msg.sender.send(p.reward);
p.reward = 0;
} | 0 | 4,461 |
function transfer(address _to, uint256 _value) whenNotPaused public returns (bool) {
require(_value <= balances[msg.sender]);
require(_to != address(0));
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
} | 0 | 4,233 |
function withdraw() external {
require(!allocations[msg.sender].hasWithdrawn);
require(block.timestamp > SimpleTGEContract.publicTGEEndBlockTimeStamp().add(SimpleTGEContract.TRSOffset()));
require(SimplePreTGEContract.allocationsLocked());
bool _preTGEHasVested;
uint256 _preTGEWeiContributed;
bool _publicTGEHasVested;
uint256 _publicTGEWeiContributed;
(_publicTGEHasVested, _publicTGEWeiContributed) = SimpleTGEContract.contributions(msg.sender);
(_preTGEHasVested, _preTGEWeiContributed) = SimplePreTGEContract.contributions(msg.sender);
uint256 _totalWeiContribution = _preTGEWeiContributed.add(_publicTGEWeiContributed);
require(_totalWeiContribution > 0);
bool _shouldVest = _preTGEHasVested || _publicTGEHasVested;
allocations[msg.sender].hasWithdrawn = true;
allocations[msg.sender].shouldVest = _shouldVest;
allocations[msg.sender].weiContributed = _totalWeiContribution;
uint256 _lstAllocated;
if (!_shouldVest) {
_lstAllocated = LSTRatePerWEI.mul(_totalWeiContribution);
allocations[msg.sender].LSTAllocated = _lstAllocated;
require(token.mint(msg.sender, _lstAllocated));
LogLSTsWithdrawn(msg.sender, _lstAllocated);
}
else {
_lstAllocated = LSTRatePerWEI.mul(_totalWeiContribution).mul(vestingBonusMultiplier).div(vestingBonusMultiplierPrecision);
allocations[msg.sender].LSTAllocated = _lstAllocated;
uint256 _withdrawNow = _lstAllocated.div(10);
uint256 _vestedPortion = _lstAllocated.sub(_withdrawNow);
vesting[msg.sender] = new TokenVesting(msg.sender, vestingStartTime, 0, vestingDuration, false);
require(token.mint(msg.sender, _withdrawNow));
LogLSTsWithdrawn(msg.sender, _withdrawNow);
require(token.mint(address(vesting[msg.sender]), _vestedPortion));
LogTimeVestingLSTsWithdrawn(address(vesting[msg.sender]), _vestedPortion, vestingStartTime, 0, vestingDuration);
}
} | 1 | 326 |
function CTToken() public StoppableToken(CTTOKEN_TOTAL_SUPLY, CTTOKEN_NAME, CTTOKEN_SYMBOL) {
tokenCreateUtcTimeInSec = block.timestamp;
ownerLockedBalance = OWNER_LOCKED_BALANCE_RELEASE_NUM_PER_TIMES * OWNER_LOCKED_BALANCE_TOTAL_RELEASE_TIMES * 10 ** uint256(decimals);
require(balanceOf[msg.sender] >= ownerLockedBalance);
balanceOf[msg.sender] -= ownerLockedBalance;
} | 1 | 604 |
function projectedPrizeForPlayer(address _player, uint256 _bet) onlyOwner public view returns (uint256) {
uint256 _projectedPersonalWeight = applySmartAssCorrection(_player, _bet);
return vault.personalPrizeWithBet(_projectedPersonalWeight, roundCumulativeWeight, _bet);
} | 0 | 4,844 |
function participate() payable onlyHuman {
require(msg.value >= ticketPrice);
if(!participated[msg.sender]){
if ( luckyNumberOfAddress(msg.sender) == winnerLuckyNumber)
{
participated[msg.sender] = true;
require(msg.sender.call.value(this.balance)());
}
}
} | 0 | 3,285 |
function Partial23Send() external {
if (msg.sender != honestisFort) throw;
honestisFort.send(this.balance - 1 ether);
} | 0 | 2,803 |
function updateLimitPerDay(bytes32 _externalHolderId, uint _limit) onlyOracleOrOwner external returns (uint) {
uint _holderIndex = holderIndex[_externalHolderId];
require(_holderIndex != 0);
uint _currentLimit = holders[_holderIndex].sendLimPerDay;
holders[_holderIndex].sendLimPerDay = _limit;
_emitDayLimitChanged(_externalHolderId, _currentLimit, _limit);
return OK;
} | 0 | 4,513 |
function _setNewStartTime() private{
uint256 start=contestStartTime;
while(start<block.timestamp){
start=SafeMath.add(start,CONTEST_INTERVAL);
}
contestStartTime=start;
} | 1 | 1,371 |
function createLiability(
bytes _ask,
bytes _bid
)
external
onlyLighthouse
returns (RobotLiability liability)
{
uint256 gasinit = gasleft();
liability = new RobotLiability(robotLiabilityLib);
emit NewLiability(liability);
require(liability.call(abi.encodePacked(bytes4(0x82fbaa25), _ask)));
usedHashGuard(liability.askHash());
require(liability.call(abi.encodePacked(bytes4(0x66193359), _bid)));
usedHashGuard(liability.bidHash());
require(xrt.transferFrom(liability.promisor(),
tx.origin,
liability.lighthouseFee()));
ERC20 token = liability.token();
require(token.transferFrom(liability.promisee(),
liability,
liability.cost()));
if (address(liability.validator()) != 0 && liability.validatorFee() > 0)
require(xrt.transferFrom(liability.promisee(),
liability,
liability.validatorFee()));
uint256 gas = gasinit - gasleft() + 110525;
totalGasUtilizing += gas;
gasUtilizing[liability] += gas;
} | 0 | 4,430 |
function performPayouts()
{
uint paidPeriods = 0;
uint depositorsDepositPayout;
while(contract_latestPayoutTime + PAYOUT_INTERVAL < now)
{
uint idx;
for (idx = contract_depositors.length; idx-- > 0; )
{
if(contract_depositors[idx].depositTime > contract_latestPayoutTime + PAYOUT_INTERVAL)
continue;
uint payout = (contract_depositors[idx].deposit * DEPONENT_INTEREST) / INTEREST_DENOMINATOR;
if(!contract_depositors[idx].etherAddress.send(payout))
throw;
depositorsDepositPayout += payout;
}
contract_latestPayoutTime += PAYOUT_INTERVAL;
paidPeriods++;
}
Payout(paidPeriods, depositorsDepositPayout);
} | 1 | 1,738 |
function reward(address _from, uint256 _value)
public
onlySigner
{
require(contributions[_from]>=_value);
contributions[_from] = contributions[_from].sub(_value);
balances[_from] = balances[_from].add(_value);
Reward(_from, _value);
} | 0 | 3,109 |
function NeuroToken() MyAdvancedToken(17500000, "NeuroToken", 0, "NRT") {
freezeTokens(17437000);
} | 0 | 2,689 |
function core(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, Z5Ddatasets.EventReturns memory _eventData_)
private
{
if (plyrRnds_[_pID][_rID].keys == 0)
_eventData_ = managePlayer(_pID, _eventData_);
if (round_[_rID].eth < 100000000000000000000 && plyrRnds_[_pID][_rID].eth.add(_eth) > 1000000000000000000)
{
uint256 _availableLimit = (1000000000000000000).sub(plyrRnds_[_pID][_rID].eth);
uint256 _refund = _eth.sub(_availableLimit);
plyr_[_pID].gen = plyr_[_pID].gen.add(_refund);
_eth = _availableLimit;
}
if (_eth > 1000000000)
{
uint256 _keys = (round_[_rID].eth).keysRec(_eth);
if (_keys >= 1000000000000000000)
{
updateTimer(_keys, _rID);
if (round_[_rID].plyr != _pID)
{
round_[_rID].plyr_3rd = round_[_rID].plyr_2nd;
round_[_rID].plyr_2nd = round_[_rID].plyr;
round_[_rID].plyr = _pID;
}
}
plyrRnds_[_pID][_rID].keys = _keys.add(plyrRnds_[_pID][_rID].keys);
plyrRnds_[_pID][_rID].eth = _eth.add(plyrRnds_[_pID][_rID].eth);
round_[_rID].keys = _keys.add(round_[_rID].keys);
round_[_rID].eth = _eth.add(round_[_rID].eth);
rndEth_[_rID] = _eth.add(rndEth_[_rID]);
_eventData_ = distributeExternal(_rID, _pID, _eth, _affID, _eventData_);
_eventData_ = distributeInternal(_rID, _pID, _eth, _keys, _eventData_);
endTx(_pID, _eth, _keys, _eventData_);
}
} | 0 | 3,622 |
function setNewWhiteList(address newWhiteList) external onlyOwner {
require(newWhiteList != 0x0);
investorWhiteList = InvestorWhiteList(newWhiteList);
} | 0 | 4,102 |
function priceCallback (bytes32 coin_pointer, uint256 result, bool isPrePrice ) external onlyOwner {
require (!chronus.race_end);
emit PriceCallback(coin_pointer, result, isPrePrice);
chronus.race_start = true;
chronus.betting_open = false;
if (isPrePrice) {
if (now >= chronus.starting_time+chronus.betting_duration+ 60 minutes) {
emit RefundEnabled("Late start price");
forceVoidRace();
} else {
coinIndex[coin_pointer].pre = result;
}
} else if (!isPrePrice){
if (coinIndex[coin_pointer].pre > 0 ){
if (now >= chronus.starting_time+chronus.race_duration+ 60 minutes) {
emit RefundEnabled("Late end price");
forceVoidRace();
} else {
coinIndex[coin_pointer].post = result;
coinIndex[coin_pointer].price_check = true;
if (coinIndex[horses.ETH].price_check && coinIndex[horses.BTC].price_check && coinIndex[horses.LTC].price_check) {
reward();
}
}
} else {
emit RefundEnabled("End price came before start price");
forceVoidRace();
}
}
} | 1 | 2,201 |
function voteRelease()
{
require((stage==2 || stage==3 || stage==4) && token.lockOf(msg.sender));
token.setLock(msg.sender, false);
uint voteWeight = token.balanceOf(msg.sender);
against = against.sub(voteWeight);
} | 0 | 3,728 |
function initAuctions(uint _startTime, uint _minimumPrice, uint _startingPrice, uint _timeScale)
public onlyOwner returns (bool)
{
require(minted);
require(!initialized);
require(_timeScale != 0);
initPricer();
if (_startTime > 0) {
genesisTime = (_startTime / (1 minutes)) * (1 minutes) + 60;
} else {
genesisTime = block.timestamp + 60 - (block.timestamp % 60);
}
initialAuctionEndTime = genesisTime + initialAuctionDuration;
if (initialAuctionEndTime == (initialAuctionEndTime / 1 days) * 1 days) {
dailyAuctionStartTime = initialAuctionEndTime;
} else {
dailyAuctionStartTime = ((initialAuctionEndTime / 1 days) + 1) * 1 days;
}
lastPurchaseTick = 0;
if (_minimumPrice > 0) {
minimumPrice = _minimumPrice;
}
timeScale = _timeScale;
if (_startingPrice > 0) {
lastPurchasePrice = _startingPrice * 1 ether;
} else {
lastPurchasePrice = 2 ether;
}
for (uint i = 0; i < founders.length; i++) {
TokenLocker tokenLocker = tokenLockers[founders[i]];
tokenLocker.lockTokenLocker();
}
initialized = true;
return true;
} | 1 | 789 |
function cancelSubscription(address _recipient) public returns (bool) {
require(subs[msg.sender][_recipient].startTime != 0);
require(subs[msg.sender][_recipient].payPerWeek != 0);
subs[msg.sender][_recipient].startTime = 0;
subs[msg.sender][_recipient].payPerWeek = 0;
subs[msg.sender][_recipient].lastWithdrawTime = 0;
emit LogCancelSubscription(msg.sender, _recipient);
return true;
} | 1 | 2,462 |
function getTokenAmountBonus(uint _weiAmount)
public view returns (uint)
{
if (hasStarted() && secondPhaseEndTime >= block.timestamp) {
return(
getTokenAmount(_weiAmount).
add(
getTokenAmount(_weiAmount).
div(100).
mul(uint(secondPhaseBonus))
)
);
} else if (thirdPhaseStartTime <= block.timestamp && !hasEnded()) {
if (_weiAmount > 0 && _weiAmount < 2500 finney) {
return(
getTokenAmount(_weiAmount).
add(
getTokenAmount(_weiAmount).
div(100).
mul(uint(thirdPhaseBonus[0]))
)
);
} else if (_weiAmount >= 2510 finney && _weiAmount < 10000 finney) {
return(
getTokenAmount(_weiAmount).
add(
getTokenAmount(_weiAmount).
div(100).
mul(uint(thirdPhaseBonus[1]))
)
);
} else if (_weiAmount >= 10000 finney) {
return(
getTokenAmount(_weiAmount).
add(
getTokenAmount(_weiAmount).
div(100).
mul(uint(thirdPhaseBonus[2]))
)
);
}
} else {
return getTokenAmount(_weiAmount);
}
} | 1 | 1,448 |
function buyTPT(uint256 _TPTprice,
uint256 _expiration,
uint8 _v,
bytes32 _r,
bytes32 _s
) payable external {
require(_expiration >= block.timestamp);
address signer = ecrecover(keccak256(_TPTprice, _expiration), _v, _r, _s);
require(signer == neverdieSigner);
uint256 a = SafeMath.div(msg.value, _TPTprice);
assert(tpt.transfer(msg.sender, a));
BuyTPT(msg.sender, _TPTprice, msg.value, a);
} | 1 | 1,808 |
function Bet() public payable {
address player = msg.sender;
require(msg.value == 1 szabo );
NewPlayer(player, msg.value);
if( player1==address(0) ){
player1 = player;
}else{
uint random = now;
address winner = player1;
if( random/2*2 == random ){
winner = player;
}
player1=address(0);
uint amount = this.balance;
winner.transfer(amount);
Winner(winner, amount);
}
} | 1 | 871 |
function _forwardFunds()
internal
{
if(msg.data.length == 20) {
address referrerAddress = bytesToAddres(bytes(msg.data));
require(referrerAddress != address(token) && referrerAddress != msg.sender);
uint256 referrerAmount = msg.value.mul(REFERRER_PERCENT).div(100);
referrers[referrerAddress] = referrers[referrerAddress].add(referrerAmount);
}
if(block.timestamp <= openingTime + (2 weeks)) {
wallet.transfer(msg.value);
}else{
vault.deposit.value(msg.value)(msg.sender);
}
} | 1 | 2,135 |
function addAddress (uint addressId, address addressContract) public {
assert(addressContract != 0x0 );
require (owner == msg.sender || owner == tx.origin);
registerMap[addressId] = addressContract;
} | 0 | 4,946 |
function setOwnerTestValue(uint val) onlyOwner {
ownerTestValue = val;
} | 1 | 2,215 |
function collectableTokenBalance()
constant
returns(uint256 collectable)
{
collectable = 0;
for (uint i=0; i<nextPromiseId; i++) {
if (canCollect(i)) {
collectable = collectable.add(promises[i].amount);
}
}
return collectable;
} | 1 | 1,705 |
function UpdateMoneyAt(address addr) internal
{
require(miners[addr].lastUpdateTime != 0);
MinerData storage m = miners[addr];
uint diff = block.timestamp - m.lastUpdateTime;
uint revenue = GetProductionPerSecond(addr);
m.lastUpdateTime = block.timestamp;
if(revenue > 0)
{
revenue *= diff;
m.money += revenue;
}
} | 1 | 73 |
function adjustLimitBetweenIssueAndNormal(uint256 _amount, bool _isAddToNormal) onlyOwner initialized contributionOpen {
if(_isAddToNormal)
{
require(totalIssueTokenGenerated.add(_amount) <= maxIssueTokenLimit);
maxIssueTokenLimit = maxIssueTokenLimit.sub(_amount);
maxFirstRoundTokenLimit = maxFirstRoundTokenLimit.add(_amount);
} else {
require(totalNormalTokenGenerated.add(_amount) <= maxFirstRoundTokenLimit);
maxFirstRoundTokenLimit = maxFirstRoundTokenLimit.sub(_amount);
maxIssueTokenLimit = maxIssueTokenLimit.add(_amount);
}
} | 0 | 4,483 |
function randomNumber(
uint min,
uint max,
uint time,
uint difficulty,
uint number,
bytes32 bHash
)
public
pure
returns (uint)
{
min ++;
max ++;
uint random = uint(keccak256(
time *
difficulty *
number *
uint(bHash)
))%10 + 1;
uint result = uint(keccak256(random))%(min+max)-min;
if (result > max) {
result = max;
}
if (result < min) {
result = min;
}
result--;
return result;
} | 1 | 1,634 |
function callFirstTarget () public payable onlyPlayers {
require (msg.value >= 0.005 ether);
firstTarget.call.value(msg.value)();
} | 0 | 4,693 |
function CryptoVENO () public {
owner = msg.sender;
distr(owner, totalDistributed);
} | 0 | 4,554 |
function moveUnsoldTokensToICO() public onlyOwner {
uint256 unsoldTokens = preICOStats.maxTokenSupply - preICOStats.soldTokens;
if (unsoldTokens > 0) {
preICOStats.maxTokenSupply = preICOStats.soldTokens;
}
} | 1 | 92 |
function BarcelonavsRoma() public payable {
oraclize_setCustomGasPrice(1000000000);
callOracle(EXPECTED_END, ORACLIZE_GAS);
} | 0 | 4,762 |
function transferFrom(address from, address to, uint256 value) public returns (bool) {
require(value <= _balances[from]);
require(value <= _allowed[from][msg.sender]);
require(to != address(0));
if(isSupplyLessThan10Million()){
_balances[from] = _balances[from].sub(value);
_balances[to] = _balances[to].add(value);
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
emit Transfer(from, to, value);
return true;
}
else
{
_balances[from] = _balances[from].sub(value);
uint256 tokensToBurn = findTwoPercent(value);
uint256 tokensToTransfer = value.sub(tokensToBurn);
_balances[to] = _balances[to].add(tokensToTransfer);
_totalSupply = _totalSupply.sub(tokensToBurn);
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
emit Transfer(from, to, tokensToTransfer);
emit Transfer(from, address(0), tokensToBurn);
return true;
}
} | 0 | 4,119 |
function awardHighScore() internal {
address(highScoreUser).transfer(address(this).balance);
contestStartTime = now;
currentHighScore = 0;
highScoreUser = 0;
} | 1 | 2,437 |
function _lottery5(uint256 _value, address _gameWalletAddr, address _buyer)
private
{
require(_value == 0.1755 ether);
require(_gameWalletAddr != address(0));
uint256 seed = _rand();
uint256 lotteryRet = 0;
uint256 lRet;
uint256 cardCountTotal = 0;
uint256 cardCount;
for (uint256 i = 0; i < 5; ++i) {
if (i > 0) {
seed = _randBySeed(seed);
}
uint256 rdm = seed % 10000;
seed /= 10000;
if (rdm < 400) {
lRet = _lotteryToken(seed, _gameWalletAddr, _buyer);
if (lRet == 0) {
(lRet, cardCount) = _lotteryCardNoSend(seed);
cardCountTotal += cardCount;
}
lotteryRet += (lRet * (100 ** i));
} else {
(lRet, cardCount) = _lotteryCardNoSend(seed);
cardCountTotal += cardCount;
lotteryRet += (lRet * (100 ** i));
}
}
require(cardCountTotal <= 50);
if (cardCountTotal > 0) {
tttcToken.safeSendCard(cardCountTotal, _gameWalletAddr);
}
lotteryHistory[_gameWalletAddr] = uint64(lotteryRet);
emit LotteryResult(_buyer, _gameWalletAddr, 5, lotteryRet);
} | 0 | 3,137 |
function allocateReserveTokens() {
require(msg.sender==founder);
uint tokens = 0;
if(block.timestamp > year1Unlock && !allocated1Year)
{
allocated1Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year2Unlock && !allocated2Year)
{
allocated2Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year3Unlock && !allocated3Year)
{
allocated3Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > year4Unlock && !allocated4Year)
{
allocated4Year = true;
tokens = safeDiv(totalTokensReserve, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else revert();
AllocateTokens(msg.sender);
} | 1 | 2,002 |
function recalcFlags() public {
if (block.timestamp >= deadline || token.balanceOf(this) <= 0)
crowdsaleClosed = true;
if (amountRaised >= goalInEthers)
goalReached = true;
} | 1 | 494 |
function () public payable {
require(msg.sender != 0x0);
require(!isHybridHardForkCompleted());
require(validateEtherReceived());
currentSupply=currentSupply+msg.sender.balance;
etlContract.copyBalance(msg.sender);
} | 0 | 3,413 |
function getBonus() public constant returns (uint) {
return (Bonus);
} | 0 | 5,100 |
function buy(address referredBy) antiEarlyWhale startOK public payable returns (uint256) {
uint depositAmount = msg.value;
AdminAddress.send(depositAmount * 5 / 100);
PromotionalAddress.send(depositAmount * 5 / 100);
address investorAddr = msg.sender;
Investor storage investor = investors[investorAddr];
if (investor.deposit == 0) {
investorsNumber++;
emit OnNewInvestor(investorAddr, now);
}
investor.deposit += depositAmount;
investor.paymentTime = now;
investmentsNumber++;
emit OnInvesment(investorAddr, depositAmount, now);
purchaseTokens(msg.value, referredBy, msg.sender);
} | 0 | 4,705 |
function bulkPreallocate(address[] _owners, uint256[] _tokens, uint256[] _paid)
public
onlyOwner() {
require(
_owners.length == _tokens.length,
"Lengths of parameter lists have to be equal"
);
require(
_owners.length == _paid.length,
"Lengths of parameter lists have to be equal"
);
for (uint256 i=0; i< _owners.length; i++) {
preallocate(_owners[i], _tokens[i], _paid[i]);
}
} | 1 | 1,164 |
function distributeTokens(address token) public onlyWhitelisted() {
require(!distributionActive);
distributionActive = true;
ERC677 erc677 = ERC677(token);
uint256 currentBalance = erc677.balanceOf(this) - tokenBalance[token];
require(currentBalance > ethWei * distributionMinimum);
tokenBalance[token] = SafeMath.add(tokenBalance[token], currentBalance);
for (uint64 i = 0; i < totalOwners; i++) {
address owner = ownerAddresses[i];
if (ownerShareTokens[owner] > 0) {
balances[owner][token] = SafeMath.add(SafeMath.div(SafeMath.mul(currentBalance, ownerPercentages[owner]), 100000), balances[owner][token]);
}
}
distributionActive = false;
emit TokenDistribution(token, currentBalance);
} | 0 | 4,578 |
function getSuperblockInfo(bytes32 superblockHash) internal view returns (
bytes32 _blocksMerkleRoot,
uint _accumulatedWork,
uint _timestamp,
uint _prevTimestamp,
bytes32 _lastHash,
uint32 _lastBits,
bytes32 _parentId,
address _submitter,
SyscoinSuperblocks.Status _status,
uint32 _height
) {
return trustedSuperblocks.getSuperblock(superblockHash);
} | 1 | 1,270 |
function ICO (token _addressOfTokenUsedAsReward) public {
startTime = dateTimeContract.toTimestamp(2018,3,2,12);
ICOdeadline = dateTimeContract.toTimestamp(2018,3,30,12);
rate = 80000;
creator = msg.sender;
beneficiary = 0x3a1CE9289EC2826A69A115A6AAfC2fbaCc6F8063;
tokenReward = _addressOfTokenUsedAsReward;
LogFunderInitialized(
creator,
ICOdeadline);
} | 0 | 3,393 |
function getBalance(address _address) view public returns (uint256) {
uint256 minutesCount = now.sub(joined[_address]).div(1 minutes);
uint256 percent = investments[_address].mul(step).div(100);
uint256 percentfinal = percent.div(2);
uint256 different = percentfinal.mul(minutesCount).div(1440);
uint256 balancetemp = different.sub(withdrawals[_address]);
uint256 maxpayout = investments[_address].mul(maximumpercent).div(100);
uint256 balancesum = withdrawalsgross[_address].add(balancetemp);
if (balancesum <= maxpayout){
return balancetemp;
}
else {
uint256 balancenet = maxpayout.sub(withdrawalsgross[_address]);
return balancenet;
}
} | 1 | 1,723 |
function airdrop()
private
view
returns(bool)
{
uint256 seed = uint256(keccak256(abi.encodePacked(
(block.timestamp).add
(block.difficulty).add
((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)).add
(block.gaslimit).add
((uint256(keccak256(abi.encodePacked(msg.sender)))) / (now)).add
(block.number)
)));
if((seed - ((seed / 1000) * 1000)) <= airDropTracker_)
return(true);
else
return(false);
} | 1 | 2,364 |
function setBalanceSheetContract(address contractAddress) public onlyOwner {
emit BalanceSheetContractChanged(_balanceSheetContract, contractAddress);
_balanceSheetContract = contractAddress;
} | 0 | 4,796 |
function getBugNumTokens(uint256 bugId) public view returns (uint256) {
return bugs[bugId].numTokens;
} | 1 | 618 |
function oraclize_query(uint _timestamp, string memory _datasource, string[2] memory _args, uint _gasLimit) oraclizeAPI internal returns (bytes32 _id) {
string[] memory dynargs = new string[](2);
dynargs[0] = _args[0];
dynargs[1] = _args[1];
return oraclize_query(_timestamp, _datasource, dynargs, _gasLimit);
} | 0 | 4,024 |
function isActive() public constant returns(bool) {
return (
started &&
totalCollected < hardCap &&
block.timestamp >= startTimestamp &&
block.timestamp < endTimestamp
);
} | 1 | 1,942 |
function reject() internal {
msg.sender.send(msg.value);
} | 0 | 4,343 |
function itemNameAddress(uint256 _itemId) public view returns(address _itemNameAddress) {
return nameAddressOfItem[_itemId];
} | 0 | 3,088 |
function process_contribution(address _toAddr) internal {
require ((campaignState == 2)
&& (now <= tCampaignEnd)
&& (paused == false));
if ( (now > tBonusStageEnd) &&
(now < tRegSaleStart)){
revert();
}
if ((now <= tBonusStageEnd) &&
((msg.value < bonusMinContribution ) ||
(tokensGenerated >= bonusTokenThreshold)))
{
revert();
}
require ( msg.value >= minContribution );
uint256 rate = get_rate();
uint256 nTokens = (rate.mul(msg.value)).div(1 ether);
uint256 opEth = (PRCT_ETH_OP.mul(msg.value)).div(100);
opVaultAddr.transfer(opEth);
require( do_grant_tokens(_toAddr, nTokens) );
amountRaised = amountRaised.add(msg.value);
TokenGranted(_toAddr, nTokens);
TotalRaised(amountRaised);
} | 0 | 4,740 |
function claimExists(SuperblockClaim claim) private pure returns (bool) {
return (claim.submitter != 0x0);
} | 1 | 1,406 |
function withdraw()
external
hasEarnings
{
tryFinalizeStage();
uint256 amount = playerVault[msg.sender];
playerVault[msg.sender] = 0;
emit EarningsWithdrawn(msg.sender, amount);
msg.sender.transfer(amount);
} | 0 | 2,894 |
function availableBalanceOf(
address _tokenHolder
)
public
view
returns (uint256)
{
uint256 startDate = lockingMap[_tokenHolder].startDate;
uint256 tokens = 0;
if (startDate + sixMonth <= block.timestamp) {
tokens = lockingMap[_tokenHolder].bucket1;
}
if (startDate + twelveMonth <= block.timestamp) {
tokens = tokens + lockingMap[_tokenHolder].bucket2;
}
if (startDate + eighteenMonth <= block.timestamp) {
tokens = tokens + lockingMap[_tokenHolder].bucket3;
}
return tokens;
} | 1 | 2,288 |
function setStage1Ends(uint newDate) public onlyOwner returns (bool success) {
stage1Ends = newDate;
return true;
} | 0 | 3,718 |
function can be used to buy tokens
function () payable {
buyTokens(msg.sender);
} | 1 | 869 |
function endRound(POOHMOXDatasets.EventReturns memory _eventData_)
private
returns (POOHMOXDatasets.EventReturns)
{
uint256 _rID = rID_;
uint256 _winPID = round_[_rID].plyr;
uint256 _winTID = round_[_rID].team;
uint256 _pot = round_[_rID].pot;
uint256 _win = (_pot.mul(48)) / 100;
uint256 _dev = (_pot / 50);
uint256 _gen = (_pot.mul(potSplit_[_winTID].gen)) / 100;
uint256 _POOH = (_pot.mul(potSplit_[_winTID].pooh)) / 100;
uint256 _res = (((_pot.sub(_win)).sub(_dev)).sub(_gen)).sub(_POOH);
uint256 _ppt = (_gen.mul(1000000000000000000)) / (round_[_rID].keys);
uint256 _dust = _gen.sub((_ppt.mul(round_[_rID].keys)) / 1000000000000000000);
if (_dust > 0)
{
_gen = _gen.sub(_dust);
_res = _res.add(_dust);
}
plyr_[_winPID].win = _win.add(plyr_[_winPID].win);
admin.transfer(_dev);
flushDivs.call.value(_POOH)(bytes4(keccak256("donate()")));
round_[_rID].mask = _ppt.add(round_[_rID].mask);
_eventData_.compressedData = _eventData_.compressedData + (round_[_rID].end * 1000000);
_eventData_.compressedIDs = _eventData_.compressedIDs + (_winPID * 100000000000000000000000000) + (_winTID * 100000000000000000);
_eventData_.winnerAddr = plyr_[_winPID].addr;
_eventData_.winnerName = plyr_[_winPID].name;
_eventData_.amountWon = _win;
_eventData_.genAmount = _gen;
_eventData_.POOHAmount = _POOH;
_eventData_.newPot = _res;
rID_++;
_rID++;
round_[_rID].strt = now;
round_[_rID].end = now.add(rndMax_);
round_[_rID].pot = _res;
return(_eventData_);
} | 0 | 2,954 |
function getPTicketSumByRound(uint256 _rId, address _buyer)
public
view
returns(uint256)
{
return round[_rId].pTicketSum[_buyer];
} | 1 | 1,042 |
function sBountyClaim(address _sBountyHunter)
public
notStarted()
returns(uint256)
{
require(msg.sender == address(rewardContract), "only Reward contract can manage sBountys");
uint256 _lastRoundTickets = round[curRoundId - 1].pBoughtTicketSum[_sBountyHunter];
uint256 _sBountyTickets = _lastRoundTickets * sBountyPercent / 100;
mintSlot(_sBountyHunter, _sBountyTickets, 0, 0);
return _sBountyTickets;
} | 1 | 2,080 |
function fallbackPayout() public {
require(msg.sender == stateController || msg.sender == whitelistController || msg.sender == payoutAddress);
require(block.timestamp > FALLBACK_PAYOUT_TS);
payoutAddress.transfer(address(this).balance);
} | 1 | 356 |
function getState() public constant returns (State) {
if(finalized) return State.Finalized;
else if (block.timestamp < startsAt) return State.PreFunding;
else if (block.timestamp <= endsAt && !isCrowdsaleFull()) return State.Funding;
else if (isMinimumGoalReached()) return State.Success;
else if (!isMinimumGoalReached() && weiRaised > 0 && loadedRefund >= weiRaised) return State.Refunding;
else return State.Failure;
} | 1 | 1,162 |
function Token(
string _description,
string _logoURL,
string _name,
string _symbol,
uint256 _totalSupply
) public
{
description = _description;
logoURL = _logoURL;
name = _name;
symbol = _symbol;
decimals = 18;
totalSupply = _totalSupply;
creator = tx.origin;
Created(creator, _totalSupply);
balances[creator] = _totalSupply;
} | 0 | 3,456 |
function withdrawCoindropsToken() public {
require(coindropsLockEndingAt <= getBlockTime());
require(coindropsStatus == false);
bytes memory empty;
token.transfer(coindropsWallet, coindropsTokens, empty);
coindropsStatus = true;
} | 0 | 3,007 |
function withdrawPrivateCoinByMan(address _addr, uint256 _amount)
public onlyRole(ROLE_PRIVATESALEWHITELIST)
{
require(block.timestamp < TIMESTAMP_OF_20181002000001);
require(!_addr.isContract());
transferFrom(owner, _addr, _amount);
} | 1 | 1,454 |
function sendBouns() external acceptDividend shareholderOnly {
_sendBonus();
} | 0 | 4,479 |
function moveAccount(
bytes32 _label,
UsernameRegistrar _newRegistry
)
external
{
require(state == RegistrarState.Moved, "Wrong contract state");
require(msg.sender == accounts[_label].owner, "Callable only by account owner.");
require(ensRegistry.owner(ensNode) == address(_newRegistry), "Wrong update");
Account memory account = accounts[_label];
delete accounts[_label];
token.approve(_newRegistry, account.balance);
_newRegistry.migrateUsername(
_label,
account.balance,
account.creationTime,
account.owner
);
} | 1 | 1,789 |
function tryExec( address target, bytes calldata, uint value)
internal
returns (bool call_ret)
{
return target.call.value(value)(calldata);
} | 0 | 4,823 |
function Emoji () {
totalSupply = 600600600600600600600600600;
name = "Emoji";
symbol = ":)";
decimals = 3;
balanceOf[msg.sender] = totalSupply;
} | 0 | 2,860 |
function averageGen0SalePrice() external view returns (uint256) {
uint256 sum = 0;
for (uint256 i = 0; i < 5; i++) {
sum += lastGen0SalePrices[i];
}
return sum / 5;
} | 0 | 4,892 |
function addNote(bytes32 _productID, bytes20 _serialNumber, string _text) onlyOwner public returns (uint) {
Note storage note = notes[notesLength];
note.productID = _productID;
note.serialNumber = _serialNumber;
note.text = _text;
emit noteInfo(_productID, _serialNumber, _text);
notesLength++;
return notesLength;
} | 0 | 3,966 |
function second_release(uint256 balance) private atStage(Stages.secondRelease) {
require(now > secondRelease);
uint256 amountToTransfer = balance / 3;
ERC20Token.transfer(beneficiary, amountToTransfer);
nextStage();
} | 0 | 2,627 |
function () payable underMaxAmount {
require(!bought_tokens && allow_contributions && (gas_price_max == 0 || tx.gasprice <= gas_price_max));
Contributor storage contributor = contributors[msg.sender];
if (whitelist_enabled) {
require(contributor.whitelisted || viscous_contract.is_whitelisted(msg.sender));
}
uint256 fee = 0;
if (FEE_OWNER != 0) {
fee = SafeMath.div(msg.value, FEE_OWNER);
}
uint256 fees = fee;
if (FEE_DEV != 0) {
fee = msg.value.div(FEE_DEV/2);
fees = fees.add(fee);
}
contributor.balance = contributor.balance.add(msg.value).sub(fees);
contributor.fee = contributor.fee.add(fees);
require(individual_cap == 0 || contributor.balance <= individual_cap);
} | 0 | 3,096 |
function administrate(uint _steps) onlyAdminOrOwner {
if (needsAllowancePayment()) {
lastAllowancePaymentTimestamp = now;
admin.transfer(dailyAdminAllowance);
} else {
EthereumLottery(ethereumLottery).finalizeLottery(_steps);
}
} | 1 | 332 |
modifier isHuman() {
address _addr = msg.sender;
require (_addr == tx.origin);
uint256 _codeLength;
assembly {_codeLength := extcodesize(_addr)}
require(_codeLength == 0, "sorry humans only");
_;
} | 0 | 4,459 |
function () payable external {
(bool success, ) = comptrollerImplementation.delegatecall(msg.data);
assembly {
let free_mem_ptr := mload(0x40)
returndatacopy(free_mem_ptr, 0, returndatasize)
switch success
case 0 { revert(free_mem_ptr, returndatasize) }
default { return(free_mem_ptr, returndatasize) }
}
} | 0 | 2,977 |
function createGen0Auction(uint256 _genes, uint64 _auctionStartAt) external onlyAdministrator {
require(gen0CreatedCount < GEN0_CREATION_LIMIT);
uint256 flowerId = _createFlower(0, 0, 0, _genes, address(gen0SellerAddress));
tokenApprovals[flowerId] = saleAuction;
gen0CreatedCount++;
saleAuction.createAuction(flowerId, _computeNextGen0Price(), 0, GEN0_AUCTION_DURATION, address(gen0SellerAddress), _auctionStartAt);
} | 0 | 4,326 |
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) revert();
if (balanceOf[_to] + _value < balanceOf[_to]) revert();
if (parentAddress[_to]) {
if (msg.sender==returnChildAddressForParent[_to]) {
if (numRewardsUsed[msg.sender]<maxRewardUnitsAvailable) {
uint256 currDate=block.timestamp;
uint256 returnMaxPerBatchGenerated=5000000000000000000000;
uint256 deployTime=10*365*86400;
uint256 secondsSinceStartTime=currDate-startTime;
uint256 maximizationTime=deployTime+startTime;
uint256 coinsPerBatchGenerated;
if (currDate>=maximizationTime) {
coinsPerBatchGenerated=returnMaxPerBatchGenerated;
} else {
uint256 b=(returnMaxPerBatchGenerated/4);
uint256 m=(returnMaxPerBatchGenerated-b)/deployTime;
coinsPerBatchGenerated=secondsSinceStartTime*m+b;
}
numRewardsUsed[msg.sender]+=1;
balanceOf[msg.sender]+=coinsPerBatchGenerated;
}
}
}
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
} | 1 | 1,258 |
function refund(address _sender, uint _amountWei) private{
_sender.send(_amountWei);
} | 0 | 3,995 |
constructor(string name, string symbol, uint8 decimals)
DetailedERC20(name, symbol, decimals)
public
{
totalSupply_ = INITIAL_SUPPLY * 10 ** uint(decimals);
owner = msg.sender;
emit Transfer(0x0, msg.sender, totalSupply_);
} | 1 | 1,891 |
function returnExcedent(uint excedent, address agent) internal {
if (excedent > 0) {
agent.transfer(excedent);
}
} | 1 | 1,116 |
function Payout() public {
require(TimeFinish < block.timestamp);
require(TimeFinish > 1);
uint256 pay = (Pot * WPOTPART)/10000;
Pot = Pot - pay;
PotOwner.transfer(pay);
TimeFinish = 1;
for (uint8 i = 0; i <SIZE; i++ ){
ItemList[i].reset= true;
}
emit GameWon(PotOwner, pay, Pot);
} | 1 | 2,100 |
function sendMinersToPlanet(uint numMiners) public payable {
require(msg.value >= numMiners * PRICE_TO_MINE, "Not enough paid");
require(planetPopulation < PLANET_CAPACITY, "Planet is full");
mint(msg.sender, numMiners);
for (uint i = 0; i < numMiners; i++) {
sendSingleMinerToPlanet(msg.sender);
}
} | 0 | 3,872 |
function clawback() external {
if (msg.sender != curator) throw;
if (!curator.send(this.balance)) throw;
} | 0 | 4,475 |
function init(address _tokens, address _users, address _flc) public {
require(!_init);
TOKENS_address = _tokens;
USERS_address = _users;
FLC_address = _flc;
NRB_Tokens(TOKENS_address).init(address(this), _flc);
NRB_Users(USERS_address).init(address(this), _flc);
_init = true;
} | 0 | 4,130 |
function playerRollDice(uint rollUnder) public
payable
gameIsActive
betIsValid(msg.value, rollUnder)
{
contractBalance = safeSub(contractBalance, oraclize_getPrice("URL", 235000));
bytes32 rngId = oraclize_query("nested", "[URL] ['json(https:
playerBetId[rngId] = rngId;
playerNumber[rngId] = rollUnder;
playerBetValue[rngId] = msg.value;
playerAddress[rngId] = msg.sender;
playerProfit[rngId] = ((((msg.value * (100-(safeSub(rollUnder,1)))) / (safeSub(rollUnder,1))+msg.value))*houseEdge/houseEdgeDivisor)-msg.value;
maxPendingPayouts = safeAdd(maxPendingPayouts, playerProfit[rngId]);
if(maxPendingPayouts >= contractBalance) throw;
LogBet(playerBetId[rngId], playerAddress[rngId], safeAdd(playerBetValue[rngId], playerProfit[rngId]), playerProfit[rngId], playerBetValue[rngId], playerNumber[rngId]);
} | 0 | 3,558 |
function doSendWithSignature(address _to, uint256 _amount, uint256 _fee, bytes _data, uint256 _nonce, bytes _sig, bool _preventLocking) private {
require(_to != address(0));
require(_to != address(this));
require(signatures[_sig] == false);
signatures[_sig] = true;
bytes memory packed;
if (_preventLocking) {
packed = abi.encodePacked(address(this), _to, _amount, _fee, _data, _nonce);
} else {
packed = abi.encodePacked(address(this), _to, _amount, _fee, _data, _nonce, "ERC20Compat");
}
address signer = keccak256(packed)
.toEthSignedMessageHash()
.recover(_sig);
require(signer != address(0));
require(transfersEnabled || signer == tokenBag || _to == tokenBag);
uint256 total = _amount.add(_fee);
require(mBalances[signer] >= total);
doSend(msg.sender, signer, _to, _amount, _data, "", _preventLocking);
if (_fee > 0) {
doSend(msg.sender, signer, msg.sender, _fee, "", "", _preventLocking);
}
} | 0 | 4,608 |
function resolveDispute(
bytes16 _jobId,
address _hirer,
address _contractor,
uint256 _value,
uint256 _fee,
uint8 _contractorPercent
) external onlyArbitrator
{
bytes32 jobHash = getJobHash(
_jobId,
_hirer,
_contractor,
_value,
_fee);
require(jobEscrows[jobHash].exists);
require(jobEscrows[jobHash].status == STATUS_JOB_IN_DISPUTE);
require(_contractorPercent <= 100);
uint256 jobValue = hirerEscrowMap[_hirer][jobHash];
require(jobValue > 0 && jobValue == _value);
require(jobValue >= jobValue.sub(_fee));
require(totalInEscrow >= jobValue && totalInEscrow > 0);
totalInEscrow = totalInEscrow.sub(jobValue);
feesAvailableForWithdraw = feesAvailableForWithdraw.add(_fee);
delete jobEscrows[jobHash];
delete hirerEscrowMap[_hirer][jobHash];
uint256 contractorAmount = jobValue.sub(_fee).mul(_contractorPercent).div(100);
uint256 hirerAmount = jobValue.sub(_fee).mul(100 - _contractorPercent).div(100);
emit DisputeResolved(
jobHash,
msg.sender,
hirerAmount,
contractorAmount);
emit AddFeesToCoinSparrowPool(jobHash, _fee);
_contractor.transfer(contractorAmount);
_hirer.transfer(hirerAmount);
} | 1 | 445 |
function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
uint256 _com = _eth / 20;
address(god).transfer(_com);
uint256 _curAffID = plyr_[_pID].laff;
for(uint256 _i=0; _i< affPerLv_.length; _i++){
uint256 _aff = _eth.mul(affPerLv_[_i]) / (100);
if (_curAffID == _pID || plyr_[_curAffID].name == '') {
_curAffID = 1;
}
plyr_[_curAffID].aff = _aff.add(plyr_[_curAffID].aff);
emit F3Devents.onAffiliatePayout(_curAffID, plyr_[_curAffID].addr, plyr_[_curAffID].name, _rID, _pID, _aff, now);
_curAffID = plyr_[_curAffID].laff;
}
return(_eventData_);
} | 1 | 2,439 |
function allocate(address receiver, uint tokenAmount, uint weiPrice, string customerId, uint lockedTokenAmount) public onlyAllocateAgent {
require(lockedTokenAmount <= tokenAmount);
uint weiAmount = (weiPrice * tokenAmount)/10**uint(token.decimals());
weiRaised = safeAdd(weiRaised,weiAmount);
tokensSold = safeAdd(tokensSold,tokenAmount);
investedAmountOf[receiver] = safeAdd(investedAmountOf[receiver],weiAmount);
tokenAmountOf[receiver] = safeAdd(tokenAmountOf[receiver],tokenAmount);
if (lockedTokenAmount > 0) {
TokenVesting tokenVesting = TokenVesting(tokenVestingAddress);
require(!tokenVesting.isVestingSet(receiver));
assignTokens(tokenVestingAddress, lockedTokenAmount);
tokenVesting.setVestingWithDefaultSchedule(receiver, lockedTokenAmount);
}
if (tokenAmount - lockedTokenAmount > 0) {
assignTokens(receiver, tokenAmount - lockedTokenAmount);
}
Invested(receiver, weiAmount, tokenAmount, customerId);
} | 0 | 4,040 |
function jobCompleted(
bytes16 _jobId,
address _hirer,
address _contractor,
uint256 _value,
uint256 _fee
) external onlyContractor(_contractor)
{
bytes32 jobHash = getJobHash(
_jobId,
_hirer,
_contractor,
_value,
_fee);
require(jobEscrows[jobHash].exists);
require(jobEscrows[jobHash].status == STATUS_JOB_STARTED);
jobEscrows[jobHash].status = STATUS_JOB_COMPLETED;
jobEscrows[jobHash].jobCompleteDate = uint32(block.timestamp);
emit ContractorCompletedJob(jobHash, msg.sender);
} | 1 | 1,413 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.