function string | label int64 |
|---|---|
function allowance(address _owner, address _spender)
constant
returns (uint256 remaining)
{
return allowed[_owner][_spender];
} | 0 |
function seeCurrentParticipants()public constant returns(uint256 _participants){
return carnitas[lastCarnita].participants.length;
} | 0 |
function destroy(bytes32 _id) returns (bool success);
function addMinter(address who) returns (bool);
function removeMinter(address who) returns (bool);
function totalSupply() returns (uint supply);
function transfer(address _to, uint256 _value) returns (bool success);
function transfer(address _to, bytes32 _value... | 0 |
modifier onlyDeveloper()
{
if (msg.sender!=developer) throw;
_
} | 0 |
function transfer(address _caller, address _to, uint256 _amount) onlyAsset returns (bool success) {
assert(allowTransactions);
assert(!frozenAccount[_caller]);
assert(balanceOf[_caller] >= _amount);
assert(balanceOf[_to] + _amount >= balanceOf[_to]);
activateAccount(_caller);
activateAccount(_to);
balanceOf[_cal... | 0 |
function _airdropUnlocked(address _who) internal view returns (bool) {
return now > airdropTime
|| (now > shortAirdropTime && airdrop[_who] == 0)
|| !isAirdrop(_who);
} | 0 |
function _vestedAmount(IERC20 token) private view returns (uint256) {
uint256 currentBalance = token.balanceOf(address(this));
uint256 totalBalance = currentBalance.add(_released[address(token)]);
if (block.timestamp < _cliff) {
return 0;
} else if (block.timestamp >= _start.add(_duration) || _revoked[address(toke... | 0 |
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256)... | 0 |
function _attack(uint _heroId, uint _genes, uint _heroStrength, uint _heroCurrentHealth) internal {
Monster storage monster = heroIdToMonster[_heroId];
uint8 currentLevel = monster.level;
uint heroPower;
(heroPower,,,,) = edCoreContract.getHeroPower(_genes, dungeonDifficulty);
uint damageByMonster;
uint damageByH... | 0 |
function atNow() public view returns (uint) {
return now;
} | 1 |
function isLocked() constant returns (bool) {
return (now < unlockTime);
} | 1 |
function balanceOf(address _owner) constant returns (uint256 balance) {
return uint(ownedToken[_owner]);
} | 0 |
function investments() public constant returns(uint){
return totalInvestments;
} | 0 |
function isAdmin(address a) view public returns (bool) {
return admins[currAdminEpoch][a];
} | 0 |
modifier onlyOwner() {
require(msg.sender == owner);
_;
} | 0 |
function AddMessage(address _adr,uint _val,string _data)
public
{
LastMsg.Sender = _adr;
LastMsg.Time = now;
LastMsg.Val = _val;
LastMsg.Data = _data;
History.push(LastMsg);
} | 1 |
function setValidater(address _varidater) external onlyOwner() {
validater = _varidater;
} | 0 |
modifier whenCrowdsaleSuccessful() {
require(isSuccessful());
_;
} | 0 |
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,
Terminated,
NotCompleted,
Completed
} | 0 |
function setWhitelist(address _address, string _Email) public {
var whitelist = Whitelists[_address];
whitelist.Email = _Email;
WhitelistsAccts.push(_address) -1;
} | 0 |
function advSptIssue(address _to, uint _time) onlyOwner public
{
require(saleTime == false);
require( _time < advSptVestingTime);
uint nowTime = now;
require( nowTime > advSptVestingTimer[_time] );
uint tokens = advSptVestingSupplyPerTime;
require(tokens <= advSptVestingBalances[_time]);
require(tokens > 0);
r... | 0 |
function setTransferactive(bool newdata) public {
if (msg.sender == Owner) {TransferActive = newdata;}
} | 0 |
function isIcoOver() constant public returns(bool isOver) {
return now >= icoDeadline;
} | 1 |
function releaseTokenTransfer() public onlyReleaseAgent {
mintingFinished = true;
super.releaseTokenTransfer();
} | 0 |
function setAuthority(DSAuthority authority_)
public
auth
{
authority = authority_;
emit LogSetAuthority(authority);
} | 0 |
function transferTokens(address _to, uint256 _amount) onlyOwner public {
require(_to != address(0));
tokenRaised = tokenRaised.add(_amount);
require(!hasEnded());
token.transfer(_to, _amount);
} | 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);
}
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender)
public view returns (ui... | 0 |
function transfer(address _to, uint _value, bytes _data) public returns (bool) {
uint codeLength;
assembly {
codeLength := extcodesize(_to)
}
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
if(codeLength > 0) {
ERC223Receiver receiver = ERC223Receiver(_to);
r... | 0 |
function unlock() public returns(bool) {
require(now > UNLOCK_DATE, 'Tokens are still locked');
return TOKEN.transfer(DESTINATION, TOKEN.balanceOf(address(this)));
} | 0 |
function _forwardFunds() internal {
wallet.transfer(msg.value);
} | 0 |
function addMonsterObj(uint32 _classId, address _trainer, string _name) onlyModerators public returns(uint64) {
MonsterClass storage class = monsterClass[_classId];
if (class.classId == 0)
return 0;
totalMonster += 1;
class.total += 1;
MonsterObj storage obj = monsterWorld[totalMonster];
obj.monsterId = totalMon... | 1 |
function bdevIssue(address _to, uint _value) onlyOwner public
{
uint tokens = _value * E18;
require(maxBdevSupply >= tokenIssuedBdev.add(tokens));
balances[_to] = balances[_to].add(tokens);
totalTokenSupply = totalTokenSupply.add(tokens);
tokenIssuedBdev = tokenIssuedBdev.add(tokens);
emit BdevIssue(_to, tokens)... | 0 |
function isUnlocked(address _owner) public constant returns (bool unlocked)
{
return lockedTillTime[_owner] < now;
} | 1 |
function yes(address _address, uint _votes) public;
function no(address _address, uint _votes) public;
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 only... | 0 |
function paused() public view returns (bool) {
return _paused;
} | 0 |
function MiningRigFarmer() public{
ceoAddress=msg.sender;
} | 0 |
function canUpgrade() public pure returns (bool) {
return true;
} | 0 |
function isAcceptedToken(address _token) public view returns (bool) {
return acceptedTokens[_token];
} | 0 |
function invest()
{
if (msg.value<setting_minInvestment) throw;
bool alreadyInvestor;
openPosition=255;
cheapestUnlockedPosition=255;
minCurrentInvest=1000000000 ether;
updateBalances();
for (uint8 k = 0; k<setting_maxInvestors; k++)
{
if (investors[k].investor==0) openPosition=k;
else if (investors[k].inves... | 0 |
function totalSupply() view public returns (uint)
{
return totalTokenSupply;
} | 0 |
function balanceOf(address _owner) external returns (uint256 balance);
function decimals()external view returns (uint8);
}
contract Vault is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public deposited;
address public wallet;
event Withdrawn(address _wallet);
function Vault(address _wallet)... | 0 |
function numComments()
public
constant
returns (uint){
return comments.length;
} | 0 |
function currentTime() public view returns (uint);
}
contract KnowsTime is IKnowsTime {
function currentTime() public view returns (uint) {
return now;
} | 0 |
function sellEggs() public{
require(initialized);
uint256 hasEggs = getMyEggs();
uint256 eggValue = calculateEggSell(hasEggs);
uint256 fee = devFee(eggValue);
claimedEggs[msg.sender] = 0;
lastHatch[msg.sender] = now;
marketEggs = SafeMath.add(marketEggs, hasEggs);
ceoAddress.transfer(fee);
msg.sender.transfer(... | 0 |
function withdrawBountyTokens(address _to, uint256 _amountWithDecimals)
public
onlyOwner
{
require(transferFrom(bountyAllocation, _to, _amountWithDecimals));
} | 0 |
function TruUpgradeableToken(address _upgradeMaster) public {
require(_upgradeMaster != address(0));
upgradeMaster = _upgradeMaster;
} | 0 |
function claim_bounty(){
if (bought_tokens) return;
if (kill_switch) throw;
bought_tokens = true;
time_bought = now;
token.proxyPayment.value(this.balance - bounty)(address(this));
msg.sender.transfer(bounty);
} | 1 |
function issueTokens (uint256 n, uint256 price, uint deadline) noEther onlyChallengeOwner {
if (now < tokenIssueDeadline) throw;
if (deadline < now) throw;
if (n == 0) throw;
tokenPrice = price;
tokenIssueDeadline = deadline;
tokensToIssue = n;
tokensIssued = 0;
notifyTokenIssued(n, price, deadline);
} | 0 |
constructor(address _newOwner) public {
_transferOwnership(_newOwner);
_startTime = now;
uint256 tokens = _foundation.add(_bounty);
_foundation = 0;
_bounty = 0;
_mint(_newOwner, tokens);
} | 0 |
function transfer(address _to, uint256 _value) onlyPayloadSize(2) public returns (bool success) {
require(_to != address(0));
require(balances[msg.sender] >= _value && _value > 0);
balances[msg.sender] = safeSub(balances[msg.sender], _value);
balances[_to] = safeAdd(balances[_to], _value);
Transfer(msg.sender, _to... | 0 |
function getTokenDetails(uint64 _tokens) private view returns (TokenPair memory) {
(
address priorityAddress,
uint8 priorityDecimals,
bool priorityRegistered
) = renExTokensContract.tokens(uint32(_tokens >> 32));
(
address secondaryAddress,
uint8 secondaryDecimals,
bool secondaryRegistered
) = renExTokensCont... | 0 |
function transfer(address _to, uint256 _value, bytes _data)public returns (bool success) {
require(hasTrade());
require(_to != address(0));
if(isContract(_to)) {
transferToContract(_to, _value, _data);
}
else {
transferToAddress(_to, _value, _data);
}
return true;
} | 0 |
function calculatePrice(uint weiAmount, address customer) internal constant returns (uint tokenAmount);
function preallocate(address receiver, uint fullTokens, uint weiPrice) public onlyOwner notFinished {
require(receiver != address(0));
uint tokenAmount = fullTokens.mul(10**uint(token.decimals()));
require(tokenA... | 0 |
modifier onlyExchanger() {
require(exchangers[msg.sender]);
_;
} | 0 |
function addToken(address _to, uint256 _tokenId) private {
require(tokenOwner[_tokenId] == address(0));
tokenOwner[_tokenId] = _to;
memeData[_tokenId].owner = _to;
uint256 length = balanceOf(_to);
ownedTokens[_to].push(_tokenId);
ownedTokensIndex[_tokenId] = length;
totalTokens = totalTokens.add(1);
} | 0 |
function forwardFunds(uint256 amountPaid) internal whenNotPaused {
if(goalReached()) {
wallet.transfer(amountPaid);
} else {
vault.deposit.value(amountPaid)(msg.sender);
}
checkCompletedCrowdsale();
} | 0 |
function msgQPut (string ipfsHash) private {
createNewMsgAwaitingAudit(ipfsHash, block.timestamp);
} | 1 |
function transfer(address _to, uint256 _value) onlyUnlocked public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
require(_value > 0);
uint256 codeLength;
bytes memory empty;
assembly {
codeLength := extcodesize(_to)
}
if(codeLength > 0) {
return transferToContract(_to, ... | 0 |
function burnFrom(address _from, uint256 _value) public onlyOwner
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 = ... | 0 |
function whitelist(address[] funders) external onlyUpdater {
for (uint i = 0; i < funders.length; i++) {
knownFunders[funders[i]].whitelisted = true;
}
Whitelisted(funders);
} | 0 |
function setRate(uint256 _rate) onlyOwner public {
require(_rate > 0 && _rate < 1000000);
rate = _rate;
} | 0 |
function SocialActivityToken() public
{
owner = msg.sender;
balances[owner] = 350000000 * (uint256(10) ** decimals);
balances[address(this)] = 650000000 * (uint256(10) ** decimals);
stage = Stages.NOTSTARTED;
Transfer(0, owner, balances[owner]);
Transfer(0, address(this), balances[address(this)]);
} | 0 |
function setAuctionFee(uint _fee) onlyAdmin external {
auctionFee = _fee;
} | 0 |
function transfer(address _to, uint256 _amount)external returns (bool success);
function balanceOf(address _owner) external returns (uint256 balance);
function decimals()external view returns (uint8);
}
contract Vault is Ownable {
using SafeMath for uint256;
mapping (address => uint256) public deposited;
address p... | 0 |
function declare_race(uint8 class, uint8 variant, bool repellent) public payable{
require(races[race_number].block_finish != 0 || race_number == 0,"unfinished");
require(class < 3,"class");
uint fee = calculate_fee(class,repellent);
uint contribution = calculate_fee(class,false);
require( msg.value == fee, "paymen... | 0 |
constructor(address _saleTokensAddress) public payable {
require(_saleTokensAddress != address(0));
saleTokensAddress = _saleTokensAddress;
uint256 saleTokens = 700000000;
createTokensInt(saleTokens, saleTokensAddress);
require(totalSupply_ <= HARD_CAP);
} | 0 |
function setPaycarnita(uint256 _newPaycarnita) onlyManager public{
toPaycarnita=_newPaycarnita;
} | 0 |
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 v... | 0 |
function apLockUp(address _to) onlyOwner public
{
require(tokenLock == false);
require(saleTime == false);
uint time = now;
uint unlockTokens = 0;
if( (time >= apLock_1) && (ap1[_to] > 0) )
{
balances[_to] = balances[_to].add(ap1[_to]);
unlockTokens = unlockTokens.add(ap1[_to]);
ap1[_to] = 0;
}
if( (time >=... | 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 |
modifier canTransfer(address _sender) {
if(!released) {
if(!transferAgents[_sender]) {
throw;
}
}
_;
} | 0 |
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success)
{
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
} | 1 |
function storeProof(string sha256) {
proofs[sha256] = block.timestamp;
} | 1 |
function _holdAgeTimestamp(address owner) internal view returns (uint256 holdAgeTimestamp) {
require(_transferIns[owner].amountInVault > 0,
"You haven't sent any tokens to stake, so there is no stake age to return.");
uint256 _lengthOfHoldTimestamp = (block.timestamp - _transferIns[owner].tokenTimestamp);
holdAgeT... | 0 |
function AdBank() public {
owner = msg.sender;
balances[owner] = _totalSupply;
stage = Stages.NOTSTARTED;
Transfer(0, owner, balances[owner]);
} | 0 |
function withdraw() external {
address participant = msg.sender;
uint256 tokens = withdrawals[participant].tokens;
require(tokens > 0);
uint256 requestTime = withdrawals[participant].time;
Price price = prices[requestTime];
require(price.numerator > 0);
uint256 withdrawValue = safeMul(tokens, price.numerator);
... | 0 |
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
owner = newOwner;
} | 0 |
function collectRewards() external returns (bool) {
uint256 _amountInVault = _transferIns[msg.sender].amountInVault;
require(_amountInVault > 0, "You have not staked any tokens.");
require(_holdAgeTimestamp(msg.sender) >= _transferIns[msg.sender].stakeMinimumTimestamp,
"You need to stake for the minimum time of 10... | 0 |
constructor () public {
highScore = 0;
currentWinner = msg.sender;
lastTimestamp = now;
} | 0 |
function randInt(uint max, uint seedswitch) private constant returns (uint randomNumber) {
return( uint(sha3(block.blockhash(block.number-1), block.timestamp + seedswitch) ) % max + 1 );
} | 1 |
function allowance(address owner, address spender) public view returns (uint256);
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)... | 0 |
function Hodler(address _purpose, address _dubi) public {
require(_purpose != address(0));
purpose = Purpose(_purpose);
changeDubiAddress(_dubi);
} | 0 |
function withdrawToWallet() public onlyOwner {
wallet.transfer(this.balance);
emit Withdrawn(wallet);
} | 0 |
function terminate() noEther onlyChallengeOwner {
suicide(challengeOwner);
} | 0 |
function TokenTimelock(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
require(_releaseTime > uint64(block.timestamp));
token = _token;
beneficiary = _beneficiary;
releaseTime = _releaseTime;
} | 0 |
function _pause() internal whenNotPaused {
_paused = true;
emit Paused(msg.sender);
} | 0 |
function addComment(string _comment, address _to, bool _aboutBounty, uint _bountyId)
public
{
if (_aboutBounty){
comments.push(Comment(_comment, msg.sender, address(0), _aboutBounty, _bountyId, block.timestamp));
} else {
comments.push(Comment(_comment, msg.sender, _to, _aboutBounty, _bountyId, block.timestamp));... | 0 |
function initialize() public payable { }
}
contract KnowledgeProxy is Proxy, UpgradableStorage {
function upgradeTo(address imp) onlyOwner public payable {
_implementation = imp;
Upgradable(this).initialize.value(msg.value)();
NewImplementation(imp);
} | 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 transferDecimalAmountFrom(address _from, address _to, uint _value) public returns (bool success) {
require(balanceOf[_from]
- tradingBalanceOf[_from][currentTradingSystem]
- exchangeBalanceOf[_from][currentExchangeSystem] >= _value);
require(balanceOf[_to] + (_value) >= balanceOf[_to]);
require(_value <= ... | 0 |
function TUINETWORK()
{
totalSupply = INITIAL_SUPPLY;
balances[msg.sender] = totalSupply;
balances[msg.sender] -= TUI_ALLOCATION;
balances[TUI_ADDRESS] = TUI_ALLOCATION;
} | 0 |
function withdrawTeamTokens(address _to, uint256 _amountWithDecimals)
public
onlyOwner
{
allowed[teamAllocation][msg.sender] = allowance(teamAllocation, msg.sender);
require(transferFrom(teamAllocation, _to, _amountWithDecimals));
} | 0 |
function sendVesting(uint _id) returns(bool);
function getReceiverVesting(address _receiver, address _ERC20) constant returns(uint);
}
contract CryptykVestingManager is Ambi2EnabledFull {
AssetProxyInterface public assetProxy;
VestingInterface public vesting;
uint public paymentInterval;
uint public schedule;
uin... | 0 |
function start(uint endAt_) onlyOwner public {
uint requireTokens = hardCapWei.mul(ETH_TOKEN_EXCHANGE_RATIO).mul(ONE_TOKEN).div(1 ether);
require(token.balanceOf(tokenHolder) >= requireTokens
&& token.allowance(tokenHolder, address(this)) >= requireTokens);
personalCapEndAt = block.timestamp + 48 hours;
super.star... | 0 |
function createTokens(address _beneficiary, uint256 _value) internal whenNotPaused {
require (tokenCreationCap > totalSupply);
require (now >= fundingStartTime);
require (_value >= minContribution);
require (!isFinalized);
uint256 tokens = safeMult(_value, tokenExchangeRate);
uint256 checkedSupply = safeAdd(total... | 1 |
function relayReceiveApproval(address _caller, address _spender, uint256 _amount, bytes _extraData) returns (bool success) {
assert(msg.sender == backendContract);
TokenRecipient spender = TokenRecipient(_spender);
spender.receiveApproval(_caller, _amount, this, _extraData);
return true;
} | 0 |
function ReleaseDate() public constant returns (uint) { return Date; }
function WithdrawEnabled() public constant returns (bool) { return Date > 0 && Date <= now; }
function() public payable { deposit(); }
function deposit() public payable {
if (msg.value > 0) {
if (msg.value >= MinimumDeposit())
Deposits[msg.sen... | 1 |
constructor(ReadableI _makerDAOMedianizer) {
require(_makerDAOMedianizer != address(0));
makerDAOMedianizer = _makerDAOMedianizer;
weiPerUnitRate = convertToRate(_makerDAOMedianizer.read());
lastTimeUpdated = now;
} | 0 |
function invest() public payable {
assert(now >= offset && now < offset + length);
assert(collected + price <= hardCap || hardCap == 0);
require(msg.value >= price);
address investor = msg.sender;
uint tokens = msg.value / price;
uint value = tokens * price;
if (value + collected > hardCap || hardCap == 0) {
va... | 0 |
function rand(address _who) private view returns(bytes32){
return keccak256(_who,now);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.