ETH Price: $3,240.22 (+2.29%)
Gas: 3 Gwei

Token

Ponzi (PT)
 

Overview

Max Total Supply

100,000,000 PT

Holders

8,012

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 8 Decimals)

Balance
0 PT

Value
$0.00
0xc2807533832807bf15898778d8a108405e9edfb1
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PonziToken

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-03-13
*/

pragma solidity ^0.4.18;

/*
 * Ponzi Trust Token Smart Contracts 
 * Code is published on https://github.com/PonziTrust/Token
 * Ponzi Trust https://ponzitrust.com/
*/


// see: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
  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;
  }

  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;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}


// see: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
contract ERC20 {
  function name() public view returns (string);
  function symbol() public view returns (string);
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  function allowance(address owner, address spender) public view returns (uint256);
  event Approval(address indexed owner, address indexed spender, uint256 value);
  event Transfer(address indexed from, address indexed to, uint256 value);
}


// see: https://github.com/ethereum/EIPs/issues/677
contract ERC677Token {
  function transferAndCall(address receiver, uint amount, bytes data) public returns (bool success);
  function contractFallback(address to, uint value, bytes data) internal;
  function isContract(address addr) internal view returns (bool hasCode);
  event Transfer(address indexed from, address indexed to, uint value, bytes data);
}


// see: https://github.com/ethereum/EIPs/issues/677
contract ERC677Recipient {
  function tokenFallback(address from, uint256 amount, bytes data) public returns (bool success);
}  


/**
* @dev The token implement ERC20 and ERC677 standarts(see above).
* use Withdrawal, Restricting Access, State Machine patterns.
* see: http://solidity.readthedocs.io/en/develop/common-patterns.html
* use SafeMath library, see above.
* The owner can intervene in the work of the token only before the expiration
* DURATION_TO_ACCESS_FOR_OWNER = 144 days. Contract has thee state of working:
* 1.PreSale - only owner can access to transfer tokens. 2.Sale - contract to sale
* tokens by func byToken() of fallback, contact and owner can access to transfer tokens. 
* Token price setting by owner or price setter. 3.PublicUse - anyone can transfer tokens.
*/
contract PonziToken is ERC20, ERC677Token {
  using SafeMath for uint256;

  enum State {
    PreSale,   //PRE_SALE_STR
    Sale,      //SALE_STR
    PublicUse  //PUBLIC_USE_STR
  }
  // we need returns string representation of state
  // because enums are not supported by the ABI, they are just supported by Solidity.
  // see: http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#if-i-return-an-enum-i-only-get-integer-values-in-web3-js-how-to-get-the-named-values
  string private constant PRE_SALE_STR = "PreSale";
  string private constant SALE_STR = "Sale";
  string private constant PUBLIC_USE_STR = "PublicUse";
  State private m_state;

  uint256 private constant DURATION_TO_ACCESS_FOR_OWNER = 144 days;
  
  uint256 private m_maxTokensPerAddress;
  uint256 private m_firstEntranceToSaleStateUNIX;
  address private m_owner;
  address private m_priceSetter;
  address private m_bank;
  uint256 private m_tokenPriceInWei;
  uint256 private m_totalSupply;
  uint256 private m_myDebtInWei;
  string private m_name;
  string private m_symbol;
  uint8 private m_decimals;
  bool private m_isFixedTokenPrice;
  
  mapping(address => mapping (address => uint256)) private m_allowed;
  mapping(address => uint256) private m_balances;
  mapping(address => uint256) private m_pendingWithdrawals;

////////////////
// EVENTS
//
  event StateChanged(address indexed who, State newState);
  event PriceChanged(address indexed who, uint newPrice, bool isFixed);
  event TokensSold(uint256 numberOfTokens, address indexed purchasedBy, uint256 indexed priceInWei);
  event Withdrawal(address indexed to, uint sumInWei);

////////////////
// MODIFIERS - Restricting Access and State Machine patterns
//
  modifier atState(State state) {
    require(m_state == state);
    _;
  }

  modifier onlyOwner() {
    require(msg.sender == m_owner);
    _;
  }

  modifier onlyOwnerOrAtState(State state) {
    require(msg.sender == m_owner || m_state == state); 
    _;
  }
  
  modifier checkAccess() {
    require(m_firstEntranceToSaleStateUNIX == 0 // solium-disable-line indentation, operator-whitespace
      || now.sub(m_firstEntranceToSaleStateUNIX) <= DURATION_TO_ACCESS_FOR_OWNER 
      || m_state != State.PublicUse
    ); 
    _;
    // owner has not access if duration To Access For Owner was passed 
    // and (&&) contract in PublicUse state.
  }
  
  modifier validRecipient(address recipient) {
    require(recipient != address(0) && recipient != address(this));
    _;
  }

///////////////
// CONSTRUCTOR
//  
  /**
  * @dev Constructor PonziToken.
  */
  function PonziToken() public {
    m_owner = msg.sender;
    m_bank = msg.sender;
    m_state = State.PreSale;
    m_decimals = 8;
    m_name = "Ponzi";
    m_symbol = "PT";
  }

  /**
  * do not forget about:
  * https://medium.com/codetractio/a-look-into-paritys-multisig-wallet-bug-affecting-100-million-in-ether-and-tokens-356f5ba6e90a
  * 
  * @dev Initialize the contract, only owner can call and only once.
  * @return Whether successful or not.
  */
  function initContract() 
    public 
    onlyOwner() 
    returns (bool)
  {
    require(m_maxTokensPerAddress == 0 && m_decimals > 0);
    m_maxTokensPerAddress = uint256(1000).mul(uint256(10)**uint256(m_decimals));

    m_totalSupply = uint256(100000000).mul(uint256(10)**uint256(m_decimals));
    // 70% for owner
    m_balances[msg.sender] = m_totalSupply.mul(uint256(70)).div(uint256(100));
    // 30% for sale
    m_balances[address(this)] = m_totalSupply.sub(m_balances[msg.sender]);

    // allow owner to transfer token from this  
    m_allowed[address(this)][m_owner] = m_balances[address(this)];
    return true;
  }

///////////////////
// ERC20 Methods
// get from https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token/ERC20
//
  /**
  * @dev Gets the balance of the specified address.
  * @param owner The address to query the the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address owner) public view returns (uint256) {
    return m_balances[owner];
  }
  
  /**
  * @dev The name of the token.
  * @return The name of the token.
  */
  function name() public view returns (string) {
    return m_name;
  }

  /**
  * @dev The symbol of the token.
  * @return The symbol of the token.
  */
  function symbol() public view returns (string) {
    return m_symbol;
  }

  /**
  * @dev The number of decimals the token.
  * @return The number of decimals the token.
  * @notice Uses - e.g. 8, means to divide the token.
  * amount by 100000000 to get its user representation.
  */
  function decimals() public view returns (uint8) {
    return m_decimals;
  }

  /**
  * @dev Total number of tokens in existence.
  * @return Total number of tokens in existence.
  */
  function totalSupply() public view returns (uint256) {
    return m_totalSupply;
  }

  /**
  * @dev Transfer token for a specified address.
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  * @return Whether successful or not.
  */
  function transfer(address to, uint256 value) 
    public 
    onlyOwnerOrAtState(State.PublicUse)
    validRecipient(to)
    returns (bool) 
  {
    // require(value <= m_balances[msg.sender]);
    // SafeMath.sub will already throw if this condition is not met
    m_balances[msg.sender] = m_balances[msg.sender].sub(value);
    m_balances[to] = m_balances[to].add(value);
    Transfer(msg.sender, to, value);
    return true;
  }

  /**
   * @dev Transfer tokens from one address to another.
   * @param from Address The address which you want to send tokens from.
   * @param to Address The address which you want to transfer to.
   * @param value Uint256 the amount of tokens to be transferred.
   * @return Whether successful or not.
   */
  function transferFrom(address from, address to, uint256 value) 
    public
    onlyOwnerOrAtState(State.PublicUse)
    validRecipient(to)
    returns (bool) 
  {
    // require(value <= m_balances[from]);
    // require(value <= m_allowed[from][msg.sender]);
    // SafeMath.sub will already throw if this condition is not met
    m_balances[from] = m_balances[from].sub(value);
    m_balances[to] = m_balances[to].add(value);
    m_allowed[from][msg.sender] = m_allowed[from][msg.sender].sub(value);
    Transfer(from, to, value);
    return true;
  }

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * @param spender The address which will spend the funds.
   * @param value The amount of tokens to be spent.
   * @return Whether successful or not.
   */
  function approve(address spender, uint256 value) 
    public
    onlyOwnerOrAtState(State.PublicUse)
    validRecipient(spender)
    returns (bool) 
  {
    // To change the approve amount you first have to reduce the addresses`
    // allowance to zero by calling `approve(spender,0)` if it is not
    // already 0 to mitigate the race condition described here:
    // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    require((value == 0) || (m_allowed[msg.sender][spender] == 0));

    m_allowed[msg.sender][spender] = value;
    Approval(msg.sender, spender, value);
    return true;
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param owner Address The address which owns the funds.
   * @param spender Address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(address owner, address spender) 
    public 
    view
    returns (uint256) 
  {
    return m_allowed[owner][spender];
  }
  
  /**
   * approve should be called when allowed[spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol.
   *
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   * @param spender The address which will spend the funds.
   * @param addedValue The amount of tokens to increase the allowance by.
   * @return Whether successful or not.
   */
  function increaseApproval(address spender, uint addedValue) 
    public 
    onlyOwnerOrAtState(State.PublicUse)
    validRecipient(spender)
    returns (bool) 
  {
    m_allowed[msg.sender][spender] = m_allowed[msg.sender][spender].add(addedValue);
    Approval(msg.sender, spender, m_allowed[msg.sender][spender]);
    return true;
  }

   /**
   * Approve should be called when allowed[spender] == 0. To decrement
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol.
   *
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   * @param spender The address which will spend the funds.
   * @param subtractedValue The amount of tokens to decrease the allowance by.
   * @return Whether successful or not.
   */
  function decreaseApproval(address spender, uint subtractedValue) 
    public
    onlyOwnerOrAtState(State.PublicUse)
    validRecipient(spender)
    returns (bool) 
  {
    uint oldValue = m_allowed[msg.sender][spender];
    if (subtractedValue > oldValue) {
      m_allowed[msg.sender][spender] = 0;
    } else {
      m_allowed[msg.sender][spender] = oldValue.sub(subtractedValue);
    }
    Approval(msg.sender, spender, m_allowed[msg.sender][spender]);
    return true;
  }

///////////////////
// ERC677 Methods
//
  /**
  * @dev Transfer token to a contract address with additional data if the recipient is a contact.
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  * @param extraData The extra data to be passed to the receiving contract.
  * @return Whether successful or not.
  */
  function transferAndCall(address to, uint256 value, bytes extraData) 
    public
    onlyOwnerOrAtState(State.PublicUse)
    validRecipient(to)
    returns (bool)
  {
    // require(value <= m_balances[msg.sender]);
    // SafeMath.sub will throw if there is not enough balance.
    m_balances[msg.sender] = m_balances[msg.sender].sub(value);
    m_balances[to] = m_balances[to].add(value);
    Transfer(msg.sender, to, value);
    if (isContract(to)) {
      contractFallback(to, value, extraData);
      Transfer(msg.sender, to, value, extraData);
    }
    return true;
  }

  /**
  * @dev transfer token all tokens to a contract address with additional data if the recipient is a contact.
  * @param to The address to transfer all to.
  * @param extraData The extra data to be passed to the receiving contract.
  * @return Whether successful or not.
  */
  function transferAllAndCall(address to, bytes extraData) 
    external
    onlyOwnerOrAtState(State.PublicUse)
    returns (bool) 
  {
    return transferAndCall(to, m_balances[msg.sender], extraData);
  }
  
  /**
  * @dev Call ERC677 tokenFallback for ERC677Recipient contract.
  * @param to The address of ERC677Recipient.
  * @param value Amount of tokens with was sended
  * @param data Sended to ERC677Recipient.
  * @return Whether contract or not.
  */
  function contractFallback(address to, uint value, bytes data)
    internal
  {
    ERC677Recipient recipient = ERC677Recipient(to);
    recipient.tokenFallback(msg.sender, value, data);
  }

  /**
  * @dev Check addr if is contract.
  * @param addr The address that checking.
  * @return Whether contract or not.
  */
  function isContract(address addr) internal view returns (bool) {
    uint length;
    assembly { length := extcodesize(addr) }
    return length > 0;
  }
  
  
///////////////////
// payable Methods
// use withdrawal pattern 
// see: http://solidity.readthedocs.io/en/develop/common-patterns.html#withdrawal-from-contracts
// see: https://consensys.github.io/smart-contract-best-practices/known_attacks/
//
  /**
  * Recived ETH converted to tokens amount for price. sender has max limit for tokens 
  * amount as m_maxTokensPerAddress - balanceOf(sender). if amount <= max limit
  * then transfer amount from this to sender and 95%ETH to bank, 5%ETH to owner.
  * else amount > max limit then we calc cost of max limit of tokens,
  * store this cost in m_pendingWithdrawals[sender] and m_myDebtInWei and 
  * transfer max limit of tokens from this to sender and 95% max limit cost to bank
  * 5% max limit cost to owner.
  *
  * @dev Contract receive ETH (payable) from sender and transfer some amount of tokens to him.
  */
  function byTokens() public payable atState(State.Sale) {
    // check if msg.sender can to by tokens 
    require(m_balances[msg.sender] < m_maxTokensPerAddress);

    // get actual token price and set it
    m_tokenPriceInWei = calcTokenPriceInWei();
    
    // check if msg.value has enough for by 1 token
    require(msg.value >= m_tokenPriceInWei);
    
    // calc max available tokens for sender
    uint256 maxAvailableTokens = m_maxTokensPerAddress.sub(m_balances[msg.sender]);
    
    // convert msg.value(wei) to tokens
    uint256 tokensAmount = weiToTokens(msg.value, m_tokenPriceInWei);
    
    if (tokensAmount > maxAvailableTokens) {
      // we CANT transfer all tokens amount, ONLY max available tokens 
      // calc cost in wei of max available tokens
      // subtract cost from msg.value and store it as debt for sender
      tokensAmount = maxAvailableTokens;  
      // calc cost
      uint256 tokensAmountCostInWei = tokensToWei(tokensAmount, m_tokenPriceInWei);
      // calc debt
      uint256 debt = msg.value.sub(tokensAmountCostInWei);
      // Withdrawal pattern avoid Re-Entrancy (dont use transfer to unknow address)
      // update pending withdrawals
      m_pendingWithdrawals[msg.sender] = m_pendingWithdrawals[msg.sender].add(debt);
      // update my debt
      m_myDebtInWei = m_myDebtInWei.add(debt);
    }
    // transfer tokensAmount tokens form this to sender
    // SafeMath.sub will already throw if this condition is not met
    m_balances[address(this)] = m_balances[address(this)].sub(tokensAmount);
    m_balances[msg.sender] = m_balances[msg.sender].add(tokensAmount);

    // we can transfer eth to owner and bank, because we know that they 
    // dont use Re-Entrancy and other attacks.
    // transfer 5% of eht-myDebt to owner
    // owner cant be equal address(0) because this function to be accessible
    // only in State.Sale but owner can be equal address(0), only in State.PublicUse
    // State.Sale not equal State.PublicUse!
    m_owner.transfer(this.balance.sub(m_myDebtInWei).mul(uint256(5)).div(uint256(100)));
    // transfer 95% of eht-myDebt to bank
    // bank cant be equal address(0) see setBank() and PonziToken()
    m_bank.transfer(this.balance.sub(m_myDebtInWei));
    checkValidityOfBalance(); // this.balance >= m_myDebtInWei
    Transfer(address(this), msg.sender, tokensAmount);
    TokensSold(tokensAmount, msg.sender, m_tokenPriceInWei); 
  }
  
  /**
  * @dev Sender receive his pending withdrawals(if > 0).
  */
  function withdraw() external {
    uint amount = m_pendingWithdrawals[msg.sender];
    require(amount > 0);
    // set zero the pending refund before
    // sending to prevent Re-Entrancy 
    m_pendingWithdrawals[msg.sender] = 0;
    m_myDebtInWei = m_myDebtInWei.sub(amount);
    msg.sender.transfer(amount);
    checkValidityOfBalance(); // this.balance >= m_myDebtInWei
    Withdrawal(msg.sender, amount);
  }

  /**
  * @notice http://solidity.readthedocs.io/en/develop/contracts.html#fallback-function
  * we dont need recieve ETH always, only in State.Sale from externally accounts.
  *
  * @dev Fallback func, call byTokens().
  */
  function() public payable atState(State.Sale) {
    byTokens();
  }
    
  
////////////////////////
// external view methods
// everyone outside has access 
//
  /**
  * @dev Gets the pending withdrawals of the specified address.
  * @param owner The address to query the pending withdrawals of.
  * @return An uint256 representing the amount withdrawals owned by the passed address.
  */
  function pendingWithdrawals(address owner) external view returns (uint256) {
    return m_pendingWithdrawals[owner];
  }
  
  /**
  * @dev Get contract work state.
  * @return Contract work state via string.
  */
  function state() external view returns (string stateString) {
    if (m_state == State.PreSale) {
      stateString = PRE_SALE_STR;
    } else if (m_state == State.Sale) {
      stateString = SALE_STR;
    } else if (m_state == State.PublicUse) {
      stateString = PUBLIC_USE_STR;
    }
  }
  
  /**
  * @dev Get price of one token in wei.
  * @return Price of one token in wei.
  */
  function tokenPriceInWei() public view returns (uint256) {
    return calcTokenPriceInWei();
  }
  
  /**
  * @dev Get address of the bank.
  * @return Address of the bank. 
  */
  function bank() external view returns(address) {
    return m_bank;
  }
  
  /**
  * @dev Get timestamp of first entrance to sale state.
  * @return Timestamp of first entrance to sale state.
  */
  function firstEntranceToSaleStateUNIX() 
    external
    view 
    returns(uint256) 
  {
    return m_firstEntranceToSaleStateUNIX;
  }
  
  /**
  * @dev Get address of the price setter.
  * @return Address of the price setter.
  */
  function priceSetter() external view returns (address) {
    return m_priceSetter;
  }

////////////////////
// public methods
// only for owner
//
  /**
  * @dev Owner do disown.
  */ 
  function disown() external atState(State.PublicUse) onlyOwner() {
    delete m_owner;
  }
  
  /**
  * @dev Set state of contract working.
  * @param newState String representation of new state.
  */ 
  function setState(string newState) 
    external 
    onlyOwner()
    checkAccess()
  {
    if (keccak256(newState) == keccak256(PRE_SALE_STR)) {
      m_state = State.PreSale;
    } else if (keccak256(newState) == keccak256(SALE_STR)) {
      if (m_firstEntranceToSaleStateUNIX == 0) 
        m_firstEntranceToSaleStateUNIX = now;
        
      m_state = State.Sale;
    } else if (keccak256(newState) == keccak256(PUBLIC_USE_STR)) {
      m_state = State.PublicUse;
    } else {
      // if newState not valid string
      revert();
    }
    StateChanged(msg.sender, m_state);
  }

  /**
  * If token price not fix then actual price 
  * always will be tokenPriceInWeiForDay(day).
  *
  * @dev Set price of one token in wei and fix it.
  * @param newTokenPriceInWei Price of one token in wei.
  */ 
  function setAndFixTokenPriceInWei(uint256 newTokenPriceInWei) 
    external
    checkAccess()
  {
    require(msg.sender == m_owner || msg.sender == m_priceSetter);
    m_isFixedTokenPrice = true;
    m_tokenPriceInWei = newTokenPriceInWei;
    PriceChanged(msg.sender, m_tokenPriceInWei, m_isFixedTokenPrice);
  }
  
  /**
  * If token price is unfixed then actual will be tokenPriceInWeiForDay(day).
  * 
  * @dev Set unfix token price to true.
  */
  function unfixTokenPriceInWei() 
    external
    checkAccess()
  {
    require(msg.sender == m_owner || msg.sender == m_priceSetter);
    m_isFixedTokenPrice = false;
    PriceChanged(msg.sender, m_tokenPriceInWei, m_isFixedTokenPrice);
  }
  
  /**
  * @dev Set the PriceSetter address, which has access to set one token price in wei.
  * @param newPriceSetter The address of new PriceSetter.
  */
  function setPriceSetter(address newPriceSetter) 
    external 
    onlyOwner() 
    checkAccess()
  {
    m_priceSetter = newPriceSetter;
  }

  /**
  * @dev Set the bank, which receive 95%ETH from tokens sale.
  * @param newBank The address of new bank.
  */
  function setBank(address newBank) 
    external
    validRecipient(newBank) 
    onlyOwner()
    checkAccess()
  {
    require(newBank != address(0));
    m_bank = newBank;
  }

////////////////////////
// internal pure methods
//
  /**
  * @dev Convert token to wei.
  * @param tokensAmount Amout of tokens.
  * @param tokenPrice One token price in wei.
  * @return weiAmount Result amount of convertation. 
  */
  function tokensToWei(uint256 tokensAmount, uint256 tokenPrice) 
    internal
    pure
    returns(uint256 weiAmount)
  {
    weiAmount = tokensAmount.mul(tokenPrice); 
  }
  
  /**
  * @dev Conver wei to token.
  * @param weiAmount Wei amout.
  * @param tokenPrice One token price in wei.
  * @return tokensAmount Result amount of convertation.
  */
  function weiToTokens(uint256 weiAmount, uint256 tokenPrice) 
    internal 
    pure 
    returns(uint256 tokensAmount) 
  {
    tokensAmount = weiAmount.div(tokenPrice);
  }
 
////////////////////////
// private view methods
//
  /**
  * @dev Get actual token price.
  * @return price One token price in wei. 
  */
  function calcTokenPriceInWei() 
    private 
    view 
    returns(uint256 price) 
  {
    if (m_isFixedTokenPrice) {
      // price is fixed, return current val
      price = m_tokenPriceInWei;
    } else {
      // price not fixed, we must to calc price
      if (m_firstEntranceToSaleStateUNIX == 0) {
        // if contract dont enter to SaleState then price = 0 
        price = 0;
      } else {
        // calculate day after first Entrance To Sale State
        uint256 day = now.sub(m_firstEntranceToSaleStateUNIX).div(1 days);
        // use special formula for calcutation price
        price = tokenPriceInWeiForDay(day);
      }
    } 
  }
  
  /**
  * @dev Get token price for specific day after starting sale tokens.
  * @param day Secific day.
  * @return price One token price in wei for specific day. 
  */
  function tokenPriceInWeiForDay(uint256 day) 
    private 
    view 
    returns(uint256 price)
  {
    // day 1:   price 1*10^(decimals) TOKEN = 0.001 ETH
    //          price 1 TOKEN = 1 * 10^(-3) ETH / 10^(decimals), in ETH
    //          convert to wei:
    //          price 1 TOKEN = 1 * 10^(-3) * wei * 10^(-decimals)
    //          price 1 TOKEN = 1 * 10^(-3) * 10^(18) * 10^(-decimals)
    //          price 1 TOKEN = 1 * 10^(15) * 10^(-decimals), in WEI
    
    // day 2:   price 1*10^(decimals) TOKEN = 0.002 ETH;
    //          price 1 TOKEN = 2 * 10^(15) * 10^(-decimals), in WEI
    // ...
    // day 12:  price 1*10^(decimals) TOKEN = 0.012 ETH;
    //          price 1 TOKEN = 12 * 10^(15) * 10^(-decimals), in WEI
    
    // day >12: price 1*10^(decimals) TOKEN = 0.012 ETH;
    //          price 1 TOKEN = 12 * 10^(15) * 10^(-decimals), in WEI

    // from 0 to 11 - sum is 12 days
    if (day <= 11) 
      price = day.add(1);// because from >0h to <24h after start day will be 0, 
    else                 // but for calc price it must be 1;
      price = 12;
    // convert to WEI
    price = price.mul(uint256(10**15)).div(10**uint256(m_decimals));
  }
  
  /**
  * @notice It is always must be true, for correct withdrawals and receivers ETH.
  *
  * Check if this.balance >= m_myDebtInWei.
  */
  function checkValidityOfBalance() private view {
    // assertion is not a strict equality of the balance because the contract 
    // can be forcibly sent ether without going through the byTokens() func.
    // selfdestruct does not trigger a contract's fallback function. 
    // see: http://solidity.readthedocs.io/en/develop/contracts.html#fallback-function
    assert(this.balance >= m_myDebtInWei);
  }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newBank","type":"address"}],"name":"setBank","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newTokenPriceInWei","type":"uint256"}],"name":"setAndFixTokenPriceInWei","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"disown","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"priceSetter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenPriceInWei","outputs":[{"name":"","type":"uint256"}],"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":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"},{"name":"extraData","type":"bytes"}],"name":"transferAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newPriceSetter","type":"address"}],"name":"setPriceSetter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newState","type":"string"}],"name":"setState","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bank","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initContract","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"firstEntranceToSaleStateUNIX","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"state","outputs":[{"name":"stateString","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"extraData","type":"bytes"}],"name":"transferAllAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"byTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"pendingWithdrawals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unfixTokenPriceInWei","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"who","type":"address"},{"indexed":false,"name":"newState","type":"uint8"}],"name":"StateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"who","type":"address"},{"indexed":false,"name":"newPrice","type":"uint256"},{"indexed":false,"name":"isFixed","type":"bool"}],"name":"PriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"numberOfTokens","type":"uint256"},{"indexed":true,"name":"purchasedBy","type":"address"},{"indexed":true,"name":"priceInWei","type":"uint256"}],"name":"TokensSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"sumInWei","type":"uint256"}],"name":"Withdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

606060405234156200001057600080fd5b60038054600160a060020a033316600160a060020a0319918216811790925560058054909116909117905560008054819060ff19166001820217905550600b805460ff1916600817905560408051908101604052600581527f506f6e7a6900000000000000000000000000000000000000000000000000000060208201526009908051620000a3929160200190620000f4565b5060408051908101604052600281527f50540000000000000000000000000000000000000000000000000000000000006020820152600a908051620000ed929160200190620000f4565b5062000199565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013757805160ff191683800117855562000167565b8280016001018555821562000167579182015b82811115620001675782518255916020019190600101906200014a565b506200017592915062000179565b5090565b6200019691905b8082111562000175576000815560010162000180565b90565b611fa380620001a96000396000f3006060604052600436106101695763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610192578063090d23b91461021c578063095ea7b31461023d5780630f6f5f981461027357806318160ddd146102895780631e9bf0da146102ae57806323b872dd146102c15780632c09bef7146102e95780632f8de81014610318578063313ce5671461032b5780633ccfd60b146103545780634000aea01461036757806363791e3c146103cc57806366188463146103eb57806368794b871461040d57806370a082311461042b57806376cdb03b1461044a5780638203f5fe1461045d57806395d89b4114610470578063a9059cbb14610483578063be140381146104a5578063c19d93fb146104b8578063d73dd623146104cb578063d87692d9146104ed578063dd62ed3e14610518578063dec32ae81461053d578063f3f4370314610545578063f575152414610564575b60018060005460ff16600281111561017d57fe5b1461018757600080fd5b61018f610577565b50005b341561019d57600080fd5b6101a5610853565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101e15780820151838201526020016101c9565b50505050905090810190601f16801561020e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022757600080fd5b61023b600160a060020a03600435166108fc565b005b341561024857600080fd5b61025f600160a060020a03600435166024356109df565b604051901515815260200160405180910390f35b341561027e57600080fd5b61023b600435610b03565b341561029457600080fd5b61029c610bed565b60405190815260200160405180910390f35b34156102b957600080fd5b61023b610bf3565b34156102cc57600080fd5b61025f600160a060020a0360043581169060243516604435610c4c565b34156102f457600080fd5b6102fc610dcd565b604051600160a060020a03909116815260200160405180910390f35b341561032357600080fd5b61029c610ddc565b341561033657600080fd5b61033e610deb565b60405160ff909116815260200160405180910390f35b341561035f57600080fd5b61023b610df4565b341561037257600080fd5b61025f60048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610ec195505050505050565b34156103d757600080fd5b61023b600160a060020a03600435166110bd565b34156103f657600080fd5b61025f600160a060020a0360043516602435611154565b341561041857600080fd5b61023b60048035602481019101356112d0565b341561043657600080fd5b61029c600160a060020a0360043516611600565b341561045557600080fd5b6102fc61161b565b341561046857600080fd5b61025f61162a565b341561047b57600080fd5b6101a561172a565b341561048e57600080fd5b61025f600160a060020a036004351660243561179d565b34156104b057600080fd5b61029c6118ca565b34156104c357600080fd5b6101a56118d0565b34156104d657600080fd5b61025f600160a060020a03600435166024356119d1565b34156104f857600080fd5b61025f60048035600160a060020a03169060248035908101910135611af3565b341561052357600080fd5b61029c600160a060020a0360043581169060243516611ba3565b61023b610577565b341561055057600080fd5b61029c600160a060020a0360043516611bce565b341561056f57600080fd5b61023b611be9565b600080808060018060005460ff16600281111561059057fe5b1461059a57600080fd5b600154600160a060020a0333166000908152600d6020526040902054106105c057600080fd5b6105c8611ccd565b60068190553410156105d957600080fd5b600160a060020a0333166000908152600d60205260409020546001546106049163ffffffff611d2c16565b945061061234600654611d3e565b9350848411156106995784935061062b84600654611d57565b925061063d348463ffffffff611d2c16565b600160a060020a0333166000908152600e6020526040902054909250610669908363ffffffff611d6916565b600160a060020a0333166000908152600e6020526040902055600854610695908363ffffffff611d6916565b6008555b600160a060020a0330166000908152600d60205260409020546106c2908563ffffffff611d2c16565b600160a060020a033081166000908152600d60205260408082209390935533909116815220546106f8908563ffffffff611d6916565b600160a060020a033381166000908152600d6020526040902091909155600354600854908216916108fc9161075c9160649161075091600591610744913016319063ffffffff611d2c16565b9063ffffffff611d8316565b9063ffffffff611dae16565b9081150290604051600060405180830381858888f19350505050151561078157600080fd5b600554600854600160a060020a03918216916108fc916107aa913016319063ffffffff611d2c16565b9081150290604051600060405180830381858888f1935050505015156107cf57600080fd5b6107d7611dc5565b33600160a060020a031630600160a060020a0316600080516020611f588339815191528660405190815260200160405180910390a360065433600160a060020a03167f5fb60baabe7cf733eb57af000c64fd127b00865bcc5f520b73e6d8290a37211c8660405190815260200160405180910390a35050505050565b61085b611f45565b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f15780601f106108c6576101008083540402835291602001916108f1565b820191906000526020600020905b8154815290600101906020018083116108d457829003601f168201915b505050505090505b90565b80600160a060020a03811615801590610927575030600160a060020a031681600160a060020a031614155b151561093257600080fd5b60035433600160a060020a0390811691161461094d57600080fd5b6002541580610973575062bdd80061097060025442611d2c90919063ffffffff16565b11155b8061098f5750600260005460ff16600281111561098c57fe5b14155b151561099a57600080fd5b600160a060020a03821615156109af57600080fd5b506005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60035460009060029033600160a060020a0390811691161480610a1c5750806002811115610a0957fe5b60005460ff166002811115610a1a57fe5b145b1515610a2757600080fd5b83600160a060020a03811615801590610a52575030600160a060020a031681600160a060020a031614155b1515610a5d57600080fd5b831580610a8d5750600160a060020a033381166000908152600c6020908152604080832093891683529290522054155b1515610a9857600080fd5b600160a060020a033381166000818152600c60209081526040808320948a1680845294909152908190208790557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259087905190815260200160405180910390a3506001949350505050565b6002541580610b29575062bdd800610b2660025442611d2c90919063ffffffff16565b11155b80610b455750600260005460ff166002811115610b4257fe5b14155b1515610b5057600080fd5b60035433600160a060020a0390811691161480610b7b575060045433600160a060020a039081169116145b1515610b8657600080fd5b600b805461ff001916610100908117918290556006839055600160a060020a033316917f1f5a7db2ed856277a2ace32d94edf854ab01019e7dd852065f1d739d9ac5d1709184910460ff16604051918252151560208201526040908101905180910390a250565b60075490565b60028060005460ff166002811115610c0757fe5b14610c1157600080fd5b60035433600160a060020a03908116911614610c2c57600080fd5b506003805473ffffffffffffffffffffffffffffffffffffffff19169055565b60035460009060029033600160a060020a0390811691161480610c895750806002811115610c7657fe5b60005460ff166002811115610c8757fe5b145b1515610c9457600080fd5b83600160a060020a03811615801590610cbf575030600160a060020a031681600160a060020a031614155b1515610cca57600080fd5b600160a060020a0386166000908152600d6020526040902054610cf3908563ffffffff611d2c16565b600160a060020a038088166000908152600d60205260408082209390935590871681522054610d28908563ffffffff611d6916565b600160a060020a038087166000908152600d60209081526040808320949094558983168252600c8152838220339093168252919091522054610d70908563ffffffff611d2c16565b600160a060020a038088166000818152600c602090815260408083203386168452909152908190209390935590871691600080516020611f588339815191529087905190815260200160405180910390a350600195945050505050565b600454600160a060020a031690565b6000610de6611ccd565b905090565b600b5460ff1690565b600160a060020a0333166000908152600e6020526040812054908111610e1957600080fd5b600160a060020a0333166000908152600e6020526040812055600854610e45908263ffffffff611d2c16565b600855600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610e7957600080fd5b610e81611dc5565b33600160a060020a03167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405190815260200160405180910390a250565b60035460009060029033600160a060020a0390811691161480610efe5750806002811115610eeb57fe5b60005460ff166002811115610efc57fe5b145b1515610f0957600080fd5b84600160a060020a03811615801590610f34575030600160a060020a031681600160a060020a031614155b1515610f3f57600080fd5b600160a060020a0333166000908152600d6020526040902054610f68908663ffffffff611d2c16565b600160a060020a033381166000908152600d60205260408082209390935590881681522054610f9d908663ffffffff611d6916565b600160a060020a038088166000818152600d60205260409081902093909355913390911690600080516020611f588339815191529088905190815260200160405180910390a3610fec86611ddd565b156110b157610ffc868686611de5565b85600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16878760405182815260406020820181815290820183818151815260200191508051906020019080838360005b8381101561107557808201518382015260200161105d565b50505050905090810190601f1680156110a25780820380516001836020036101000a031916815260200191505b50935050505060405180910390a35b50600195945050505050565b60035433600160a060020a039081169116146110d857600080fd5b60025415806110fe575062bdd8006110fb60025442611d2c90919063ffffffff16565b11155b8061111a5750600260005460ff16600281111561111757fe5b14155b151561112557600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600354600090819060029033600160a060020a0390811691161480611193575080600281111561118057fe5b60005460ff16600281111561119157fe5b145b151561119e57600080fd5b84600160a060020a038116158015906111c9575030600160a060020a031681600160a060020a031614155b15156111d457600080fd5b600160a060020a033381166000908152600c60209081526040808320938a168352929052205492508285111561123157600160a060020a033381166000908152600c60209081526040808320938a16835292905290812055611268565b611241838663ffffffff611d2c16565b600160a060020a033381166000908152600c60209081526040808320938b16835292905220555b600160a060020a033381166000818152600c60209081526040808320948b168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a350600195945050505050565b60035433600160a060020a039081169116146112eb57600080fd5b6002541580611311575062bdd80061130e60025442611d2c90919063ffffffff16565b11155b8061132d5750600260005460ff16600281111561132a57fe5b14155b151561133857600080fd5b604080519081016040908152600782527f50726553616c65000000000000000000000000000000000000000000000000006020830152518082805190602001908083835b6020831061139b5780518252601f19909201916020918201910161137c565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902082826040518083838082843782019150509250505060405190819003902014156114045760008054819060ff19166001825b02179055506115a6565b604080519081016040908152600482527f53616c65000000000000000000000000000000000000000000000000000000006020830152518082805190602001908083835b602083106114675780518252601f199092019160209182019101611448565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902082826040518083838082843782019150509250505060405190819003902014156114d95760025415156114c657426002555b600080546001919060ff191682806113fa565b604080519081016040908152600982527f5075626c696355736500000000000000000000000000000000000000000000006020830152518082805190602001908083835b6020831061153c5780518252601f19909201916020918201910161151d565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902082826040518083838082843782019150509250505060405190819003902014156115a157600080546002919060ff19166001836113fa565b600080fd5b600054600160a060020a033316907f20628e08e5aabb4d0033fdf39ce214d8b24483924acea1be5c168206746d5a379060ff16604051808260028111156115e957fe5b60ff16815260200191505060405180910390a25050565b600160a060020a03166000908152600d602052604090205490565b600554600160a060020a031690565b60035460009033600160a060020a0390811691161461164857600080fd5b60015415801561165f5750600b54600060ff909116115b151561166a57600080fd5b600b54611686906103e89060ff16600a0a63ffffffff611d8316565b600155600b546116a7906305f5e1009060ff16600a0a63ffffffff611d8316565b60078190556116c49060649061075090604663ffffffff611d8316565b600160a060020a0333166000908152600d602052604090208190556007546116f19163ffffffff611d2c16565b600160a060020a033081166000908152600d60209081526040808320859055600c82528083206003549094168352929052205550600190565b611732611f45565b600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f15780601f106108c6576101008083540402835291602001916108f1565b60035460009060029033600160a060020a03908116911614806117da57508060028111156117c757fe5b60005460ff1660028111156117d857fe5b145b15156117e557600080fd5b83600160a060020a03811615801590611810575030600160a060020a031681600160a060020a031614155b151561181b57600080fd5b600160a060020a0333166000908152600d6020526040902054611844908563ffffffff611d2c16565b600160a060020a033381166000908152600d60205260408082209390935590871681522054611879908563ffffffff611d6916565b600160a060020a038087166000818152600d60205260409081902093909355913390911690600080516020611f588339815191529087905190815260200160405180910390a3506001949350505050565b60025490565b6118d8611f45565b6000805460ff1660028111156118ea57fe5b141561192b5760408051908101604052600781527f50726553616c6500000000000000000000000000000000000000000000000000602082015290506108f9565b600160005460ff16600281111561193e57fe5b141561197f5760408051908101604052600481527f53616c6500000000000000000000000000000000000000000000000000000000602082015290506108f9565b600260005460ff16600281111561199257fe5b14156108f95760408051908101604052600981527f5075626c696355736500000000000000000000000000000000000000000000006020820152905090565b60035460009060029033600160a060020a0390811691161480611a0e57508060028111156119fb57fe5b60005460ff166002811115611a0c57fe5b145b1515611a1957600080fd5b83600160a060020a03811615801590611a44575030600160a060020a031681600160a060020a031614155b1515611a4f57600080fd5b600160a060020a033381166000908152600c6020908152604080832093891683529290522054611a85908563ffffffff611d6916565b600160a060020a033381166000818152600c60209081526040808320948b168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a3506001949350505050565b60035460009060029033600160a060020a0390811691161480611b305750806002811115611b1d57fe5b60005460ff166002811115611b2e57fe5b145b1515611b3b57600080fd5b611b9a85600d600033600160a060020a0316600160a060020a031681526020019081526020016000205486868080601f016020809104026020016040519081016040528181529291906020840183838082843750610ec1945050505050565b95945050505050565b600160a060020a039182166000908152600c6020908152604080832093909416825291909152205490565b600160a060020a03166000908152600e602052604090205490565b6002541580611c0f575062bdd800611c0c60025442611d2c90919063ffffffff16565b11155b80611c2b5750600260005460ff166002811115611c2857fe5b14155b1515611c3657600080fd5b60035433600160a060020a0390811691161480611c61575060045433600160a060020a039081169116145b1515611c6c57600080fd5b600b805461ff00191690819055600654600160a060020a033316917f1f5a7db2ed856277a2ace32d94edf854ab01019e7dd852065f1d739d9ac5d1709190610100900460ff16604051918252151560208201526040908101905180910390a2565b600b546000908190610100900460ff1615611cec576006549150611d28565b6002541515611cfe5760009150611d28565b611d1a6201518061075060025442611d2c90919063ffffffff16565b9050611d2581611ef5565b91505b5090565b600082821115611d3857fe5b50900390565b6000611d50838363ffffffff611dae16565b9392505050565b6000611d50838363ffffffff611d8316565b600082820183811015611d7857fe5b8091505b5092915050565b600080831515611d965760009150611d7c565b50828202828482811515611da657fe5b0414611d7857fe5b6000808284811515611dbc57fe5b04949350505050565b600854600160a060020a033016311015611ddb57fe5b565b6000903b1190565b82600160a060020a03811663c0ee0b8a3385856000604051602001526040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611e87578082015183820152602001611e6f565b50505050905090810190601f168015611eb45780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1515611ed457600080fd5b6102c65a03f11515611ee557600080fd5b5050506040518051505050505050565b6000600b8211611f1757611f1082600163ffffffff611d6916565b9050611f1b565b50600c5b600b54611f3f9060ff16600a0a6107508366038d7ea4c6800063ffffffff611d8316565b92915050565b602060405190810160405260008152905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582003c0523e2b1b3696b8d35ceacaf1567e8044c8e5ac63f79a20068e089cd158d40029

Deployed Bytecode

0x6060604052600436106101695763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610192578063090d23b91461021c578063095ea7b31461023d5780630f6f5f981461027357806318160ddd146102895780631e9bf0da146102ae57806323b872dd146102c15780632c09bef7146102e95780632f8de81014610318578063313ce5671461032b5780633ccfd60b146103545780634000aea01461036757806363791e3c146103cc57806366188463146103eb57806368794b871461040d57806370a082311461042b57806376cdb03b1461044a5780638203f5fe1461045d57806395d89b4114610470578063a9059cbb14610483578063be140381146104a5578063c19d93fb146104b8578063d73dd623146104cb578063d87692d9146104ed578063dd62ed3e14610518578063dec32ae81461053d578063f3f4370314610545578063f575152414610564575b60018060005460ff16600281111561017d57fe5b1461018757600080fd5b61018f610577565b50005b341561019d57600080fd5b6101a5610853565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101e15780820151838201526020016101c9565b50505050905090810190601f16801561020e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022757600080fd5b61023b600160a060020a03600435166108fc565b005b341561024857600080fd5b61025f600160a060020a03600435166024356109df565b604051901515815260200160405180910390f35b341561027e57600080fd5b61023b600435610b03565b341561029457600080fd5b61029c610bed565b60405190815260200160405180910390f35b34156102b957600080fd5b61023b610bf3565b34156102cc57600080fd5b61025f600160a060020a0360043581169060243516604435610c4c565b34156102f457600080fd5b6102fc610dcd565b604051600160a060020a03909116815260200160405180910390f35b341561032357600080fd5b61029c610ddc565b341561033657600080fd5b61033e610deb565b60405160ff909116815260200160405180910390f35b341561035f57600080fd5b61023b610df4565b341561037257600080fd5b61025f60048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610ec195505050505050565b34156103d757600080fd5b61023b600160a060020a03600435166110bd565b34156103f657600080fd5b61025f600160a060020a0360043516602435611154565b341561041857600080fd5b61023b60048035602481019101356112d0565b341561043657600080fd5b61029c600160a060020a0360043516611600565b341561045557600080fd5b6102fc61161b565b341561046857600080fd5b61025f61162a565b341561047b57600080fd5b6101a561172a565b341561048e57600080fd5b61025f600160a060020a036004351660243561179d565b34156104b057600080fd5b61029c6118ca565b34156104c357600080fd5b6101a56118d0565b34156104d657600080fd5b61025f600160a060020a03600435166024356119d1565b34156104f857600080fd5b61025f60048035600160a060020a03169060248035908101910135611af3565b341561052357600080fd5b61029c600160a060020a0360043581169060243516611ba3565b61023b610577565b341561055057600080fd5b61029c600160a060020a0360043516611bce565b341561056f57600080fd5b61023b611be9565b600080808060018060005460ff16600281111561059057fe5b1461059a57600080fd5b600154600160a060020a0333166000908152600d6020526040902054106105c057600080fd5b6105c8611ccd565b60068190553410156105d957600080fd5b600160a060020a0333166000908152600d60205260409020546001546106049163ffffffff611d2c16565b945061061234600654611d3e565b9350848411156106995784935061062b84600654611d57565b925061063d348463ffffffff611d2c16565b600160a060020a0333166000908152600e6020526040902054909250610669908363ffffffff611d6916565b600160a060020a0333166000908152600e6020526040902055600854610695908363ffffffff611d6916565b6008555b600160a060020a0330166000908152600d60205260409020546106c2908563ffffffff611d2c16565b600160a060020a033081166000908152600d60205260408082209390935533909116815220546106f8908563ffffffff611d6916565b600160a060020a033381166000908152600d6020526040902091909155600354600854908216916108fc9161075c9160649161075091600591610744913016319063ffffffff611d2c16565b9063ffffffff611d8316565b9063ffffffff611dae16565b9081150290604051600060405180830381858888f19350505050151561078157600080fd5b600554600854600160a060020a03918216916108fc916107aa913016319063ffffffff611d2c16565b9081150290604051600060405180830381858888f1935050505015156107cf57600080fd5b6107d7611dc5565b33600160a060020a031630600160a060020a0316600080516020611f588339815191528660405190815260200160405180910390a360065433600160a060020a03167f5fb60baabe7cf733eb57af000c64fd127b00865bcc5f520b73e6d8290a37211c8660405190815260200160405180910390a35050505050565b61085b611f45565b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f15780601f106108c6576101008083540402835291602001916108f1565b820191906000526020600020905b8154815290600101906020018083116108d457829003601f168201915b505050505090505b90565b80600160a060020a03811615801590610927575030600160a060020a031681600160a060020a031614155b151561093257600080fd5b60035433600160a060020a0390811691161461094d57600080fd5b6002541580610973575062bdd80061097060025442611d2c90919063ffffffff16565b11155b8061098f5750600260005460ff16600281111561098c57fe5b14155b151561099a57600080fd5b600160a060020a03821615156109af57600080fd5b506005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60035460009060029033600160a060020a0390811691161480610a1c5750806002811115610a0957fe5b60005460ff166002811115610a1a57fe5b145b1515610a2757600080fd5b83600160a060020a03811615801590610a52575030600160a060020a031681600160a060020a031614155b1515610a5d57600080fd5b831580610a8d5750600160a060020a033381166000908152600c6020908152604080832093891683529290522054155b1515610a9857600080fd5b600160a060020a033381166000818152600c60209081526040808320948a1680845294909152908190208790557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259087905190815260200160405180910390a3506001949350505050565b6002541580610b29575062bdd800610b2660025442611d2c90919063ffffffff16565b11155b80610b455750600260005460ff166002811115610b4257fe5b14155b1515610b5057600080fd5b60035433600160a060020a0390811691161480610b7b575060045433600160a060020a039081169116145b1515610b8657600080fd5b600b805461ff001916610100908117918290556006839055600160a060020a033316917f1f5a7db2ed856277a2ace32d94edf854ab01019e7dd852065f1d739d9ac5d1709184910460ff16604051918252151560208201526040908101905180910390a250565b60075490565b60028060005460ff166002811115610c0757fe5b14610c1157600080fd5b60035433600160a060020a03908116911614610c2c57600080fd5b506003805473ffffffffffffffffffffffffffffffffffffffff19169055565b60035460009060029033600160a060020a0390811691161480610c895750806002811115610c7657fe5b60005460ff166002811115610c8757fe5b145b1515610c9457600080fd5b83600160a060020a03811615801590610cbf575030600160a060020a031681600160a060020a031614155b1515610cca57600080fd5b600160a060020a0386166000908152600d6020526040902054610cf3908563ffffffff611d2c16565b600160a060020a038088166000908152600d60205260408082209390935590871681522054610d28908563ffffffff611d6916565b600160a060020a038087166000908152600d60209081526040808320949094558983168252600c8152838220339093168252919091522054610d70908563ffffffff611d2c16565b600160a060020a038088166000818152600c602090815260408083203386168452909152908190209390935590871691600080516020611f588339815191529087905190815260200160405180910390a350600195945050505050565b600454600160a060020a031690565b6000610de6611ccd565b905090565b600b5460ff1690565b600160a060020a0333166000908152600e6020526040812054908111610e1957600080fd5b600160a060020a0333166000908152600e6020526040812055600854610e45908263ffffffff611d2c16565b600855600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610e7957600080fd5b610e81611dc5565b33600160a060020a03167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b658260405190815260200160405180910390a250565b60035460009060029033600160a060020a0390811691161480610efe5750806002811115610eeb57fe5b60005460ff166002811115610efc57fe5b145b1515610f0957600080fd5b84600160a060020a03811615801590610f34575030600160a060020a031681600160a060020a031614155b1515610f3f57600080fd5b600160a060020a0333166000908152600d6020526040902054610f68908663ffffffff611d2c16565b600160a060020a033381166000908152600d60205260408082209390935590881681522054610f9d908663ffffffff611d6916565b600160a060020a038088166000818152600d60205260409081902093909355913390911690600080516020611f588339815191529088905190815260200160405180910390a3610fec86611ddd565b156110b157610ffc868686611de5565b85600160a060020a031633600160a060020a03167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16878760405182815260406020820181815290820183818151815260200191508051906020019080838360005b8381101561107557808201518382015260200161105d565b50505050905090810190601f1680156110a25780820380516001836020036101000a031916815260200191505b50935050505060405180910390a35b50600195945050505050565b60035433600160a060020a039081169116146110d857600080fd5b60025415806110fe575062bdd8006110fb60025442611d2c90919063ffffffff16565b11155b8061111a5750600260005460ff16600281111561111757fe5b14155b151561112557600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600354600090819060029033600160a060020a0390811691161480611193575080600281111561118057fe5b60005460ff16600281111561119157fe5b145b151561119e57600080fd5b84600160a060020a038116158015906111c9575030600160a060020a031681600160a060020a031614155b15156111d457600080fd5b600160a060020a033381166000908152600c60209081526040808320938a168352929052205492508285111561123157600160a060020a033381166000908152600c60209081526040808320938a16835292905290812055611268565b611241838663ffffffff611d2c16565b600160a060020a033381166000908152600c60209081526040808320938b16835292905220555b600160a060020a033381166000818152600c60209081526040808320948b168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a350600195945050505050565b60035433600160a060020a039081169116146112eb57600080fd5b6002541580611311575062bdd80061130e60025442611d2c90919063ffffffff16565b11155b8061132d5750600260005460ff16600281111561132a57fe5b14155b151561133857600080fd5b604080519081016040908152600782527f50726553616c65000000000000000000000000000000000000000000000000006020830152518082805190602001908083835b6020831061139b5780518252601f19909201916020918201910161137c565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902082826040518083838082843782019150509250505060405190819003902014156114045760008054819060ff19166001825b02179055506115a6565b604080519081016040908152600482527f53616c65000000000000000000000000000000000000000000000000000000006020830152518082805190602001908083835b602083106114675780518252601f199092019160209182019101611448565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902082826040518083838082843782019150509250505060405190819003902014156114d95760025415156114c657426002555b600080546001919060ff191682806113fa565b604080519081016040908152600982527f5075626c696355736500000000000000000000000000000000000000000000006020830152518082805190602001908083835b6020831061153c5780518252601f19909201916020918201910161151d565b6001836020036101000a038019825116818451161790925250505091909101925060409150505190819003902082826040518083838082843782019150509250505060405190819003902014156115a157600080546002919060ff19166001836113fa565b600080fd5b600054600160a060020a033316907f20628e08e5aabb4d0033fdf39ce214d8b24483924acea1be5c168206746d5a379060ff16604051808260028111156115e957fe5b60ff16815260200191505060405180910390a25050565b600160a060020a03166000908152600d602052604090205490565b600554600160a060020a031690565b60035460009033600160a060020a0390811691161461164857600080fd5b60015415801561165f5750600b54600060ff909116115b151561166a57600080fd5b600b54611686906103e89060ff16600a0a63ffffffff611d8316565b600155600b546116a7906305f5e1009060ff16600a0a63ffffffff611d8316565b60078190556116c49060649061075090604663ffffffff611d8316565b600160a060020a0333166000908152600d602052604090208190556007546116f19163ffffffff611d2c16565b600160a060020a033081166000908152600d60209081526040808320859055600c82528083206003549094168352929052205550600190565b611732611f45565b600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f15780601f106108c6576101008083540402835291602001916108f1565b60035460009060029033600160a060020a03908116911614806117da57508060028111156117c757fe5b60005460ff1660028111156117d857fe5b145b15156117e557600080fd5b83600160a060020a03811615801590611810575030600160a060020a031681600160a060020a031614155b151561181b57600080fd5b600160a060020a0333166000908152600d6020526040902054611844908563ffffffff611d2c16565b600160a060020a033381166000908152600d60205260408082209390935590871681522054611879908563ffffffff611d6916565b600160a060020a038087166000818152600d60205260409081902093909355913390911690600080516020611f588339815191529087905190815260200160405180910390a3506001949350505050565b60025490565b6118d8611f45565b6000805460ff1660028111156118ea57fe5b141561192b5760408051908101604052600781527f50726553616c6500000000000000000000000000000000000000000000000000602082015290506108f9565b600160005460ff16600281111561193e57fe5b141561197f5760408051908101604052600481527f53616c6500000000000000000000000000000000000000000000000000000000602082015290506108f9565b600260005460ff16600281111561199257fe5b14156108f95760408051908101604052600981527f5075626c696355736500000000000000000000000000000000000000000000006020820152905090565b60035460009060029033600160a060020a0390811691161480611a0e57508060028111156119fb57fe5b60005460ff166002811115611a0c57fe5b145b1515611a1957600080fd5b83600160a060020a03811615801590611a44575030600160a060020a031681600160a060020a031614155b1515611a4f57600080fd5b600160a060020a033381166000908152600c6020908152604080832093891683529290522054611a85908563ffffffff611d6916565b600160a060020a033381166000818152600c60209081526040808320948b168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a3506001949350505050565b60035460009060029033600160a060020a0390811691161480611b305750806002811115611b1d57fe5b60005460ff166002811115611b2e57fe5b145b1515611b3b57600080fd5b611b9a85600d600033600160a060020a0316600160a060020a031681526020019081526020016000205486868080601f016020809104026020016040519081016040528181529291906020840183838082843750610ec1945050505050565b95945050505050565b600160a060020a039182166000908152600c6020908152604080832093909416825291909152205490565b600160a060020a03166000908152600e602052604090205490565b6002541580611c0f575062bdd800611c0c60025442611d2c90919063ffffffff16565b11155b80611c2b5750600260005460ff166002811115611c2857fe5b14155b1515611c3657600080fd5b60035433600160a060020a0390811691161480611c61575060045433600160a060020a039081169116145b1515611c6c57600080fd5b600b805461ff00191690819055600654600160a060020a033316917f1f5a7db2ed856277a2ace32d94edf854ab01019e7dd852065f1d739d9ac5d1709190610100900460ff16604051918252151560208201526040908101905180910390a2565b600b546000908190610100900460ff1615611cec576006549150611d28565b6002541515611cfe5760009150611d28565b611d1a6201518061075060025442611d2c90919063ffffffff16565b9050611d2581611ef5565b91505b5090565b600082821115611d3857fe5b50900390565b6000611d50838363ffffffff611dae16565b9392505050565b6000611d50838363ffffffff611d8316565b600082820183811015611d7857fe5b8091505b5092915050565b600080831515611d965760009150611d7c565b50828202828482811515611da657fe5b0414611d7857fe5b6000808284811515611dbc57fe5b04949350505050565b600854600160a060020a033016311015611ddb57fe5b565b6000903b1190565b82600160a060020a03811663c0ee0b8a3385856000604051602001526040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611e87578082015183820152602001611e6f565b50505050905090810190601f168015611eb45780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b1515611ed457600080fd5b6102c65a03f11515611ee557600080fd5b5050506040518051505050505050565b6000600b8211611f1757611f1082600163ffffffff611d6916565b9050611f1b565b50600c5b600b54611f3f9060ff16600a0a6107508366038d7ea4c6800063ffffffff611d8316565b92915050565b602060405190810160405260008152905600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582003c0523e2b1b3696b8d35ceacaf1567e8044c8e5ac63f79a20068e089cd158d40029

Swarm Source

bzzr://03c0523e2b1b3696b8d35ceacaf1567e8044c8e5ac63f79a20068e089cd158d4
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.