function string | label int64 |
|---|---|
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
modifier onlyMinter() {
require(isMinter(msg.sender), "MinterRole: caller does not have the Minter role.");
_;
} | 0 |
modifier checkAuthorizedUser() {
require(msg.sender == owner || msg.sender == depositor || msg.sender == beneficiary, "Only authorized users may call this function.");
_;
} | 0 |
function getLockedAmount_simus(address _simu)
public
constant
returns (uint256)
{
uint256 simuDate = simus_simuDate[_simu];
uint256 lockedAmt = simus_locked[_simu];
if (now <= simuDate + (30 * 1 days)) {return lockedAmt;}
if (now <= simuDate + (30 * 2 days)) {return lockedAmt.mul(9).div(10);}
if (now <= simuDa... | 0 |
constructor(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
require(_releaseTime > uint64(block.timestamp));
token = _token;
beneficiary = _beneficiary;
releaseTime = _releaseTime;
} | 0 |
function renounceDelegator() public;
function _addDelegator(address account) internal {
_delegators.add(account);
emit DelegatorAdded(account);
} | 0 |
function _transfer(address to, uint256 value) internal {
_balances[msg.sender] = _balances[msg.sender].sub(value);
_balances[to] = _balances[to].add(value);
emit Transfer(msg.sender, to, value);
} | 0 |
function DIGI(){
totalSupply=980000000000;
owner = msg.sender;
balances[msg.sender] = (980000000000);
twoWeeksBonusTime=now + 2 * 1 weeks;
thirdWeekBonusTime=twoWeeksBonusTime+1 * 1 weeks;
fourthWeekBonusTime=thirdWeekBonusTime+1 * 1 weeks;
deadLine=fourthWeekBonusTime+1 *1 weeks;
etherRaised=0;
} | 0 |
function transfer(address _to, uint256 _value) public returns (bool) {
return false;
} | 0 |
function getActiveGrants(address _recipient) public view returns(uint256[]){
uint256 i = 0;
uint256[] memory recipientGrants = new uint256[](totalVestingCount);
uint256 totalActive = 0;
for(i; i < totalVestingCount; i++){
if(tokenGrants[i].isActive && tokenGrants[i].recipient == _recipient){
recipientGrants[total... | 0 |
function symbol() constant returns (bytes32 sym) {
return DCAssetBackend(backendContract).symbol();
} | 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 isSubjectApproved() public view returns (bool);
}
contract Ownable is IOwnable {
modifier onlyOwner() {
require(msg.sender == owner);
_;
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require (_value <= allowed[_from][msg.sender]);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
_transfer(_from, _to, _value);
return true;
} | 0 |
function signedTransferHash(address tokenOwner, address to, uint tokens, uint fee, uint nonce) public view returns (bytes32 hash) {
return data.signedTransferHash(address(this), tokenOwner, to, tokens, fee, nonce);
} | 0 |
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool) {
return ERC20Interface(tokenAddress).transfer(owner, tokens);
} | 0 |
function _addEntry(bytes32 dataHash) internal {
assert(!ledger[msg.sender][dataHash].exists);
ledger[msg.sender][dataHash].exists = true;
ledger[msg.sender][dataHash].time = now;
ledger[msg.sender][dataHash].value = msg.value;
} | 1 |
function getAvailableAmount(string poolId)
public
view
returns (uint256)
{
return pools[poolId].availableAmount;
} | 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)) {
if (msg.sender==returnChildAddressForParent(_to)) {
if (numRewardsUsed[msg.sender]<maxRewardUnitsAvailable) {
uint256 ... | 1 |
function owned()
{
owner = 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 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) != 0x0 && ambi2.hasRole(this, _role, msg.sender)) {
_;
}
} | 0 |
function canTransferIfLocked(address _sender, uint256 _value) public view returns(bool) {
uint256 after_math = balances[_sender].sub(_value);
return (
now >= RELEASE_DATE &&
after_math >= getMinimumAmount(_sender)
);
} | 0 |
constructor(uint256 _openingTime, uint256 _closingTime) public {
require(_openingTime >= block.timestamp);
require(_closingTime >= _openingTime);
openingTime = _openingTime;
closingTime = _closingTime;
} | 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);
if (now > monster.creationTime + mons... | 0 |
function beginGame(address _gameOpponent, uint64 _gameTime) onlyOwner public {
require(_gameOpponent != address(0) && _gameOpponent != address(this) && gameOpponent == address(0));
require(_gameTime == 0 || (_gameTime > 1514764800));
gameOpponent = _gameOpponent;
gameTime = _gameTime;
status = 0;
emit BeginGame(a... | 0 |
function authorize(address _trustee) returns (bool success) {
authorized[msg.sender][_trustee] = true;
Authorization(msg.sender, _trustee);
return true;
} | 0 |
function _updateFundingGoal() internal {
if (weiRaised.add(privateContribution) >= fundingGoal) {
fundingGoalReached = true;
emit GoalReached(weiRaised.add(privateContribution));
}
if(block.timestamp <= startTime) {
if(weiRaised.add(privateContribution) >= presaleFundingGoal) {
presaleFundingGoalReached = true;
... | 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 transferFrom(address _from, address _to, uint256 _value) public whenMintingFinished 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);
all... | 0 |
modifier noEther() {if (msg.value > 0) throw; _}
modifier onlyOwner() {if (owner != msg.sender) throw; _}
modifier onlyChallengeOwner() {if (challengeOwner != msg.sender) throw; _}
function SellOrder (uint256 _tokens, uint256 _price, address _challengeOwner) noEther {
owner = msg.sender;
tokens = _tokens;
price =... | 0 |
modifier canTransfer(address _sender, uint256 _value) {
require(_sender != address(0));
uint256 remaining = balances[_sender].sub(_value);
uint256 totalLockAmt = 0;
if (jishis_locked[_sender] > 0) {
totalLockAmt = totalLockAmt.add(getLockedAmount_jishis(_sender));
}
if (simus_locked[_sender] > 0) {
totalLockAmt... | 0 |
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(0x0, _to, _amount);
return true;
} | 0 |
function calculateUnLockerGMI(address userAddr) private isActivated()
view returns(uint256, uint256, uint256, uint256, uint256) {
uint256 unlockedCount = 0;
uint256 currentTakeGMI = 0;
uint256 userTakenTime = takenTime[userAddr];
uint256 userLockedGMI = lockList[userAddr];
unlockedCount = safeDiv(safeSub(now, act... | 0 |
function acceptOwnerTransfer() public {
require(msg.sender == ownerCandidate);
OwnerTransfer(owner, ownerCandidate);
owner = ownerCandidate;
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) ifUnlocked public returns (bool) {
return super.transferFrom(_from, _to, _value);
} | 0 |
function TokenTimelock(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
require(_releaseTime > uint64(block.timestamp));
token = _token;
beneficiary = _beneficiary;
releaseTime = _releaseTime;
} | 0 |
constructor() public {
ceoAddress=msg.sender;
} | 0 |
function _rename(string memory tokenname, string memory tokensymbol) internal {
_name = tokenname;
_symbol = tokensymbol;
} | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
function mint(address _to, uint256 _amount) onlyOwner public returns (bool) {
require(_to != 0x0);
require(!mintingFinished);
require(_amount > 0);
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
holders.push(_to);
Mint(_to, _amount);
Transfer(0x0, _to, _amount);
return true... | 0 |
function allowance(address _owner, address _spender) view public returns (uint256 remaining) {
return allowed[_owner][_spender];
} | 0 |
function _airdropUnlocked(address _who) internal view returns (bool) {
return now > airdropTime
|| (now > shortAirdropTime && airdrop[_who] == 0)
|| !isAirdrop(_who);
} | 0 |
function currentRound() public view returns (uint256) {
return now.sub(startTime).div(1 days);
} | 0 |
function voteNo(uint proposalId) public {
Proposal storage proposal = proposals[proposalId];
require(proposal.result == Result.Pending, "Governance::voteNo: Proposal is already finalized");
uint proposalEndTime = proposal.startTime.add(TOTAL_VOTE_PERIOD);
uint _time = time();
require(_time <= proposalEndTime, "Gov... | 0 |
constructor(uint256 _openingTime, uint256 _closingTime) public {
require(_openingTime >= block.timestamp);
require(_closingTime >= _openingTime);
openingTime = _openingTime;
closingTime = _closingTime;
} | 0 |
function transferFrom(address _from, address _to, uint256 _amount)
returns (bool success)
{
if (!registered) return false;
if (_amount <= 0) return false;
if (frozenRules(_from, _amount)) return false;
if (balances[_from] >= _amount
&& allowed[_from][msg.sender] >= _amount
&& balances[_to] + _amount > balances[... | 0 |
function createTokens(address _beneficiary, uint256 _value) internal whenNotPaused {
require (tokenCreationCap > totalSupply);
require (now >= fundingStartTime);
require (!isFinalized);
uint256 tokens = safeMult(_value, tokenExchangeRate);
uint256 checkedSupply = safeAdd(totalSupply, tokens);
if (tokenCreationCap... | 1 |
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 calculateIdeaSell(uint256 _ideas) public view returns(uint256){
return calculateTrade(_ideas,marketIdeas,address(this).balance);
} | 0 |
function transferAdminship(address _newAdmin) onlyAdmin public {
require(_newAdmin != address(0));
admin = _newAdmin;
TransferAdminship(admin);
} | 1 |
function relaxFundingCap(uint _newCap, uint _weiRaised) public constant returns (uint);
}
contract FixedCeiling is CeilingStrategy {
using SafeMath for uint;
uint public chunkedWeiMultiple;
uint public weiLimitPerAddress;
function FixedCeiling(uint multiple, uint limit) {
chunkedWeiMultiple = multiple;
weiLimitPe... | 0 |
constructor() public {
owner = msg.sender;
emit OwnerChanged(address(0), owner);
} | 0 |
function burnFrom(address from, uint256 value) public {
_burnFrom(from, value);
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, bytes32 _value) returns (bool success);
function approve(address _spender, uint256 _value) returns (bool success);
function approve(address _spender, bytes32 _value) returns (bo... | 0 |
function get_times() public view returns (uint block_start, uint block_finish, uint block_current){
return (
races[race_number].block_start,
races[race_number].block_finish,
block.number
);
} | 0 |
function signedApproveHash(Data storage , address tokenOwner, address spender, uint tokens, uint fee, uint nonce) public view returns (bytes32 hash) {
hash = keccak256(signedApproveSig, address(this), tokenOwner, spender, tokens, fee, nonce);
} | 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 getBlockTimestamp() returns (uint256) {
return block.timestamp;
} | 1 |
function transfer(address _to, uint256 _value) public returns (bool);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
function allowance(address _owner, address _spender) public view returns (uint256);
... | 0 |
function add(address _owner, uint16 _species, uint8 _subSpecies, uint8 _eyeColor) external onlyCaller {
Creature memory _creature = Creature({
species: _species,
subSpecies: _subSpecies,
eyeColor: _eyeColor,
timestamp: uint64(now)
});
uint256 newCreatureID = creatures.push(_creature) - 1;
transfer(0, _owner, ne... | 1 |
function finishMinting() onlyOwner public returns (bool) {
require(!mintingFinished);
mintingFinished = true;
MintFinished();
return true;
} | 0 |
function setOwner(address newOwner) ownerOnly {
owner = newOwner;
} | 0 |
function createReserveTokensVault() external onlyOwner {
require(reserveTokensVault == address(0));
uint256 reserveTokens = 210000000;
reserveTokensVault = createTokenVaultInt(reserveTokens);
require(totalSupply_ <= HARD_CAP);
} | 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 Crowdsale {
using SafeMath for uint256;
ERC20 public token;
address... | 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 transferOwnership(address _newOwner) public;
function acceptOwnership() public;
}
contract Owned is IOwned {
address public owner;
address public newOwner;
event OwnerUpdate(address _prevOwner, address _newOwner);
function Owned() {
owner = msg.sender;
} | 0 |
function revoke(IERC20 token) public onlyOwner {
require(_revocable);
require(!_revoked[address(token)]);
uint256 balance = token.balanceOf(address(this));
uint256 unreleased = _releasableAmount(token);
uint256 refund = balance.sub(unreleased);
_revoked[address(token)] = true;
token.safeTransfer(owner(), refund)... | 0 |
function transferFrom(address currency, address from, address to, uint256 amount) multisig(sha3(msg.data)) spendControlTargeted(currency, to, amount) onlyWithOversight {
Token(currency).transferFrom(from, to, amount);
PerformedTransferFrom(from, to, amount);
} | 0 |
function finalize(uint proposalId) public {
Proposal storage proposal = proposals[proposalId];
require(proposal.result == Result.Pending, "Governance::finalize: Proposal is already finalized");
uint _time = time();
if (proposal.yesCount > proposal.noCount) {
require(_time > proposal.startTime.add(TOTAL_VOTE_PERIOD... | 0 |
function getTime() internal returns (uint) {
return now;
} | 1 |
function mintLockedToken(address addr, uint256 tokens, uint256 _duration) public {
require(msg.sender == owner, "Lockable: only owner can lock token ");
require(_totalSupply.add(totalLocked()).add(tokens) <= cap(), "Lockable: locked tokens can not exceed total cap.");
require(_lock_list[addr] == false, "Lockable: th... | 0 |
function transferToken(ContractToken _tokenContract, address _transferTo, uint256 _value) onlyOwner external {
_tokenContract.transfer(_transferTo, _value);
} | 0 |
function play() payable {
assert(msg.value == TICKET_AMOUNT);
pot += msg.value;
var random = uint(block.blockhash(block.number)) + block.timestamp + block.difficulty + block.number;
if (mulmod(random, 1, 2) == 0) {
bank.transfer(FEE_AMOUNT);
msg.sender.transfer(pot - FEE_AMOUNT);
pot = 0;
}
} | 1 |
function SATCoin() public
{
owner = msg.sender;
balances[owner] = 350000000 * 10 **8;
balances[address(this)] = 650000000 *10**8;
stage = Stages.NOTSTARTED;
Transfer(0, owner, balances[owner]);
Transfer(0, owner, balances[address(this)]);
} | 0 |
function setMasterKey(address addr) onlyOwnerUnlocked {
assert(!masterKeys[addr]);
activateMasterKey(addr);
masterKeys[addr] = true;
SetMasterKey(msg.sender);
} | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
constructor(IERC20 _token) public {
require(address(_token) != address(0x0), "Matic token address is not valid");
maticToken = _token;
uint256 SCALING_FACTOR = 10 ** 18;
uint256 day = 1 minutes;
day = day.div(15);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 0, 3230085552 * SCALING_FACTOR);
addVe... | 0 |
function rest() returns (bool success){
require(balanceOf[msg.sender] >= 5000);
balanceOf[this] += 5000;
balanceOf[msg.sender] -= 5000;
restFinish[msg.sender] = block.timestamp + 3 days;
return true;
} | 1 |
function signedApproveAndCallCheck(address tokenOwner, address spender, uint tokens, bytes _data, uint fee, uint nonce, bytes sig, address feeAccount) public view returns (CheckResult result) {
return data.signedApproveAndCallCheck(tokenOwner, spender, tokens, _data, fee, nonce, sig, feeAccount);
} | 0 |
function approveAndCall(address _spender, uint256 _amount, bytes _extraData) returns (bool success) {
assert(allowTransactions);
assert(!frozenAccount[msg.sender]);
allowance[msg.sender][_spender] = _amount;
activateAccount(msg.sender);
activateAccount(_spender);
activateAllowanceRecord(msg.sender, _spender);
To... | 0 |
function _addEntry(bytes32 dataHash)
entryExists(msg.sender, dataHash, false)
internal
{
users.insert(msg.sender);
accounts[msg.sender].entries.insert(dataHash);
accounts[msg.sender].values[dataHash] = Entry(now, msg.value);
} | 1 |
function privateSaleUnlock(address _to, uint _time) onlyOwner public
{
require(saleTime == false);
require( _time < privateSaleLockTime);
uint nowTime = now;
require( nowTime > privateLockTimer[_time] );
uint tokens = privateLockWallet[_to][_time];
require(tokens > 0);
balances[_to] = balances[_to].add(tokens);... | 0 |
constructor(uint256 _openingTime, uint256 _closingTime) public {
require(_openingTime >= block.timestamp);
require(_closingTime >= _openingTime);
openingTime = _openingTime;
closingTime = _closingTime;
} | 0 |
function yes(address _address, uint _votes) public onlyOwner {
require(inProgress());
require(lastVoting[_address] < currentVoting);
require(_votes > 0);
lastVoting[_address] = currentVoting;
votes[_address] = int(_votes);
votesYes = safeAdd(votesYes, _votes);
emit Vote(_address, int(_votes));
} | 0 |
function currTime() constant returns (uint) {
if (testing) {
return fakeTime;
} else {
return block.timestamp;
}
} | 1 |
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 (uint256);
function transferFrom(address from, address to, uint256 valu... | 0 |
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
function approve(address _spe... | 0 |
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
} | 0 |
function transfer(address to, uint value, bytes data) public returns (bool);
event Transfer(address indexed from, address indexed to, uint value, bytes data);
}
contract SuccessfulERC223Receiver is ERC223Receiver {
event Invoked(address from, uint value, bytes data);
function tokenFallback(address _from, uint _value... | 0 |
function transfer(address _to, uint256 _value) public onlyPayloadSize(2*32) returns (bool success) {
require(vestedBalanceOf(msg.sender) >= _value);
balances[msg.sender] -= _value;
balances[_to] += _value;
if ((msg.sender == bounty.addr) && (now < vestingBounty)) {
balancesEndIcoFreeze[_to] += _value;
}
if ((msg... | 0 |
function _remoteTransferFrom (address from, address to, uint256 value) internal returns (bool) {
return _remoteToken.transferFrom(from, to, value);
} | 0 |
constructor(string _VERSION) public {
VERSION = _VERSION;
} | 0 |
constructor() public {
pause();
} | 0 |
function getRandom(uint _seed) constant public returns(uint) {
return uint(keccak256(block.timestamp, block.difficulty)) ^ _seed;
} | 1 |
function EndtimesCrowdsale() public {
token = createTokenContract();
} | 0 |
modifier multisig (bytes32 hash) {
assert(trustAddress != address(0x0));
address current = Trust(trustAddress).functionCalls(hash);
uint8 code = Trust(trustAddress).authCall(msg.sender, hash);
if (code == 0) Unauthorized(msg.sender);
else if (code == 1) AuthInit(msg.sender);
else if (code == 2) {
AuthComplete(cu... | 0 |
function doSafeSend(address toAddr, uint amount) internal {
doSafeSendWData(toAddr, "", amount);
} | 0 |
function pingTimestamp() returns (uint) {
return block.timestamp;
} | 0 |
function unlockAccount(address tokenOwner) public {
data.unlockAccount(tokenOwner);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.