Sponsored Link:   COVESTING - EU-based digital asset exchange. Aggregated liquidity. Algorithmic & Copy-trading features. 24/7 support. Get access!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 2 txns
 Latest 2 txns


TxHash Age From To Value [TxFee]
0x70f4408976a79e86cd19ebe1b38fecccc0a5b35a4e30b77efff0c2b31d008e52118 days 12 hrs ago0x83f143944dcb14ebbb3de18e9b5e7127e9fc8438  IN   0xac23cee3949e2fc17f9a198465cd5c658ed7bdc60 Ether0.000175816
0x2202042d16410c25e7469b4cefbff1c76edf621a77a33cbd567948c923569cca118 days 12 hrs ago0x83f143944dcb14ebbb3de18e9b5e7127e9fc8438  IN    Contract Creation0 Ether0.001660972
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: FlatPricingExt
Compiler Version: v0.4.11+commit.68ef5810
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

// Created using Token Wizard https://github.com/poanetwork/token-wizard by POA Network 
pragma solidity ^0.4.11;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}
/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */




/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */



/**
 * Interface for defining crowdsale pricing.
 */
contract PricingStrategy {

  address public tier;

  /** Interface declaration. */
  function isPricingStrategy() public constant returns (bool) {
    return true;
  }

  /** Self check if all references are correctly set.
   *
   * Checks that pricing strategy matches crowdsale parameters.
   */
  function isSane(address crowdsale) public constant returns (bool) {
    return true;
  }

  /**
   * @dev Pricing tells if this is a presale purchase or not.
     @param purchaser Address of the purchaser
     @return False by default, true if a presale purchaser
   */
  function isPresalePurchase(address purchaser) public constant returns (bool) {
    return false;
  }

  /* How many weis one token costs */
  function updateRate(uint newOneTokenInWei) public;

  /**
   * When somebody tries to buy tokens for X eth, calculate how many tokens they get.
   *
   *
   * @param value - What is the value of the transaction send in as wei
   * @param tokensSold - how much tokens have been sold this far
   * @param weiRaised - how much money has been raised this far in the main token sale - this number excludes presale
   * @param msgSender - who is the investor of this transaction
   * @param decimals - how many decimal units the token has
   * @return Amount of tokens the investor receives
   */
  function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint tokenAmount);
}

/**
 * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
 *
 * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
 */



/**
 * Safe unsigned safe math.
 *
 * https://blog.aragon.one/library-driven-development-in-solidity-2bebcaf88736#.750gwtwli
 *
 * Originally from https://raw.githubusercontent.com/AragonOne/zeppelin-solidity/master/contracts/SafeMathLib.sol
 *
 * Maintained here until merged to mainline zeppelin-solidity.
 *
 */
library SafeMathLibExt {

  function times(uint a, uint b) returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function divides(uint a, uint b) returns (uint) {
    assert(b > 0);
    uint c = a / b;
    assert(a == b * c + a % b);
    return c;
  }

  function minus(uint a, uint b) returns (uint) {
    assert(b <= a);
    return a - b;
  }

  function plus(uint a, uint b) returns (uint) {
    uint c = a + b;
    assert(c>=a);
    return c;
  }

}



/**
 * Fixed crowdsale pricing - everybody gets the same price.
 */
contract FlatPricingExt is PricingStrategy, Ownable {
  using SafeMathLibExt for uint;

  /* How many weis one token costs */
  uint public oneTokenInWei;

  // Crowdsale rate has been changed
  event RateChanged(uint newOneTokenInWei);

  modifier onlyTier() {
    if (msg.sender != address(tier)) throw;
    _;
  }

  function setTier(address _tier) onlyOwner {
    assert(_tier != address(0));
    assert(tier == address(0));
    tier = _tier;
  }

  function FlatPricingExt(uint _oneTokenInWei) onlyOwner {
    require(_oneTokenInWei > 0);
    oneTokenInWei = _oneTokenInWei;
  }

  function updateRate(uint newOneTokenInWei) onlyTier {
    oneTokenInWei = newOneTokenInWei;
    RateChanged(newOneTokenInWei);
  }

  /**
   * Calculate the current price for buy in amount.
   *
   */
  function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {
    uint multiplier = 10 ** decimals;
    return value.times(multiplier) / oneTokenInWei;
  }

}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"isPricingStrategy","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tier","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"value","type":"uint256"},{"name":"weiRaised","type":"uint256"},{"name":"tokensSold","type":"uint256"},{"name":"msgSender","type":"address"},{"name":"decimals","type":"uint256"}],"name":"calculatePrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_tier","type":"address"}],"name":"setTier","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOneTokenInWei","type":"uint256"}],"name":"updateRate","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"oneTokenInWei","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"crowdsale","type":"address"}],"name":"isSane","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"purchaser","type":"address"}],"name":"isPresalePurchase","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_oneTokenInWei","type":"uint256"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOneTokenInWei","type":"uint256"}],"name":"RateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b60405160208061052383398101604052515b5b60018054600160a060020a03191633600160a060020a03161790555b60015433600160a060020a039081169116146100575760006000fd5b600081116100655760006000fd5b60028190555b5b505b6104a68061007d6000396000f300606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304bbc25581146100a357806316f4d022146100c757806318a4155e146100f357806355c081d41461012d57806369ea17711461014b57806384e3ac94146101605780638da5cb5b146101825780638e768288146101ae578063f14ae17d146101de578063f2fde38b1461020e575bfe5b34156100ab57fe5b6100b361022c565b604080519115158252519081900360200190f35b34156100cf57fe5b6100d7610232565b60408051600160a060020a039092168252519081900360200190f35b34156100fb57fe5b61011b600435602435604435600160a060020a0360643516608435610241565b60408051918252519081900360200190f35b341561013557fe5b610149600160a060020a03600435166102f5565b005b341561015357fe5b610149600435610363565b005b341561016857fe5b61011b6103bc565b60408051918252519081900360200190f35b341561018a57fe5b6100d76103c2565b60408051600160a060020a039092168252519081900360200190f35b34156101b657fe5b6100b3600160a060020a03600435166103d1565b604080519115158252519081900360200190f35b34156101e657fe5b6100b3600160a060020a03600435166103d9565b604080519115158252519081900360200190f35b341561021657fe5b610149600160a060020a03600435166103e1565b005b60015b90565b600054600160a060020a031681565b6000600082600a0a90506002548773435383d1038078871ba8747558c94f9752bd95e5631d3b9edf9091846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018281526020019250505060206040518083038186803b15156102c857fe5b6102c65a03f415156102d657fe5b50506040515190508115156102e757fe5b0491505b5095945050505050565b60015433600160a060020a039081169116146103115760006000fd5b600160a060020a038116151561032357fe5b600054600160a060020a03161561033657fe5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b60005433600160a060020a0390811691161461037f5760006000fd5b60028190556040805182815290517f595a30f13a69b616c4d568e2a2b7875fdfe86e4300a049953c76ee278f8f3f109181900360200190a15b5b50565b60025481565b600154600160a060020a031681565b60015b919050565b60005b919050565b60015433600160a060020a039081169116146103fd5760006000fd5b600160a060020a03811615156104135760006000fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b505600a165627a7a72305820d5eadd8aa5b4f5a132f6d1ec85dcd3f0d262020747a9debf0e5564e000405709002900000000000000000000000000000000000000000000000000038d7ea4c68000

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000038d7ea4c68000

-----Decoded View---------------
Found 1 constructor arguments :
Arg [0] : 00000000000000000000000000000000000000000000000000038d7ea4c68000


   Library Used
SafeMathLibExt : 0x435383D1038078871Ba8747558c94f9752Bd95e5

   Swarm Source:
bzzr://d5eadd8aa5b4f5a132f6d1ec85dcd3f0d262020747a9debf0e5564e000405709

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.