function string | label int64 |
|---|---|
function min256(uint a, uint b) internal constant returns (uint) {
return a < b ? a : b;
} | 0 |
modifier validAddress(address _address) {
require(_address != 0x0);
_;
} | 0 |
modifier onUnlocked() {
require(now >= lock, "Wallet locked");
_;
} | 0 |
function min(uint256 a, uint256 b) private pure returns (uint256)
{
return a < b ? a : b;
} | 0 |
constructor(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
require(_releaseTime > uint64(block.timestamp));
token = _token;
beneficiary = _beneficiary;
releaseTime = _releaseTime;
} | 0 |
function setDepositAddress(address _depositAddress) onlyOwner {
depositAddress = _depositAddress;
} | 1 |
function addWallet(address _wallet, string _data) public onlyPrivilegedAddresses {
require(_wallet != address(0));
require(!isWhitelisted(_wallet));
whitelist[_wallet].data = _data;
whitelist[_wallet].whitelisted = true;
whitelist[_wallet].createdTimestamp = now;
whitelistLength++;
} | 0 |
function add(uint a, uint b) internal returns (uint)
{
uint c = a + b;
assert(c >= a);
return c;
} | 0 |
function mintTokens(address recipient, uint amount)
returns (bool ok)
{
require(msg.sender == mintMaster);
require(amount > 0);
balances[recipient] = balances[recipient].safeAdd(amount);
totalSupply = totalSupply.safeAdd(amount);
LogMintTokens(recipient, amount, balances[recipient], totalSupply);
Transfer(addre... | 0 |
function isAuthorized(address logger) returns (bool) {
return authorizedLoggers[logger];
} | 1 |
function mintInternal(address receiver, uint amount) internal {
total_supply = total_supply.add(amount);
balances[receiver] = balances[receiver].add(amount);
Minted(receiver, amount);
Transfer(0, receiver, amount);
} | 0 |
function transfer(address _to, uint256 _value) public returns (bool) {
bytes memory empty;
return transfer(_to, _value, empty);
} | 0 |
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
require(b <= a, "SafeMath sub failed");
return a - b;
} | 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 airdrop(address [] _holders,uint256 paySize) external
onlyOwner
{
uint256 count = _holders.length;
assert(paySize.mul(count) <= balanceOf(msg.sender));
for (uint256 i = 0; i < count; i++) {
transfer(_holders [i], paySize);
airdropSupply = airdropSupply.add(paySize);
}
Wasted(owner, airdropSupply, now)... | 1 |
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 freezeTo(address _to, uint _amount, uint64 _until) public {
require(_to != address(0));
require(_amount <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_amount);
bytes32 currentKey = toKey(_to, _until);
freezings[currentKey] = freezings[currentKey].add(_amount);
freezingBalance[... | 0 |
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public;
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Saf... | 0 |
function confirmOwnership()
public
onlyPotentialOwner
{
allowed[investorsAllocation][owner] = 0;
allowed[investorsAllocation][msg.sender] = balanceOf(investorsAllocation);
allowed[teamAllocation][owner] = 0;
allowed[advisorsAllocation][owner] = 0;
allowed[bountyAllocation][owner] = 0;
allowed[liquidityPoolAllo... | 0 |
modifier withGasPriceLimit(uint256 _gasPriceLimit) {
require(tx.gasprice <= _gasPriceLimit, "gas price too high");
_;
} | 0 |
function rand(address _who) returns(bytes2){
return bytes2(keccak256(_who,now));
} | 1 |
function totalSupply() external constant returns (uint256) {
return totalTokens;
} | 0 |
modifier onlyMaster() {
require(msg.sender == upgradeMaster);
_;
} | 0 |
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 tokenExists (uint256 _tokenId) public view returns (bool _exists) {
return memeData[_tokenId].price > 0;
} | 0 |
function myPercentageMiddle() external view returns (uint256) {
return _transferIns[msg.sender].percentageMiddle;
} | 0 |
function getFallback() view public returns (TKN) {
return fallback;
} | 0 |
function balanceOf(address accountAddr) public constant returns (uint256 balance) {
return balances[accountAddr];
} | 0 |
modifier onlyUnlocked() {
uint nowtime = block.timestamp;
uint futuretime = 1550537591;
if(nowtime > futuretime) {
_;
} else {
require(!lockedAddress[msg.sender]);
_;
}
} | 0 |
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
}
contract ERC20Token is ERC20 {
using SafeMath for uint256;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
... | 0 |
function buy() public payable {
require(block.timestamp<pubEnd);
require(msg.value>0);
uint256 tokenAmount = (msg.value * tokenUnit) / tokenPrice ;
transferBuy(msg.sender, tokenAmount);
addrFWD.transfer(msg.value);
} | 0 |
function signedTransferFromCheck(address spender, address from, address to, uint tokens, uint fee, uint nonce, bytes sig, address feeAccount) public view returns (CheckResult result) {
return data.signedTransferFromCheck(address(this), spender, from, to, tokens, fee, nonce, sig, feeAccount);
} | 0 |
function canAddToVault() external view canPoSMint returns(bool) {
return true;
} | 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 claimFreeDragon() public{
require(initialized);
require(hatchery[msg.sender] == 0);
lastHatch[msg.sender] = now;
hatchery[msg.sender] = 300;
} | 0 |
modifier isNotTimeLockedFrom( address _from ) {
require( now >= timelockedAccounts[_from] && now >= timelockedAccounts[msg.sender]);
_;
} | 0 |
constructor(uint256 _openingTime, uint256 _closingTime) public {
require(_openingTime >= block.timestamp);
require(_closingTime >= _openingTime);
openingTime = _openingTime;
closingTime = _closingTime;
} | 0 |
function today() private constant returns (uint) {
return now / 1 days;
} | 1 |
function TokenTimelock(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
require(_releaseTime > uint64(block.timestamp));
token = _token;
beneficiary = _beneficiary;
releaseTime = _releaseTime;
} | 0 |
function setCoinPrice(uint256 newPriceInWei) public returns(uint256 oldPriceInWei){
require(msg.sender==owner);
uint256 _old=coinPriceInWei;
coinPriceInWei=newPriceInWei;
return _old;
} | 0 |
function PreICO(address _token, uint256 _endTime, address _wallet) public {
require(_token != address(0));
require(_wallet != address(0));
require(_endTime > now);
token = Showcoin(_token);
wallet = _wallet;
endTime = _endTime;
} | 0 |
function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
} | 0 |
function signedApprove(Data storage self, address tokenContract, address tokenOwner, address spender, uint tokens, uint fee, uint nonce, bytes sig, address feeAccount) public returns (bool success) {
require(self.transferable);
bytes32 hash = signedApproveHash(self, tokenContract, tokenOwner, spender, tokens, fee, no... | 0 |
function buyTokens(address beneficiary) public whenNotPaused payable {
require(beneficiary != address(0));
require(validPurchase());
uint256 weiAmount = msg.value;
weiRaised = weiRaised.add(weiAmount);
investments[beneficiary] = investments[beneficiary].add(weiAmount);
emit Investment(msg.sender, beneficiary, wei... | 0 |
function updateUpdater(address newUpdater) onlyOwner {
updater = newUpdater;
} | 0 |
function _vestedAmount(address token) private view returns (uint256) {
uint256 currentBalance = tokenReward.balanceOf(address(this));
uint256 totalBalance = currentBalance.add(_released[token]);
if (block.timestamp < _cliff) {
return 0;
} else if (block.timestamp >= _start.add(_duration)) {
return totalBalance;
... | 0 |
function safeMul(uint256 _x, uint256 _y) internal pure returns (uint256) {
uint256 z = _x * _y;
require(_x == 0 || z / _x == _y);
return z;
} | 0 |
function claimOwnerSupply() onlyOwner {
if (now < ownerTokensFreeDay) throw;
if (remainingOwner == 0) throw;
if (!remaindersSet) throw;
balanceOf[owner] = safeAdd(balanceOf[owner], remainingOwner);
remainingOwner = 0;
} | 1 |
modifier whenSaleIsOpen() {
require(now >= startTimestamp && now < endTimestamp);
_;
} | 0 |
function changeStartDate(uint256 startTimeUnixTimestamp) public onlyOwner{
startTime = startTimeUnixTimestamp;
} | 0 |
function getHours() returns (uint){
return (block.timestamp / 60 / 60) % 24;
} | 1 |
function _teamToRelease(address who) internal view returns(uint256) {
uint256 teamStage = now.sub(_startTime).div(365 days);
if (teamStage > 3) teamStage = 3;
uint256 teamTokens = team[who].mul(teamStage).div(3).sub(teamReleased[who]);
return teamTokens;
} | 0 |
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value);
require(token.approve(spender, newAllowance));
} | 0 |
function transferFromTreasury(address to, uint256 amount) multisig(sha3(msg.data)) {
assert(treasuryBalance >= amount);
treasuryBalance -= amount;
balanceOf[to] += amount;
activateAccount(to);
} | 0 |
function ownerRecoverTokens(address _address, uint256 _value) external onlyOwner {
require(_address != address(0));
require(now < endtime );
require(_value <= balances[_address]);
require(balances[_address].sub(_value) >=0);
balances[_address] = balances[_address].sub(_value);
balances[owner] = balances[owner].ad... | 1 |
function remainingTokens() public view returns (uint256) {
return token.allowance(tokenWallet, this);
} | 0 |
function issueTokens(address _to, uint256 _amount) public onlyOwner
{
require(_to != 0x0);
this.transfer(_to, _amount);
} | 0 |
function UpgradeableToken(address master) internal {
setUpgradeMaster(master);
} | 0 |
function claimRefund() notPaused public returns (bool) {
require(!goalReached);
require(hasEnded());
uint contributedAmt = weiContributed[msg.sender];
require(contributedAmt > 0);
weiContributed[msg.sender] = 0;
msg.sender.transfer(contributedAmt);
LogClaimRefund(msg.sender, contributedAmt);
return true;
} | 0 |
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
}
contract ERC20Token is IERC20Token, SafeMath {
string public standard = 'Token 0.1';
string public name = 'DEBIT Coin Token';
string pu... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.