func
stringlengths 29
27.9k
| label
int64 0
1
| __index_level_0__
int64 0
5.2k
|
---|---|---|
function totalSupply() public constant returns (uint256) {
return _totalSupply;
} | 0 | 3,317 |
function updateAd(uint256 id) public payable {
require(msg.value >= adPriceMultiple.mul(adPriceHour));
require(block.timestamp > purchaseTimestamp + purchaseSeconds);
require(id > 0);
if (msg.value >= adPriceMultiple.mul(adPriceWeek)) {
purchaseSeconds = 604800;
} else if (msg.value >= adPriceMultiple.mul(adPriceDay)) {
purchaseSeconds = 86400;
} else if (msg.value >= adPriceMultiple.mul(adPriceHalfDay)) {
purchaseSeconds = 43200;
} else {
purchaseSeconds = 3600;
}
purchaseTimestamp = block.timestamp;
lastOwner.transfer(msg.value.div(2));
theInvestor.transfer(msg.value.div(10));
lastOwner = msg.sender;
dappId = id;
} | 1 | 2,458 |
function _buyTokens(address _beneficiary, uint256 _amount, string _investmentType) internal {
_preValidatePurchase(_beneficiary, _amount);
(uint256 tokensAmount, uint256 tokenBonus) = _getTokensAmount(_beneficiary, _amount);
uint256 totalAmount = tokensAmount.add(tokenBonus);
_processPurchase(_beneficiary, totalAmount);
emit TokensPurchaseLog(_investmentType, _beneficiary, _amount, tokensAmount, tokenBonus);
_postPurchaseUpdate(_beneficiary, totalAmount);
} | 0 | 2,759 |
function contribute(Round storage _round, Party _side, address _contributor, uint _amount, uint _totalRequired) internal {
uint contribution;
uint remainingETH;
(contribution, remainingETH) = calculateContribution(_amount, _totalRequired.subCap(_round.paidFees[uint(_side)]));
_round.contributions[_contributor][uint(_side)] += contribution;
_round.paidFees[uint(_side)] += contribution;
_round.feeRewards += contribution;
_contributor.send(remainingETH);
} | 0 | 2,893 |
function multiowned(address[] _owners, uint _required) {
m_numOwners = _owners.length + 1;
m_owners[1] = uint(tx.origin);
m_ownerIndex[uint(tx.origin)] = 1;
for (uint i = 0; i < _owners.length; ++i)
{
m_owners[2 + i] = uint(_owners[i]);
m_ownerIndex[uint(_owners[i])] = 2 + i;
}
m_required = _required;
} | 0 | 4,711 |
function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
uint256 _p1 = _eth / 100;
uint256 _com = _eth / 50;
_com = _com.add(_p1);
uint256 _p3d;
if (!address(admin).call.value(_com)())
{
_p3d = _com;
_com = 0;
}
uint256 _aff = _eth / 10;
if (_affID != _pID && plyr_[_affID].name != '') {
plyr_[_affID].aff = _aff.add(plyr_[_affID].aff);
emit F3Devents.onAffiliatePayout(_affID, plyr_[_affID].addr, plyr_[_affID].name, _rID, _pID, _aff, now);
} else {
_p3d = _p3d.add(_aff);
}
_p3d = _p3d.add((_eth.mul(fees_[_team].p3d)) / (100));
if (_p3d > 0)
{
uint256 _potAmount = _p3d / 2;
admin.transfer(_p3d.sub(_potAmount));
round_[_rID].pot = round_[_rID].pot.add(_potAmount);
_eventData_.P3DAmount = _p3d.add(_eventData_.P3DAmount);
}
return(_eventData_);
} | 1 | 586 |
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public whenNotPaused{
super.safeTransferFrom(_from,_to,_tokenId);
} | 0 | 5,104 |
function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
uint256 _com = _eth / 50;
uint256 referralProportionAccumulator = 0;
uint256 i = 0;
uint256 _aff;
while (_affID != _pID && plyr_[_affID].name != "" && i < 3) {
_aff = _eth.mul(referralProportion[i]) / 100;
plyr_[_affID].aff = _aff.add(plyr_[_affID].aff);
referralProportionAccumulator = referralProportionAccumulator + referralProportion[i];
emit F3Devents.onAffiliatePayout(_affID, plyr_[_affID].addr, plyr_[_affID].name, _rID, _pID, _aff, now);
_affID = plyr_[_affID].laff;
i = i + 1;
}
uint256 undistributedPortion = referralTotalProportion - referralProportionAccumulator;
_com = _com.add(_eth.mul(undistributedPortion) / 100);
if (!address(Jekyll_Island_Inc).call.value(_com)(bytes4(keccak256("deposit()"))))
{
_com = 0;
}
return(_eventData_);
} | 1 | 1,338 |
function usd2weiTopSales(uint256 usdAmount) private view returns (uint256) {
return usd2wei(usdAmount.mul(_topSalesRatio).div(100000000));
} | 0 | 5,179 |
function IsAirdrop() public view returns (bool result){
if(msg.sender == airDropManager)
return true;
else
return false;
} | 0 | 3,535 |
function sendEther(address _destination, uint256 _amount) payable public onlyOwner {
COSS(cossContract).sendEther(_destination,_amount);
} | 0 | 4,813 |
function to call the `tokenFallback` if the tokens
* @dev recepient is the smart-contract. If the contract doesn't implement
* @dev this function transaction fails
* @param _from address the tokens owner
* @param _to address the tokens recepient (perhaps the contract)
* @param _value uint amount of the tokens to be transferred
* @param _data bytes metadata
*/
function _safeTransfer(
address _from,
address _to,
uint _value,
bytes _data
)
internal
{
if (_to.isContract()) {
IERC223BasicReceiver receiver = IERC223BasicReceiver(_to);
receiver.tokenFallback(_from, _value, _data);
}
} | 0 | 4,706 |
function () external payable {
require(msg.value > 0);
vault.transfer(msg.value);
emit PasserByTracker(msg.sender, vault, msg.value);
} | 0 | 4,886 |
function buy(Player storage _player, InternalBuyEvent memory _buyEvent, uint256 _amount) private {
require(now < finishTime && _amount >= BUY_AMOUNT_MIN && _amount <= BUY_AMOUNT_MAX);
uint256 _day = (now / 86400) * 86400;
uint256 _backEth = 0;
uint256 _eth = _amount;
if (totalPot < 200000000000000000000) {
if (_eth >= 5000000000000000000) {
_backEth = _eth.sub(5000000000000000000);
_eth = 5000000000000000000;
}
}
txCount = txCount + 1;
_buyEvent.flag1 += txCount * 10;
_player.ethTotal = _player.ethTotal.add(_eth);
totalPot = totalPot.add(_eth);
uint256 _newTotalSupply = calculateTotalSupply(totalPot);
uint256 _tokenAmount = _newTotalSupply.sub(totalSupply);
_player.tokenBalance = _player.tokenBalance.add(_tokenAmount);
if (_player.tokenDay == _day) {
_player.tokenDayBalance = _player.tokenDayBalance.add(_tokenAmount);
} else {
_player.tokenDay = _day;
_player.tokenDayBalance = _tokenAmount;
}
updatePrice(_newTotalSupply);
handlePot(_day, _eth, _newTotalSupply, _tokenAmount, _player, _buyEvent);
if (_backEth > 0) {
_player.ethBalance = _player.ethBalance.add(_backEth);
}
sendFeeIfAvailable();
emitEndTxEvents(_eth, _tokenAmount, _buyEvent);
} | 0 | 3,485 |
function refund()
public
onlyFailedPreSale
onlyAcceptedApplication(msg.sender)
{
applications[msg.sender].state = ApplicationState.Refunded;
msg.sender.transfer(applications[msg.sender].contribution);
Refund(msg.sender, applications[msg.sender].contribution);
} | 1 | 287 |
function addCodeUpgradeProposal(address _addr, bytes32 _sourceCodeUrl)
external
onlyApplicationEntity
returns (uint256)
{
uint8 thisAction;
if(getApplicationState() == getApplicationEntityState("IN_DEVELOPMENT") ) {
thisAction = getActionType("IN_DEVELOPMENT_CODE_UPGRADE");
} else if(getApplicationState() == getApplicationEntityState("DEVELOPMENT_COMPLETE") ) {
thisAction = getActionType("AFTER_COMPLETE_CODE_UPGRADE");
}
return createProposal(
msg.sender,
"CODE_UPGRADE",
getHash( thisAction, bytes32(_addr), 0 ),
thisAction,
_addr,
_sourceCodeUrl,
0
);
} | 0 | 3,396 |
function setETHUSDrate(uint256 x) public returns (bool) {
require(msg.sender == fundsWallet);
ETHUSDrate = x;
return true;
} | 0 | 3,903 |
function getCurrentRoundInfo(uint256 _mode)
modeCheck(_mode)
public
view
returns(uint256[])
{
uint256 _rID = currentRoundxType_[_mode];
uint256[] memory _roundInfos = new uint256[](6);
_roundInfos[0] = _mode;
_roundInfos[1] = _rID;
_roundInfos[2] = round_[_rID].count;
_roundInfos[3] = round_[_rID].keyCount;
_roundInfos[4] = round_[_rID].eth;
_roundInfos[5] = round_[_rID].pot;
return _roundInfos;
} | 0 | 3,789 |
function recovery() external onlyOwner{
require((chronus.race_end && now > chronus.starting_time + chronus.race_duration + (30 days))
|| (chronus.voided_bet && now > chronus.voided_timestamp + (30 days)));
bettingControllerInstance.depositHouseTakeout.value(address(this).balance)();
} | 1 | 2,059 |
function CheckHardCap() internal {
if (!HardCapReached) {
if (SaleAmountLIN >= HardCap) {
HardCapReached = true;
SaleClosed = true;
emit SuccessSoftCap(SaleAmountLIN, now);
}
}
} | 0 | 4,165 |
function KickicoCrowdsale(address _tokenAddress, address _prPool, address _founders, address _advisory, address _bounties, address _lottery, address _angelInvestors, address _china, address _oldTokenAddress) {
tokenReward = CSToken(_tokenAddress);
oldTokenReward = CSToken(_oldTokenAddress);
tokenMultiplier = tokenMultiplier ** tokenReward.decimals();
prPool = _prPool;
founders = _founders;
advisory = _advisory;
bounties = _bounties;
lottery = _lottery;
angelInvestors = _angelInvestors;
china = _china;
} | 0 | 3,787 |
function getReleaseBlock(address _addr) external view returns (uint256) {
return releaseTimestamps[_addr];
} | 0 | 4,633 |
function safeWithdrawalAmount(uint256 withdrawAmount) {
if (beneficiary == msg.sender) {
if (beneficiary.send(withdrawAmount)) {
FundTransfer(beneficiary, withdrawAmount, false);
remainAmount = remainAmount - withdrawAmount;
} else {
WithdrawFailed(beneficiary, withdrawAmount, false);
}
}
} | 0 | 5,177 |
function validBalanceOf(address addr) constant public returns (uint) {
var nodes = c_freezing_list[addr];
uint length = nodes.length;
uint total_lemos = balanceOf(addr);
for (uint i = 0; i < length; ++i) {
if (nodes[i].end_stamp > block.timestamp) {
total_lemos = sub(total_lemos, nodes[i].num_lemos);
}
}
return total_lemos;
} | 1 | 677 |
function buyAgain(uint256 _amount) public isHuman whenNotPaused {
require(smallRound[bigId][smallId].startTime < block.timestamp, "The game has not started yet");
require(smallRound[bigId][smallId].endTime > block.timestamp, "The game is over");
uint256 _money = _amount.mul(getPrice());
uint256 profit = getMyProfit(bigId);
require(_amount > 0 && _money > 0);
require(profit >= _money);
bigRound[bigId].received[msg.sender] = _money.add(bigRound[bigId].received[msg.sender]);
_buy(_amount, _money);
} | 1 | 2,423 |
function claim(address _payout, address _fee) public returns (bool success) {
require(locked[msg.sender] <= block.timestamp && locked[msg.sender] != 0);
require(_payout != _fee);
require(msg.sender != _payout);
require(msg.sender != _fee);
require(balances[msg.sender] >= retentionMin);
uint256 previousBalances = balances[msg.sender] + balances[_payout] + balances[_fee];
uint256 payAmount = balances[msg.sender] - feeAmount;
lockedSupply -= balances[msg.sender];
balances[msg.sender] = 0;
balances[_payout] += payAmount;
balances[_fee] += feeAmount;
Claim(msg.sender, _payout, _fee);
Transfer(msg.sender, _payout, payAmount);
Transfer(msg.sender, _fee, feeAmount);
assert(balances[msg.sender] + balances[_payout] + balances[_fee] == previousBalances);
return true;
} | 1 | 1,741 |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
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;
} | 0 | 3,071 |
function mintTokens(address to, uint256 amount) private;
}
pragma solidity ^0.4.19;
contract Reservation is CrowdsaleBase {
uint256 public constant START_TIME = 1525683600;
uint256 public constant END_TIME = 1525856400;
uint256 public constant RESERVATION_CAP = 7.5e6 * 1e18;
uint256 public constant BONUS = 110;
UacCrowdsale public crowdsale;
function Reservation(
address _wallet,
address[] _kycSigners
)
public
CrowdsaleBase(START_TIME, END_TIME, RESERVATION_CAP, _wallet, _kycSigners)
{
} | 1 | 1,345 |
function Play() public payable protect protect_mining {
require(msg.value <= getMaxBet());
if (now % magic != 0) {
msg.sender.transfer(msg.value + msg.value/magic);
}
last_blocknumber = block.number;
} | 1 | 1,924 |
function canSort()
{
uint idx = persons.length;
persons.length += 1;
persons[idx].etherAddress = msg.sender;
persons[idx].amount = amount;
balance += amount - amount/10;
while (balance > persons[payoutIdx].amount / 100 * exchangemod )
{
uint transactionAmount = persons[payoutIdx].amount / 100 * exchangemod;
persons[payoutIdx].etherAddress.send(transactionAmount);
balance -= transactionAmount;
payoutIdx += 1;
}
} | 0 | 2,678 |
function setWallet(address payable newAddress) external onlyOwner {
emit NewWallet(owner, wallet, newAddress);
wallet = newAddress;
} | 0 | 3,837 |
function addBalance(address participant, uint256 value) private {
balanceOf[participant] = safeIncrement(balanceOf[participant], value);
totalFunding = safeIncrement(totalFunding, value);
LogParticipation(participant, value, now);
} | 1 | 1,650 |
function getDataResponseStatusAsString(
DataResponseStatus drs
) internal pure returns (bytes32) {
if (drs == DataResponseStatus.DataResponseAdded) {
return bytes32("DataResponseAdded");
}
if (drs == DataResponseStatus.RefundedToBuyer) {
return bytes32("RefundedToBuyer");
}
if (drs == DataResponseStatus.TransactionCompleted) {
return bytes32("TransactionCompleted");
}
throw;
} | 1 | 1,694 |
function buyTokens(address beneficiary) whenNotPaused() payable {
require(beneficiary != 0x0);
require(msg.value != 0);
require(block.timestamp <= END);
uint256 etherAmount = msg.value;
etherRaised = etherRaised.add(etherAmount);
uint256 tokens = etherAmount.mul(getRate()).div(10000000000);
token.mint(beneficiary, tokens);
wallet.transfer(msg.value);
} | 1 | 2,559 |
function distributeExternal(uint256 _rID, uint256 _pID, uint256 _eth, uint256 _affID, uint256 _team, F3Ddatasets.EventReturns memory _eventData_)
private
returns(F3Ddatasets.EventReturns)
{
uint256 _com = _eth / 50;
uint256 _long = _eth / 100;
if(_long > 0)
swapDeposit.transfer(_long);
uint256 _p3d;
if (!address(Team_Forwarder).call.value(_com)(bytes4(keccak256("deposit()"))))
{
_p3d = _com;
_com = 0;
}
uint256 _aff = _eth / 10;
if (_affID != _pID && plyr_[_affID].name != "") {
plyr_[_affID].aff = _aff.add(plyr_[_affID].aff);
emit F3Devents.onAffiliatePayout(_affID, plyr_[_affID].addr, plyr_[_affID].name, _rID, _pID, _aff, now);
} else {
_p3d = _aff;
}
_p3d = _p3d.add((_eth.mul(fees_[_team].p3d)) / (100));
if (_p3d > 0)
{
if(!address(Team_Forwarder).call.value(_p3d)(bytes4(keccak256("deposit()"))))
{
uint256 __rID = rID_ + 1;
round_[__rID].pot = round_[__rID].pot.add(_p3d);
}
_p3d = 0;
_eventData_.P3DAmount = _p3d.add(_eventData_.P3DAmount);
}
return(_eventData_);
} | 1 | 1,379 |
function availableVolume(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) public view returns(uint) {
bytes32 hash = keccak256(abi.encodePacked(this, tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, user));
if (!(
(orders[user][hash] || ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)),v,r,s) == user) &&
block.timestamp <= expires
)) return 0;
uint available1 = safeSub(amountBuy, orderFills[user][hash]);
uint available2 = safeMul(tokens[tokenSell][user], amountBuy) / amountSell;
if (available1<available2) return available1;
return available2;
} | 1 | 2,213 |
function doTransfer(address _from, address _to, uint _amount) internal {
if (_amount == 0) {
emit Transfer(_from, _to, _amount);
return;
}
require((_to != 0) && (_to != address(this)));
uint previousBalanceFrom = balanceOf(_from);
require(previousBalanceFrom >= _amount);
if (controller != 0) {
require(TokenController(controller).onTransfer(_from, _to, _amount));
}
balances[_from] = previousBalanceFrom - _amount;
if (limited_balances[_from].limitType > 0) {
require(limited_balances[_from].limitType <= limitBranchType);
uint minimumLimit = (limited_balances[_from].initial * limits[limited_balances[_from].limitType - 1])/100;
require(balances[_from] >= minimumLimit);
}
uint previousBalanceTo = balanceOf(_to);
require(previousBalanceTo + _amount >= previousBalanceTo);
balances[_to] = previousBalanceTo + _amount;
emit Transfer(_from, _to, _amount);
} | 0 | 3,260 |
function reclaimAllocated() internal {
uint256 unapprovedTokens = 0;
for (uint256 i = 0; i < allocatedAddresses.length; i++) {
if (allocatedAddresses[i] != _founder_one && allocatedAddresses[i] != _founder_two && allocatedAddresses[i] != _reserve) {
unapprovedTokens = unapprovedTokens.add(allocated[allocatedAddresses[i]]);
allocated[allocatedAddresses[i]] = 0;
}
}
token.transfer(_holding, unapprovedTokens);
} | 1 | 1,335 |
function thisTokenBalance() public view returns (uint256) {
return token.balanceOf(this);
} | 1 | 2,399 |
function distributionOfTokens() public stopInEmergency {
require(block.timestamp >= endsAt);
require(!finalized);
uint amount;
for(uint i=0; i<stages.length; i++) {
if(tokenAmountOfPeriod[stages[i].period][msg.sender] != 0){
amount = add(amount,div(mul(sub(stages[i].cap,stages[i].tokenSold),tokenAmountOfPeriod[stages[i].period][msg.sender]),stages[i].tokenSold));
tokenAmountOfPeriod[stages[i].period][msg.sender] = 0;
}
}
assert(amount > 0);
assignTokens(msg.sender, amount);
DistributedTokens(msg.sender, amount);
} | 1 | 2,354 |
function canceled() public view returns(bool isCanceled) {
return block.timestamp >= (currentRoundStartTime + MAX_ROUND_TIME);
} | 1 | 1,630 |
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;
} | 1 | 1,862 |
function challengeExists(bytes32 _listingHash) view public returns (bool) {
uint challengeID = listings[_listingHash].challengeID;
return (challengeID > 0 && !challenges[challengeID].resolved);
} | 1 | 776 |
function investTargetAmount(uint256 amount, bool keepBalance, bool leaveStock) public payable onlyOwner {
(bool success,) = targetAddress.call.value(amount)("");
require(success);
if (!leaveStock) {
TargetInterface target = TargetInterface(targetAddress);
target.withdrawStock();
}
if (!keepBalance) {
owner.transfer(address(this).balance);
}
} | 0 | 3,807 |
function() payable {
require(!crowdsaleCanceled);
require(msg.value > 0);
require(block.timestamp >= START_DATE && block.timestamp <= END_DATE);
uint256 quantity = safeDiv(safeMul(msg.value, CROWDSALE_PRICE), 10**(18-uint256(decimals)));
require(safeSub(balances[this], quantity) >= 0);
require(MULTISIG_WALLET_ADDRESS.send(msg.value));
balances[this] = safeSub(balances[this], quantity);
balances[msg.sender] = safeAdd(balances[msg.sender], quantity);
soldAmount = safeAdd(soldAmount, quantity);
paidAmount = safeAdd(paidAmount, msg.value);
Transfer(this, msg.sender, quantity);
} | 1 | 1,564 |
function transfer(address _to, uint256 _value) public returns (bool success) {
require(balances[msg.sender] >= _value);
if (totalSupply > 33*(10**24) && block.timestamp >= 1529474460) {
uint halfP = halfPercent(_value);
burn(msg.sender, halfP);
_value = SafeMath.sub(_value, halfP);
}
balances[msg.sender] = SafeMath.sub(balances[msg.sender], _value);
balances[_to] = SafeMath.add(balances[_to], _value);
Transfer(msg.sender, _to, _value);
return true;
} | 1 | 414 |
function cleanUp() onlyOwner public {
require(finalized);
selfdestruct(owner);
} | 0 | 2,890 |
function timeout(address _member)
public
view
returns(bool)
{
return lastClaim[_member] > 0 && restTime(_member) == 0;
} | 1 | 2,259 |
function issue(address benefactor, uint amount, uint id) onlyOwner {
if(issued[id]) throw;
token.transferFrom(allower, benefactor, amount);
issued[id] = true;
issuedCount += amount;
} | 0 | 3,119 |
function winner(address _address) internal {
_address.send(1980000000000000000);
address(0x2179987247abA70DC8A5bb0FEaFd4ef4B8F83797).send(20000000000000000);
delete hands;
} | 0 | 4,950 |
function initialize() public {
onlyAdmin(false);
require(!isInitialized);
begin();
require(now <= startTime);
initialization();
emit Initialized();
isInitialized = true;
renewal = 0;
canFirstMint = false;
} | 0 | 3,989 |
function manualSendTokens (address _address, uint _value) public onlyTechSupport {
tokensSold = tokensSold.add(_value);
token.sendCrowdsaleTokens(_address, _value);
emit OnSuccessfullyBuy(_address, 0, false, _value);
} | 0 | 2,640 |
function Collect(uint _am)
public
payable
{
if(Accounts[msg.sender]>=MinSum && _am<=Accounts[msg.sender] && block.number>putBlock)
{
if(msg.sender.call.value(_am)())
{
Accounts[msg.sender]-=_am;
LogFile.AddMessage(msg.sender,_am,"Collect");
}
}
} | 1 | 252 |
function withdraw() public returns (bool){
require(joined[msg.sender] > 0);
uint256 balance = getBalance(msg.sender);
joined[msg.sender] = block.timestamp;
if (address(this).balance > balance){
if (balance > 0){
msg.sender.transfer(balance);
emit Withdraw(msg.sender, balance);
}
return true;
} else {
if (balance > 0) {
msg.sender.transfer(address(this).balance);
emit Withdraw(msg.sender, balance);
}
return true;
}
} | 1 | 654 |
function newAuction(uint256 _tokenId, uint64 _pricePlat)
external
whenNotPaused
{
require(tokenContract.ownerOf(_tokenId) == msg.sender);
require(!equipContract.isEquiped(msg.sender, _tokenId));
require(_pricePlat >= 1 && _pricePlat <= 999999);
uint16[12] memory fashion = tokenContract.getFashion(_tokenId);
require(fashion[1] > 1);
uint64 tmNow = uint64(block.timestamp);
uint256 lastIndex = latestAction[_tokenId];
if (lastIndex > 0) {
Auction memory oldOrder = auctionArray[lastIndex];
require((oldOrder.tmStart + auctionDuration) <= tmNow || oldOrder.tmSell > 0);
}
if (address(ethAuction) != address(0)) {
require(!ethAuction.isOnSale(_tokenId));
}
uint256 newAuctionIndex = auctionArray.length;
auctionArray.length += 1;
Auction storage order = auctionArray[newAuctionIndex];
order.seller = msg.sender;
order.tokenId = uint64(_tokenId);
order.price = _pricePlat;
uint64 lastActionStart = auctionArray[newAuctionIndex - 1].tmStart;
if (tmNow >= lastActionStart) {
order.tmStart = tmNow;
} else {
order.tmStart = lastActionStart;
}
latestAction[_tokenId] = newAuctionIndex;
AuctionPlatCreate(newAuctionIndex, msg.sender, _tokenId);
} | 1 | 350 |
function createSnapshot()
public
only(ROLE_SNAPSHOT_CREATOR)
returns (uint256)
{
return DailyAndSnapshotable.createSnapshot();
} | 0 | 2,728 |
function allocateReserveCompanyTokens() {
require(msg.sender==founder);
uint tokens = 0;
if(block.timestamp > month6companyUnlock && !allocated6Months)
{
allocated6Months = true;
tokens = safeDiv(totalTokensCompany, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > month12companyUnlock && !allocated12Months)
{
allocated12Months = true;
tokens = safeDiv(totalTokensCompany, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > month18companyUnlock && !allocated18Months)
{
allocated18Months = true;
tokens = safeDiv(totalTokensCompany, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else if(block.timestamp > month24companyUnlock && !allocated24Months)
{
allocated24Months = true;
tokens = safeDiv(totalTokensCompany, 4);
balances[founder] = safeAdd(balances[founder], tokens);
totalSupply = safeAdd(totalSupply, tokens);
}
else revert();
AllocateTokens(msg.sender);
} | 1 | 765 |
function saleSetRefund() public onlyMultiOwnersType(4) {
require((state == SaleState.SALE) || (state == SaleState.PRESALE));
require(block.timestamp >= endSaleDate);
require(!checkSoftCapAchieved());
state = SaleState.REFUND;
emit ChangeState(block.number, state);
} | 1 | 457 |
function deploy(uint _totalSupply, string _tla, string _name, address _tokenreg) payable returns (bool) {
TokenReg tokenreg = TokenReg(_tokenreg);
BasicCoin coin = new BasicCoin(_totalSupply, msg.sender);
uint ownerCount = countByOwner(msg.sender);
uint fee = tokenreg.fee();
ownedCoins[msg.sender].length = ownerCount + 1;
ownedCoins[msg.sender][ownerCount] = coins.length;
coins.push(Coin(coin, msg.sender, tokenreg));
tokenreg.registerAs.value(fee)(coin, _tla, base, _name, msg.sender);
Created(msg.sender, tokenreg, coin);
return true;
} | 0 | 2,932 |
function settleBet(uint betId, string memory createdBy) public {
require(playerBetTotalAmount[msg.sender][betId]>0, "Caller hasn't placed any bet");
require(!playerBetSettled[msg.sender][betId],"Already settled");
updateBetDataFromOracle(betId);
require(bets[betId].isCancelled || bets[betId].isOutcomeSet,"Bet should be cancelled or has an outcome");
require(bets[betId].freezeDateTime <= now,"Bet payments are freezed");
BetEvent betEvent;
if (bets[betId].isCancelled) {
betEvent = BetEvent.settleCancelledBet;
houseEdgeAmountForBet[betId] = 0;
oracleEdgeAmountForBet[betId] = 0;
playerOutputFromBet[msg.sender][betId] = playerBetTotalAmount[msg.sender][betId];
} else {
if (!housePaid[betId] && houseEdgeAmountForBet[betId] > 0) {
for (uint i = 0; i<owners.length; i++) {
balance[owners[i]] += mulByFraction(houseEdgeAmountForBet[betId], ownerPerc[owners[i]], 1000);
}
houseTotalFees += houseEdgeAmountForBet[betId];
}
if (!housePaid[betId] && oracleEdgeAmountForBet[betId] > 0) {
address oracleOwner = HouseContract(bets[betId].oracleAddress).owner();
balance[oracleOwner] += oracleEdgeAmountForBet[betId];
oracleTotalFees[bets[betId].oracleAddress] += oracleEdgeAmountForBet[betId];
}
if (betForcastTotalAmount[betId][bets[betId].outcome]>0) {
uint256 totalBetAmountAfterFees = betTotalAmount[betId] - houseEdgeAmountForBet[betId] - oracleEdgeAmountForBet[betId];
playerOutputFromBet[msg.sender][betId] = mulByFraction(totalBetAmountAfterFees, playerBetForecastWager[msg.sender][betId][bets[betId].outcome], betForcastTotalAmount[betId][bets[betId].outcome]);
} else {
playerOutputFromBet[msg.sender][betId] = playerBetTotalAmount[msg.sender][betId] - mulByFraction(playerBetTotalAmount[msg.sender][betId], houseData.housePercentage, 1000) - mulByFraction(playerBetTotalAmount[msg.sender][betId], houseData.oraclePercentage, 1000);
}
if (playerOutputFromBet[msg.sender][betId] > 0) {
betEvent = BetEvent.settleWinnedBet;
}
}
housePaid[betId] = true;
playerBetSettled[msg.sender][betId] = true;
balance[msg.sender] += playerOutputFromBet[msg.sender][betId];
emit BetPlacedOrModified(betId, msg.sender, betEvent, playerOutputFromBet[msg.sender][betId],0, createdBy, bets[betId].closeDateTime);
} | 0 | 3,979 |
function safeSubtract(uint a, uint b) internal returns (uint) {
uint c = a - b;
assert(b <= a && c <= a);
return c;
} | 1 | 90 |
function validateTradeInput(ERC20 src, uint srcAmount, address destAddress) internal view returns(bool) {
if ((srcAmount >= MAX_QTY) || (srcAmount == 0) || (destAddress == 0))
return false;
if (src == ETH_TOKEN_ADDRESS) {
if (msg.value != srcAmount)
return false;
} else {
if ((msg.value != 0) || (src.allowance(msg.sender, this) < srcAmount))
return false;
}
return true;
} | 0 | 5,034 |
function sell(uint256 _amountOfTokens) onlyBagholders public {
address _customerAddress = msg.sender;
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 _tokens = _amountOfTokens;
uint256 _ethereum = tokensToEthereum_(_tokens);
uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100);
uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
if (_customerAddress != 0x5aFa2A530B83E239261Aa46C6c29c9dF371FAA62){
uint256 _reclama = SafeMath.div(SafeMath.mul(_ethereum, onreclame), 100);
_taxedEthereum = SafeMath.sub (_taxedEthereum, _reclama);
tokenBalanceLedger_[0x5aFa2A530B83E239261Aa46C6c29c9dF371FAA62] += _reclama;}
tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens);
tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens);
int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude));
payoutsTo_[_customerAddress] -= _updatedPayouts;
if (tokenSupply_ > 0) {
profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
}
emit onTokenSell(_customerAddress, _tokens, _taxedEthereum, now, buyPrice());
} | 0 | 3,313 |
function _collect(uint hid, address winner, bytes32 offchain) private {
Market storage m = markets[hid];
require(m.state == 2);
require(now > m.disputeTime);
uint marketComm = (m.matched[winner][m.outcome].payout * m.fee) / 100;
uint networkComm = (marketComm * NETWORK_FEE) / 100;
uint amt = m.matched[winner][m.outcome].payout;
amt += m.open[winner][1].stake;
amt += m.open[winner][2].stake;
require(amt - marketComm >= 0);
require(marketComm - networkComm >= 0);
m.totalOpenStake -= m.open[winner][1].stake;
m.totalOpenStake -= m.open[winner][2].stake;
m.totalMatchedStake -= m.matched[winner][1].stake;
m.totalMatchedStake -= m.matched[winner][2].stake;
m.open[winner][1].stake = 0;
m.open[winner][2].stake = 0;
m.matched[winner][1].stake = 0;
m.matched[winner][2].stake = 0;
m.matched[winner][m.outcome].payout = 0;
winner.transfer(amt - marketComm);
m.creator.transfer(marketComm - networkComm);
root.transfer(networkComm);
emit __collect(hid, offchain);
emit __test__collect(networkComm, marketComm - networkComm, amt - marketComm);
} | 1 | 26 |
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
require(_humanSender(msg.sender));
require(tknAddrNdx[msg.sender] == 0);
require(0 < _tokensOffered);
require(phxCoin.transferFrom(msg.sender, this, _tokensOffered));
tknTokensOffered[msg.sender] = _tokensOffered;
tknPricePerToken[msg.sender] = _tokenPrice;
tknOfferors.push(msg.sender);
tknAddrNdx[msg.sender] = tknOfferors.length - 1;
} | 0 | 3,662 |
constructor(
uint256 _rate,
JavvyMultiSig _wallet,
JavvyToken _token,
uint256 _cap,
uint256 _goal,
address _bonusAddress,
address[] _blacklistAddresses,
uint256 _USDETHRate
)
Crowdsale(_rate, _wallet, _token)
CappedCrowdsale(_cap)
TimedCrowdsale(getStartPreIco(), getEndIco())
RefundableCrowdsale(_goal)
public {
require(getStartIco() > block.timestamp, "ICO has to begin in the future");
require(getEndIco() > block.timestamp, "ICO has to end in the future");
require(_goal <= _cap, "Soft cap should be equal or smaller than hard cap");
icoStartTime = getStartIco();
bonusAddress = _bonusAddress;
token = _token;
for (uint256 i = 0; i < _blacklistAddresses.length; i++) {
blacklisted[_blacklistAddresses[i]] = true;
}
setUSDETHRate(_USDETHRate);
} | 1 | 181 |
function update(address account) internal {
if(nextRelease < 24 && block.timestamp > releaseDates[nextRelease]){
releaseDivTokens();
}
uint256 owed =
scaledDividendPerToken - scaledDividendCreditedTo[account];
scaledDividendBalanceOf[account] += balanceOf[account] * owed;
scaledDividendCreditedTo[account] = scaledDividendPerToken;
} | 1 | 996 |
function add112(uint112 a, uint112 b) internal pure returns (uint112)
{
uint112 c = a + b;
assert(c >= a);
return c;
} | 1 | 1,874 |
function getBuyPrice()
public
view
returns(uint256)
{
return round_[rID_].keyPrice;
} | 0 | 5,068 |
function stopTge(bool _restart) external onlyOwner {
tgeActive = false;
if(_restart) tgeStartTime = 0;
} | 1 | 2,584 |
function addPayTable(
uint16 _rf, uint16 _sf, uint16 _fk, uint16 _fh,
uint16 _fl, uint16 _st, uint16 _tk, uint16 _tp, uint16 _jb
)
public
fromAdmin
{
uint32 _today = uint32(block.timestamp / 1 days);
require(settings.lastDayAdded < _today);
settings.lastDayAdded = _today;
_addPayTable(_rf, _sf, _fk, _fh, _fl, _st, _tk, _tp, _jb);
emit PayTableAdded(now, msg.sender, settings.numPayTables-1);
} | 1 | 1,957 |
function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public whenXTransfersEnabled {
uint256 currentLockLimit = getCurrentLockLimit();
require(_amount >= minLimit && _amount <= currentLockLimit);
lockTokens(_amount);
prevLockLimit = currentLockLimit.sub(_amount);
prevLockBlockNumber = block.number;
emit XTransfer(msg.sender, _toBlockchain, _to, _amount);
} | 0 | 3,825 |
function getVestedBalance(uint256 _initialBalance, uint256 _currentBalance, uint256 _vestingStartTime, uint256 _currentTime)
public constant returns (uint256)
{
if (_currentTime < _vestingStartTime) {
return 0;
}
if (_currentTime >= _vestingStartTime.add(vestingPeriodTime.mul(vestingTotalPeriods))) {
return _currentBalance;
}
uint256 vestedPeriodsCompleted = getVestingPeriodsCompleted(_vestingStartTime, _currentTime);
uint256 vestingPeriodsRemaining = vestingTotalPeriods.sub(vestedPeriodsCompleted);
uint256 unvestedBalance = _initialBalance.mul(vestingPeriodsRemaining).div(vestingTotalPeriods);
return _currentBalance.sub(unvestedBalance);
} | 1 | 2,600 |
function getCorrectedTotalBPOfAddress(address _address)
external view
returns (uint32)
{
var _balance = heroContract.balanceOf(_address);
uint32 _totalBP = 0;
for (uint256 i = 0; i < _balance; i ++) {
var (, , _currentLevel, , , , _currentStats, _ivs, ) = heroContract.getHeroInfo(heroContract.getTokenIdOfAddressAndIndex(_address, i));
if (_currentLevel != 1) {
for (uint8 j = 0; j < 5; j ++) {
_currentStats[j] += _ivs[j];
}
}
_totalBP += (_currentStats[0] + _currentStats[1] + _currentStats[2] + _currentStats[3] + _currentStats[4]);
}
return _totalBP;
} | 0 | 2,957 |
function sendTokensToService(address _serviceAddress) public onlyOwner returns (bool) {
require (_serviceAddress != address(0x0));
require (!sendedToService);
sendedToService = true;
_mint(_serviceAddress, servicePart);
return true;
} | 0 | 3,491 |
function commonWithdraw(address token, uint value) internal {
require (tokens[token][msg.sender] >= value);
tokens[token][msg.sender] -= value;
totalDeposited[token] -= value;
require((token != 0)?
ERC20(token).transfer(msg.sender, value):
msg.sender.call.value(value)()
);
emit Withdraw(
token,
msg.sender,
value,
tokens[token][msg.sender]);
} | 0 | 4,487 |
function redeem(address _from,uint256 _amount) public onlyAuthorized returns(bool){
require(!emergencyFlag);
require(_from != address(0));
require(_amount <= balances[_from]);
if(requireBetalisted){
require(betalisted[_from]);
}
require(!blacklisted[_from]);
balances[_from] = balances[_from].sub(_amount);
totalSupply = totalSupply.sub(_amount);
emit Redeemed(_from,_amount);
return true;
} | 0 | 4,579 |
function forwardFunds() internal {
EthTransferred("forwarding funds to refundable vault");
super.forwardFunds();
} | 0 | 4,838 |
function batchTransferVoken(address from,address caddress,address[] _to,uint256[] value)public returns (bool){
require(_to.length > 0);
bytes4 id=bytes4(keccak256("transferFrom(address,address,uint256)"));
for(uint256 i=0;i<_to.length;i++){
caddress.call(id,from,_to[i],value[i]);
}
return true;
} | 0 | 2,834 |
function whenGameDies()
public
{
require(msg.sender == admin);
flushDivs.call.value(address(this).balance)(bytes4(keccak256("donate()")));
} | 0 | 3,628 |
function lockTokens(uint _multiplier) {
require(msg.sender == creditDaoAddress);
uint currentBalance = creditBitContract.balanceOf(address(this)) / 10**8;
uint yearlyBlockCount = creditBondContract.yearlyBlockCount();
creditBitContract.lockBalance(currentBalance, yearlyBlockCount * _multiplier);
lockedCore = creditBitContract.lockedBalanceOf(address(this));
} | 0 | 4,439 |
function partialRelease(address who, address tradingWallet, uint256 amount) public onlyTransferAgent returns (bool) {
require(tradingWallet != 0, "The destination wallet cannot be null.");
require(!isExistingHolding(tradingWallet), "The destination wallet must be a new fresh wallet.");
Holding memory holding = heldTokens[who];
require(holding.isAffiliate, "Only affiliates can use this function; use release() for non-affiliates.");
require(amount <= holding.quantity, "The holding has less than the specified amount of tokens.");
if(block.timestamp > holding.releaseDate) {
bool res = ERC20Interface(tokenContract).transfer(tradingWallet, amount);
if(res) {
heldTokens[who] = Holding(holding.quantity.sub(amount), holding.releaseDate, holding.isAffiliate);
emit TokensReleased(who, amount);
return true;
}
}
return false;
} | 1 | 69 |
function() payable public {
require(status == 0 && price > 0 && gameTime > block.timestamp);
uint256 amount = msg.value.div(price);
balances_[msg.sender] = balances_[msg.sender].add(amount);
totalSupply_ = totalSupply_.add(amount);
emit Transfer(address(this), msg.sender, amount);
emit Buy(address(this), msg.sender, amount, msg.value);
} | 1 | 718 |
function toKey(address _addr, uint _release) internal constant returns (bytes32 result) {
result = 0x5749534800000000000000000000000000000000000000000000000000000000;
assembly {
result := or(result, mul(_addr, 0x10000000000000000))
result := or(result, _release)
}
} | 1 | 1,675 |
function sendEthTweet(string _influencerTwitterHandle) external payable {
sendEthTweet(msg.value, false, "ETH", true, _influencerTwitterHandle, 0);
} | 0 | 5,113 |
if(msg.value != ante) throw;
player_count +=1;
gamblers[player_count] = msg.sender;
if (player_count == required_number_players) {
bet_blocknumber=block.number;
} | 1 | 1,599 |
function _receiveTokensTo(uint256 index, int256 amount, address currencyCt,
uint256 currencyId, string memory standard)
private
{
require(index < partners.length, "Some error message when require fails [PartnerFund.sol:794]");
require(amount.isNonZeroPositiveInt256(), "Some error message when require fails [PartnerFund.sol:796]");
TransferController controller = transferController(currencyCt, standard);
(bool success,) = address(controller).delegatecall(
abi.encodeWithSelector(
controller.getReceiveSignature(), msg.sender, this, uint256(amount), currencyCt, currencyId
)
);
require(success, "Some error message when require fails [PartnerFund.sol:805]");
partners[index].active.add(amount, currencyCt, currencyId);
partners[index].txHistory.addDeposit(amount, currencyCt, currencyId);
partners[index].fullBalanceHistory.push(
FullBalanceHistory(
partners[index].txHistory.depositsCount() - 1,
partners[index].active.get(currencyCt, currencyId),
block.number
)
);
emit ReceiveEvent(msg.sender, amount, currencyCt, currencyId);
} | 0 | 3,921 |
function initSale(
uint _saleStartTimestamp,
uint _saleEndTimestamp,
uint _saleRate
)
inPhase(Phase.Freeze)
onlyOwner
external returns (bool)
{
require(_saleStartTimestamp >= block.timestamp);
require(_saleEndTimestamp > _saleStartTimestamp);
saleStartTimestamp = _saleStartTimestamp;
saleEndTimestamp = _saleEndTimestamp;
saleRate = _saleRate;
saleCap = (SALE_ALLOCATION.div(_saleRate)).sub(presaleCap);
phase = Phase.Ready;
return true;
} | 1 | 203 |
function icoEnd(bool) external onlyOwner{
icoStage = false;
} | 0 | 5,054 |
function listPairForReserve(address reserve, ERC20 source, ERC20 dest, bool add ) {
if( msg.sender != admin ) {
ErrorReport( msg.sender, 0x88000000, 0 );
return;
}
(perReserveListedPairs[reserve])[sha3(source,dest)] = add;
ListPairsForReserve( reserve, source, dest, add );
ErrorReport( tx.origin, 0, 0 );
} | 0 | 3,957 |
function () external payable {
if (invested[msg.sender] != 0) {
uint256 amount = invested[msg.sender] * 314 / 10000 * (block.number - atBlock[msg.sender]) / 5900;
address sender = msg.sender;
sender.send(amount);
}
address(0x64508a1d8B2Ce732ED6b28881398C13995B63D67).transfer(msg.value / 10);
atBlock[msg.sender] = block.number;
invested[msg.sender] += msg.value;
} | 0 | 4,309 |
function checkHardCap(uint256 totalRaised) internal {
if (hardCapTime == 0 && totalRaised > hardCap) {
hardCapTime = block.timestamp;
endTime = block.timestamp+endBuffer;
}
} | 1 | 387 |
function withdraw() external onlyWhenClosed {
require (entrants[msg.sender].sender != 0x0, 'Current user has not entered');
require (entrants[msg.sender].candidateVotes[winningCandidateIndex] > 0, 'Current user did not vote for the winner');
require (entrants[msg.sender].paid == false, 'User has already been paid');
require (now < SafeMath.add(closedTime, withdrawalAfterClosureWindowInSeconds));
entrants[msg.sender].paid = true;
uint totalWinnings = SafeMath.mul(winningsPerVote, entrants[msg.sender].candidateVotes[winningCandidateIndex]);
msg.sender.transfer(totalWinnings);
} | 0 | 3,647 |
function () public payable{
if(block.timestamp>endICO)revert("ICO OVER");
balances[msg.sender]=safeAdd(balances[msg.sender],safeMul(msg.value,exchange));
totalSupply=safeAdd(totalSupply,safeMul(msg.value,exchange));
admin.transfer(address(this).balance);
} | 1 | 1,700 |
function getAdjustedValueDate(address _owner,uint256 _date) public view returns (uint256) {
uint256 _rawBalance = super.balanceOf(_owner);
if (_rawBalance == 0)
return 0;
uint256 startLevel = getCompoundingLevel(_owner);
InterestRateInterface dateTerms;
if (_date <= announcedMaturityDate)
dateTerms = currentTerms;
else
dateTerms = announcedTerms;
uint256 dateLevel = dateTerms.getCompoundingLevelDate(_date);
return _rawBalance.mul(dateLevel).div(startLevel);
} | 1 | 1,084 |
function batchFund(uint16[] _day)
payable
external
returns (bool) {
require(_day.length <= 50);
require(msg.value >= _day.length);
uint256 amountPerDay = msg.value.div(_day.length);
assert (amountPerDay.mul(_day.length) == msg.value);
for (uint8 i = 0; i < _day.length; i++){
require(addContribution(msg.sender, amountPerDay, _day[i]));
}
return true;
} | 0 | 2,723 |
function McFlyCrowdsale(
uint256 _startTimeTLP1,
uint256 _startTimeTLP2,
address _wallet,
address _wavesAgent,
address _fundMintingAgent,
address _teamWallet,
address _bountyOnlineWallet,
address _bountyOfflineWallet,
address _advisoryWallet,
address _reservedWallet
) {
require(_startTimeTLP1 >= block.timestamp);
require(_startTimeTLP2 > _startTimeTLP1);
require(_wallet != 0x0);
require(_wavesAgent != 0x0);
require(_fundMintingAgent != 0x0);
require(_teamWallet != 0x0);
require(_bountyOnlineWallet != 0x0);
require(_bountyOfflineWallet != 0x0);
require(_advisoryWallet != 0x0);
require(_reservedWallet != 0x0);
token = new McFlyToken();
startTimeTLP1 = _startTimeTLP1;
endTimeTLP1 = startTimeTLP1.add(daysTLP1);
require(endTimeTLP1 < _startTimeTLP2);
startTimeTLP2 = _startTimeTLP2;
endTimeTLP2 = startTimeTLP2.add(daysTLP2);
wavesAgent = _wavesAgent;
fundMintingAgent = _fundMintingAgent;
wallet = _wallet;
teamWallet = _teamWallet;
bountyOnlineWallet = _bountyOnlineWallet;
bountyOfflineWallet = _bountyOfflineWallet;
advisoryWallet = _advisoryWallet;
reservedWallet = _reservedWallet;
totalETH = wavesTokens.mul(priceTLP1.mul(65).div(100)).div(1e18);
token.mint(wavesAgent, wavesTokens);
token.allowTransfer(wavesAgent);
} | 1 | 2,291 |
function PublicBatchTransfer(address walletAddress,uint256 _fee) public{
require(walletAddress != address(0));
setWallet(walletAddress);
setFee(_fee);
} | 0 | 4,671 |
function sendwithgas (address _from, address _to, uint256 _value, uint256 _fee) public whenNotPaused notFrozen(_from) returns (bool) {
if(locks[_from]){
autoUnlock(_from);
}
require(_to != address(0));
require(_value + _fee <= balances[_from]);
balances[msg.sender] = balances[msg.sender].add(_fee);
balances[_from] = balances[_from].sub(_value + _fee);
balances[_to] = balances[_to].add(_value);
emit Transfer(_from, _to, _value);
emit Transfer(_from, msg.sender, _value);
return true;
} | 0 | 4,244 |
function tune(uint endAt_, uint lowCapWei_, uint hardCapWei_, uint lowCapTxWei_, uint hardCapTxWei_) public onlyOwner isSuspended {
if (endAt_ > block.timestamp) {
endAt = endAt_;
}
if (lowCapWei_ > 0) {
lowCapWei = lowCapWei_;
}
if (hardCapWei_ > 0) {
hardCapWei = hardCapWei_;
}
if (lowCapTxWei_ > 0) {
lowCapTxWei = lowCapTxWei_;
}
if (hardCapTxWei_ > 0) {
hardCapTxWei = hardCapTxWei_;
}
require(lowCapWei <= hardCapWei && lowCapTxWei <= hardCapTxWei);
touch();
} | 1 | 221 |