Contract 0x96c68443bbe2e3f93ada8d146605fe1acc748445

 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)

Contract Name:
MPSSaleConfig

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No

Runs (Optimizer):
200

Contract Source Code

/**
 * MPSSaleConfig.sol
 * Configuration for the MPS token sale private phase.

 * More info about MPS : https://github.com/MtPelerin/MtPelerin-share-MPS

 * The unflattened code is available through this github tag:
 * https://github.com/MtPelerin/MtPelerin-protocol/tree/etherscan-verify-batch-1

 * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved

 * @notice All matters regarding the intellectual property of this code 
 * @notice or software are subject to Swiss Law without reference to its 
 * @notice conflicts of law rules.

 * @notice License for each contract is available in the respective file
 * @notice or in the LICENSE.md file.
 * @notice https://github.com/MtPelerin/

 * @notice Code by OpenZeppelin is copyrighted and licensed on their repository:
 * @notice https://github.com/OpenZeppelin/openzeppelin-solidity
 */

pragma solidity ^0.4.24;

// File: contracts/interface/ISaleConfig.sol

/**
 * @title ISaleConfig interface
 *
 * @author Cyril Lapinte - <[email protected]>
 *
 * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved
 * @notice Please refer to the top of this file for the license.
 */
contract ISaleConfig {

  struct Tokensale {
    uint256 lotId;
    uint256 tokenPriceCHFCent;
  }

  function tokenSupply() public pure returns (uint256);
  function tokensaleLotSupplies() public view returns (uint256[]);

  function tokenizedSharePercent() public pure returns (uint256); 
  function tokenPriceCHF() public pure returns (uint256);

  function minimalCHFInvestment() public pure returns (uint256);
  function maximalCHFInvestment() public pure returns (uint256);

  function tokensalesCount() public view returns (uint256);
  function lotId(uint256 _tokensaleId) public view returns (uint256);
  function tokenPriceCHFCent(uint256 _tokensaleId)
    public view returns (uint256);
}

// File: contracts/zeppelin/ownership/Ownable.sol

/**
 * @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 OwnershipRenounced(address indexed previousOwner);
  event OwnershipTransferred(
    address indexed previousOwner,
    address indexed newOwner
  );


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() public {
    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 relinquish control of the contract.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

  /**
   * @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) public onlyOwner {
    _transferOwnership(_newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}

// File: contracts/mps/MPSSaleConfig.sol

/**
 * @title MPSSaleConfig
 * @dev MPSSaleConfig contract
 * The contract configure the sale for the MPS token
 *
 * @author Cyril Lapinte - <[email protected]>
 *
 * @notice Copyright © 2016 - 2018 Mt Pelerin Group SA - All Rights Reserved
 * @notice Please refer to the top of this file for the license.
 */
contract MPSSaleConfig is ISaleConfig, Ownable {

  // Token supply cap: 10M
  uint256 constant public TOKEN_SUPPLY = 10 ** 7;
 
  // 100% of Mt Pelerin's shares are tokenized
  uint256 constant public TOKENSALE_LOT1_SHARE_PERCENT = 5;
  uint256 constant public TOKENSALE_LOT2_SHARE_PERCENT = 95;
  uint256 constant public TOKENIZED_SHARE_PERCENT
  = TOKENSALE_LOT1_SHARE_PERCENT + TOKENSALE_LOT2_SHARE_PERCENT;

  uint256 constant public TOKENSALE_LOT1_SUPPLY
  = TOKEN_SUPPLY * TOKENSALE_LOT1_SHARE_PERCENT / 100;
  uint256 constant public TOKENSALE_LOT2_SUPPLY
  = TOKEN_SUPPLY * TOKENSALE_LOT2_SHARE_PERCENT / 100;

  uint256[] private tokensaleLotSuppliesArray
  = [ TOKENSALE_LOT1_SUPPLY, TOKENSALE_LOT2_SUPPLY ];

  // Tokens amount per CHF Cents
  uint256 constant public TOKEN_PRICE_CHF_CENT = 500;

  // Minimal CHF Cents investment
  uint256 constant public MINIMAL_CHF_CENT_INVESTMENT = 10 ** 4;

  // Maximal CHF Cents investment
  uint256 constant public MAXIMAL_CHF_CENT_INVESTMENT = 10 ** 10;

  Tokensale[] public tokensales;

  /**
   * @dev constructor
   */
  constructor() public {
    tokensales.push(Tokensale(
      0,
      TOKEN_PRICE_CHF_CENT * 80 / 100
    ));

    tokensales.push(Tokensale(
      0,
      TOKEN_PRICE_CHF_CENT
    ));
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function tokenSupply() public pure returns (uint256) {
    return TOKEN_SUPPLY;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function tokensaleLotSupplies() public view returns (uint256[]) {
    return tokensaleLotSuppliesArray;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function tokenizedSharePercent() public pure returns (uint256) {
    return TOKENIZED_SHARE_PERCENT;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function tokenPriceCHF() public pure returns (uint256) {
    return TOKEN_PRICE_CHF_CENT;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function minimalCHFInvestment() public pure returns (uint256) {
    return MINIMAL_CHF_CENT_INVESTMENT;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function maximalCHFInvestment() public pure returns (uint256) {
    return MAXIMAL_CHF_CENT_INVESTMENT;
  }

  /**
   * @dev tokensale count
   */
  function tokensalesCount() public view returns (uint256) {
    return tokensales.length;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function lotId(uint256 _tokensaleId) public view returns (uint256) {
    return tokensales[_tokensaleId].lotId;
  }

  /**
   * @dev getter need to be declared to comply with ISaleConfig interface
   */
  function tokenPriceCHFCent(uint256 _tokensaleId)
    public view returns (uint256)
  {
    return tokensales[_tokensaleId].tokenPriceCHFCent;
  }
}

Contract ABI

[{"constant":true,"inputs":[],"name":"MINIMAL_CHF_CENT_INVESTMENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOKENIZED_SHARE_PERCENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokensaleId","type":"uint256"}],"name":"lotId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maximalCHFInvestment","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"TOKENSALE_LOT2_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenPriceCHF","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_tokensaleId","type":"uint256"}],"name":"tokenPriceCHFCent","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAXIMAL_CHF_CENT_INVESTMENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimalCHFInvestment","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"TOKEN_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokensalesCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokensaleLotSupplies","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOKEN_PRICE_CHF_CENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenizedSharePercent","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokensales","outputs":[{"name":"lotId","type":"uint256"},{"name":"tokenPriceCHFCent","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOKENSALE_LOT1_SHARE_PERCENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TOKENSALE_LOT2_SHARE_PERCENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"TOKENSALE_LOT1_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Contract Creation Code

6080604052604080519081016040528060646005629896800281151561002157fe5b0481526020016064605f629896800281151561003957fe5b04815250600190600261004d929190610167565b5034801561005a57600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506002604080519081016040528060008152602001606460506101f4028115156100c057fe5b0481525090806001815401808255809150509060018203906000526020600020906002020160009091929091909150600082015181600001556020820151816001015550505060026040805190810160405280600081526020016101f48152509080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000155602082015181600101555050506101d9565b8280548282559060005260206000209081019282156101a3579160200282015b828111156101a2578251825591602001919060010190610187565b5b5090506101b091906101b4565b5090565b6101d691905b808211156101d25760008160009055506001016101ba565b5090565b90565b6109cb806101e86000396000f300608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806316357d5d1461012d5780631bb8d2f2146101585780633e6044f7146101835780635317b7d8146101c45780635becf4b7146101ef5780636792eeb41461021a578063715018a6146102455780637824407f1461025c5780637fc232df1461028757806389fe99f0146102c85780638da5cb5b146102f3578063af11aaf61461034a578063b152f6cf14610375578063bac04659146103a0578063bbe4ddc9146103cb578063c81434bc14610437578063cea1c81514610462578063d06bc7771461048d578063d9080011146104d5578063dd9dd56f14610500578063f2fde38b1461052b578063fa2d41bc1461056e575b600080fd5b34801561013957600080fd5b50610142610599565b6040518082815260200191505060405180910390f35b34801561016457600080fd5b5061016d61059f565b6040518082815260200191505060405180910390f35b34801561018f57600080fd5b506101ae600480360381019080803590602001909291905050506105a7565b6040518082815260200191505060405180910390f35b3480156101d057600080fd5b506101d96105d1565b6040518082815260200191505060405180910390f35b3480156101fb57600080fd5b506102046105de565b6040518082815260200191505060405180910390f35b34801561022657600080fd5b5061022f6105f4565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b5061025a6105fe565b005b34801561026857600080fd5b50610271610700565b6040518082815260200191505060405180910390f35b34801561029357600080fd5b506102b26004803603810190808035906020019092919050505061070b565b6040518082815260200191505060405180910390f35b3480156102d457600080fd5b506102dd610735565b6040518082815260200191505060405180910390f35b3480156102ff57600080fd5b5061030861073e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035657600080fd5b5061035f610763565b6040518082815260200191505060405180910390f35b34801561038157600080fd5b5061038a61076d565b6040518082815260200191505060405180910390f35b3480156103ac57600080fd5b506103b5610774565b6040518082815260200191505060405180910390f35b3480156103d757600080fd5b506103e0610781565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610423578082015181840152602081019050610408565b505050509050019250505060405180910390f35b34801561044357600080fd5b5061044c6107d9565b6040518082815260200191505060405180910390f35b34801561046e57600080fd5b506104776107df565b6040518082815260200191505060405180910390f35b34801561049957600080fd5b506104b8600480360381019080803590602001909291905050506107eb565b604051808381526020018281526020019250505060405180910390f35b3480156104e157600080fd5b506104ea61081e565b6040518082815260200191505060405180910390f35b34801561050c57600080fd5b50610515610823565b6040518082815260200191505060405180910390f35b34801561053757600080fd5b5061056c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610828565b005b34801561057a57600080fd5b5061058361088f565b6040518082815260200191505060405180910390f35b61271081565b605f60050181565b60006002828154811015156105b857fe5b9060005260206000209060020201600001549050919050565b60006402540be400905090565b6064605f62989680028115156105f057fe5b0481565b60006101f4905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561065957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600062989680905090565b600060028281548110151561071c57fe5b9060005260206000209060020201600101549050919050565b6402540be40081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000612710905090565b6298968081565b6000600280549050905090565b606060018054806020026020016040519081016040528092919081815260200182805480156107cf57602002820191906000526020600020905b8154815260200190600101908083116107bb575b5050505050905090565b6101f481565b6000605f600501905090565b6002818154811015156107fa57fe5b90600052602060002090600202016000915090508060000154908060010154905082565b600581565b605f81565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088357600080fd5b61088c816108a5565b50565b6064600562989680028115156108a157fe5b0481565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156108e157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a7230582013bded8618d7a009e8f186dff1572a384634c97fa51ed6bb66fb29fdfdb4e4780029

Swarm Source

bzzr://13bded8618d7a009e8f186dff1572a384634c97fa51ed6bb66fb29fdfdb4e478
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.