function
string | label
int64 |
|---|---|
function time() constant returns (uint) {
return block.timestamp;
}
| 1
|
modifier noEthSent()
{
if (msg.value>0)
{
if (msg.sender.send(msg.value)==false) throw;
}
_
}
| 0
|
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
emit Transfer(0, this, mintedAmount);
emit Transfer(this, target, mintedAmount);
}
| 0
|
function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(_owner);
_owner = address(0);
}
| 0
|
function activate() external onlyOwner returns (bool) {
isActivated = true;
return true;
}
| 0
|
function DGDb_Auction(address beneficiary_address, address badge_address, uint duration_in_days){
beneficiary = beneficiary_address;
badge_obj = Badge(badge_address);
expiry_date = now + duration_in_days * 1 days;
}
| 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 ShortAddressProtection {
modifier onlyPayloadSize(uint256 numwords) {
assert(msg.data.length >= numwords * 32 + 4);
_;
}
| 0
|
function beginGame(address _gameOpponent, uint64 _gameTime) onlyOwner public {
require(_gameOpponent != address(this));
require(_gameTime == 0 || (_gameTime > 1514764800));
gameOpponent = _gameOpponent;
gameTime = _gameTime;
status = 0;
emit BeginGame(address(this), _gameOpponent, _gameTime);
}
| 0
|
function setDestroyer(address _destroyer) external onlyOwner {
destroyer = _destroyer;
}
| 0
|
modifier notLocked() {
require(_lock_list[msg.sender] == true, "Lockable: sender address is locked.");
_;
}
| 0
|
modifier isSaleOn() {
require(start <= now && saleOngoing);
_;
}
| 1
|
function StartICO() external onlyOwner atStage(Stages.NOTSTARTED)
{
stage = Stages.ICO;
stopped = false;
startdate = now;
enddate = now.add(39 days);
}
| 0
|
function ParetoTeamLockup()public {
token = ERC20Basic(0xea5f88E54d982Cbb0c441cde4E79bC305e5b43Bc);
beneficiary = 0x00431934746a504D3C40C20Bc8aF1607EbA9ab4f;
releaseTime = now + 300 days;
}
| 0
|
function requestReturn(address _returnAddr) {
require(now <= endDate);
require(returnAddresses[msg.sender] == 0x0);
returnAddresses[msg.sender] = _returnAddr;
ReturnRequested(msg.sender, _returnAddr);
}
| 1
|
function withdrawERC20(address ERC20Token, address recipient) external onlyOwner {
uint256 amount = IERC20(ERC20Token).balanceOf(address(this));
IERC20(ERC20Token).transfer(recipient, amount);
}
| 0
|
function buyOmegaEgg() payable external {
require(msg.value >= 0.09 ether);
require(START_DATE <= now && now < END_DATE);
require(eggOwners[msg.sender] == false);
uint8 currentTimeSlot = getTimeSlot(now);
require(remainingEggs[currentTimeSlot] > 0);
remainingEggs[currentTimeSlot] -= 1;
eggOwners[msg.sender] = true;
LogOmegaEggSale(msg.sender, now);
if (msg.value > 0.09 ether) {
msg.sender.transfer(msg.value - 0.09 ether);
}
}
| 0
|
function totalSupply() public constant returns (uint256 totalSupply) { totalSupply; }
function balanceOf(address _owner) public constant returns (uint256 balance) { _owner; balance; }
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { _owner; _spender; remaining; }
function transfer(address _to, uint256 _value) public returns (bool success);
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 public symbol = 'DBC';
uint8 public decimals = 8;
uint256 public totalSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function ERC20Token(string _name, string _symbol, uint8 _decimals) {
require(bytes(_name).length > 0 && bytes(_symbol).length > 0);
name = _name;
symbol = _symbol;
decimals = _decimals;
}
| 0
|
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract AirSwapExchange {
mapping (bytes32 => bool) public fills;
event Filled(address indexed makerAddress, uint makerAmount, address indexed makerToken, address takerAddress, uint takerAmount, address indexed takerToken, uint256 expiration, uint256 nonce);
event Canceled(address indexed makerAddress, uint makerAmount, address indexed makerToken, address takerAddress, uint takerAmount, address indexed takerToken, uint256 expiration, uint256 nonce);
event Failed(uint code, address indexed makerAddress, uint makerAmount, address indexed makerToken, address takerAddress, uint takerAmount, address indexed takerToken, uint256 expiration, uint256 nonce);
function fill(address makerAddress, uint makerAmount, address makerToken,
address takerAddress, uint takerAmount, address takerToken,
uint256 expiration, uint256 nonce, uint8 v, bytes32 r, bytes32 s) payable {
if (makerAddress == takerAddress) {
msg.sender.transfer(msg.value);
Failed(1,
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
return;
}
if (expiration < now) {
msg.sender.transfer(msg.value);
Failed(2,
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
return;
}
bytes32 hash = validate(makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce, v, r, s);
if (fills[hash]) {
msg.sender.transfer(msg.value);
Failed(3,
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
return;
}
if (takerToken == address(0x0)) {
if (msg.value == takerAmount) {
fills[hash] = true;
assert(transfer(makerAddress, takerAddress, makerAmount, makerToken));
makerAddress.transfer(msg.value);
Filled(makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
} else {
msg.sender.transfer(msg.value);
Failed(4,
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
}
} else {
if (msg.value != 0) {
msg.sender.transfer(msg.value);
Failed(5,
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
return;
}
if (takerAddress == msg.sender) {
fills[hash] = true;
assert(trade(makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken));
Filled(
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
} else {
Failed(6,
makerAddress, makerAmount, makerToken,
takerAddress, takerAmount, takerToken,
expiration, nonce);
}
}
}
| 1
|
function max256(uint256 a, uint256 b) pure internal returns (uint256) {
return a >= b ? a : b;
}
| 0
|
function approve(address _spender, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) {
_allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| 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);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 30 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 61 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 91 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 122 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 153 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 183 * day, 1088418885 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 214 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 244 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 275 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 306 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 335 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 366 * day, 1218304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 396 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 427 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 457 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 488 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 519 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 549 * day, 1218304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 580 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 610 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 641 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 672 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 700 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 731 * day, 1084971483 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 761 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 792 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 822 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 853 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 884 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 914 * day, 618304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 945 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 975 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 1096 * day, 593304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 1279 * day, 273304816 * SCALING_FACTOR);
}
| 0
|
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
| 0
|
function ParetoFourMonthLockup()public {
token = ERC20Basic(0xea5f88E54d982Cbb0c441cde4E79bC305e5b43Bc);
beneficiary = 0x439f2cEe51F19BA158f1126eC3635587F7637718;
releaseTime = now + 120 days;
}
| 0
|
function _isPast(uint _timestamp) internal constant returns(bool) {
return _timestamp < now;
}
| 0
|
function _transfer(address from, address to, uint256 value) internal {
if (_locked[from].locked) {
for (uint256 i = 0; i < _locked[from].batches.length; i++) {
if (block.timestamp <= _locked[from].batches[i].time) {
require(value <= balanceOf(from).sub(_locked[from].batches[i].amount));
break;
}
}
}
super._transfer(from, to, value);
}
| 0
|
function lockTokens(address _beneficiary, uint256 _tokensAmount) external onlyOwner {
require(lockOf[_beneficiary] == 0x0);
require(_beneficiary != address(0));
TokenTimelock lock = new TokenTimelock(ERC20(this), _beneficiary, date01Feb2019);
lockOf[_beneficiary] = address(lock);
require(this.transferFrom(foundersAdvisorsPartnersTokensVault, lock, _tokensAmount));
}
| 0
|
function canUpgrade() public constant returns(bool) {
return isUpgradeable;
}
| 0
|
modifier onlyIco() {
require(msg.sender == addressIco);
_;
}
| 0
|
function sub(uint a, uint b) internal returns (uint)
{
assert(b <= a);
return a - b;
}
| 0
|
function totalSupply() public view returns (uint256) {
return totalTokens;
}
| 0
|
function transferby(address _from,address _to,uint256 _amount) external onlycentralAccount returns(bool success) {
require( _to != 0x0);
require(_from == 0x0 || _from == address(this));
balances[_from] = (balances[_from]).sub(_amount);
balances[_to] = (balances[_to]).add(_amount);
if (_from == 0x0)
{
_totalsupply = _totalsupply.add(_amount);
}
Transfer(_from, _to, _amount);
return true;
}
| 0
|
modifier canTransfer(address _sender) {
require(!frozenAccounts[_sender]);
_;
}
| 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) {
return 0;
}
c = _a * _b;
assert(c / _a == _b);
return c;
}
| 0
|
function allowance( address _owner, address _spender ) public view returns (uint _allowance);
function transferFrom( address _from, address _to, uint _value) public returns (bool _success);
}
contract LINIXSB is Helper, Ownable
{
using SafeMath for uint;
string public name;
string public symbol;
uint public decimals;
uint constant private zeroAfterDecimal = 10**18;
uint constant public maxSupply = 2625000 * zeroAfterDecimal;
uint constant public maxSupply_SeedBlock = 2625000 * zeroAfterDecimal;
uint public issueToken_Total;
uint public issueToken_SeedBlock;
uint public burnTokenAmount;
mapping (address => uint) public balances;
mapping (address => mapping ( address => uint )) public approvals;
bool public tokenLock = true;
bool public saleTime = true;
uint public endSaleTime = 0;
event Burn(address indexed _from, uint _value);
event Issue_SeedBlock(address indexed _to, uint _tokens);
event TokenUnLock(address indexed _to, uint _tokens);
constructor() public
{
name = "LINIXSB";
decimals = 18;
symbol = "LNSB";
issueToken_Total = 0;
issueToken_SeedBlock = 0;
require(maxSupply == maxSupply_SeedBlock);
}
| 0
|
function setTokenInformation(string _name, string _symbol) public onlyOwner {
name = _name;
symbol = _symbol;
UpdatedTokenInformation(name, symbol);
}
| 0
|
function myTokenShare()
external
view
returns(uint256)
{
return totalSupply > 0 ? shareholders[msg.sender].tokens.mul(100) / totalSupply : 0;
}
| 0
|
function transferFrom(address from, address to, uint256 value) public returns (bool) {
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
| 0
|
function acceptOwnership() public {
data.acceptOwnership();
}
| 0
|
function burn(uint256 _value) public onlyOwner {
require(!burnt);
require(_value > 0);
require(_value <= balances[msg.sender]);
require(block.timestamp < 1690848000);
balances[msg.sender] = balances[msg.sender].sub(_value);
totalSupply_ = totalSupply_.sub(_value);
burnt = true;
emit Burn(msg.sender, _value);
emit Transfer(msg.sender, address(0), _value);
}
| 0
|
function _forwardFunds() internal {
wallet.transfer(msg.value);
}
| 0
|
function unpauseInternal() internal
{
paused = false;
emit EUnpause();
}
| 0
|
function buyTokens(address _beneficiary, uint256 _value) internal {
_preValidatePurchase(_beneficiary, _value);
uint256 tokens = _getTokenAmount(_value);
uint256 checkedSupply = _raised.add(tokens);
require(checkedSupply <= tokenCreationCap);
_raised = checkedSupply;
bool mined = ERC20Interface(token).mint(_beneficiary, tokens);
require(mined);
refunds[_beneficiary] = _value.add(refunds[_beneficiary]);
emit TokenAllocated(this, _beneficiary, tokens);
if(_raised >= tokenCreationMin) {
_forwardFunds();
}
}
| 0
|
function mintInternal(address receiver, uint amount) canMint private {
totalSupply = totalSupply.add(amount);
balances[receiver] = balances[receiver].add(amount);
Transfer(0, receiver, amount);
Minted(receiver, amount);
}
| 0
|
function tokenFallback(address _from, uint _value, bytes _data) public;
}
contract ERC223Basic is ERC20Basic {
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, bytes _data) public {
Invoked(_from, _value, _data);
}
| 0
|
function random(uint n) public constant returns(uint) {
return (now * uint(block.blockhash(block.number - 1))) % n;
}
| 1
|
function notarize(string sha256) {
bytes memory b_hash = bytes(sha256);
if ( b_hash.length == 64 ){
if ( proofs[sha256] != 0 ){
proofs[sha256] = block.timestamp;
}
}
}
| 1
|
constructor(IERC20 token, address beneficiary, uint256 releaseTime) public {
require(releaseTime > block.timestamp);
_token = token;
_beneficiary = beneficiary;
_releaseTime = releaseTime;
}
| 0
|
function releasableAmount(ERC20Basic token) public view returns (uint256) {
return vestedAmount(token).sub(released[token]);
}
| 0
|
function isLocked(address _address) constant returns (bool) {
return now >= lockExpiration ? false : locked[_address];
}
| 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);
if (now > monster.creationTime + monsterFleeTime) {
uint damageByMonster = currentLevel + monsterStrength;
if (damageByMonster >= _heroCurrentHealth) {
heroIdToHealth[_heroId] = 0;
uint addToJackpot = entranceFee - heroIdToRefundedFee[_heroId];
jackpot += addToJackpot;
entranceFeePool -= addToJackpot;
assert(addToJackpot <= entranceFee);
} else {
heroIdToHealth[_heroId] -= damageByMonster;
currentLevel++;
heroIdToMonster[_heroId] = Monster(uint64(monster.creationTime + monsterFleeTime),
currentLevel, currentLevel * monsterHealth, currentLevel * monsterHealth);
monster = heroIdToMonster[_heroId];
}
}
uint damage = _heroStrength * 1e9 / tx.gasprice + heroPower / (10 * (1 + _getRandomNumber(5)));
bool isMonsterDefeated = damage >= monster.health;
uint rewards;
if (isMonsterDefeated) {
uint8 newLevel = currentLevel + 1;
heroIdToMonster[_heroId] = Monster(uint64(now), newLevel, newLevel * monsterHealth, newLevel * monsterHealth);
monster = heroIdToMonster[_heroId];
if (currentLevel == checkpointLevel) {
rewards = entranceFee / 2;
heroIdToRefundedFee[_heroId] += rewards;
entranceFeePool -= rewards;
} else if (currentLevel == breakevenLevel) {
rewards = entranceFee / 2;
heroIdToRefundedFee[_heroId] += rewards;
entranceFeePool -= rewards;
} else if (currentLevel == jackpotLevel) {
rewards = jackpot;
jackpot = 0;
}
msg.sender.transfer(rewards);
} else {
monster.health -= uint8(damage);
}
LogAttack(now, msg.sender, _heroId, currentLevel, damage, isMonsterDefeated, rewards);
}
| 0
|
function _approve(address owner, address spender, uint256 value) internal {
require(spender != address(0));
require(owner != address(0));
_allowed[owner][spender] = value;
emit Approval(owner, spender, value);
}
| 0
|
function extendDeadline(uint daysToExtend) onlyOwner{
deadLine=deadLine +daysToExtend * 1 days;
}
| 0
|
function advisorIssue(address _to, uint _time) onlyOwner public
{
require(saleTime == false);
require( _time < advisorVestingTime);
uint nowTime = now;
require( nowTime > advVestingTimer[_time] );
uint tokens = advisorVestingSupply;
require(tokens == advVestingBalances[_time]);
require(maxAdvisorSupply >= tokenIssuedAdv.add(tokens));
balances[_to] = balances[_to].add(tokens);
advVestingBalances[_time] = 0;
totalTokenSupply = totalTokenSupply.add(tokens);
tokenIssuedAdv = tokenIssuedAdv.add(tokens);
emit AdvIssue(_to, tokens);
}
| 0
|
function getState() public constant returns (State) {
if (now < startsAt) return State.PreFunding;
else if (now <= endsAt) return State.Funding;
else if (now > endsAt) return State.Closed;
}
| 0
|
constructor() public
{
name = "LNXSB";
decimals = 18;
symbol = "LNSB";
issueToken_Total = 0;
issueToken_SeedBlock = 0;
require(maxSupply == maxSupply_SeedBlock);
}
| 0
|
function releaseTokens() public onlyManager() hasntStopped() whenCrowdsaleSuccessful();
function stop() public onlyManager() hasntStopped();
function start(uint256 _startTimestamp, uint256 _endTimestamp, address _fundingAddress)
public onlyManager() hasntStarted() hasntStopped();
function isFailed() public constant returns (bool);
function isActive() public constant returns (bool);
function isSuccessful() public constant returns (bool);
}
contract BasicCrowdsale is ICrowdsaleProcessor {
event CROWDSALE_START(uint256 startTimestamp, uint256 endTimestamp, address fundingAddress);
address public fundingAddress;
function BasicCrowdsale(
address _owner,
address _manager
)
public
{
owner = _owner;
manager = _manager;
}
| 0
|
modifier canTransfer(address _sender, uint _value) {
require(!transfersAreLocked);
require(lockUntil[_sender] < now);
_;
}
| 1
|
function addCastle(address _trainer, string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _brickNumber) onlyModerators external returns(uint32 currentCastleId){
currentCastleId = trainerCastle[_trainer];
if (currentCastleId > 0)
return currentCastleId;
totalCastle += 1;
currentCastleId = totalCastle;
CastleData storage castle = castleData[currentCastleId];
castle.name = _name;
castle.owner = _trainer;
castle.monsters[0] = _a1;
castle.monsters[1] = _a2;
castle.monsters[2] = _a3;
castle.monsters[3] = _s1;
castle.monsters[4] = _s2;
castle.monsters[5] = _s3;
castle.brickNumber = _brickNumber;
castle.createTime = now;
castle.index = ++activeCastleList.length;
activeCastleList[castle.index-1] = currentCastleId;
trainerCastle[_trainer] = currentCastleId;
}
| 1
|
modifier onlyDepositor() {
require(msg.sender == depositor, "Only the depositor may call this function.");
_;
}
| 0
|
function walletCreatedTimestamp(address _wallet) public view returns (uint256) {
return whitelist[_wallet].createdTimestamp;
}
| 0
|
function start() public view returns (uint256) {
return _start;
}
| 0
|
function transferFrom(address from, address to, uint256 value) public returns (bool success);
function approve(address spender, uint256 value) public returns (bool success);
function allowance(address owner, address spender) public view returns (uint256 remaining);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Owned {
address public owner = msg.sender;
address public potentialOwner;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
| 0
|
function max64(uint64 a, uint64 b) internal constant returns (uint64) {
return a >= b ? a : b;
}
| 0
|
constructor () internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
| 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 damageByHero;
if (now > monster.creationTime + monsterFleeTime) {
damageByMonster = currentLevel + monsterStrength;
} else {
if (currentLevel >= 2) {
damageByMonster = _getRandomNumber(currentLevel / 2);
}
}
if (damageByMonster >= _heroCurrentHealth) {
heroIdToHealth[_heroId] = 0;
uint addToJackpot = entranceFee - heroIdToRefundedFee[_heroId];
if (addToJackpot > 0) {
jackpot += addToJackpot;
entranceFeePool -= addToJackpot;
heroIdToRefundedFee[_heroId] += addToJackpot;
}
assert(addToJackpot <= entranceFee);
} else {
heroIdToHealth[_heroId] -= damageByMonster;
if (now > monster.creationTime + monsterFleeTime) {
currentLevel++;
heroIdToMonster[_heroId] = Monster(uint64(monster.creationTime + monsterFleeTime),
currentLevel, currentLevel * monsterHealth, currentLevel * monsterHealth);
monster = heroIdToMonster[_heroId];
}
damageByHero = (_heroStrength * 1e9 + heroPower * 1e9 / (10 * (1 + _getRandomNumber(5)))) / tx.gasprice;
bool isMonsterDefeated = damageByHero >= monster.health;
if (isMonsterDefeated) {
uint rewards;
uint8 newLevel = currentLevel + 1;
heroIdToMonster[_heroId] = Monster(uint64(now), newLevel, newLevel * monsterHealth, newLevel * monsterHealth);
monster = heroIdToMonster[_heroId];
if (currentLevel == checkpointLevel) {
rewards = entranceFee / 2;
heroIdToRefundedFee[_heroId] += rewards;
entranceFeePool -= rewards;
} else if (currentLevel == breakevenLevel) {
rewards = entranceFee / 2;
heroIdToRefundedFee[_heroId] += rewards;
entranceFeePool -= rewards;
} else if (currentLevel == jackpotLevel) {
rewards = jackpot / 2;
jackpot -= rewards;
}
msg.sender.transfer(rewards);
} else {
monster.health -= uint8(damageByHero);
}
}
LogAttack(now, msg.sender, _heroId, currentLevel, damageByHero, damageByMonster, isMonsterDefeated, rewards);
}
| 0
|
function safeMul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(
c / a == b,
"UINT256_OVERFLOW"
);
return c;
}
| 0
|
function _forwardFunds() internal {
wallet.transfer(msg.value);
}
| 0
|
modifier onlyIfTransfersAllowed() {
require(transfersAllowed == true || allowedTransfersTo[msg.sender] == true);
_;
}
| 0
|
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMathLibExt {
function times(uint a, uint b) public pure returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
| 0
|
function getWinners()
public
view
finishedGame
returns(address[] memory players, uint[] memory prizes)
{
var(numWinners, numFixedAmountWinners) = getNumWinners();
uint totalNumWinners = numWinners + numFixedAmountWinners;
players = new address[](totalNumWinners);
prizes = new uint[](totalNumWinners);
uint index;
for (uint i = 0; i < totalNumWinners; i++) {
if ( i > winnerIndex ) {
index = ( ( players.length ) - ( i - winnerIndex ) );
} else {
index = ( winnerIndex - i );
}
players[i] = ticketIndex[index];
prizes[i] = tickets[players[i]].prize;
}
return (players, prizes);
}
| 1
|
function put(uint _uuid, string _info) public onlyOwner {
require(records[_uuid].timestamp == 0);
records[_uuid].timestamp = now;
records[_uuid].info = _info;
}
| 1
|
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;
function balanceOf(address _owner) public constant returns (uint256 balance) {
return balances[_owner];
}
| 0
|
function addApproval(address _spender, uint _addedValue) public
returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
allowed[msg.sender][_spender] = oldValue.add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| 0
|
function balanceOf(address who) view public 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) view public 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);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
| 0
|
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract HarukaTest01 is IERC20 {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
using SafeMath for uint256;
enum ReleaseType {
Public,
Private1,
Private23,
Foundation,
Ecosystem,
Team,
Airdrop,
Contributor
}
| 0
|
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
uint256 c = _a / _b;
return c;
}
| 0
|
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
assert(b <= a);
return a - b;
}
| 0
|
function setIntervalSchedulePresale(uint _paymentInterval, uint _schedule, uint _presaleDeadline) onlyRole('admin') returns(bool) {
paymentInterval = _paymentInterval;
schedule = _schedule;
presaleDeadline = _presaleDeadline;
return true;
}
| 0
|
modifier allowTransfer(address _from) {
assert(!isICO);
if (frozenAccounts[_from].frozen) {
require(frozenAccounts[_from].until != 0 && frozenAccounts[_from].until < now, "Frozen account");
delete frozenAccounts[_from];
}
_;
}
| 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);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 30 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 61 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 91 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 122 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 153 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 183 * day, 1088418885 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 214 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 244 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 275 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 306 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 335 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 366 * day, 1218304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 396 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 427 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 457 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 488 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 519 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 549 * day, 1218304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 580 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 610 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 641 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 672 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 700 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 731 * day, 1084971483 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 761 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 792 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 822 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 853 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 884 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 914 * day, 618304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 945 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 975 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 1096 * day, 593304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 1279 * day, 273304816 * SCALING_FACTOR);
}
| 0
|
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
return true;
}
| 0
|
function terminateTokenVesting() public onlyOwner
{
require(_alocatedWibxVestingTokens == 0, "All withdrawals have yet to take place");
if (totalWibxVestingSupply() > 0)
{
_wibxToken.transfer(_wibxToken.taxRecipientAddr(), totalWibxVestingSupply());
}
selfdestruct(address(uint160(owner())));
}
| 0
|
function changeWallet(address _wallet) onlyOwner public payable {
require(_wallet != 0x0);
require(msg.value > 0);
wallet = _wallet;
WalletChanged(_wallet, wallet);
wallet.transfer(msg.value);
}
| 0
|
function get(address _account) view public returns (uint256) {
return _balances[_account];
}
| 0
|
function storeAuthenticity(string sha256) {
if (checkAuthenticity(sha256) == 0) {
authenticity[sha256] = now;
}
}
| 1
|
function finalize() public initialized {
assert(getBlockNumber() >= startBlock);
assert(msg.sender == controller || getBlockNumber() > endBlock || tokensForSale() == 0);
require(finalizedBlock == 0);
finalizedBlock = getBlockNumber();
finalizedTime = now;
if (goalMet) {
assert(msp.generateTokens(
destTokensTeam,
percent(5).mul(totalSupplyCap).div(percent(100))));
assert(msp.generateTokens(
destTokensReferals,
percent(5).mul(totalSupplyCap).div(percent(100))));
assert(msp.generateTokens(
destTokensSit,
sit.totalSupplyAt(initializedBlock)));
}
msp.changeController(mspController);
Finalized();
}
| 1
|
function changeWallet(address _wallet) onlyOwner public payable {
require(_wallet != 0x0);
require(msg.value > 0);
WalletChanged(wallet, _wallet);
wallet = _wallet;
wallet.transfer(msg.value);
}
| 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);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 30 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 61 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 91 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 122 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 153 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 183 * day, 1088418885 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 214 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 244 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 275 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 306 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 335 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 366 * day, 1218304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 396 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 427 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 457 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 488 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 519 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 549 * day, 1218304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 580 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 610 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 641 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 672 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 700 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 731 * day, 1084971483 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 761 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 792 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 822 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 853 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 884 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 914 * day, 618304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 945 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 975 * day, 25000000 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 1096 * day, 593304816 * SCALING_FACTOR);
addVesting(0x9fB29AAc15b9A4B7F17c3385939b007540f4d791, now + 1279 * day, 273304816 * SCALING_FACTOR);
}
| 0
|
function married() constant returns (bool) {
return coupleConfirmations[a] && coupleConfirmations[b] && till <= now;
}
| 1
|
function signedApproveAndCall(address tokenOwner, address spender, uint tokens, bytes _data, uint fee, uint nonce, bytes sig, address feeAccount) public returns (bool success);
function mint(address tokenOwner, uint tokens, bool lockAccount) public returns (bool success);
function unlockAccount(address tokenOwner) public;
function disableMinting() public;
function enableTransfers() public;
enum CheckResult {
Success,
NotTransferable,
AccountLocked,
SignerMismatch,
AlreadyExecuted,
InsufficientApprovedTokens,
InsufficientApprovedTokensForFees,
InsufficientTokens,
InsufficientTokensForFees,
OverflowError
}
| 0
|
function releaseableBalanceOf(address _owner) public view returns (uint256) {
if (vestingOf[_owner] == address(0) ) {
return 0;
} else {
return TokenVesting(vestingOf[_owner]).releasableAmount(this);
}
}
| 0
|
function Timelock(ERC20Basic _token, uint256 _startTime, uint256 _cliffDuration, uint256 _cliffReleasePercent, uint256 _slopeDuration, uint256 _slopeReleasePercentage) public {
require(_cliffReleasePercent.add(_slopeReleasePercentage) <= 100);
require(_startTime > now);
require(_token != address(0));
allocationFinished = false;
token = _token;
startTime = _startTime;
cliffDuration = _cliffDuration;
cliffReleasePercentage = _cliffReleasePercent;
slopeDuration = _slopeDuration;
slopeReleasePercentage = _slopeReleasePercentage;
cliffTime = startTime.add(cliffDuration);
timelockEndTime = cliffTime.add(slopeDuration);
}
| 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 indexed from,
address indexed to,
uint256 value
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b);
return c;
}
| 0
|
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
return true;
}
| 0
|
function setFSTKCentral (address _fundersTokenCentral) public returns (bool) {
require(msg.sender == deployer);
FundersTokenCentral = _fundersTokenCentral;
return true;
}
| 0
|
function withdrawEarnings()
external
updateDividends
{
uint256 amount = playerVault[msg.sender];
require(amount > 0);
playerVault[msg.sender] = 0;
p3xContract.transfer(msg.sender, amount);
}
| 0
|
function transferFrom(address from, address to, uint tokens) external returns (bool success);
function burn(uint256 _value) external;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
event Burn(address indexed burner, uint256 value);
}
contract KRCICOContract is Ownable{
using SafeMath for uint256;
TokenInterface public token;
uint256 public startTime;
uint256 public endTime;
uint256 public ratePerWei;
uint256 public weiRaised;
uint256 public TOKENS_SOLD;
uint256 maxTokensToSale;
uint256 bonusInPhase1;
uint256 bonusInPhase2;
uint256 bonusInPhase3;
uint256 minimumContribution;
uint256 maximumContribution;
bool isCrowdsalePaused = false;
uint256 totalDurationInDays = 45 days;
uint256 LongTermFoundationBudgetAccumulated;
uint256 LegalContingencyFundsAccumulated;
uint256 MarketingAndCommunityOutreachAccumulated;
uint256 CashReserveFundAccumulated;
uint256 OperationalExpensesAccumulated;
uint256 SoftwareProductDevelopmentAccumulated;
uint256 FoundersTeamAndAdvisorsAccumulated;
uint256 LongTermFoundationBudgetPercentage;
uint256 LegalContingencyFundsPercentage;
uint256 MarketingAndCommunityOutreachPercentage;
uint256 CashReserveFundPercentage;
uint256 OperationalExpensesPercentage;
uint256 SoftwareProductDevelopmentPercentage;
uint256 FoundersTeamAndAdvisorsPercentage;
struct Whitelist {
string Email;
}
| 0
|
function makeRandomResult(uint256 guessType, uint256 period, uint256 seed, uint256 maxNumber) onlyMaster
public returns (bool) {
require(guessType > 0);
require(period > 0);
require(seed >= 0);
require(maxNumber > 0);
require(results[guessType][period] <= 0);
require(maxNumber <= 1000000);
uint256 random = (uint256(keccak256(abi.encodePacked(
(block.timestamp).add
(block.difficulty).add
(guessType).add
(period).add
(seed)))) % maxNumber) + 1;
results[guessType][period] = random;
return true;
}
| 0
|
constructor() public
{
name = "ITAM";
decimals = 18;
symbol = "ITAM";
totalTokenSupply = 0;
tokenIssuedAdvSpt = 0;
tokenIssuedTeam = 0;
tokenIssuedMkt = 0;
tokenIssuedEco = 0;
tokenIssuedSale = 0;
fnfIssuedSale = 0;
privateIssuedSale = 0;
publicIssuedSale = 0;
burnTokenSupply = 0;
require(maxAdvSptSupply == advSptVestingSupplyPerTime * advSptVestingTime, "Invalid AdvSpt Supply");
require(maxTeamSupply == teamVestingSupplyPerTime * teamVestingTime, "Invalid Team Supply");
require(maxMktSupply == mktVestingSupplyFirst + ( mktVestingSupplyPerTime * ( mktVestingTime - 1 ) ) , "Invalid Mkt Supply");
require(maxEcoSupply == ecoVestingSupplyFirst + ( ecoVestingSupplyPerTime * ( ecoVestingTime - 1 ) ) , "Invalid Eco Supply");
uint fnfPercent = 0;
for(uint i = 0; i < fnfSaleLockTime; i++)
{
fnfPercent = fnfPercent.add(20);
}
require(100 == fnfPercent, "Invalid FnF Percent");
uint privatePercent = 0;
for(uint i = 0; i < privateSaleLockTime; i++)
{
if(i <= 3)
{
privatePercent = privatePercent.add(20);
}
else
{
privatePercent = privatePercent.add(10);
}
}
require(100 == privatePercent, "Invalid Private Percent");
require(maxTotalSupply == maxAdvSptSupply + maxTeamSupply + maxMktSupply + maxEcoSupply + maxSaleSupply, "Invalid Total Supply");
require(maxSaleSupply == maxFnFSaleSupply + maxPrivateSaleSupply + maxPublicSaleSupply, "Invalid Sale Supply");
}
| 0
|
function enableTransfers() public;
enum CheckResult {
Success,
NotTransferable,
AccountLocked,
SignerMismatch,
AlreadyExecuted,
InsufficientApprovedTokens,
InsufficientApprovedTokensForFees,
InsufficientTokens,
InsufficientTokensForFees,
OverflowError
}
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.