More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 447 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 5876942 | 2369 days ago | IN | 0 ETH | 0.00003037 | ||||
Sell | 5874571 | 2369 days ago | IN | 0 ETH | 0.00012009 | ||||
Buy | 5836958 | 2376 days ago | IN | 0.001 ETH | 0.00016233 | ||||
Buy | 5670750 | 2405 days ago | IN | 0.001 ETH | 0.00133157 | ||||
Buy | 5665060 | 2406 days ago | IN | 0.03 ETH | 0.0004258 | ||||
Withdraw | 5665009 | 2406 days ago | IN | 0 ETH | 0.00015128 | ||||
Sell | 5664990 | 2406 days ago | IN | 0 ETH | 0.00066599 | ||||
Sell | 5664816 | 2406 days ago | IN | 0 ETH | 0.00099394 | ||||
Buy | 5663771 | 2406 days ago | IN | 0.00001 ETH | 0.00145173 | ||||
Buy | 5663769 | 2406 days ago | IN | 0.00001 ETH | 0.00133833 | ||||
Buy | 5663769 | 2406 days ago | IN | 0.00001 ETH | 0.00124581 | ||||
Buy | 5663767 | 2406 days ago | IN | 0.00001 ETH | 0.00130935 | ||||
Withdraw | 5663014 | 2406 days ago | IN | 0 ETH | 0.00027922 | ||||
Sell | 5663003 | 2406 days ago | IN | 0 ETH | 0.00121309 | ||||
Buy | 5662938 | 2406 days ago | IN | 0.001 ETH | 0.00264 | ||||
Buy | 5662914 | 2406 days ago | IN | 0.001 ETH | 0.0092664 | ||||
Buy | 5661735 | 2407 days ago | IN | 0.00055 ETH | 0.00178571 | ||||
Transfer | 5661049 | 2407 days ago | IN | 0.001 ETH | 0.0014626 | ||||
Buy | 5660252 | 2407 days ago | IN | 0.001 ETH | 0.0010296 | ||||
Transfer | 5657777 | 2407 days ago | IN | 0.0001 ETH | 0.00146266 | ||||
Exit | 5657741 | 2407 days ago | IN | 0 ETH | 0.00126503 | ||||
Buy | 5656780 | 2407 days ago | IN | 0.001 ETH | 0.00133848 | ||||
Buy | 5655813 | 2408 days ago | IN | 0.001 ETH | 0.0006006 | ||||
Buy | 5655741 | 2408 days ago | IN | 0.001 ETH | 0.0006075 | ||||
Buy | 5655246 | 2408 days ago | IN | 0.001 ETH | 0.00073101 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
5876942 | 2369 days ago | 0.00080997 ETH | ||||
5874571 | 2369 days ago | 0.00008999 ETH | ||||
5836958 | 2376 days ago | 0.0001 ETH | ||||
5670750 | 2405 days ago | 0.0001 ETH | ||||
5665009 | 2406 days ago | 0.00177224 ETH | ||||
5664990 | 2406 days ago | 0.0001858 ETH | ||||
5664816 | 2406 days ago | 0.00055896 ETH | ||||
5664756 | 2406 days ago | 0.00044954 ETH | ||||
5664756 | 2406 days ago | 0.00004994 ETH | ||||
5664461 | 2406 days ago | 0.0000555 ETH | ||||
5664461 | 2406 days ago | 0.000555 ETH | ||||
5663771 | 2406 days ago | 0.000001 ETH | ||||
5663769 | 2406 days ago | 0.000001 ETH | ||||
5663769 | 2406 days ago | 0.000001 ETH | ||||
5663767 | 2406 days ago | 0.000001 ETH | ||||
5663014 | 2406 days ago | 0.00008336 ETH | ||||
5663003 | 2406 days ago | 0.00000926 ETH | ||||
5662914 | 2406 days ago | 0.0001 ETH | ||||
5661735 | 2407 days ago | 0.000055 ETH | ||||
5661049 | 2407 days ago | 0.0001 ETH | ||||
5660252 | 2407 days ago | 0.0001 ETH | ||||
5657777 | 2407 days ago | 0.00001 ETH | ||||
5657741 | 2407 days ago | 0.00000058 ETH | ||||
5657741 | 2407 days ago | 0.00000006 ETH | ||||
5656780 | 2407 days ago | 0.0001 ETH |
Loading...
Loading
Contract Name:
ProductionUnitToken
Compiler Version
v0.4.20+commit.3155dd80
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-05-20 */ pragma solidity 0.4.20; /* * Team AppX presents - Moon, Inc. | Competitive Ethereum Idle Pyramid * * - You can buy workers with ETH to increase your cookies production. * - You can sell your cookies and claim a proportion of the cookie fund. * - You cannot sell cookies within the first hour of a new production unit launch. * - The selling price of a cookie depends on the Cookie Fund and the total cookies supply, the formula is: * CookiePrice = CookieFund / TotalCookieSupply * Multiplier * * Where Multiplier is a number from 0.5 to 1, which starts with 0.5 after a new production unit started, and reaches maximum value (1) after 5 days. * - You can sell your workers at any time like normal tokens * */ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract ProductionUnitToken { /*================================= = MODIFIERS = =================================*/ /// @dev Only people with tokens modifier onlyBagholders { require(myTokens() > 0); _; } /// @dev Only people with profits modifier onlyStronghands { require(myDividends(true) > 0); _; } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy, uint timestamp, uint256 price ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned, uint timestamp, uint256 price ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = DEPENDENCIES = =====================================*/ // MoonInc contract MoonInc public moonIncContract; /*===================================== = CONFIGURABLES = =====================================*/ string public name = "Production Unit | Moon, Inc."; string public symbol = "ProductionUnit"; uint8 constant public decimals = 18; /// @dev dividends for token purchase uint8 public entryFee_; /// @dev dividends for token transfer uint8 public transferFee_; /// @dev dividends for token selling uint8 public exitFee_; /// @dev 20% of entryFee_ is given to referrer uint8 constant internal refferalFee_ = 20; uint256 public tokenPriceInitial_; // original is 0.0000001 ether uint256 public tokenPriceIncremental_; // original is 0.00000001 ether uint256 constant internal magnitude = 2 ** 64; /// @dev proof of stake (10 tokens) uint256 public stakingRequirement = 10e18; // cookie production multiplier (how many cookies do 1 token make per second) uint256 public cookieProductionMultiplier; // auto start timer uint256 public startTime; // Maximum amount of dev one time pre-mine mapping(address => uint) public ambassadorsMaxPremine; mapping(address => bool) public ambassadorsPremined; mapping(address => address) public ambassadorsPrerequisite; /*================================= = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /// @dev Set the MoonInc contract address to notify when token amount changes function ProductionUnitToken( address _moonIncContractAddress, uint8 _entryFee, uint8 _transferFee, uint8 _exitFee, uint _tokenPriceInitial, uint _tokenPriceIncremental, uint _cookieProductionMultiplier, uint _startTime ) public { moonIncContract = MoonInc(_moonIncContractAddress); entryFee_ = _entryFee; transferFee_ = _transferFee; exitFee_ = _exitFee; tokenPriceInitial_ = _tokenPriceInitial; tokenPriceIncremental_ = _tokenPriceIncremental; cookieProductionMultiplier = _cookieProductionMultiplier; startTime = _startTime; // Set ambassadors' maximum one time pre-mine amount (Total 1.29 ETH pre-mine). uint BETA_DIVISOR = 1000; // TODO: remove this in main launch contract // MA ambassadorsMaxPremine[0xFEA0904ACc8Df0F3288b6583f60B86c36Ea52AcD] = 0.28 ether / BETA_DIVISOR; ambassadorsPremined[address(0)] = true; // first ambassador don't need prerequisite // BL ambassadorsMaxPremine[0xc951D3463EbBa4e9Ec8dDfe1f42bc5895C46eC8f] = 0.28 ether / BETA_DIVISOR; ambassadorsPrerequisite[0xc951D3463EbBa4e9Ec8dDfe1f42bc5895C46eC8f] = 0xFEA0904ACc8Df0F3288b6583f60B86c36Ea52AcD; // PH ambassadorsMaxPremine[0x183feBd8828a9ac6c70C0e27FbF441b93004fC05] = 0.28 ether / BETA_DIVISOR; ambassadorsPrerequisite[0x183feBd8828a9ac6c70C0e27FbF441b93004fC05] = 0xc951D3463EbBa4e9Ec8dDfe1f42bc5895C46eC8f; // RS ambassadorsMaxPremine[0x1fbc2Ca750E003A56d706C595b49a0A430EBA92d] = 0.09 ether / BETA_DIVISOR; ambassadorsPrerequisite[0x1fbc2Ca750E003A56d706C595b49a0A430EBA92d] = 0x183feBd8828a9ac6c70C0e27FbF441b93004fC05; // LN ambassadorsMaxPremine[0x41F29054E7c0BC59a8AF10f3a6e7C0E53B334e05] = 0.09 ether / BETA_DIVISOR; ambassadorsPrerequisite[0x41F29054E7c0BC59a8AF10f3a6e7C0E53B334e05] = 0x1fbc2Ca750E003A56d706C595b49a0A430EBA92d; // LE ambassadorsMaxPremine[0x15Fda64fCdbcA27a60Aa8c6ca882Aa3e1DE4Ea41] = 0.09 ether / BETA_DIVISOR; ambassadorsPrerequisite[0x15Fda64fCdbcA27a60Aa8c6ca882Aa3e1DE4Ea41] = 0x41F29054E7c0BC59a8AF10f3a6e7C0E53B334e05; // MI ambassadorsMaxPremine[0x0a3239799518E7F7F339867A4739282014b97Dcf] = 0.09 ether / BETA_DIVISOR; ambassadorsPrerequisite[0x0a3239799518E7F7F339867A4739282014b97Dcf] = 0x15Fda64fCdbcA27a60Aa8c6ca882Aa3e1DE4Ea41; // PO ambassadorsMaxPremine[0x31529d5Ab0D299D9b0594B7f2ef3515Be668AA87] = 0.09 ether / BETA_DIVISOR; ambassadorsPrerequisite[0x31529d5Ab0D299D9b0594B7f2ef3515Be668AA87] = 0x0a3239799518E7F7F339867A4739282014b97Dcf; } /// @dev Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) function buy(address _referredBy) public payable returns (uint256) { purchaseTokens(msg.value, _referredBy); } /** * @dev Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */ function() payable public { purchaseTokens(msg.value, 0x0); } /// @dev Converts all of caller's dividends to tokens. function reinvest() onlyStronghands public { // fetch dividends uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code // pay out the dividends virtually address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // retrieve ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; // dispatch a buy order with the virtualized "withdrawn dividends" uint256 _tokens = purchaseTokens(_dividends, 0x0); // fire event onReinvestment(_customerAddress, _dividends, _tokens); } /// @dev Alias of sell() and withdraw(). function exit() public { // get token count for caller & sell them all address _customerAddress = msg.sender; uint256 _tokens = tokenBalanceLedger_[_customerAddress]; if (_tokens > 0) sell(_tokens); // lambo delivery service withdraw(); } /// @dev Withdraws all of the callers earnings. function withdraw() onlyStronghands public { // setup data address _customerAddress = msg.sender; uint256 _dividends = myDividends(false); // get ref. bonus later in the code // update dividend tracker payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // add ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; // lambo delivery service _customerAddress.transfer(_dividends); // fire event onWithdraw(_customerAddress, _dividends); } /// @dev Liquifies tokens to ethereum. function sell(uint256 _amountOfTokens) onlyBagholders public { require(now >= startTime); // setup data address _customerAddress = msg.sender; // russian hackers BTFO require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); uint256 _tokens = _amountOfTokens; uint256 _ethereum = tokensToEthereum_(_tokens); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); // burn the sold tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens); tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens); // update dividends tracker int256 _updatedPayouts = (int256) (_taxedEthereum * magnitude); payoutsTo_[_customerAddress] -= _updatedPayouts; // Tell MoonInc contract for tokens amount change, and transfer dividends. moonIncContract.handleProductionDecrease.value(_dividends)(_customerAddress, _tokens * cookieProductionMultiplier); // fire event onTokenSell(_customerAddress, _tokens, _taxedEthereum, now, buyPrice()); } /** * @dev Transfer tokens from the caller to a new holder. * Remember, there's a fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders public returns (bool) { // setup address _customerAddress = msg.sender; // make sure we have the requested tokens require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); // withdraw all outstanding dividends first if (myDividends(true) > 0) { withdraw(); } // liquify 10% of the tokens that are transfered // these are dispersed to shareholders uint256 _tokenFee = SafeMath.div(SafeMath.mul(_amountOfTokens, transferFee_), 100); uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee); uint256 _dividends = tokensToEthereum_(_tokenFee); // burn the fee tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee); // exchange tokens tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens); tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens); // Tell MoonInc contract for tokens amount change, and transfer dividends. moonIncContract.handleProductionDecrease.value(_dividends)(_customerAddress, _amountOfTokens * cookieProductionMultiplier); moonIncContract.handleProductionIncrease(_toAddress, _taxedTokens * cookieProductionMultiplier); // fire event Transfer(_customerAddress, _toAddress, _taxedTokens); // ERC20 return true; } /*===================================== = HELPERS AND CALCULATORS = =====================================*/ function getSettings() public view returns (uint8, uint8, uint8, uint256, uint256, uint256, uint256) { return (entryFee_, transferFee_, exitFee_, tokenPriceInitial_, tokenPriceIncremental_, cookieProductionMultiplier, startTime); } /** * @dev Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns (uint256) { return this.balance; } /// @dev Retrieve the total token supply. function totalSupply() public view returns (uint256) { return tokenSupply_; } /// @dev Retrieve the tokens owned by the caller. function myTokens() public view returns (uint256) { address _customerAddress = msg.sender; return balanceOf(_customerAddress); } /** * @dev Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. */ function myDividends(bool _includeReferralBonus) public view returns (uint256) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ; } /// @dev Retrieve the token balance of any single address. function balanceOf(address _customerAddress) public view returns (uint256) { return tokenBalanceLedger_[_customerAddress]; } /// @dev Retrieve the dividend balance of any single address. function dividendsOf(address _customerAddress) public view returns (uint256) { return (uint256) ((int256) (-payoutsTo_[_customerAddress])) / magnitude; } /// @dev Return the sell price of 1 individual token. function sellPrice() public view returns (uint256) { // our calculation relies on the token supply, so we need supply. Doh. if (tokenSupply_ == 0) { return tokenPriceInitial_ - tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } } /// @dev Return the buy price of 1 individual token. function buyPrice() public view returns (uint256) { // our calculation relies on the token supply, so we need supply. Doh. if (tokenSupply_ == 0) { return tokenPriceInitial_ + tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, entryFee_), 100); uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends); return _taxedEthereum; } } /// @dev Function for the frontend to dynamically retrieve the price scaling of buy orders. function calculateTokensReceived(uint256 _ethereumToSpend) public view returns (uint256) { uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereumToSpend, entryFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); return _amountOfTokens; } /// @dev Function for the frontend to dynamically retrieve the price scaling of sell orders. function calculateEthereumReceived(uint256 _tokensToSell) public view returns (uint256) { require(_tokensToSell <= tokenSupply_); uint256 _ethereum = tokensToEthereum_(_tokensToSell); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ /// @dev Internal function to actually purchase the tokens. function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal returns (uint256) { // Remove this on main launch require(_incomingEthereum <= 1 finney); require( // auto start now >= startTime || // ambassador pre-mine within 1 hour before startTime, sequences enforced (now >= startTime - 1 hours && !ambassadorsPremined[msg.sender] && ambassadorsPremined[ambassadorsPrerequisite[msg.sender]] && _incomingEthereum <= ambassadorsMaxPremine[msg.sender]) || // ambassador pre-mine within 10 minutes before startTime, sequences not enforced (now >= startTime - 10 minutes && !ambassadorsPremined[msg.sender] && _incomingEthereum <= ambassadorsMaxPremine[msg.sender]) ); if (now < startTime) { ambassadorsPremined[msg.sender] = true; } // data setup address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(SafeMath.mul(_incomingEthereum, entryFee_), 100); uint256 _referralBonus = SafeMath.div(SafeMath.mul(_undividedDividends, refferalFee_), 100); uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus); uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); // no point in continuing execution if OP is a poorfag russian hacker // prevents overflow in the case that the pyramid somehow magically starts being used by everyone in the world // (or hackers) // and yes we know that the safemath function automatically rules out the "greater then" equasion. require(_amountOfTokens > 0 && SafeMath.add(_amountOfTokens, tokenSupply_) > tokenSupply_); // is the user referred by a masternode? if ( // is this a referred purchase? _referredBy != 0x0000000000000000000000000000000000000000 && // no cheating! _referredBy != _customerAddress && // does the referrer have at least X whole tokens? // i.e is the referrer a godly chad masternode tokenBalanceLedger_[_referredBy] >= stakingRequirement ) { // wealth redistribution referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus); } else { // no ref purchase // add the referral bonus back to the global dividends cake _dividends = SafeMath.add(_dividends, _referralBonus); } // add tokens to the pool tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens); // update circulating supply & the ledger address for the customer tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens); // Tell MoonInc contract for tokens amount change, and transfer dividends. moonIncContract.handleProductionIncrease.value(_dividends)(_customerAddress, _amountOfTokens * cookieProductionMultiplier); // fire event onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy, now, buyPrice()); return _amountOfTokens; } /** * @dev Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns (uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( // underflow attempts BTFO SafeMath.sub( (sqrt ( (_tokenPriceInitial ** 2) + (2 * (tokenPriceIncremental_ * 1e18) * (_ethereum * 1e18)) + ((tokenPriceIncremental_ ** 2) * (tokenSupply_ ** 2)) + (2 * tokenPriceIncremental_ * _tokenPriceInitial*tokenSupply_) ) ), _tokenPriceInitial ) ) / (tokenPriceIncremental_) ) - (tokenSupply_); return _tokensReceived; } /** * @dev Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns (uint256) { uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( // underflow attempts BTFO SafeMath.sub( ( ( ( tokenPriceInitial_ + (tokenPriceIncremental_ * (_tokenSupply / 1e18)) ) - tokenPriceIncremental_ ) * (tokens_ - 1e18) ), (tokenPriceIncremental_ * ((tokens_ ** 2 - tokens_) / 1e18)) / 2 ) / 1e18); return _etherReceived; } /// @dev This is where all your gas goes. function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } contract MoonInc { string public constant name = "Cookie | Moon, Inc."; string public constant symbol = "Cookie"; uint8 public constant decimals = 18; // Total balances uint256 public totalEtherCookieResearchPool; // Eth dividends to be split between players' cookie production uint256 public totalCookieProduction; uint256 private roughSupply; uint256 private lastTotalCookieSaveTime; // Last time any player claimed their produced cookie // Balances for each player mapping(address => uint256) public cookieProduction; mapping(address => uint256) public cookieBalance; mapping(address => uint256) private lastCookieSaveTime; // Last time player claimed their produced cookie // Mapping of approved ERC20 transfers (by player) mapping(address => mapping(address => uint256)) internal allowed; // Production unit contracts ProductionUnitToken[] public productionUnitTokenContracts; mapping(address => bool) productionUnitTokenContractAddresses; // Store the production unit start time to calculate sell price. uint256[] public tokenContractStartTime; uint256 public constant firstUnitStartTime = 1526763600; // TODO: change this in main launch contract // ERC20 events event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); // Constructor function MoonInc() public payable { // Create first production unit (Space Kitty) createProductionUnit1Beta(); // Create first production unit (Space Rabbit) // createProductionUnit2Beta(); // Create first production unit (Space Hamster) // createProductionUnit3Beta(); } function() public payable { // Fallback will add to research pot totalEtherCookieResearchPool += msg.value; } // TODO: Create 7 createProductionUnit functions in main launch contract function createProductionUnit1Beta() public { require(productionUnitTokenContracts.length == 0); createProductionUnitTokenContract(10, 10, 10, 0.0000001 ether / 1000, 0.00000001 ether / 1000, 1, firstUnitStartTime); } function createProductionUnit2Beta() public { require(productionUnitTokenContracts.length == 1); createProductionUnitTokenContract(15, 15, 15, 0.0000001 ether / 1000, 0.00000001 ether / 1000, 3, firstUnitStartTime + 1 days); } function createProductionUnit3Beta() public { require(productionUnitTokenContracts.length == 2); createProductionUnitTokenContract(20, 20, 20, 0.0000001 ether / 1000, 0.00000001 ether / 1000, 9, firstUnitStartTime + 2 days); } function createProductionUnitTokenContract( uint8 _entryFee, uint8 _transferFee, uint8 _exitFee, uint256 _tokenPriceInitial, uint256 _tokenPriceIncremental, uint256 _cookieProductionMultiplier, uint256 _startTime ) internal { ProductionUnitToken newContract = new ProductionUnitToken(address(this), _entryFee, _transferFee, _exitFee, _tokenPriceInitial, _tokenPriceIncremental, _cookieProductionMultiplier, _startTime); productionUnitTokenContracts.push(newContract); productionUnitTokenContractAddresses[address(newContract)] = true; tokenContractStartTime.push(_startTime); } function productionUnitTokenContractCount() public view returns (uint) { return productionUnitTokenContracts.length; } function handleProductionIncrease(address player, uint256 amount) public payable { require(productionUnitTokenContractAddresses[msg.sender]); updatePlayersCookie(player); totalCookieProduction = SafeMath.add(totalCookieProduction, amount); cookieProduction[player] = SafeMath.add(cookieProduction[player], amount); if (msg.value > 0) { totalEtherCookieResearchPool += msg.value; } } function handleProductionDecrease(address player, uint256 amount) public payable { require(productionUnitTokenContractAddresses[msg.sender]); updatePlayersCookie(player); totalCookieProduction = SafeMath.sub(totalCookieProduction, amount); cookieProduction[player] = SafeMath.sub(cookieProduction[player], amount); if (msg.value > 0) { totalEtherCookieResearchPool += msg.value; } } function getState() public view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256) { return (totalCookieProduction, cookieProduction[msg.sender], totalSupply(), balanceOf(msg.sender), totalEtherCookieResearchPool, lastTotalCookieSaveTime, computeSellPrice()); } function totalSupply() public constant returns(uint256) { return roughSupply + balanceOfTotalUnclaimedCookie(); } function balanceOf(address player) public constant returns(uint256) { return cookieBalance[player] + balanceOfUnclaimedCookie(player); } function balanceOfTotalUnclaimedCookie() public constant returns(uint256) { if (lastTotalCookieSaveTime > 0 && lastTotalCookieSaveTime < block.timestamp) { return (totalCookieProduction * (block.timestamp - lastTotalCookieSaveTime)); } return 0; } function balanceOfUnclaimedCookie(address player) internal constant returns (uint256) { uint256 lastSave = lastCookieSaveTime[player]; if (lastSave > 0 && lastSave < block.timestamp) { return (cookieProduction[player] * (block.timestamp - lastSave)); } return 0; } function transfer(address recipient, uint256 amount) public returns (bool) { updatePlayersCookie(msg.sender); require(amount <= cookieBalance[msg.sender]); cookieBalance[msg.sender] -= amount; cookieBalance[recipient] += amount; Transfer(msg.sender, recipient, amount); return true; } function transferFrom(address player, address recipient, uint256 amount) public returns (bool) { updatePlayersCookie(player); require(amount <= allowed[player][msg.sender] && amount <= cookieBalance[player]); cookieBalance[player] -= amount; cookieBalance[recipient] += amount; allowed[player][msg.sender] -= amount; Transfer(player, recipient, amount); return true; } function approve(address approvee, uint256 amount) public returns (bool){ allowed[msg.sender][approvee] = amount; Approval(msg.sender, approvee, amount); return true; } function allowance(address player, address approvee) public constant returns(uint256){ return allowed[player][approvee]; } function updatePlayersCookie(address player) internal { roughSupply += balanceOfTotalUnclaimedCookie(); cookieBalance[player] += balanceOfUnclaimedCookie(player); lastTotalCookieSaveTime = block.timestamp; lastCookieSaveTime[player] = block.timestamp; } // Sell all cookies, the eth earned is calculated by the proportion of cookies owned. // Selling of cookie is forbidden within one hour of new production unit launch. function sellAllCookies() public { updatePlayersCookie(msg.sender); uint256 sellPrice = computeSellPrice(); require(sellPrice > 0); uint256 myCookies = cookieBalance[msg.sender]; uint256 value = myCookies * sellPrice / (1 ether); cookieBalance[msg.sender] = 0; msg.sender.transfer(value); } // Compute sell price for 1 cookie, it is 0.5 when a new token contract is deployed, // and then goes up until it reaches the maximum sell price after 5 days. function computeSellPrice() public view returns (uint) { uint256 supply = totalSupply(); if (supply == 0) { return 0; } uint index; uint lastTokenContractStartTime = now; while (index < tokenContractStartTime.length && tokenContractStartTime[index] < now) { lastTokenContractStartTime = tokenContractStartTime[index]; index++; } if (now < lastTokenContractStartTime + 1 hours) { return 0; } uint timeToMaxValue = 2 days; // TODO: change to 5 days in main launch contract uint256 secondsPassed = now - lastTokenContractStartTime; secondsPassed = secondsPassed <= timeToMaxValue ? secondsPassed : timeToMaxValue; uint256 multiplier = 5000 + 5000 * secondsPassed / timeToMaxValue; return 1 ether * totalEtherCookieResearchPool / supply * multiplier / 10000; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"dividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenPriceIncremental_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ethereumToSpend","type":"uint256"}],"name":"calculateTokensReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokensToSell","type":"uint256"}],"name":"calculateEthereumReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"entryFee_","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"exitFee_","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"moonIncContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sellPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingRequirement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cookieProductionMultiplier","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_includeReferralBonus","type":"bool"}],"name":"myDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEthereumBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ambassadorsPrerequisite","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSettings","outputs":[{"name":"","type":"uint8"},{"name":"","type":"uint8"},{"name":"","type":"uint8"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"buyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"myTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ambassadorsMaxPremine","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_toAddress","type":"address"},{"name":"_amountOfTokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenPriceInitial_","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"transferFee_","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ambassadorsPremined","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"sell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_referredBy","type":"address"}],"name":"buy","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"reinvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_moonIncContractAddress","type":"address"},{"name":"_entryFee","type":"uint8"},{"name":"_transferFee","type":"uint8"},{"name":"_exitFee","type":"uint8"},{"name":"_tokenPriceInitial","type":"uint256"},{"name":"_tokenPriceIncremental","type":"uint256"},{"name":"_cookieProductionMultiplier","type":"uint256"},{"name":"_startTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"incomingEthereum","type":"uint256"},{"indexed":false,"name":"tokensMinted","type":"uint256"},{"indexed":true,"name":"referredBy","type":"address"},{"indexed":false,"name":"timestamp","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"}],"name":"onTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"tokensBurned","type":"uint256"},{"indexed":false,"name":"ethereumEarned","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"}],"name":"onTokenSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"ethereumReinvested","type":"uint256"},{"indexed":false,"name":"tokensMinted","type":"uint256"}],"name":"onReinvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"ethereumWithdrawn","type":"uint256"}],"name":"onWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"}]
Contract Creation Code
606060405260408051908101604052601c81527f50726f64756374696f6e20556e6974207c204d6f6f6e2c20496e632e00000000602082015260019080516200004d929160200190620005ff565b5060408051908101604052600e81527f50726f64756374696f6e556e69740000000000000000000000000000000000006020820152600290805162000097929160200190620005ff565b50678ac7230489e800006006553415620000b057600080fd5b6040516101008062001ae1833981016040528080519190602001805191906020018051919060200180519190602001805191906020018051919060200180519190602001805160008054600160a060020a031916600160a060020a038c161790556003805460ff191660ff8b81169190911761ff0019166101008b8316021762ff0000191662010000918a1691909102179055600486905560058590556007849055600881905591506103e89050806703e2c284391c0000047fdc959cfe2b175ed260f0d29d50a22c723de07c076741b0738b156a69a84636995560008052600a6020527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3805460ff19166001179055806703e2c284391c0000811515620001d457fe5b73c951d3463ebba4e9ec8ddfe1f42bc5895c46ec8f600052047fb695afe0815f1a0fca34d55e5d648a369b4989966d7594ae6f113a618370409b55600b6020527f730ff749317258461f89653602b716cd5c77b4430f734b68615d399e235daab48054600160a060020a03191673fea0904acc8df0f3288b6583f60b86c36ea52acd179055806703e2c284391c00008115156200026d57fe5b73183febd8828a9ac6c70c0e27fbf441b93004fc05600052047fc68aad4c1efaa842aea3a9d2ef6d3c57921a98bd08630ba918f144f511e9aa0955600b6020527f632d53bb0a06b84f57f84351b146332d537795c36068497ae9ec22629c7cdc3c8054600160a060020a03191673c951d3463ebba4e9ec8ddfe1f42bc5895c46ec8f1790558067013fbe85edc900008115156200030657fe5b731fbc2ca750e003a56d706c595b49a0a430eba92d600052047fef927b934bc32d82ae7d641a23d3f563a41aa8e146f895d08c46497d785bdc0055600b6020527f5822f778597e038424f954d4d0a4ec35b70e4c7dc48356651af02ae4ce3acf4a8054600160a060020a03191673183febd8828a9ac6c70c0e27fbf441b93004fc051790558067013fbe85edc900008115156200039f57fe5b7341f29054e7c0bc59a8af10f3a6e7c0e53b334e05600052047f7f06417dd09751df064645fc55f4e3ad35f1aa4997f158e6625cc6c9ffe22bab55600b6020527fa9e140e18b8636e4180c954d35a67013fae2eac65cafdc8af79fff5936148ce48054600160a060020a031916731fbc2ca750e003a56d706c595b49a0a430eba92d1790558067013fbe85edc900008115156200043857fe5b7315fda64fcdbca27a60aa8c6ca882aa3e1de4ea41600052047f29a99edf4941a3eac30edf3a60256cf4422b9bb9fb28a920b99c1f4dd243783d55600b6020527f56121a7225f2a97c74a8b467e786fb63acc82e3c5d55a7c61bfec773825930cc8054600160a060020a0319167341f29054e7c0bc59a8af10f3a6e7c0e53b334e051790558067013fbe85edc90000811515620004d157fe5b730a3239799518e7f7f339867a4739282014b97dcf600052047fedf7f37d95c8653e131d57ed11c4929c66f3d8a74fde852c94dc8c9af46ca8a455600b6020527fd433f2f4e53512cb54961dced8a1916be6e9fd9110abd57b77b2e5c3beb9b0fb8054600160a060020a0319167315fda64fcdbca27a60aa8c6ca882aa3e1de4ea411790558067013fbe85edc900008115156200056a57fe5b7331529d5ab0d299d9b0594b7f2ef3515be668aa87600052047fecaa8676ca64deffc478fdaf3eb925484756642be5d1b665f32b3a356ab3ec11555050600b60205250507f6f28103fc34e8f0762bbb16833a0dc581d4a584d896cd233edbb7c8d133e6df88054600160a060020a031916730a3239799518e7f7f339867a4739282014b97dcf17905550620006a49350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200064257805160ff191683800117855562000672565b8280016001018555821562000672579182015b828111156200067257825182559160200191906001019062000655565b506200068092915062000684565b5090565b620006a191905b808211156200068057600081556001016200068b565b90565b61142d80620006b46000396000f30060606040526004361061017b5763ffffffff60e060020a60003504166265318b811461018957806306fdde03146101ba5780630ea8e5ac1461024457806310d0ffdd1461025757806318160ddd1461026d57806322609373146102805780632290d6e2146102965780632b38ee56146102bf578063313ce567146102d25780633ccfd60b146102e55780634abb525a146102fa5780634b7503341461032957806356d399e81461033c578063577ec5ae1461034f578063688abbf7146103625780636b2f46321461037a57806370a082311461038d57806375fb4540146103ac57806378e97925146103cb57806385b4bb53146103de5780638620410b14610435578063949e8acd1461044857806395d89b411461045b578063a14b972b1461046e578063a9059cbb1461048d578063c4c1b39a146104c3578063cb8cd7cb146104d6578063d292d5d7146104e9578063e4849b3214610508578063e9fad8ee1461051e578063f088d54714610531578063fdb5a03e14610545575b610186346000610558565b50005b341561019457600080fd5b6101a8600160a060020a03600435166108e3565b60405190815260200160405180910390f35b34156101c557600080fd5b6101cd61090b565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102095780820151838201526020016101f1565b50505050905090810190601f1680156102365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561024f57600080fd5b6101a86109a9565b341561026257600080fd5b6101a86004356109af565b341561027857600080fd5b6101a86109ed565b341561028b57600080fd5b6101a86004356109f3565b34156102a157600080fd5b6102a9610a3d565b60405160ff909116815260200160405180910390f35b34156102ca57600080fd5b6102a9610a46565b34156102dd57600080fd5b6102a9610a55565b34156102f057600080fd5b6102f8610a5a565b005b341561030557600080fd5b61030d610b26565b604051600160a060020a03909116815260200160405180910390f35b341561033457600080fd5b6101a8610b35565b341561034757600080fd5b6101a8610b9b565b341561035a57600080fd5b6101a8610ba1565b341561036d57600080fd5b6101a86004351515610ba7565b341561038557600080fd5b6101a8610bea565b341561039857600080fd5b6101a8600160a060020a0360043516610bf8565b34156103b757600080fd5b61030d600160a060020a0360043516610c13565b34156103d657600080fd5b6101a8610c2e565b34156103e957600080fd5b6103f1610c34565b60405160ff97881681529587166020870152939095166040808601919091526060850192909252608084015260a083019390935260c082015260e001905180910390f35b341561044057600080fd5b6101a8610c61565b341561045357600080fd5b6101a8610cb5565b341561046657600080fd5b6101cd610cc7565b341561047957600080fd5b6101a8600160a060020a0360043516610d32565b341561049857600080fd5b6104af600160a060020a0360043516602435610d44565b604051901515815260200160405180910390f35b34156104ce57600080fd5b6101a8610f84565b34156104e157600080fd5b6102a9610f8a565b34156104f457600080fd5b6104af600160a060020a0360043516610f98565b341561051357600080fd5b6102f8600435610fad565b341561052957600080fd5b6102f861117f565b6101a8600160a060020a03600435166111b6565b341561055057600080fd5b6102f86111c2565b600080808080808066038d7ea4c6800089111561057457600080fd5b600854421015806106065750610e106008540342101580156105af5750600160a060020a0333166000908152600a602052604090205460ff16155b80156105e25750600160a060020a033381166000908152600b60209081526040808320549093168252600a9052205460ff165b80156106065750600160a060020a0333166000908152600960205260409020548911155b8061065f575061025860085403421015801561063b5750600160a060020a0333166000908152600a602052604090205460ff16155b801561065f5750600160a060020a0333166000908152600960205260409020548911155b151561066a57600080fd5b60085442101561069857600160a060020a0333166000908152600a60205260409020805460ff191660011790555b6003543396506106b7906106b0908b9060ff1661127d565b60646112b3565b94506106c76106b086601461127d565b93506106d385856112ca565b92506106df89866112ca565b91506106ea826112dc565b90506000811180156107065750600f546107048282611356565b115b151561071157600080fd5b600160a060020a0388161580159061073b575085600160a060020a031688600160a060020a031614155b80156107615750600654600160a060020a0389166000908152600c602052604090205410155b156107a757600160a060020a0388166000908152600d60205260409020546107899085611356565b600160a060020a0389166000908152600d60205260409020556107b4565b6107b18385611356565b92505b6107c0600f5482611356565b600f55600160a060020a0386166000908152600c60205260409020546107e69082611356565b600160a060020a038088166000908152600c60205260408082209390935554600754911691632c3ca9249186918a918602905160e060020a63ffffffff8616028152600160a060020a03909216600483015260248201526044016000604051808303818588803b151561085857600080fd5b6125ee5a03f1151561086957600080fd5b5050505087600160a060020a031686600160a060020a03167f8032875b28d82ddbd303a9e4e5529d047a14ecb6290f80012a81b7e6227ff1ab8b84426108ad610c61565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a398975050505050505050565b600160a060020a03166000908152600e60205260408120546801000000000000000091030490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a15780601f10610976576101008083540402835291602001916109a1565b820191906000526020600020905b81548152906001019060200180831161098457829003601f168201915b505050505081565b60055481565b6003546000908190819081906109cd906106b090879060ff1661127d565b92506109d985846112ca565b91506109e4826112dc565b95945050505050565b600f5490565b600080600080600f548511151515610a0a57600080fd5b610a1385611365565b600354909350610a31906106b090859062010000900460ff1661127d565b91506109e483836112ca565b60035460ff1681565b60035462010000900460ff1681565b601281565b6000806000610a696001610ba7565b11610a7357600080fd5b339150610a806000610ba7565b600160a060020a0383166000818152600e602090815260408083208054680100000000000000008702019055600d9091528082208054929055920192509082156108fc0290839051600060405180830381858888f193505050501515610ae557600080fd5b81600160a060020a03167fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc8260405190815260200160405180910390a25050565b600054600160a060020a031681565b600080600080600f5460001415610b5457600554600454039350610b95565b610b65670de0b6b3a7640000611365565b600354909350610b83906106b090859062010000900460ff1661127d565b9150610b8f83836112ca565b90508093505b50505090565b60065481565b60075481565b60003382610bbd57610bb8816108e3565b610be1565b600160a060020a0381166000908152600d6020526040902054610bdf826108e3565b015b91505b50919050565b600160a060020a0330163190565b600160a060020a03166000908152600c602052604090205490565b600b60205260009081526040902054600160a060020a031681565b60085481565b60035460045460055460075460085460ff8086169661010087048216966201000090049091169493929190565b600080600080600f5460001415610c8057600554600454019350610b95565b610c91670de0b6b3a7640000611365565b600354909350610ca9906106b090859060ff1661127d565b9150610b8f8383611356565b600033610cc181610bf8565b91505090565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a15780601f10610976576101008083540402835291602001916109a1565b60096020526000908152604090205481565b600080600080600080610d55610cb5565b11610d5f57600080fd5b33600160a060020a0381166000908152600c6020526040902054909450861115610d8857600080fd5b6000610d946001610ba7565b1115610da257610da2610a5a565b600354610dbc906106b0908890610100900460ff1661127d565b9250610dc886846112ca565b9150610dd383611365565b9050610de1600f54846112ca565b600f55600160a060020a0384166000908152600c6020526040902054610e0790876112ca565b600160a060020a038086166000908152600c60205260408082209390935590891681522054610e369083611356565b600160a060020a038089166000908152600c60205260408082209390935554600754911691637f7de18591849188918b02905160e060020a63ffffffff8616028152600160a060020a03909216600483015260248201526044016000604051808303818588803b1515610ea857600080fd5b6125ee5a03f11515610eb957600080fd5b5050600054600754600160a060020a039091169250632c3ca92491508990850260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610f1c57600080fd5b6102c65a03f11515610f2d57600080fd5b50505086600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019695505050505050565b60045481565b600354610100900460ff1681565b600a6020526000908152604090205460ff1681565b6000806000806000806000610fc0610cb5565b11610fca57600080fd5b600854421015610fd957600080fd5b33600160a060020a0381166000908152600c602052604090205490965087111561100257600080fd5b86945061100e85611365565b60035490945061102c906106b090869062010000900460ff1661127d565b925061103884846112ca565b9150611046600f54866112ca565b600f55600160a060020a0386166000908152600c602052604090205461106c90866112ca565b600160a060020a038088166000908152600c6020908152604080832094909455600e9052828120805468010000000000000000870290819003909155905460075491945090911691637f7de1859186918a918a02905160e060020a63ffffffff8616028152600160a060020a03909216600483015260248201526044016000604051808303818588803b151561110157600080fd5b6125ee5a03f1151561111257600080fd5b5050505085600160a060020a03167f8d3a0130073dbd54ab6ac632c05946df540553d3b514c9f8165b4ab7f2b1805e86844261114c610c61565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050565b33600160a060020a0381166000908152600c6020526040812054908111156111aa576111aa81610fad565b6111b2610a5a565b5050565b6000610be43483610558565b6000806000806111d26001610ba7565b116111dc57600080fd5b6111e66000610ba7565b33600160a060020a0381166000908152600e602090815260408083208054680100000000000000008702019055600d909152812080549082905590920194509250611232908490610558565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab3615326458848360405191825260208201526040908101905180910390a2505050565b60008083151561129057600091506112ac565b508282028284828115156112a057fe5b04146112a857fe5b8091505b5092915050565b60008082848115156112c157fe5b04949350505050565b6000828211156112d657fe5b50900390565b6000806000600454670de0b6b3a7640000029150600f5460055461134361133d600f548660055460020202026002600f540a60026005540a0289670de0b6b3a764000002600554670de0b6b3a764000002600202026002890a0101016113cc565b856112ca565b81151561134c57fe5b0403949350505050565b6000828201838110156112a857fe5b600f54600554600454600092670de0b6b3a7640000858101939181019285926113b991838604820201038702600283670de0b6b3a763ffff1982890a8b90030104600554028115156113b357fe5b046112ca565b8115156113c257fe5b0495945050505050565b80600260018201045b81811015610be45780915060028182858115156113ee57fe5b04018115156113f957fe5b0490506113d55600a165627a7a72305820e36d74dd513a82bb15488b4fd7d395ecec9d7da855c58c38cb47b27aaf4cbe7d0029000000000000000000000000edfb84a94051f49b9c65cee01a98d1fd802f3e6d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000005b009050
Deployed Bytecode
0x60606040526004361061017b5763ffffffff60e060020a60003504166265318b811461018957806306fdde03146101ba5780630ea8e5ac1461024457806310d0ffdd1461025757806318160ddd1461026d57806322609373146102805780632290d6e2146102965780632b38ee56146102bf578063313ce567146102d25780633ccfd60b146102e55780634abb525a146102fa5780634b7503341461032957806356d399e81461033c578063577ec5ae1461034f578063688abbf7146103625780636b2f46321461037a57806370a082311461038d57806375fb4540146103ac57806378e97925146103cb57806385b4bb53146103de5780638620410b14610435578063949e8acd1461044857806395d89b411461045b578063a14b972b1461046e578063a9059cbb1461048d578063c4c1b39a146104c3578063cb8cd7cb146104d6578063d292d5d7146104e9578063e4849b3214610508578063e9fad8ee1461051e578063f088d54714610531578063fdb5a03e14610545575b610186346000610558565b50005b341561019457600080fd5b6101a8600160a060020a03600435166108e3565b60405190815260200160405180910390f35b34156101c557600080fd5b6101cd61090b565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156102095780820151838201526020016101f1565b50505050905090810190601f1680156102365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561024f57600080fd5b6101a86109a9565b341561026257600080fd5b6101a86004356109af565b341561027857600080fd5b6101a86109ed565b341561028b57600080fd5b6101a86004356109f3565b34156102a157600080fd5b6102a9610a3d565b60405160ff909116815260200160405180910390f35b34156102ca57600080fd5b6102a9610a46565b34156102dd57600080fd5b6102a9610a55565b34156102f057600080fd5b6102f8610a5a565b005b341561030557600080fd5b61030d610b26565b604051600160a060020a03909116815260200160405180910390f35b341561033457600080fd5b6101a8610b35565b341561034757600080fd5b6101a8610b9b565b341561035a57600080fd5b6101a8610ba1565b341561036d57600080fd5b6101a86004351515610ba7565b341561038557600080fd5b6101a8610bea565b341561039857600080fd5b6101a8600160a060020a0360043516610bf8565b34156103b757600080fd5b61030d600160a060020a0360043516610c13565b34156103d657600080fd5b6101a8610c2e565b34156103e957600080fd5b6103f1610c34565b60405160ff97881681529587166020870152939095166040808601919091526060850192909252608084015260a083019390935260c082015260e001905180910390f35b341561044057600080fd5b6101a8610c61565b341561045357600080fd5b6101a8610cb5565b341561046657600080fd5b6101cd610cc7565b341561047957600080fd5b6101a8600160a060020a0360043516610d32565b341561049857600080fd5b6104af600160a060020a0360043516602435610d44565b604051901515815260200160405180910390f35b34156104ce57600080fd5b6101a8610f84565b34156104e157600080fd5b6102a9610f8a565b34156104f457600080fd5b6104af600160a060020a0360043516610f98565b341561051357600080fd5b6102f8600435610fad565b341561052957600080fd5b6102f861117f565b6101a8600160a060020a03600435166111b6565b341561055057600080fd5b6102f86111c2565b600080808080808066038d7ea4c6800089111561057457600080fd5b600854421015806106065750610e106008540342101580156105af5750600160a060020a0333166000908152600a602052604090205460ff16155b80156105e25750600160a060020a033381166000908152600b60209081526040808320549093168252600a9052205460ff165b80156106065750600160a060020a0333166000908152600960205260409020548911155b8061065f575061025860085403421015801561063b5750600160a060020a0333166000908152600a602052604090205460ff16155b801561065f5750600160a060020a0333166000908152600960205260409020548911155b151561066a57600080fd5b60085442101561069857600160a060020a0333166000908152600a60205260409020805460ff191660011790555b6003543396506106b7906106b0908b9060ff1661127d565b60646112b3565b94506106c76106b086601461127d565b93506106d385856112ca565b92506106df89866112ca565b91506106ea826112dc565b90506000811180156107065750600f546107048282611356565b115b151561071157600080fd5b600160a060020a0388161580159061073b575085600160a060020a031688600160a060020a031614155b80156107615750600654600160a060020a0389166000908152600c602052604090205410155b156107a757600160a060020a0388166000908152600d60205260409020546107899085611356565b600160a060020a0389166000908152600d60205260409020556107b4565b6107b18385611356565b92505b6107c0600f5482611356565b600f55600160a060020a0386166000908152600c60205260409020546107e69082611356565b600160a060020a038088166000908152600c60205260408082209390935554600754911691632c3ca9249186918a918602905160e060020a63ffffffff8616028152600160a060020a03909216600483015260248201526044016000604051808303818588803b151561085857600080fd5b6125ee5a03f1151561086957600080fd5b5050505087600160a060020a031686600160a060020a03167f8032875b28d82ddbd303a9e4e5529d047a14ecb6290f80012a81b7e6227ff1ab8b84426108ad610c61565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a398975050505050505050565b600160a060020a03166000908152600e60205260408120546801000000000000000091030490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a15780601f10610976576101008083540402835291602001916109a1565b820191906000526020600020905b81548152906001019060200180831161098457829003601f168201915b505050505081565b60055481565b6003546000908190819081906109cd906106b090879060ff1661127d565b92506109d985846112ca565b91506109e4826112dc565b95945050505050565b600f5490565b600080600080600f548511151515610a0a57600080fd5b610a1385611365565b600354909350610a31906106b090859062010000900460ff1661127d565b91506109e483836112ca565b60035460ff1681565b60035462010000900460ff1681565b601281565b6000806000610a696001610ba7565b11610a7357600080fd5b339150610a806000610ba7565b600160a060020a0383166000818152600e602090815260408083208054680100000000000000008702019055600d9091528082208054929055920192509082156108fc0290839051600060405180830381858888f193505050501515610ae557600080fd5b81600160a060020a03167fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc8260405190815260200160405180910390a25050565b600054600160a060020a031681565b600080600080600f5460001415610b5457600554600454039350610b95565b610b65670de0b6b3a7640000611365565b600354909350610b83906106b090859062010000900460ff1661127d565b9150610b8f83836112ca565b90508093505b50505090565b60065481565b60075481565b60003382610bbd57610bb8816108e3565b610be1565b600160a060020a0381166000908152600d6020526040902054610bdf826108e3565b015b91505b50919050565b600160a060020a0330163190565b600160a060020a03166000908152600c602052604090205490565b600b60205260009081526040902054600160a060020a031681565b60085481565b60035460045460055460075460085460ff8086169661010087048216966201000090049091169493929190565b600080600080600f5460001415610c8057600554600454019350610b95565b610c91670de0b6b3a7640000611365565b600354909350610ca9906106b090859060ff1661127d565b9150610b8f8383611356565b600033610cc181610bf8565b91505090565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a15780601f10610976576101008083540402835291602001916109a1565b60096020526000908152604090205481565b600080600080600080610d55610cb5565b11610d5f57600080fd5b33600160a060020a0381166000908152600c6020526040902054909450861115610d8857600080fd5b6000610d946001610ba7565b1115610da257610da2610a5a565b600354610dbc906106b0908890610100900460ff1661127d565b9250610dc886846112ca565b9150610dd383611365565b9050610de1600f54846112ca565b600f55600160a060020a0384166000908152600c6020526040902054610e0790876112ca565b600160a060020a038086166000908152600c60205260408082209390935590891681522054610e369083611356565b600160a060020a038089166000908152600c60205260408082209390935554600754911691637f7de18591849188918b02905160e060020a63ffffffff8616028152600160a060020a03909216600483015260248201526044016000604051808303818588803b1515610ea857600080fd5b6125ee5a03f11515610eb957600080fd5b5050600054600754600160a060020a039091169250632c3ca92491508990850260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610f1c57600080fd5b6102c65a03f11515610f2d57600080fd5b50505086600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019695505050505050565b60045481565b600354610100900460ff1681565b600a6020526000908152604090205460ff1681565b6000806000806000806000610fc0610cb5565b11610fca57600080fd5b600854421015610fd957600080fd5b33600160a060020a0381166000908152600c602052604090205490965087111561100257600080fd5b86945061100e85611365565b60035490945061102c906106b090869062010000900460ff1661127d565b925061103884846112ca565b9150611046600f54866112ca565b600f55600160a060020a0386166000908152600c602052604090205461106c90866112ca565b600160a060020a038088166000908152600c6020908152604080832094909455600e9052828120805468010000000000000000870290819003909155905460075491945090911691637f7de1859186918a918a02905160e060020a63ffffffff8616028152600160a060020a03909216600483015260248201526044016000604051808303818588803b151561110157600080fd5b6125ee5a03f1151561111257600080fd5b5050505085600160a060020a03167f8d3a0130073dbd54ab6ac632c05946df540553d3b514c9f8165b4ab7f2b1805e86844261114c610c61565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050565b33600160a060020a0381166000908152600c6020526040812054908111156111aa576111aa81610fad565b6111b2610a5a565b5050565b6000610be43483610558565b6000806000806111d26001610ba7565b116111dc57600080fd5b6111e66000610ba7565b33600160a060020a0381166000908152600e602090815260408083208054680100000000000000008702019055600d909152812080549082905590920194509250611232908490610558565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab3615326458848360405191825260208201526040908101905180910390a2505050565b60008083151561129057600091506112ac565b508282028284828115156112a057fe5b04146112a857fe5b8091505b5092915050565b60008082848115156112c157fe5b04949350505050565b6000828211156112d657fe5b50900390565b6000806000600454670de0b6b3a7640000029150600f5460055461134361133d600f548660055460020202026002600f540a60026005540a0289670de0b6b3a764000002600554670de0b6b3a764000002600202026002890a0101016113cc565b856112ca565b81151561134c57fe5b0403949350505050565b6000828201838110156112a857fe5b600f54600554600454600092670de0b6b3a7640000858101939181019285926113b991838604820201038702600283670de0b6b3a763ffff1982890a8b90030104600554028115156113b357fe5b046112ca565b8115156113c257fe5b0495945050505050565b80600260018201045b81811015610be45780915060028182858115156113ee57fe5b04018115156113f957fe5b0490506113d55600a165627a7a72305820e36d74dd513a82bb15488b4fd7d395ecec9d7da855c58c38cb47b27aaf4cbe7d0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000edfb84a94051f49b9c65cee01a98d1fd802f3e6d000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000009896800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000005b009050
-----Decoded View---------------
Arg [0] : _moonIncContractAddress (address): 0xedfb84a94051f49b9C65ceE01a98d1FD802f3e6D
Arg [1] : _entryFee (uint8): 10
Arg [2] : _transferFee (uint8): 10
Arg [3] : _exitFee (uint8): 10
Arg [4] : _tokenPriceInitial (uint256): 100000000
Arg [5] : _tokenPriceIncremental (uint256): 10000000
Arg [6] : _cookieProductionMultiplier (uint256): 1
Arg [7] : _startTime (uint256): 1526763600
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000edfb84a94051f49b9c65cee01a98d1fd802f3e6d
Arg [1] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [4] : 0000000000000000000000000000000000000000000000000000000005f5e100
Arg [5] : 0000000000000000000000000000000000000000000000000000000000989680
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 000000000000000000000000000000000000000000000000000000005b009050
Swarm Source
bzzr://e36d74dd513a82bb15488b4fd7d395ecec9d7da855c58c38cb47b27aaf4cbe7d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,398.1 | 0.0545 | $185.11 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.