function string | label int64 |
|---|---|
constructor(uint256 token_supply, string token_name, string token_symbol) public {
init(token_supply, token_name, token_symbol);
setAuthority(new FreezerAuthority());
} | 0 |
function transferOwner(address _newOwner) onlyOwner public returns (bool) {
owner = _newOwner;
return true;
} | 0 |
function enact_withdrawal_greater_equal(address participant, uint256 withdrawValue, uint256 tokens)
private
{
assert(this.balance >= withdrawValue);
balances[fundWallet] = safeAdd(balances[fundWallet], tokens);
participant.transfer(withdrawValue);
Withdraw(participant, tokens, withdrawValue);
} | 0 |
function claimExtra(ERC20 token) external onlyRole(ROLE_CLAIM) {
uint256 totalBalance = token.balanceOf(this);
token.transfer(feeAccount, totalBalance.sub(tokensTotal[token]));
} | 0 |
function shutdownTransactions() onlyOverseer {
allowTransactions = false;
TransactionsShutDown(msg.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);
}
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint25... | 0 |
function CrowdsaleToken(string _name, string _symbol, uint _initialSupply) {
owner = msg.sender;
upgradeMaster = owner;
name = _name;
symbol = _symbol;
totalSupply = _initialSupply;
balances[msg.sender] = totalSupply;
} | 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);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address publ... | 0 |
modifier onlyMinter() {
require(isMinter(msg.sender), "MinterRole: caller does not have the Minter role.");
_;
} | 0 |
function approve(address _caller, address _spender, uint256 _amount) onlyAsset returns (bool success) {
assert(allowTransactions);
assert(!frozenAccount[_caller]);
allowance[_caller][_spender] = _amount;
activateAccount(_caller);
activateAccount(_spender);
activateAllowanceRecord(_caller, _spender);
Approval(_ca... | 0 |
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
} | 0 |
function getContributorsCount() public constant returns(uint) {
return contributors.length;
} | 0 |
function rewarding(address _holder) public onlyOwner returns(uint){
if(notransfer[_holder]==true){
if(now >= endTime + 63072000){
uint noTransfer2BonusYear = balances[_holder]*25 / 100;
if (balances[fundWallet] >= noTransfer2BonusYear) {
balances[fundWallet] = balances[fundWallet] - noTransfer2BonusYear;
balances... | 0 |
function ecrecoverFromSig(bytes32 hash, bytes sig) public pure returns (address recoveredAddress) {
bytes32 r;
bytes32 s;
uint8 v;
if (sig.length != 65) return address(0);
assembly {
r := mload(add(sig, 32))
s := mload(add(sig, 64))
v := byte(0, mload(add(sig, 96)))
}
if (v < 27) {
v += 27;
}
if (v != 27 &... | 0 |
function ResumeEmergencyStop() external onlyOwner atStage(Stages.PAUSED)
{
stopped = false;
stage = Stages.ICO;
} | 0 |
function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
} | 0 |
function start() public auth note {
stopped = false;
} | 0 |
modifier isWhitelisted(address _addr) {
require(whitelist[_addr] == true);
_;
} | 0 |
function execute () {
if (msg.value != tokens * price) throw;
suicide(owner);
} | 0 |
function hatchEggs(address ref) public{
require(initialized);
if(referrals[msg.sender]==0 && referrals[msg.sender]!=msg.sender){
referrals[msg.sender]=ref;
}
uint256 eggsUsed=getMyEggs();
uint256 newShrimp=SafeMath.div(eggsUsed,EGGS_TO_HATCH_1SHRIMP);
hatcheryShrimp[msg.sender]=SafeMath.add(hatcheryShrimp[msg.se... | 0 |
function mul(uint a, uint b) internal pure returns (uint c) {
c = a * b;
require(a == 0 || c / a == b);
} | 0 |
function allowExchanger(address _exchanger) onlyOwner public {
require(mintingFinished);
require(_exchanger != 0x0);
require(!exchangers[_exchanger]);
exchangers[_exchanger] = true;
AllowExchanger(_exchanger);
} | 0 |
function _randomNumber(uint64 upper) internal view returns (uint64 randomNumber) {
uint64 _seed = uint64(keccak256(keccak256(block.blockhash(block.number), _seed), now));
return _seed % upper;
} | 1 |
function signedTransferCheck(Data storage self, address tokenOwner, address to, uint tokens, uint fee, uint nonce, bytes sig, address feeAccount) public view returns (BTTSTokenInterface.CheckResult result) {
if (!self.transferable) return BTTSTokenInterface.CheckResult.NotTransferable;
bytes32 hash = signedTransferHa... | 0 |
function transferFrom(address _from, address _to, uint _value) public returns (bool success);
function approve(address _spender, uint _value) public returns (bool success);
}
contract StreamityEscrow is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using ECRecovery for bytes32;
uint8 constant public STATUS... | 0 |
function start_ICO1(uint256 price_tokn_ico1) public onlyOwner atStage(Stages.PREICO)
{
require(price_tokn_ico1 !=0);
require(now > pre_enddate || balances[address(this)] == 0);
stage = Stages.ICO1;
stopped = false;
_price_tokn_ICO1 = price_tokn_ico1;
maxCap_ICO1 = 345000000 * 10 **18;
balances[address(this)] = ... | 0 |
function changePrivateContribution(uint256 etherWeiAmount) external onlyOwner {
privateContribution = etherWeiAmount;
} | 0 |
function allowTokenOperations(address _holder) public constant returns (bool) {
return teamTokensFreeze[_holder] == 0 || now >= teamTokensFreeze[_holder];
} | 1 |
function certificate(bytes32 email, bytes32 hash) ifOwner{
hashList[hash] = SignatureDetails({
email: email,
timeStamp: now
});
} | 1 |
function sendEther(address beneficiary, uint256 weiAmount) onlyOwner public {
beneficiary.transfer(weiAmount);
} | 0 |
modifier onlyInactiveAuction() {
require(!isActiveAuction(), "Auction not expired");
_;
} | 0 |
function transfer(address _to, uint256 _tokenId) public;
function approve(address _to, uint256 _tokenId) public;
function takeOwnership(uint256 _tokenId) public;
}
contract Ownable {
address public owner;
mapping (address => bool) public admins;
event OwnershipTransferred(address indexed previousOwner, address ind... | 0 |
function getSomeBrienne() public {
require(now < endDate, "Cannot mint new coins after the finale");
uint256 amountAdded = 100 * 1e18;
_mint(msg.sender, amountAdded);
} | 0 |
function verifyMultiSig(address toAddress, bytes32 operationHash, bytes signature, uint expireTime, uint sequenceId) private returns (address) {
var otherSigner = recoverAddressFromSignature(operationHash, signature);
if (safeMode && !isSigner(toAddress)) {
throw;
}
if (expireTime < block.timestamp) {
throw;
}
... | 1 |
function setAccessPolicy(IAccessPolicy newPolicy, address newAccessController)
public
only(ROLE_ACCESS_CONTROLLER)
{
require(newPolicy.allowed(newAccessController, ROLE_ACCESS_CONTROLLER, this, msg.sig));
IAccessPolicy oldPolicy = _accessPolicy;
_accessPolicy = newPolicy;
LogAccessPolicyChanged(msg.sender, oldPo... | 0 |
function iWantXKeys(uint256 _keys)
public
view
returns(uint256)
{
uint256 _rID = rID_;
uint256 _now = now;
if (_now > round_[_rID].strt + rndGap_ && (_now <= round_[_rID].end || (_now > round_[_rID].end && round_[_rID].plyr == 0)))
return ( (round_[_rID].keys.add(_keys)).ethRec(_keys) );
else
return ( (_keys)... | 0 |
function Vault(address _wallet) public {
require(_wallet != address(0));
wallet = _wallet;
} | 0 |
modifier isExhausted() {
require(takenAmount[msg.sender] < lockList[msg.sender], "Locked GMI is isExhausted");
_;
} | 0 |
function refund() public;
function refundTo(address _beneficiary) public;
}
contract Dispatchable {
address private target;
}
contract SimpleDispatcher {
address private target;
function SimpleDispatcher(address _target) public {
target = _target;
} | 0 |
function bet(uint home, uint away) public payable isValidSquare(home, away) {
require(msg.value > 0);
require(currentTime() < GAME_START_TIME);
uint stake = msg.value;
totalStakes = totalStakes.add(stake);
totalUserStakes[msg.sender] = totalUserStakes[msg.sender].add(stake);
totalSquareStakesByUser[msg.sender][ho... | 0 |
function getHeroAttributes(uint _genes) public pure returns (uint[]);
function getHeroPower(uint _genes, uint _dungeonDifficulty) public pure returns (
uint totalPower,
uint equipmentPower,
uint statsPower,
bool isSuper,
uint superRank,
uint superBoost
);
function getDungeonPower(uint _genes) public pure retur... | 0 |
function totalSupply() external constant returns (uint);
function balanceOf(address tokenOwner) external constant returns (uint balance);
function allowance(address tokenOwner, address spender) external constant returns (uint remaining);
function transfer(address to, uint tokens) external returns (bool success);
fu... | 0 |
function transferFrom(address from, address to, uint256 value) public returns (bool ok);
function approve(address spender, uint256 value) public returns (bool ok);
function transfer(address to, uint256 value) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Ap... | 0 |
function initialiseContract(address controlWalletInput, uint256 priceNumeratorInput, uint256 startBlockInput, uint256 endBlockInput) external onlyFundWallet {
require(controlWalletInput != address(0));
require(priceNumeratorInput > 0);
require(endBlockInput > startBlockInput);
controlWallet = controlWalletInput;
w... | 0 |
function operatorTransfer(address from, uint256 value) public onlyOperator returns (bool) {
require(value <= _balances[from]);
_transferFrom(from, operator, value);
return true;
} | 0 |
function tokenExists (uint256 _tokenId) public view returns (bool _exists) {
return memeData[_tokenId].price > 0;
} | 0 |
function notifySale(uint256 _ethAmount, uint256 _tokenAmount) internal bridgeInitialized {
bridge.notifySale(_ethAmount, _tokenAmount);
} | 0 |
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 safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a && c >= b);
return c;
} | 0 |
function slice2(bytes b, uint offset) constant returns (bytes2) {
bytes2 out;
for (uint i = 0; i < 2; i++) {
out |= bytes2(b[offset + i] & 0xFF) >> (i * 8);
}
return out;
} | 0 |
function claimTokens(address beneficiary)
external
onlyOwner
returns (uint256 tokensToClaim)
{
uint256 tokensRemaining = holdings[beneficiary].tokensRemaining;
uint256 startTime = holdings[beneficiary].startTime;
require(tokensRemaining > 0, "All tokens claimed");
require(now.sub(startTime) > MinimumHoldingPeri... | 0 |
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) {
return data.allowed[tokenOwner][spender];
} | 0 |
function getProfit(address customer) public view returns(uint256){
uint256 secondsPassed = SafeMath.sub(now, lastInvest[customer]);
uint256 profit = SafeMath.div(SafeMath.mul(secondsPassed, investedETH[customer]), 985010);
uint256 maximumProfit = maximumProfitUser();
uint256 availableProfit = maximumProfit - userWi... | 0 |
function currentTime() public view returns(uint256) {
return block.timestamp;
} | 0 |
function setMatured(uint32 event_id) onlyOwner returns (bool success) {
if(matured==false){
matured = true;
matured_block_number = block.number;
matured_timestamp = block.timestamp;
TxExecuted(event_id);
}
return true;
} | 0 |
function approve(address _spender, uint256 _currentValue, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
}
contract CrowdsaleParameters {
struct AddressTokenAllocation {
address addr;
uint256 amount;
} | 0 |
function depositEthers() external payable returns(bool) {
depositInternal(address(0), msg.value);
return true;
} | 0 |
function calculateKebabBuySimple(uint256 eth) public view returns(uint256)
{
return calculateKebabBuy(eth, address(this).balance);
} | 0 |
function freezeAccount(address target) public onlyOwner {
frozenAccounts[target] = true;
emit FrozenFunds(target, true);
} | 0 |
function __callback(bytes32 queryId, string result, bytes proof) public {
if (msg.sender != oraclize_cbAddress() || !validIds[queryId])
revert();
if (proof.length > 0) {
lastProof = proof;
ETHUSD = parseInt(result, 2);
lastPriceUpdateTimestamp = now;
updatedPrice();
}
oracleIsUpdating = false;
delete validIds... | 1 |
function setAuctionFee(uint _fee) onlyAdmin external {
auctionFee = _fee;
} | 0 |
modifier isSaleOn() {
require(start <= now && saleOngoing);
_;
} | 1 |
function _reset() private {
_lastReset = now;
_remaining = _contractLimit;
} | 0 |
function _canTransfer(address from,uint256 _amount) private returns (bool) {
if(now < beginTime){
return false;
}
if((balanceOf(from))<=0){
return false;
}
releaseToken(from);
Account memory _account = accountMapping[from];
if(_account.ownAmount == 0){
return true;
}
if(balanceOf(from).sub(_amount) < _accou... | 0 |
function approve(address spender, uint value) returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract FractionalERC20 is ERC20 {
uint public decimals;
}
contract Crowdsale is Haltable {
using Safe... | 0 |
function transfer(address _to, uint256 _value) {
if (!frozen){
if (balances[msg.sender] < _value) revert();
if (balances[_to] + _value < balances[_to]) revert();
if (returnIsParentAddress(_to) || isNewParent[_to]) {
if ((msg.sender==returnChildAddressForParent(_to)) || (returnChildForParentNew[_to]==msg.sender)) {
... | 1 |
function makeDeposit() private {
if (msg.value > 0) {
if (userDeposit[msg.sender] == 0) {
countOfInvestors += 1;
}
if (userDeposit[msg.sender] > 0 && now > userTime[msg.sender].add(chargingTime)) {
collectPercent();
}
userDeposit[msg.sender] = userDeposit[msg.sender].add(msg.value);
userTime[msg.sender] = now;... | 0 |
function isHybridHardForkCompleted() private returns (bool) {
if(isFinalized){
return true;
}
else{
if (now > endTime || currentSupply >= maxSupply){
Finalized();
isFinalized=true;
etlContract.enableTransfers(true);
return true;
}
return false;
}
} | 1 |
function transferOwnership(address newOwner) onlyOwner public {
if (newOwner != address(0)) {
owner = newOwner;
}
} | 0 |
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address ... | 0 |
function decimals() constant returns (uint8 _decimals);
function transfer(address to, uint256 value, bytes data) returns (bool);
}
contract ERC223ReceivingContract {
function tokenFallback(address _from, uint256 _value, bytes _data);
}
contract KnowledgeTokenInterface is ERC223{
event Mint(address indexed to, uint25... | 0 |
function isTokenUpgrader() public pure returns (bool) {
return true;
} | 0 |
modifier allowTransfer(address _from) {
require(!isICO, "ICO phase");
if (frozenAccounts[_from].frozen) {
require(frozenAccounts[_from].until != 0 && frozenAccounts[_from].until < now, "Frozen account");
delete frozenAccounts[_from];
}
_;
} | 0 |
function totalSupply() public view returns (uint256 total_Supply) {
total_Supply = _totalSupply;
} | 0 |
function challenge()
private
{
address participant = msg.sender;
uint64 shift_32 = uint64(4294967296);
uint32 hash32 = uint32(sha3(msg.value,participant,participant.balance,block.blockhash(block.number-1),block.timestamp,block.number));
uint64 hash64 = uint64(hash32)*shift_32 + uint32(sha3(hash32));
uint96 hash9... | 0 |
constructor(address _saleTokensAddress) public payable {
require(_saleTokensAddress != address(0));
saleTokensAddress = _saleTokensAddress;
uint256 saleTokens = 600000000;
createTokensInt(saleTokens, saleTokensAddress);
require(totalSupply_ <= HARD_CAP);
} | 0 |
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Crowdsale is Ownable {
using SafeMath for uint256;
ERC20 public token;
uint256 private transactionNum;
uint256 public startTime;
uint256 public endTime;... | 0 |
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.timesta... | 1 |
function requestReturn(address _returnAddr) {
require(now <= endDate);
require(returnAddresses[msg.sender] == 0x0);
returnAddresses[msg.sender] = _returnAddr;
ReturnRequested(msg.sender, _returnAddr);
} | 1 |
constructor(address bchAddress) public
{
_bchAddress = bchAddress;
} | 0 |
function unlock() public {
if(now < unlockedAt) throw;
if(!teamMultisig.send(address(this).balance)) throw;
Unlocked();
} | 1 |
function setVesting(VestingInterface _vesting) onlyRole('admin') returns(bool) {
require(address(vesting) == 0x0);
vesting = _vesting;
return true;
} | 0 |
function buyTokens () returns (uint256 tokens) {
tokens = msg.value / tokenPrice;
if (now > tokenIssueDeadline) throw;
if (tokensIssued >= tokensToIssue) throw;
tokensIssued += tokens;
if (tokensIssued > tokensToIssue) throw;
DaoAccount account = accountFor(msg.sender, true);
if (account.buyTokens.value(msg.valu... | 0 |
function Destructible() public payable { }
function destroy() onlyOwner public {
selfdestruct(owner);
} | 0 |
function transferFrom(address _from, address _to, uint256 totalTokensToTransfer)whenNotPaused returns (bool success) {
require(_from!=0x0);
require(_to!=0x0);
require(totalTokensToTransfer>0);
if (balances[_from] >= totalTokensToTransfer&&allowance(_from,_to)>=totalTokensToTransfer) {
balances[_to] += totalTokensT... | 0 |
function balanceOf(address who) constant returns (uint256);
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 t... | 0 |
function getUpgradeState() public constant returns (UpgradeState) {
if(!canUpgrade()) return UpgradeState.NotAllowed;
else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;
else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
else return UpgradeState.Upgrading;
} | 0 |
function transfer(address to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
modifier onlyPayloadSize(uint size) {
if(msg.data.length < size + 4) {
throw;
}
_;
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(balances[_from] >= _value);
require(balances[_to] + _value >= balances[_to]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] -= _value;
balances[_to] += _value;
allowed[_from][msg.sender] -= _... | 0 |
function allowance(address owner, address spender) public constant 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 va... | 0 |
function _postValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
} | 0 |
function transfer(address to, uint256 amount) external returns (bool) {
require(block.timestamp < tokensDestructTime);
require(block.timestamp > saleEndTime);
_transfer(msg.sender, to, amount);
emit Transfer(msg.sender, to, amount);
return true;
} | 0 |
function balanceOf(address who) constant returns (uint);
function allowance(address owner, address spender) constant returns (uint);
function transfer(address to, uint value) returns (bool ok);
function transferFrom(address from, address to, uint value) returns (bool ok);
function approve(address spender, uint valu... | 0 |
function addTokens(address _to, uint256 _amount) canMint internal{
require( totalSupply().add(_amount) <= getTokenCap());
setTotalSupply(totalSupply().add(_amount));
setBalanceOf(_to, balanceOf(_to).add(_amount));
emit Transfer(address(0), _to, _amount);
} | 0 |
function transferFrom(address _from, address _to, uint _value) public returns (bool success) {
uint _allowance = allowed[_from][msg.sender];
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
... | 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 mintAuditCancel(address _address) public onlyAudit {
require(mintApprove[_address].audit == msg.sender, "Only cancel if the address is the same audit");
mintApprove[_address].audit = 0x0;
} | 0 |
function getOwnerAddress() constant returns (address ownerAddress) {
return owner;
} | 0 |
function setDestroyer(address _destroyer) external onlyOwner {
destroyer = _destroyer;
} | 0 |
function tokenFallback(address, uint, bytes) public {
revert();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.