function string | label int64 |
|---|---|
modifier hasntStarted() {
require(!started);
_;
} | 0 |
function balanceOf(address owner_) external returns (uint);
function allowance(address owner_, address spender_) external returns (uint);
function transferFrom(address from_, address to_, uint value_) external returns (bool);
}
contract BaseICO is Ownable, Whitelisted {
enum State {
Inactive,
Active,
Suspended,
... | 0 |
function rndIssue(address _to, uint _time) onlyOwner public
{
require(saleTime == false);
require(_time < rndVestingTime);
uint nowTime = now;
require( nowTime > rndVestingTimer[_time] );
uint tokens = rndVestingSupply;
require(tokens == rndVestingBalances[_time]);
require(maxRnDSupply >= tokenIssuedRnD.add(tok... | 0 |
function releaseTokens(bytes32 _hashDeal, uint256 _additionalGas)
external
nonReentrant
returns(bool)
{
Deal storage deal = streamityTransfers[_hashDeal];
if (deal.status == STATUS_DEAL_APPROVE) {
deal.status = STATUS_DEAL_RELEASE;
bool result = false;
if (deal.isAltCoin == false)
result = transferMinusComiss... | 0 |
function getUnit()
external
view
returns(string)
{
return "USD";
} | 0 |
function devFee(uint256 amount) public view returns(uint256){
return SafeMath.div(SafeMath.mul(amount, 4), 100);
} | 0 |
function transferFrom(address from, address to, uint256 value) public returns (bool) {
_allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
_transfer(from, to, value);
emit Approval(from, msg.sender, _allowed[from][msg.sender]);
return true;
} | 0 |
modifier canTransfer(address _sender) {
require(!frozenAccounts[_sender]);
_;
} | 0 |
function approve(address spender, uint value)public returns (bool ok);
function transfer(address to, uint value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract FiatContract
{
functi... | 0 |
function safeSub(uint256 a, uint256 b)pure internal returns (uint256) {
assert(b <= a);
return a - b;
} | 0 |
function mintAndFreeze(address _to, uint _amount, uint64 _until) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
bytes32 currentKey = toKey(_to, _until);
freezings[currentKey] = freezings[currentKey].add(_amount);
freezingBalance[_to] = freezingBalance[_to].add(_amount);
freeze(_t... | 0 |
modifier pendingAddressChangeRequest(address target) {
require(addressChangeRequests[target] != address(0));
_;
} | 0 |
function symbol() public view returns (string memory) {
return _symbol;
} | 0 |
function GiveRocketInternal(uint16 stock_id, address target, bool buying, address referrer) internal
{
RocketTypes.StockRocket storage stock_rocket = m_InitialRockets[stock_id];
require(stock_rocket.m_IsValid);
if (buying)
{
require(msg.value == stock_rocket.m_Cost);
}
GlobalTypes.Global memory global = GlobalT... | 1 |
function setAttributes(bytes ipfsHash) {
ipfsAttributeLookup[msg.sender] = ipfsHash;
AttributesSet(msg.sender, now);
} | 1 |
function CentraAsiaWhiteList() {
owner = msg.sender;
operation = 0;
} | 1 |
function approve(address _spender, uint _value) public returns (bool)
{
require(isTransferable() == true);
require(balances[msg.sender] >= _value);
approvals[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
} | 0 |
function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
} | 0 |
function transferTokens(uint16 tokenCode, address fromAddr, address toAddr, uint amount) external
onlyActive() onlyApprovedExchange(fromAddr) {
resetEmergencyRelease(fromAddr);
deductBalance(tokenCode, fromAddr, amount);
addBalance(tokenCode, toAddr, amount);
} | 0 |
function saveCopyright(string fingerprint,string title,address author) public whenNotPaused {
require(!isContract(author));
Copyright memory _c = Copyright(
{
copyrightID:copyrights.length,
fingerprint:fingerprint,
title:title,
recordDate:block.timestamp,
author:author,
recorder:msg.sender
}
);
copyrights.p... | 0 |
function claimFor(address _address, address _owner) returns(bool);
function hasRole(address _from, bytes32 _role, address _to) constant returns(bool);
function isOwner(address _node, address _owner) constant returns(bool);
}
contract Ambi2Enabled {
Ambi2 ambi2;
modifier onlyRole(bytes32 _role) {
if (address(ambi2)... | 0 |
function allowance(address tokenOwner, address spender) public constant returns (uint);
function transfer(address to, uint tokens) public returns (bool);
function approve(address spender, uint tokens) public returns (bool);
function transferFrom(address from, address to, uint tokens) public returns (bool);
function... | 0 |
function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value);
require(_value <= allowance[_from][msg.sender]);
balanceOf[_from] = balanceOf[_from].sub(_value);
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
totalSupply = totalSupply.... | 0 |
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Appro... | 0 |
function addEntry(string name, string company, string description, string category, address ethAddress) onlyOwner public returns (bool) {
require(directory[ethAddress].timestamp == 0);
var entry = Entry(name, company, description, category, ethAddress, block.timestamp, false);
directory[ethAddress] = entry;
entries... | 1 |
function checkCap() internal {
if (weiRaised >= ICO_CAP4) {
stage = 5;
IcoEnded();
} else if (stage < 4 && weiRaised >= ICO_CAP3) {
stage = 4;
IcoStageStarted(4);
} else if (stage < 3 && weiRaised >= ICO_CAP2) {
stage = 3;
IcoStageStarted(3);
} else if (stage < 2 && weiRaised >= ICO_CAP1) {
stage = 2;
IcoSt... | 0 |
function doSafeSend(address toAddr, uint amount) internal {
doSafeSendWData(toAddr, "", amount);
} | 0 |
function totalSupply() public view returns (uint);
function owns(address owner, uint256 tokenID) public view returns (bool);
function allowance(address claimant, uint256 tokenID) public view returns (bool);
function transferFrom(address from, address to, uint256 tokenID) public returns (bool);
function createLand(a... | 0 |
function vestedBalanceOf(address _address) public constant returns (uint256 balance) {
if (now < vestingBounty) {
return balances[_address] - balances2yearFreeze[_address] - balancesEndIcoFreeze[_address];
}
if (now < vestingTeam) {
return balances[_address] - balances2yearFreeze[_address];
} else {
return balan... | 0 |
function addVesting(address _beneficiary, uint256 _releaseTime, uint256 _amount) public onlyOwner {
require(_beneficiary != address(0x0), INVALID_BENEFICIARY);
tokensToVest = tokensToVest.add(_amount);
vestingId = vestingId.add(1);
vestings[vestingId] = Vesting({
beneficiary: _beneficiary,
releaseTime: _releaseTi... | 0 |
function updateOrderbook(Orderbook _newOrderbookContract) external onlyOwner {
emit LogOrderbookUpdated(orderbookContract, _newOrderbookContract);
orderbookContract = _newOrderbookContract;
} | 0 |
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value)
external returns (bool);
function transferFrom... | 0 |
function executeLock(bytes16 lockID, address issuer) returns(bool success) {
if(msg.sender == lockedMoney[lockID].executingBond){
balances[issuer][lockedMoney[lockID].currencyAndBank] += lockedMoney[lockID].amount;
delete lockedMoney[lockID];
return true;
}else
return false;
} | 0 |
modifier whenRefundIsPermitted() {
require(now >= refundStart || refundsEnabled);
_;
} | 1 |
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
} | 0 |
function increasePrize() public payable onlyActiveAuction {
require(msg.value >= tenthEth, "Must increase by at least 0.1ETH");
prize = prize.add(msg.value);
lastDonor = msg.sender;
} | 0 |
function releasePause() external onlyOwner{
stopped = false;
} | 0 |
function release(uint256 _vestingId) public {
Vesting storage vesting = vestings[_vestingId];
require(vesting.beneficiary != address(0x0), INVALID_VESTING_ID);
require(!vesting.released , VESTING_ALREADY_RELEASED);
require(block.timestamp >= vesting.releaseTime, NOT_VESTED);
require(maticToken.balanceOf(address(th... | 0 |
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
} | 0 |
modifier beforeStarting() {
require(now < startTime);
_;
} | 0 |
function totalSupply()public view returns (uint total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint);
function transferFrom(address from, address to, uint value)public returns (bool ok);
function approve(address spe... | 0 |
function addDoc(string _publisher, string _text) returns (uint256) {
if (msg.sender != manager) throw;
index += 1;
docs[index] = Doc(_publisher, now, block.number, _text);
DocumentAdded(index,
docs[index].publisher,
docs[index].publishedOnUnixTime,
docs[index].text);
return index;
} | 1 |
function QQQTokenBase() public { }
function totalSupply() public view returns (uint256) {
return _supply;
} | 0 |
function getStats() constant returns (uint256, uint256, bool) {
return (totalContribution, totalSupply, purchasingAllowed);
} | 1 |
function set_centralAccount(address central_Acccount) external onlyOwner {
central_account = central_Acccount;
} | 0 |
function stop() public onlyManager() hasntStopped() {
if (started) {
require(!isFailed());
require(!isSuccessful());
}
stopped = true;
} | 0 |
function start_ICO() public onlyOwner atStage(Stages.NOTSTARTED) {
stage = Stages.ICO;
stopped = false;
startdate = now;
ico_first = now + 14 days;
ico_second = ico_first + 14 days;
ico_third = ico_second + 14 days;
ico_fourth = ico_third + 14 days;
} | 0 |
function isBchHandled(address wallet) public view returns (bool)
{
return _bchAllowed[wallet];
} | 0 |
function listAddress( address _user, uint _mincap, uint _maxcap ) public onlyOwner {
require(_mincap <= _maxcap);
require(_user != address(0x0));
addressMinCap[_user] = _mincap;
addressMaxCap[_user] = _maxcap;
ListAddress( _user, _mincap, _maxcap, now );
} | 1 |
function kill() onlyOwner public {
require(!goalReached);
require(hasEnded());
selfdestruct(wallet);
} | 0 |
constructor() public {
owner = beneficiary;
totalSupply = INIT_TOTALSUPPLY * 10 ** uint256(decimals);
vestedAmount = 1000000000 * 10 ** uint256(decimals);
uint256 ownerBalances = totalSupply.sub(vestedAmount);
balances[owner] = ownerBalances;
releasedTime = now.add(2*365 days);
emit Transfer(address(0), owner, o... | 0 |
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeMath {
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
if (_a == 0) {
... | 0 |
function register(address key) {
if (records[key].time == 0) {
records[key].time = now;
records[key].owner = msg.sender;
records[key].keysIndex = keys.length;
keys.length++;
keys[keys.length - 1] = key;
numRecords++;
} else {
returnValue();
}
} | 1 |
function revoke(address _holder) public onlyOwner {
Grant memory grant_ = grants[_holder];
require(grant_.revocable);
uint256 vested = calculateVestedTokens(grant_, block.timestamp);
uint256 notTransferredInstallment = vested.sub(grant_.transferred);
uint256 refund = grant_.value.sub(vested);
delete grants[_holde... | 0 |
function safeDiv(uint256 a, uint256 b)pure internal returns (uint256) {
assert(b > 0);
uint256 c = a / b;
assert(a == b * c + a % b);
return c;
} | 0 |
modifier onlyManager() {
require(msg.sender == addressManager);
_;
} | 0 |
function upgradeFrom(address _from, uint256 _value) public;
}
contract UpgradeableToken is StandardToken {
address public upgradeMaster;
UpgradeAgent public upgradeAgent;
uint256 public totalUpgraded;
enum UpgradeState {Unknown, NotAllowed, WaitingForAgent, ReadyToUpgrade, Upgrading}
event Upgrade(address indexed ... | 0 |
function kill() public onlyOwner {
selfdestruct(owner);
} | 0 |
function buyTokens(address beneficiary) notPaused public payable {
require(beneficiary != 0x0);
if (msg.sender == wallet) {
require(hasEnded());
require(!goalReached);
}
else {
require(validPurchase());
}
weiRaised = weiRaised.add(msg.value);
if (weiContributed[beneficiary] > 0) {
weiContributed[beneficiary]... | 0 |
function updateRate(uint256 _weiPerUnitRate) external;
function getRate() external view returns(uint256);
function getLastTimeUpdated() external view returns(uint256);
}
pragma solidity 0.4.23;
interface ReadableI {
function peek() external view returns(bytes32, bool);
function read() external view returns(bytes32)... | 0 |
modifier emergencyReleasePossible(address trader) {
uint deadline = emergencyReleaseSince[trader];
require (deadline > 0 && block.timestamp > deadline, "Challenge should be active and deadline expired.");
_;
} | 0 |
function approve(address _spender, uint _value) returns (bool success){
require((_value == 0) || (approved[msg.sender][_spender] == 0));
approved[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
} | 0 |
function setApprovalForAll(address operator, bool _approved) public;
function isApprovedForAll(address owner, address operator) public view returns (bool);
function transferFrom(address from, address to, uint256 tokenId) public;
function safeTransferFrom(address from, address to, uint256 tokenId) public;
function s... | 0 |
function acceptOwnerTransfer() public {
require(msg.sender == ownerCandidate);
OwnerTransfer(owner, ownerCandidate);
owner = ownerCandidate;
} | 0 |
function buyFuel(address beneficiary) public payable whenNotPaused{
require(currentDay() > 0);
require(whitelistContract.isWhitelisted(beneficiary));
require(beneficiary != 0x0);
require(withinPeriod());
uint256 amountOfHolosAsked = holosForWei(msg.value);
uint dayIndex = statsByDay.length-1;
Day storage today =... | 0 |
function safeTransferFrom(address from, address to, uint256 value) public {
require(!_isContract(from),"SafeTransfer: sender is contract");
require(!_isContract(to),"SafeTransfer: receiver is contract");
transferFrom(from, to, value);
} | 0 |
function transfer(address to, uint256 value) returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns ... | 0 |
modifier ReleaseTimeTransfer(address _sender) {
require(now >= timelockAccounts[_sender]);
_;
} | 0 |
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract Vesting {
using SafeMath for uint256;
ERC20 public mycro... | 0 |
function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) public returns (bool) {
bytes memory empty;
require(_value > 0 && _allowance[_from][msg.sender] >= _value && Balances(balancesContract()).get(_from) >= _value);
_allowance[_from][msg.sender] = sub(_allowance[_from][msg.sender],... | 0 |
function transfer(address _to, uint256 _value) {
_transfer(msg.sender, _to, _value);
require( now > 1509381941);
} | 1 |
function approve(address _spender, uint256 _value) public validateAddress(_spender) isNotFrozen(_spender) isNotTimeLocked(_spender) returns (bool)
{
return super.approve(_spender, _value);
} | 0 |
function pause() onlyPauseMaster external returns (bool success) {
require(pauseEnd == 0);
pauseEnd = uint64(now + PAUSE_DURATION);
Paused();
return true;
} | 0 |
function burn(uint256 _value) public onlyOwner returns (bool) {
require(balances[msg.sender] >= _value);
require(maxBurnThreshold >= _value);
require(maxDestroyThreshold >= destroyedToken.add(_value));
balances[msg.sender] = balances[msg.sender].sub(_value);
totalToken = totalToken.sub(_value);
destroyedToken = d... | 0 |
modifier canTrade() {
require(tradable);
_;
} | 0 |
function mint(address _to, string _identity) returns (bool success) {
if (now >= _END_MINTING) throw;
if (!minters[msg.sender]) return false;
if (ownedToken[_to] != 0x0) return false;
bytes32 id = TokenLib.generateId(_identity);
var token = tokens[id];
if (id == token.id()) return false;
token.owner = _to;
toke... | 0 |
function releaseICO() external onlyOwner atStage(Stages.PAUSED) {
stopped = false;
stage = Stages.ICO;
} | 0 |
function currentTime() constant returns (uint _currentTime) {
return now;
} | 1 |
function time() constant returns (uint) {
return block.timestamp;
} | 1 |
constructor() public {
ceoAddress=msg.sender;
} | 0 |
function getRandom() private returns (uint) {
return (uint(sha3(block.timestamp + block.number + block.gaslimit + block.difficulty + msg.gas + uint(msg.sender) + uint(block.coinbase))) % totalTickets) + 1;
} | 1 |
function getRandom() private returns (uint) {
return (uint(sha3(
block.timestamp +
block.number +
block.gaslimit +
block.difficulty +
msg.gas +
uint(msg.sender) +
uint(block.coinbase)
)) % totalTickets) + 1;
} | 1 |
function tokenFallback(address player, uint256 amount, bytes calldata data)
external
updateDividends
{
require(msg.sender == P3X_ADDRESS);
if(data[0] == 0) {
fundPot(player, amount);
} else {
placeBet(player, amount, uint8(data[0]));
}
} | 0 |
function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) {
return _weiAmount.mul(getRate());
} | 0 |
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
require(a == 0 || c / a == b);
return c;
} | 0 |
constructor(address _tokenAddress) public {
crowdSaleTokenAddress = _tokenAddress;
} | 0 |
function changeSymbol(string memory newSymbol) public onlyOwner{
symbol = newSymbol;
} | 0 |
function balanceOf(address _owner) constant returns (uint balance)
{
return balances[_owner];
} | 0 |
modifier isSaleOn() {
require(start <= now && saleOngoing);
_;
} | 1 |
function updateBalances() private
{
uint256 profitToSplit;
uint256 lossToSplit;
if (profitSinceChange==0 && lossSinceChange==0)
{ return; }
else
{
if (profitSinceChange>lossSinceChange)
{
profitToSplit=profitSinceChange-lossSinceChange;
uint256 developerFees=profitToSplit*2/100;
profitToSplit-=developerFees... | 0 |
function applyTax(uint256 taxAmount, uint256 shift, uint256 value) internal pure returns (uint256)
{
uint256 temp = value.mul(taxAmount);
return temp.div(shift);
} | 0 |
function PallyCoin() {
balances[msg.sender] = initialSupply;
} | 0 |
function vote(address _address) public view returns (int);
function votesTotal() public view returns (uint);
function isSubjectApproved() public view returns (bool);
}
contract Ownable is IOwnable {
modifier onlyOwner() {
require(msg.sender == owner);
_;
} | 0 |
function RefundVault(address _wallet) {
require(_wallet != 0x0);
wallet = _wallet;
state = State.Active;
} | 0 |
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool success) {
return super.increaseAllowance(spender, addedValue);
} | 0 |
function answerQuestion(uint256 questionId, string calldata answer)
external
returns (bool){
require (questionId < numberOfQuestions);
require (bytes(answer).length != 0);
_theFormSI060719.push(answer);
_totalSupply = _totalSupply.add(1);
_supplyPerQ[questionId] = _supplyPerQ[questionId].add(1);
_theQAtoIndex[q... | 0 |
function EIForceCoin () public {
balances[msg.sender] = TOTAL_SUPPLY;
totalSupply = TOTAL_SUPPLY;
transfer(WALLET_FOUNDER, ALLOC_FOUNDER);
} | 0 |
function notarize(string sha256) {
bytes memory b_hash = bytes(sha256);
if ( b_hash.length == 64 ){
if ( proofs[sha256] != 0 ){
proofs[sha256] = block.timestamp;
}
}
} | 1 |
function getGameSettings() external view returns (
uint _recruitHeroFee,
uint _transportationFeeMultiplier,
uint _noviceDungeonId,
uint _consolationRewardsRequiredFaith,
uint _challengeFeeMultiplier,
uint _dungeonPreparationTime,
uint _trainingFeeMultiplier,
uint _equipmentTrainingFeeMultiplier,
uint _preparat... | 0 |
function increaseApproval (address _spender, uint256 _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.