Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 182 txns
Token Tracker: �y� TOS05 (�y� TOS05)
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x40e4af98aca710ddbb86a4f7d2d781906d3d108cat txn 0x81e974a65e5d7a33ea054be95a58fe8ce157b58f0f981f0eabd97caf28d3cc53
 Latest 25 transactions from a total of 182 transactions

TxHash Age From To Value [TxFee]
0xa7550cf8f47a55bedc169868164ac1f076bffaff162c666bdbdd1b854789c3c736 days 5 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.0009911825
0x19cb750175684ba7a8cdf1c43d60e05e83b92d2bb646ba17296d36da46211ccd39 days 8 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.00016176
0xc5213407a23c634ae3330f0d5c4472b2b96a67c572874d3e96f270c3bf6df9c839 days 11 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001452495
0x25436ee1e6abdf9a074eec2b5ce1069acfb563b921546941f04fcee5b355089c39 days 11 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001450805
0x4fc7ed39906bf1b45bd7c446035da64e080ad2066b11c070cce23afbf6b7814939 days 11 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451445
0x0132c61574f2d398b542eedbe50312128373ce8b9d79231a921bf8144d6efc7139 days 11 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451445
0x0e29bbc46f760c16410b1770a9909eea514d0fcebe84db6c5fb7a7f5d3c7521f39 days 12 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451125
0x0f67327d0079836f8ad87fb8c88a2136e078568cbb072ac6bb335876093fe28039 days 12 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451125
0xd2b867552a58c67cc0dfb0d48680fabafb3078c6a7b194a720f95dcedd19e42439 days 12 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451125
0xed76a0d5669975afb22c58f34a768bf17be08739af3e7ff0b58f16b162ae994239 days 12 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.000900755
0xa59e23cb5a0842708507e324276761c7405b4a40255af9af051300a3d7d33c8439 days 12 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451125
0xc3826140c6dc7a58adb2b5bfc0fc9e232ea310da4ac90258596fa23d5f6939dc39 days 12 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.00021882
0x7ec2edf6462a2bb413398351069d01592c8d45fbe9c0f73f06267055a8ed6b0739 days 16 hrs ago0x0f10c1a42f0b23d4185fc4243d3b2f4d713a2cc0  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b510 Ether0.000605202
0x5638910e4a4da1196a1f5e31caf86cc9d97776c0d25d8e8bff39300268d990be39 days 19 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.0010160115
0x16ed43c009900025553ceaf64cf2e429a263182853920e6572fe120a39b8fb6340 days 1 hr ago0x1cd6ec23c94828b062a2c420086a806cfd84c0a2  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b513 Ether0.008472828
0x22c659b2f6824b92d0825daed5b348051e7ec97bd3527dbe145029835172a7f740 days 1 hr ago0x1cd6ec23c94828b062a2c420086a806cfd84c0a2  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b54 Ether0.008471652
0x7a073732cc25ba6ee505e562217df2ebb23982e30bb679c4000db11664c5282f40 days 1 hr ago0x1cd6ec23c94828b062a2c420086a806cfd84c0a2  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b54 Ether0.006220438
0xc6a80ef9fd8c72d2971eb33c32cdb206e1c181aae48214d4ba37da3eea3214c040 days 6 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001051075
0xe9a8c0be9927cce8be7ec3fc8699b398d0999424e113f4aa4c6ed3b0d5c89a3240 days 6 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451445
0x7a3a81c2cde3252059bddd25339b30d99112fb2b195547f6bdd83dbe7f1c061d40 days 6 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451445
0x7c140856ff09c17fad7bbc062d98a284f4f48d7e0355e0827565c0cd8cdba71340 days 6 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001051075
0x697215193a9ba0589a55ae607e385721c68dbe4181b92144d26ff24f3d0a148f40 days 6 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451405
0x574eab4495e9726c08bbcaba5364816039e43ad1f7e3bbfe5d85a8b2c8fb44d940 days 6 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451405
0x3e4df901e379c83694c0c7085d6d3f5624f5e0a5c9fa938e04bea51c2b68489240 days 7 hrs ago0x40e4af98aca710ddbb86a4f7d2d781906d3d108c  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50 Ether0.001451405
0x11a677ae7bca212c75f8f3701e5b101e5896a2481c56727f2ebd3bb885d9d3b140 days 7 hrs ago0x298202a103782e7e6be1655c37286617b54e987a  IN   0x44a86bc0b0e27f92699c2f3c6f323d965ac651b513 Ether0.008884946
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x19cb750175684ba7a8cdf1c43d60e05e83b92d2bb646ba17296d36da46211ccd689153939 days 8 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5000.5 Ether
0x7ec2edf6462a2bb413398351069d01592c8d45fbe9c0f73f06267055a8ed6b07688940639 days 16 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50010 Ether
0x16ed43c009900025553ceaf64cf2e429a263182853920e6572fe120a39b8fb63688712440 days 1 hr ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50013 Ether
0x22c659b2f6824b92d0825daed5b348051e7ec97bd3527dbe145029835172a7f7688710940 days 1 hr ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5004 Ether
0x11a677ae7bca212c75f8f3701e5b101e5896a2481c56727f2ebd3bb885d9d3b1688561440 days 7 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50013 Ether
0x3f458cf220d7baf51db99a599e9116e08cb1843a98d9cd24d7a6ca4954807724688114441 days 1 hr ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50013 Ether
0x9af23a5a911769d0f517e6d267d78dabd3b3354db43bd37c0a67df0c9f4c250e687356442 days 7 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50012 Ether
0x71480637d47be714214175f2a4e379ecb35041d8c07d5b191b6fdb7e7f614a6d684017247 days 19 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5009.54660325774806442 Ether
0x503acc6b0a0224161ca9102a269bc02e40c3401319c2096f02ce4f7380866837679913054 days 14 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50010 Ether
0x537de7b64ed8535448077cfb613353b7282f5f992aba70a042ab48b4063f7b41677592158 days 10 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50047 Ether
0x121ce41b97ecf7c05da76bd2c1ef3a9b59c99493a70ddde30d2073fbf84e91eb675388362 days 1 hr ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50030.2 Ether
0x5c9841328aa2778c5f06f9d52f8c2c540ff349bd4811d16c2ebef86b7d353e69671346268 days 16 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5002 Ether
0x44cabece992e338f3f64b1f0855d08f72b7b2193735897b6a9d0a7811d6005eb669707071 days 8 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50020 Ether
0x1d5990fe91c437769949ed5c3df00bd27563358c8d7fb3058383287251929e33669647171 days 11 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5002.375 Ether
0xf6f8536d0ff85f92f943e43c0cb4899600af8157144a17680ed5898df328274b668484273 days 8 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50026.92726 Ether
0x6740cc320e9db364d77757f0b4021128fd327af170cbb9dd1cafe39b015167cc667432275 days 2 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50010 Ether
0x24cee0439b698d5e3f8d1756431323f362ebf1428369efb69408d27c47c91abd666272776 days 23 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5003.000866511606694944 Ether
0xb5143d51ecc149567876276faacaf5cac507a640067040abb4e4e973f0849e87665355578 days 11 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a50010.264545327299024872 Ether
0xb1148184d4a5fc9aae9791f2170a21a6b7ed51590eddd102267db5e9ce547fc4663587681 days 9 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5001.97693209 Ether
0x0aa038c73b002088452dd735fbcf884095faae59cce838582f0ad3fe0f246b05663074882 days 5 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5002 Ether
0xa793eb870f126867ac5fe200338eb7279403d0b0678bd5fbe6f65e654d773578662934682 days 11 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5007 Ether
0xe41d9606a43c257773bb11a5baab318fee6633eb3af05006b690828cc3fc39d2662835482 days 14 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5008 Ether
0x5b18fc0d4afa7057ae830c43b79a93f1252d5b20f199461526af3b124d40cc2e662586983 days 1 hr ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5009 Ether
0x565dcbce4fc6d6ea2b00aefa1e5554197ad34c3372e134991732f1ab062a1680662484383 days 5 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5007 Ether
0x8296dde86b5dd2d7b709cef84ec017b34d96064bb4f510a1b24461afcaaa2ae4662412083 days 7 hrs ago0x44a86bc0b0e27f92699c2f3c6f323d965ac651b50x74e6acf300e8c8d8ef7c1f85d2589fc1fcc8a5005.9 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Tokensale
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

/**
 * Tokensale.sol
 * Mt Pelerin Share (MPS) token sale : public 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-2

 * @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/IUserRegistry.sol

/**
 * @title IUserRegistry
 * @dev IUserRegistry 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 IUserRegistry {

  function registerManyUsers(address[] _addresses, uint256 _validUntilTime)
    public;

  function attachManyAddresses(uint256[] _userIds, address[] _addresses)
    public;

  function detachManyAddresses(address[] _addresses)
    public;

  function userCount() public view returns (uint256);
  function userId(address _address) public view returns (uint256);
  function addressConfirmed(address _address) public view returns (bool);
  function validUntilTime(uint256 _userId) public view returns (uint256);
  function suspended(uint256 _userId) public view returns (bool);
  function extended(uint256 _userId, uint256 _key)
    public view returns (uint256);

  function isAddressValid(address _address) public view returns (bool);
  function isValid(uint256 _userId) public view returns (bool);

  function registerUser(address _address, uint256 _validUntilTime) public;
  function attachAddress(uint256 _userId, address _address) public;
  function confirmSelf() public;
  function detachAddress(address _address) public;
  function detachSelf() public;
  function detachSelfAddress(address _address) public;
  function suspendUser(uint256 _userId) public;
  function unsuspendUser(uint256 _userId) public;
  function suspendManyUsers(uint256[] _userIds) public;
  function unsuspendManyUsers(uint256[] _userIds) public;
  function updateUser(uint256 _userId, uint256 _validUntil, bool _suspended)
    public;

  function updateManyUsers(
    uint256[] _userIds,
    uint256 _validUntil,
    bool _suspended) public;

  function updateUserExtended(uint256 _userId, uint256 _key, uint256 _value)
    public;

  function updateManyUsersExtended(
    uint256[] _userIds,
    uint256 _key,
    uint256 _value) public;
}

// File: contracts/interface/IRatesProvider.sol

/**
 * @title IRatesProvider
 * @dev IRatesProvider 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 IRatesProvider {
  function rateWEIPerCHFCent() public view returns (uint256);
  function convertWEIToCHFCent(uint256 _amountWEI)
    public view returns (uint256);

  function convertCHFCentToWEI(uint256 _amountCHFCent)
    public view returns (uint256);
}

// File: contracts/zeppelin/token/ERC20/ERC20Basic.sol

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// File: contracts/zeppelin/token/ERC20/ERC20.sol

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender)
    public view returns (uint256);

  function transferFrom(address from, address to, uint256 value)
    public returns (bool);

  function approve(address spender, uint256 value) public returns (bool);
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

// File: contracts/interface/ITokensale.sol

/**
 * @title ITokensale
 * @dev ITokensale 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 ITokensale {

  function () external payable;

  uint256 constant MINIMAL_AUTO_WITHDRAW = 0.5 ether;
  uint256 constant MINIMAL_BALANCE = 0.5 ether;
  uint256 constant MINIMAL_INVESTMENT = 50; // tokens
  uint256 constant BASE_PRICE_CHF_CENT = 500;
  uint256 constant KYC_LEVEL_KEY = 1;

  function minimalAutoWithdraw() public view returns (uint256);
  function minimalBalance() public view returns (uint256);
  function basePriceCHFCent() public view returns (uint256);

  /* General sale details */
  function token() public view returns (ERC20);
  function vaultETH() public view returns (address);
  function vaultERC20() public view returns (address);
  function userRegistry() public view returns (IUserRegistry);
  function ratesProvider() public view returns (IRatesProvider);
  function sharePurchaseAgreementHash() public view returns (bytes32);

  /* Sale status */
  function startAt() public view returns (uint256);
  function endAt() public view returns (uint256);
  function raisedETH() public view returns (uint256);
  function raisedCHF() public view returns (uint256);
  function totalRaisedCHF() public view returns (uint256);
  function totalUnspentETH() public view returns (uint256);
  function totalRefundedETH() public view returns (uint256);
  function availableSupply() public view returns (uint256);

  /* Investor specific attributes */
  function investorUnspentETH(uint256 _investorId)
    public view returns (uint256);

  function investorInvestedCHF(uint256 _investorId)
    public view returns (uint256);

  function investorAcceptedSPA(uint256 _investorId)
    public view returns (bool);

  function investorAllocations(uint256 _investorId)
    public view returns (uint256);

  function investorTokens(uint256 _investorId) public view returns (uint256);
  function investorCount() public view returns (uint256);

  function investorLimit(uint256 _investorId) public view returns (uint256);

  /* Share Purchase Agreement */
  function defineSPA(bytes32 _sharePurchaseAgreementHash)
    public returns (bool);

  function acceptSPA(bytes32 _sharePurchaseAgreementHash)
    public payable returns (bool);

  /* Investment */
  function investETH() public payable;
  function addOffChainInvestment(address _investor, uint256 _amountCHF)
    public;

  /* Schedule */
  function updateSchedule(uint256 _startAt, uint256 _endAt) public;

  /* Allocations admin */
  function allocateTokens(address _investor, uint256 _amount)
    public returns (bool);

  function allocateManyTokens(address[] _investors, uint256[] _amounts)
    public returns (bool);

  /* ETH administration */
  function fundETH() public payable;
  function refundManyUnspentETH(address[] _receivers) public;
  function refundUnspentETH(address _receiver) public;
  function withdrawETHFunds() public;

  event SalePurchaseAgreementHash(bytes32 sharePurchaseAgreement);
  event Allocation(
    uint256 investorId,
    uint256 tokens
  );
  event Investment(
    uint256 investorId,
    uint256 spentCHF
  );
  event ChangeETHCHF(
    address investor,
    uint256 amount,
    uint256 converted,
    uint256 rate
  );
  event FundETH(uint256 amount);
  event WithdrawETH(address receiver, uint256 amount);
}

// File: contracts/zeppelin/math/SafeMath.sol

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return a / b;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
    c = a + b;
    assert(c >= a);
    return c;
  }
}

// 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/zeppelin/lifecycle/Pausable.sol

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

// File: contracts/Authority.sol

/**
 * @title Authority
 * @dev The Authority contract has an authority address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 * Authority means to represent a legal entity that is entitled to specific rights
 *
 * @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.
 *
 * Error messages
 * AU01: Message sender must be an authority
 */
contract Authority is Ownable {

  address authority;

  /**
   * @dev Throws if called by any account other than the authority.
   */
  modifier onlyAuthority {
    require(msg.sender == authority, "AU01");
    _;
  }

  /**
   * @dev Returns the address associated to the authority
   */
  function authorityAddress() public view returns (address) {
    return authority;
  }

  /** Define an address as authority, with an arbitrary name included in the event
   * @dev returns the authority of the
   * @param _name the authority name
   * @param _address the authority address.
   */
  function defineAuthority(string _name, address _address) public onlyOwner {
    emit AuthorityDefined(_name, _address);
    authority = _address;
  }

  event AuthorityDefined(
    string name,
    address _address
  );
}

// File: contracts/tokensale/Tokensale.sol

/**
 * @title Tokensale
 * @dev Tokensale contract
 *
 * @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.
 *
 * Error messages
 * TOS01: It must be before the sale is opened
 * TOS02: Sale must be open
 * TOS03: It must be before the sale is closed
 * TOS04: It must be after the sale is closed
 * TOS05: No data must be sent while sending ETH
 * TOS06: Share Purchase Agreement Hashes must match
 * TOS07: User/Investor must exist
 * TOS08: SPA must be accepted before any ETH investment
 * TOS09: Cannot update schedule once started
 * TOS10: Investor must exist
 * TOS11: Cannot allocate more tokens than available supply
 * TOS12: Length of InvestorIds and amounts arguments must match
 * TOS13: Investor must exist
 * TOS14: Must refund ETH unspent
 * TOS15: Must withdraw ETH to vaultETH
 * TOS16: Cannot invest onchain and offchain at the same time
 * TOS17: A ETHCHF rate must exist to invest
 * TOS18: User must be valid
 * TOS19: Cannot invest if no tokens are available
 * TOS20: Investment is below the minimal investment
 * TOS21: Cannot unspend more CHF than BASE_TOKEN_PRICE_CHF
 * TOS22: Token transfer must be successful
 */
contract Tokensale is ITokensale, Authority, Pausable {
  using SafeMath for uint256;

  uint32[5] contributionLimits = [
    5000,
    500000,
    1500000,
    10000000,
    25000000
  ];

  /* General sale details */
  ERC20 public token;
  address public vaultETH;
  address public vaultERC20;
  IUserRegistry public userRegistry;
  IRatesProvider public ratesProvider;

  uint256 public minimalBalance = MINIMAL_BALANCE;
  bytes32 public sharePurchaseAgreementHash;

  uint256 public startAt = 4102441200;
  uint256 public endAt = 4102441200;
  uint256 public raisedETH;
  uint256 public raisedCHF;
  uint256 public totalRaisedCHF;
  uint256 public totalUnspentETH;
  uint256 public totalRefundedETH;
  uint256 public allocatedTokens;

  struct Investor {
    uint256 unspentETH;
    uint256 investedCHF;
    bool acceptedSPA;
    uint256 allocations;
    uint256 tokens;
  }
  mapping(uint256 => Investor) investors;
  mapping(uint256 => uint256) investorLimits;
  uint256 public investorCount;

  /**
   * @dev Throws unless before sale opening
   */
  modifier beforeSaleIsOpened {
    require(currentTime() < startAt, "TOS01");
    _;
  }

  /**
   * @dev Throws if sale is not open
   */
  modifier saleIsOpened {
    require(currentTime() >= startAt && currentTime() <= endAt, "TOS02");
    _;
  }

  /**
   * @dev Throws once the sale is closed
   */
  modifier beforeSaleIsClosed {
    require(currentTime() <= endAt, "TOS03");
    _;
  }

  /**
   * @dev constructor
   */
  constructor(
    ERC20 _token,
    IUserRegistry _userRegistry,
    IRatesProvider _ratesProvider,
    address _vaultERC20,
    address _vaultETH
  ) public
  {
    token = _token;
    userRegistry = _userRegistry;
    ratesProvider = _ratesProvider;
    vaultERC20 = _vaultERC20;
    vaultETH = _vaultETH;
  }

  /**
   * @dev fallback function
   */
  function () external payable {
    require(msg.data.length == 0, "TOS05");
    investETH();
  }

  /**
   * @dev returns the token sold
   */
  function token() public view returns (ERC20) {
    return token;
  }

  /**
   * @dev returns the vault use to
   */
  function vaultETH() public view returns (address) {
    return vaultETH;
  }

  /**
   * @dev returns the vault to receive ETH
   */
  function vaultERC20() public view returns (address) {
    return vaultERC20;
  }

  function userRegistry() public view returns (IUserRegistry) {
    return userRegistry;
  }

  function ratesProvider() public view returns (IRatesProvider) {
    return ratesProvider;
  }

  function sharePurchaseAgreementHash() public view returns (bytes32) {
    return sharePurchaseAgreementHash;
  }

  /* Sale status */
  function startAt() public view returns (uint256) {
    return startAt;
  }

  function endAt() public view returns (uint256) {
    return endAt;
  }

  function raisedETH() public view returns (uint256) {
    return raisedETH;
  }

  function raisedCHF() public view returns (uint256) {
    return raisedCHF;
  }

  function totalRaisedCHF() public view returns (uint256) {
    return totalRaisedCHF;
  }

  function totalUnspentETH() public view returns (uint256) {
    return totalUnspentETH;
  }

  function totalRefundedETH() public view returns (uint256) {
    return totalRefundedETH;
  }

  function availableSupply() public view returns (uint256) {
    uint256 vaultSupply = token.balanceOf(vaultERC20);
    uint256 allowance = token.allowance(vaultERC20, address(this));
    return (vaultSupply < allowance) ? vaultSupply : allowance;
  }
 
  /* Investor specific attributes */
  function investorUnspentETH(uint256 _investorId)
    public view returns (uint256)
  {
    return investors[_investorId].unspentETH;
  }

  function investorInvestedCHF(uint256 _investorId)
    public view returns (uint256)
  {
    return investors[_investorId].investedCHF;
  }

  function investorAcceptedSPA(uint256 _investorId)
    public view returns (bool)
  {
    return investors[_investorId].acceptedSPA;
  }

  function investorAllocations(uint256 _investorId)
    public view returns (uint256)
  {
    return investors[_investorId].allocations;
  }

  function investorTokens(uint256 _investorId) public view returns (uint256) {
    return investors[_investorId].tokens;
  }

  function investorCount() public view returns (uint256) {
    return investorCount;
  }

  function investorLimit(uint256 _investorId) public view returns (uint256) {
    return investorLimits[_investorId];
  }

  /**
   * @dev get minimak auto withdraw threshold
   */
  function minimalAutoWithdraw() public view returns (uint256) {
    return MINIMAL_AUTO_WITHDRAW;
  }

  /**
   * @dev get minimal balance to maintain in contract
   */
  function minimalBalance() public view returns (uint256) {
    return minimalBalance;
  }

  /**
   * @dev get base price in CHF cents
   */
  function basePriceCHFCent() public view returns (uint256) {
    return BASE_PRICE_CHF_CENT;
  }

  /**
   * @dev contribution limit based on kyc level
   */
  function contributionLimit(uint256 _investorId)
    public view returns (uint256)
  {
    uint256 kycLevel = userRegistry.extended(_investorId, KYC_LEVEL_KEY);
    uint256 limit = 0;
    if (kycLevel < 5) {
      limit = contributionLimits[kycLevel];
    } else {
      limit = (investorLimits[_investorId] > 0
        ) ? investorLimits[_investorId] : contributionLimits[4];
    }
    return limit.sub(investors[_investorId].investedCHF);
  }

  /**
   * @dev update minimal balance to be kept in contract
   */
  function updateMinimalBalance(uint256 _minimalBalance)
    public returns (uint256)
  {
    minimalBalance = _minimalBalance;
  }

  /**
   * @dev define investor limit
   */
  function updateInvestorLimits(uint256[] _investorIds, uint256 _limit)
    public returns (uint256)
  {
    for (uint256 i = 0; i < _investorIds.length; i++) {
      investorLimits[_investorIds[i]] = _limit;
    }
  }

  /* Share Purchase Agreement */
  /**
   * @dev define SPA
   */
  function defineSPA(bytes32 _sharePurchaseAgreementHash)
    public onlyOwner returns (bool)
  {
    sharePurchaseAgreementHash = _sharePurchaseAgreementHash;
    emit SalePurchaseAgreementHash(_sharePurchaseAgreementHash);
  }

  /**
   * @dev Accept SPA and invest if msg.value > 0
   */
  function acceptSPA(bytes32 _sharePurchaseAgreementHash)
    public beforeSaleIsClosed payable returns (bool)
  {
    require(
      _sharePurchaseAgreementHash == sharePurchaseAgreementHash, "TOS06");
    uint256 investorId = userRegistry.userId(msg.sender);
    require(investorId > 0, "TOS07");
    investors[investorId].acceptedSPA = true;
    investorCount++;

    if (msg.value > 0) {
      investETH();
    }
  }

  /* Investment */
  function investETH() public
    saleIsOpened whenNotPaused payable
  {
    //Accepting SharePurchaseAgreement is temporarily offchain
    //uint256 investorId = userRegistry.userId(msg.sender);
    //require(investors[investorId].acceptedSPA, "TOS08");
    investInternal(msg.sender, msg.value, 0);
    withdrawETHFundsInternal();
  }

  /**
   * @dev add off chain investment
   */
  function addOffChainInvestment(address _investor, uint256 _amountCHF)
    public onlyAuthority
  {
    investInternal(_investor, 0, _amountCHF);
  }

  /* Schedule */ 
  /**
   * @dev update schedule
   */
  function updateSchedule(uint256 _startAt, uint256 _endAt)
    public onlyAuthority beforeSaleIsOpened
  {
    require(_startAt < _endAt, "TOS09");
    startAt = _startAt;
    endAt = _endAt;
  }

  /* Allocations admin */
  /**
   * @dev allocate
   */
  function allocateTokens(address _investor, uint256 _amount)
    public onlyAuthority beforeSaleIsClosed returns (bool)
  {
    uint256 investorId = userRegistry.userId(_investor);
    require(investorId > 0, "TOS10");
    Investor storage investor = investors[investorId];
    
    allocatedTokens = allocatedTokens.sub(investor.allocations).add(_amount);
    require(allocatedTokens <= availableSupply(), "TOS11");

    investor.allocations = _amount;
    emit Allocation(investorId, _amount);
  }

  /**
   * @dev allocate many
   */
  function allocateManyTokens(address[] _investors, uint256[] _amounts)
    public onlyAuthority beforeSaleIsClosed returns (bool)
  {
    require(_investors.length == _amounts.length, "TOS12");
    for (uint256 i = 0; i < _investors.length; i++) {
      allocateTokens(_investors[i], _amounts[i]);
    }
  }

  /* ETH administration */
  /**
   * @dev fund ETH
   */
  function fundETH() public payable onlyAuthority {
    emit FundETH(msg.value);
  }

  /**
   * @dev refund unspent ETH many
   */
  function refundManyUnspentETH(address[] _receivers) public onlyAuthority {
    for (uint256 i = 0; i < _receivers.length; i++) {
      refundUnspentETH(_receivers[i]);
    }
  }

  /**
   * @dev refund unspent ETH
   */
  function refundUnspentETH(address _receiver) public onlyAuthority {
    uint256 investorId = userRegistry.userId(_receiver);
    require(investorId != 0, "TOS13");
    Investor storage investor = investors[investorId];

    if (investor.unspentETH > 0) {
      // solium-disable-next-line security/no-send
      require(_receiver.send(investor.unspentETH), "TOS14");
      totalRefundedETH = totalRefundedETH.add(investor.unspentETH);
      emit WithdrawETH(_receiver, investor.unspentETH);
      totalUnspentETH = totalUnspentETH.sub(investor.unspentETH);
      investor.unspentETH = 0;
    }
  }

  /**
   * @dev withdraw ETH funds
   */
  function withdrawETHFunds() public onlyAuthority {
    withdrawETHFundsInternal();
  }

  /**
   * @dev withdraw all ETH funds
   */
  function withdrawAllETHFunds() public onlyAuthority {
    uint256 balance = address(this).balance;
    // solium-disable-next-line security/no-send
    require(vaultETH.send(balance), "TOS15");
    emit WithdrawETH(vaultETH, balance);
  }

  /**
   * @dev allowed token investment
   */
  function allowedTokenInvestment(
    uint256 _investorId, uint256 _contributionCHF)
    public view returns (uint256)
  {
    uint256 tokens = 0;
    uint256 allowedContributionCHF = contributionLimit(_investorId);
    if (_contributionCHF < allowedContributionCHF) {
      allowedContributionCHF = _contributionCHF;
    }
    tokens = allowedContributionCHF.div(BASE_PRICE_CHF_CENT);
    uint256 availableTokens = availableSupply().sub(
      allocatedTokens).add(investors[_investorId].allocations);
    if (tokens > availableTokens) {
      tokens = availableTokens;
    }
    if (tokens < MINIMAL_INVESTMENT) {
      tokens = 0;
    }
    return tokens;
  }

  /**
   * @dev withdraw ETH funds internal
   */
  function withdrawETHFundsInternal() internal {
    uint256 balance = address(this).balance;

    if (balance > totalUnspentETH && balance > minimalBalance) {
      uint256 amount = balance.sub(minimalBalance);
      // solium-disable-next-line security/no-send
      require(vaultETH.send(amount), "TOS15");
      emit WithdrawETH(vaultETH, amount);
    }
  }

  /**
   * @dev invest internal
   */
  function investInternal(
    address _investor, uint256 _amountETH, uint256 _amountCHF)
    private
  {
    // investment with _amountETH is decentralized
    // investment with _amountCHF is centralized
    // They are mutually exclusive
    bool isInvesting = (
        _amountETH != 0 && _amountCHF == 0
      ) || (
      _amountETH == 0 && _amountCHF != 0
      );
    require(isInvesting, "TOS16");
    require(ratesProvider.rateWEIPerCHFCent() != 0, "TOS17");
    uint256 investorId = userRegistry.userId(_investor);
    require(userRegistry.isValid(investorId), "TOS18");

    Investor storage investor = investors[investorId];

    uint256 contributionCHF = ratesProvider.convertWEIToCHFCent(
      investor.unspentETH);

    if (_amountETH > 0) {
      contributionCHF = contributionCHF.add(
        ratesProvider.convertWEIToCHFCent(_amountETH));
    }
    if (_amountCHF > 0) {
      contributionCHF = contributionCHF.add(_amountCHF);
    }

    uint256 tokens = allowedTokenInvestment(investorId, contributionCHF);
    require(tokens != 0, "TOS19");

    /** Calculating unspentETH value **/
    uint256 investedCHF = tokens.mul(BASE_PRICE_CHF_CENT);
    uint256 unspentContributionCHF = contributionCHF.sub(investedCHF);

    uint256 unspentETH = 0;
    if (unspentContributionCHF != 0) {
      if (_amountCHF > 0) {
        // Prevent CHF investment LARGER than available supply
        // from creating a too large and dangerous unspentETH value
        require(unspentContributionCHF < BASE_PRICE_CHF_CENT, "TOS21");
      }
      unspentETH = ratesProvider.convertCHFCentToWEI(
        unspentContributionCHF);
    }

    /** Spent ETH **/
    uint256 spentETH = 0;
    if (investor.unspentETH == unspentETH) {
      spentETH = _amountETH;
    } else {
      uint256 unspentETHDiff = (unspentETH > investor.unspentETH)
        ? unspentETH.sub(investor.unspentETH)
        : investor.unspentETH.sub(unspentETH);

      if (_amountCHF > 0) {
        if (unspentETH < investor.unspentETH) {
          spentETH = unspentETHDiff;
        }
        // if unspentETH > investor.unspentETH
        // then CHF has been converted into ETH
        // and no ETH were spent
      }
      if (_amountETH > 0) {
        spentETH = (unspentETH > investor.unspentETH)
          ? _amountETH.sub(unspentETHDiff)
          : _amountETH.add(unspentETHDiff);
      }
    }

    totalUnspentETH = totalUnspentETH.sub(
      investor.unspentETH).add(unspentETH);
    investor.unspentETH = unspentETH;
    investor.investedCHF = investor.investedCHF.add(investedCHF);
    investor.tokens = investor.tokens.add(tokens);
    raisedCHF = raisedCHF.add(_amountCHF);
    raisedETH = raisedETH.add(spentETH);
    totalRaisedCHF = totalRaisedCHF.add(investedCHF);

    allocatedTokens = allocatedTokens.sub(investor.allocations);
    investor.allocations = (investor.allocations > tokens)
      ? investor.allocations.sub(tokens) : 0;
    allocatedTokens = allocatedTokens.add(investor.allocations);
    require(
      token.transferFrom(vaultERC20, _investor, tokens),
      "TOS22");

    if (spentETH > 0) {
      emit ChangeETHCHF(
        _investor,
        spentETH,
        ratesProvider.convertWEIToCHFCent(spentETH),
        ratesProvider.rateWEIPerCHFCent());
    }
    emit Investment(investorId, investedCHF);
  }

  /* Util */
  /**
   * @dev current time
   */
  function currentTime() private view returns (uint256) {
    // solium-disable-next-line security/no-block-members
    return now;
  }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"allocatedTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"investorTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"raisedCHF","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sharePurchaseAgreementHash","type":"bytes32"}],"name":"defineSPA","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vaultETH","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalUnspentETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"investorLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sharePurchaseAgreementHash","type":"bytes32"}],"name":"acceptSPA","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_receivers","type":"address[]"}],"name":"refundManyUnspentETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"vaultERC20","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"raisedETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRaisedCHF","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"contributionLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"authorityAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"investorAcceptedSPA","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ratesProvider","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"userRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawETHFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"investorInvestedCHF","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"investorAllocations","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"availableSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_investor","type":"address"},{"name":"_amount","type":"uint256"}],"name":"allocateTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRefundedETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sharePurchaseAgreementHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"},{"name":"_contributionCHF","type":"uint256"}],"name":"allowedTokenInvestment","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"investETH","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"minimalAutoWithdraw","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"fundETH","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"basePriceCHFCent","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_investors","type":"address[]"},{"name":"_amounts","type":"uint256[]"}],"name":"allocateManyTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"}],"name":"refundUnspentETH","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"startAt","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_investorIds","type":"uint256[]"},{"name":"_limit","type":"uint256"}],"name":"updateInvestorLimits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_investor","type":"address"},{"name":"_amountCHF","type":"uint256"}],"name":"addOffChainInvestment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"investorCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_startAt","type":"uint256"},{"name":"_endAt","type":"uint256"}],"name":"updateSchedule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAllETHFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minimalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_investorId","type":"uint256"}],"name":"investorUnspentETH","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_address","type":"address"}],"name":"defineAuthority","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_minimalBalance","type":"uint256"}],"name":"updateMinimalBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_userRegistry","type":"address"},{"name":"_ratesProvider","type":"address"},{"name":"_vaultERC20","type":"address"},{"name":"_vaultETH","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"name","type":"string"},{"indexed":false,"name":"_address","type":"address"}],"name":"AuthorityDefined","type":"event"},{"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"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sharePurchaseAgreement","type":"bytes32"}],"name":"SalePurchaseAgreementHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investorId","type":"uint256"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Allocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investorId","type":"uint256"},{"indexed":false,"name":"spentCHF","type":"uint256"}],"name":"Investment","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investor","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"converted","type":"uint256"},{"indexed":false,"name":"rate","type":"uint256"}],"name":"ChangeETHCHF","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"FundETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"receiver","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"WithdrawETH","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60806040526000600160146101000a81548160ff02191690831515021790555060a06040519081016040528061138863ffffffff1681526020016207a12063ffffffff1681526020016216e36063ffffffff1681526020016298968063ffffffff16815260200163017d784063ffffffff168152506002906005620000869291906200028c565b506706f05b59d3b2000060085563f48648f0600a5563f48648f0600b55348015620000b057600080fd5b5060405160a080620045ae8339810180604052810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050506200036c565b826005600701600890048101928215620003235791602002820160005b83821115620002ef57835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302620002a9565b8015620003215782816101000a81549063ffffffff0219169055600401602081600301049283019260010302620002ef565b505b50905062000332919062000336565b5090565b6200036991905b808211156200036557600081816101000a81549063ffffffff0219169055506001016200033d565b5090565b90565b614232806200037c6000396000f300608060405260043610610250576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680622f9569146102d55780630562ac271461030057806308510f18146103415780630ab297e31461036c5780630c8b28c3146103b55780630d23a17b1461040c57806316be1b14146104375780631b24725a146104785780631f2aa2ed146104b45780632235919b1461051a5780632a486a28146105715780632d1bc65c1461059c5780632e3d0281146105c75780633c695d4e146106085780633f4ba83a1461065f578063431f4e2e146106765780634ea4fbec146106bb5780635c7460d6146107125780635c975abb14610769578063629f349d14610798578063715018a6146107af57806374a85cb9146107c65780637b7f3157146108075780637cc3ae8c146108485780637ecc2b56146108735780638456cb591461089e57806386ce0285146108b55780638da5cb5b1461091a5780638dd84c231461097157806391c9b2c21461099c578063a2a49907146109cf578063a39cfae614610a1a578063a88c41a614610a24578063a9e31ac914610a4f578063aaf9b32914610a59578063af01ce8114610a84578063b9bb3a5a14610b45578063c744656514610b88578063cc122df914610bb3578063cd9d535314610c37578063d7e64c0014610c84578063e6671f9014610caf578063f049191114610ce6578063f2fde38b14610cfd578063f5e30ed614610d40578063f62e33d914610d6b578063fc0c546a14610dac578063fc21e16714610e03578063fca9475714610e8c575b6000803690501415156102cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6102d3610ecd565b005b3480156102e157600080fd5b506102ea610f95565b6040518082815260200191505060405180910390f35b34801561030c57600080fd5b5061032b60048036038101908080359060200190929190505050610f9b565b6040518082815260200191505060405180910390f35b34801561034d57600080fd5b50610356610fbb565b6040518082815260200191505060405180910390f35b34801561037857600080fd5b5061039b6004803603810190808035600019169060200190929190505050610fc5565b604051808215151515815260200191505060405180910390f35b3480156103c157600080fd5b506103ca611071565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561041857600080fd5b5061042161109b565b6040518082815260200191505060405180910390f35b34801561044357600080fd5b50610462600480360381019080803590602001909291905050506110a5565b6040518082815260200191505060405180910390f35b61049a60048036038101908080356000191690602001909291905050506110c2565b604051808215151515815260200191505060405180910390f35b3480156104c057600080fd5b5061051860048036038101908080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611392565b005b34801561052657600080fd5b5061052f611498565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561057d57600080fd5b506105866114c2565b6040518082815260200191505060405180910390f35b3480156105a857600080fd5b506105b16114cc565b6040518082815260200191505060405180910390f35b3480156105d357600080fd5b506105f2600480360381019080803590602001909291905050506114d6565b6040518082815260200191505060405180910390f35b34801561061457600080fd5b5061061d611693565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561066b57600080fd5b506106746116bd565b005b34801561068257600080fd5b506106a16004803603810190808035906020019092919050505061177c565b604051808215151515815260200191505060405180910390f35b3480156106c757600080fd5b506106d06117a9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561071e57600080fd5b506107276117d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561077557600080fd5b5061077e6117fd565b604051808215151515815260200191505060405180910390f35b3480156107a457600080fd5b506107ad611810565b005b3480156107bb57600080fd5b506107c46118df565b005b3480156107d257600080fd5b506107f1600480360381019080803590602001909291905050506119e1565b6040518082815260200191505060405180910390f35b34801561081357600080fd5b5061083260048036038101908080359060200190929190505050611a01565b6040518082815260200191505060405180910390f35b34801561085457600080fd5b5061085d611a21565b6040518082815260200191505060405180910390f35b34801561087f57600080fd5b50610888611a2b565b6040518082815260200191505060405180910390f35b3480156108aa57600080fd5b506108b3611cb2565b005b3480156108c157600080fd5b50610900600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d71565b604051808215151515815260200191505060405180910390f35b34801561092657600080fd5b5061092f612145565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561097d57600080fd5b5061098661216a565b6040518082815260200191505060405180910390f35b3480156109a857600080fd5b506109b1612174565b60405180826000191660001916815260200191505060405180910390f35b3480156109db57600080fd5b50610a04600480360381019080803590602001909291908035906020019092919050505061217e565b6040518082815260200191505060405180910390f35b610a22610ecd565b005b348015610a3057600080fd5b50610a39612222565b6040518082815260200191505060405180910390f35b610a57612232565b005b348015610a6557600080fd5b50610a6e612330565b6040518082815260200191505060405180910390f35b348015610a9057600080fd5b50610b2b600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061233a565b604051808215151515815260200191505060405180910390f35b348015610b5157600080fd5b50610b86600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612557565b005b348015610b9457600080fd5b50610b9d61291e565b6040518082815260200191505060405180910390f35b348015610bbf57600080fd5b50610c216004803603810190808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190929190505050612928565b6040518082815260200191505060405180910390f35b348015610c4357600080fd5b50610c82600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061297c565b005b348015610c9057600080fd5b50610c99612a51565b6040518082815260200191505060405180910390f35b348015610cbb57600080fd5b50610ce46004803603810190808035906020019092919080359060200190929190505050612a5b565b005b348015610cf257600080fd5b50610cfb612c29565b005b348015610d0957600080fd5b50610d3e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e65565b005b348015610d4c57600080fd5b50610d55612ecc565b6040518082815260200191505060405180910390f35b348015610d7757600080fd5b50610d9660048036038101908080359060200190929190505050612ed6565b6040518082815260200191505060405180910390f35b348015610db857600080fd5b50610dc1612ef6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610e0f57600080fd5b50610e8a600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f20565b005b348015610e9857600080fd5b50610eb760048036038101908080359060200190929190505050613090565b6040518082815260200191505060405180910390f35b600a54610ed861309e565b10158015610eef5750600b54610eec61309e565b11155b1515610f63576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600160149054906101000a900460ff16151515610f7f57600080fd5b610f8b333460006130a6565b610f93613ee1565b565b60115481565b600060126000838152602001908152602001600020600401549050919050565b6000600d54905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561102257600080fd5b81600981600019169055507f17e73384223b513b8527d30845d17eb190bb29269f323c3bac7f57bcb88635958260405180826000191660001916815260200191505060405180910390a1919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600f54905090565b600060136000838152602001908152602001600020549050919050565b600080600b546110d061309e565b11151515611146576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6009546000191683600019161415156111c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303600000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663376fe102336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561128457600080fd5b505af1158015611298573d6000803e3d6000fd5b505050506040513d60208110156112ae57600080fd5b81019080805190602001909291905050509050600081111515611339576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303700000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60016012600083815260200190815260200160002060020160006101000a81548160ff021916908315150217905550601460008154809291906001019190505550600034111561138c5761138b610ecd565b5b50919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600090505b815181101561149457611487828281518110151561147857fe5b90602001906020020151612557565b808060010191505061145e565b5050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600c54905090565b6000600e54905090565b6000806000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a77c52658560016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b15801561157557600080fd5b505af1158015611589573d6000803e3d6000fd5b505050506040513d602081101561159f57600080fd5b810190808051906020019092919050505091506000905060058210156115f7576002826005811015156115ce57fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff169050611661565b6000601360008681526020019081526020016000205411611649576002600460058110151561162257fe5b600891828204019190066004029054906101000a900463ffffffff1663ffffffff1661165e565b60136000858152602001908152602001600020545b90505b61168a60126000868152602001908152602001600020600101548261408990919063ffffffff16565b92505050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561171857600080fd5b600160149054906101000a900460ff16151561173357600080fd5b6000600160146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60006012600083815260200190815260200160002060020160009054906101000a900460ff169050919050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160149054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6118dd613ee1565b565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561193a57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600060126000838152602001908152602001600020600101549050919050565b600060126000838152602001908152602001600020600301549050919050565b6000600b54905090565b6000806000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611b0f57600080fd5b505af1158015611b23573d6000803e3d6000fd5b505050506040513d6020811015611b3957600080fd5b81019080805190602001909291905050509150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015611c5f57600080fd5b505af1158015611c73573d6000803e3d6000fd5b505050506040513d6020811015611c8957600080fd5b81019080805190602001909291905050509050808210611ca95780611cab565b815b9250505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d0d57600080fd5b600160149054906101000a900460ff16151515611d2957600080fd5b60018060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600b54611e4661309e565b11151515611ebc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663376fe102866040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611f7957600080fd5b505af1158015611f8d573d6000803e3d6000fd5b505050506040513d6020811015611fa357600080fd5b8101908080519060200190929190505050915060008211151561202e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60126000838152602001908152602001600020905061206e84612060836003015460115461408990919063ffffffff16565b6140a290919063ffffffff16565b60118190555061207c611a2b565b601154111515156120f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8381600301819055507f2ccf21bc8a43b499670fe41c33ca0f7b56c83863aca7c1494f0ede9068d2731a8285604051808381526020018281526020019250505060405180910390a1505092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601054905090565b6000600954905090565b60008060008060009250612191866114d6565b91508185101561219f578491505b6121b46101f4836140be90919063ffffffff16565b92506121fa60126000888152602001908152602001600020600301546121ec6011546121de611a2b565b61408990919063ffffffff16565b6140a290919063ffffffff16565b905080831115612208578092505b603283101561221657600092505b82935050505092915050565b60006706f05b59d3b20000905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156122f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b7ffb52132c41e08fba4ca49ec0ecc612f9e9e65735297a70f7105f545d9448cd75346040518082815260200191505060405180910390a1565b60006101f4905090565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600b5461240d61309e565b11151515612483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b825184511415156124fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600090505b835181101561255057612542848281518110151561251b57fe5b90602001906020020151848381518110151561253357fe5b90602001906020020151611d71565b508080600101915050612501565b5092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561261f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663376fe102846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156126dc57600080fd5b505af11580156126f0573d6000803e3d6000fd5b505050506040513d602081101561270657600080fd5b8101908080519060200190929190505050915060008214151515612792576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b601260008381526020019081526020016000209050600081600001541115612919578273ffffffffffffffffffffffffffffffffffffffff166108fc82600001549081150290604051600060405180830381858888f193505050501515612861576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61287a81600001546010546140a290919063ffffffff16565b6010819055507f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79838260000154604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a16129088160000154600f5461408990919063ffffffff16565b600f81905550600081600001819055505b505050565b6000600a54905090565b600080600090505b8351811015612975578260136000868481518110151561294c57fe5b906020019060200201518152602001908152602001600020819055508080600101915050612930565b5092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a41576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b612a4d826000836130a6565b5050565b6000601454905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600a54612b2b61309e565b101515612ba0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8082101515612c17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53303900000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b81600a8190555080600b819055505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612cf0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f415530310000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16319050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515612dd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b7f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ec057600080fd5b612ec9816140d4565b50565b6000600854905090565b600060126000838152602001908152602001600020600001549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612f7b57600080fd5b7fc8c81ac5a1b95ead7b5f71eafa51c9a1436e443c27ba33460885b9debe345abf828260405180806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015613010578082015181840152602081019050612ff5565b50505050905090810190601f16801561303d5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a180600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600081600881905550919050565b600042905090565b60008060008060008060008060008060008c141580156130c6575060008b145b806130de575060008c1480156130dd575060008b14155b5b9950891515613155576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313600000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac37bd66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156131dd57600080fd5b505af11580156131f1573d6000803e3d6000fd5b505050506040513d602081101561320757600080fd5b81019080805190602001909291905050501415151561328e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313700000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663376fe1028e6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561334b57600080fd5b505af115801561335f573d6000803e3d6000fd5b505050506040513d602081101561337557600080fd5b81019080805190602001909291905050509850600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f577a5008a6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561341957600080fd5b505af115801561342d573d6000803e3d6000fd5b505050506040513d602081101561344357600080fd5b810190808051906020019092919050505015156134c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313800000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b601260008a81526020019081526020016000209750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3b1f60f89600001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561357257600080fd5b505af1158015613586573d6000803e3d6000fd5b505050506040513d602081101561359c57600080fd5b8101908080519060200190929190505050965060008c111561369957613696600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3b1f60f8e6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561364c57600080fd5b505af1158015613660573d6000803e3d6000fd5b505050506040513d602081101561367657600080fd5b8101908080519060200190929190505050886140a290919063ffffffff16565b96505b60008b11156136b8576136b58b886140a290919063ffffffff16565b96505b6136c2898861217e565b95506000861415151561373d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313900000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6137526101f4876141ce90919063ffffffff16565b9450613767858861408990919063ffffffff16565b9350600092506000841415156138c95760008b11156137fa576101f4841015156137f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53323100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc7b0ae6856040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561388b57600080fd5b505af115801561389f573d6000803e3d6000fd5b505050506040513d60208110156138b557600080fd5b810190808051906020019092919050505092505b6000915082886000015414156138e1578b9150613980565b876000015483116139085761390383896000015461408990919063ffffffff16565b613920565b61391f88600001548461408990919063ffffffff16565b5b905060008b111561393c57876000015483101561393b578091505b5b60008c111561397f578760000154831161396857613963818d6140a290919063ffffffff16565b61397c565b61397b818d61408990919063ffffffff16565b5b91505b5b6139ab8361399d8a60000154600f5461408990919063ffffffff16565b6140a290919063ffffffff16565b600f819055508288600001819055506139d18589600101546140a290919063ffffffff16565b88600101819055506139f08689600401546140a290919063ffffffff16565b8860040181905550613a0d8b600d546140a290919063ffffffff16565b600d81905550613a2882600c546140a290919063ffffffff16565b600c81905550613a4385600e546140a290919063ffffffff16565b600e81905550613a62886003015460115461408990919063ffffffff16565b60118190555085886003015411613a7a576000613a92565b613a9186896003015461408990919063ffffffff16565b5b8860030181905550613ab388600301546011546140a290919063ffffffff16565b601181905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168f896040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015613bd457600080fd5b505af1158015613be8573d6000803e3d6000fd5b505050506040513d6020811015613bfe57600080fd5b81019080805190602001909291905050501515613c83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53323200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000821115613e93577fdeaa92aa373191aee90a177118df53483d5f83ba9f14e5aef4ebb53fef1af76e8d83600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a3b1f60f866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015613d4057600080fd5b505af1158015613d54573d6000803e3d6000fd5b505050506040513d6020811015613d6a57600080fd5b8101908080519060200190929190505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630ac37bd66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613e0157600080fd5b505af1158015613e15573d6000803e3d6000fd5b505050506040513d6020811015613e2b57600080fd5b8101908080519060200190929190505050604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200194505050505060405180910390a15b7f85369d2981b3997d58407719c231e73f6aa20ff0098b02824bc36d0bf81b0b3b8986604051808381526020018281526020019250505060405180910390a150505050505050505050505050565b6000803073ffffffffffffffffffffffffffffffffffffffff16319150600f5482118015613f10575060085482115b1561408557613f2a6008548361408990919063ffffffff16565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515613ff7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f544f53313500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b7f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b79600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5050565b600082821115151561409757fe5b818303905092915050565b600081830190508281101515156140b557fe5b80905092915050565b600081838115156140cb57fe5b04905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561411057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000808314156141e15760009050614200565b81830290508183828115156141f257fe5b041415156141fc57fe5b8090505b929150505600a165627a7a7230582069f6dd03eb23520cca541390b68fe6fcca8f7a581b19e392ddc767e88e0cb7ac002900000000000000000000000096c645d3d3706f793ef52c19bbace441900ed47d0000000000000000000000004e19d015b2b4ff6c0aefc078c9ae1c079bb6a64a00000000000000000000000065d30deca4f8bca6ad637df2804213722859063000000000000000000000000009519a92007e055c8a727df194cd951da654b61600000000000000000000000074e6acf300e8c8d8ef7c1f85d2589fc1fcc8a500

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000096c645d3d3706f793ef52c19bbace441900ed47d0000000000000000000000004e19d015b2b4ff6c0aefc078c9ae1c079bb6a64a00000000000000000000000065d30deca4f8bca6ad637df2804213722859063000000000000000000000000009519a92007e055c8a727df194cd951da654b61600000000000000000000000074e6acf300e8c8d8ef7c1f85d2589fc1fcc8a500

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000096c645d3d3706f793ef52c19bbace441900ed47d
Arg [1] : 0000000000000000000000004e19d015b2b4ff6c0aefc078c9ae1c079bb6a64a
Arg [2] : 00000000000000000000000065d30deca4f8bca6ad637df28042137228590630
Arg [3] : 00000000000000000000000009519a92007e055c8a727df194cd951da654b616
Arg [4] : 00000000000000000000000074e6acf300e8c8d8ef7c1f85d2589fc1fcc8a500


   Swarm Source:
bzzr://69f6dd03eb23520cca541390b68fe6fcca8f7a581b19e392ddc767e88e0cb7ac

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.