Sponsored Link:   Learn and build dApps today without code using Crowd Machine's Crowd App Studio.
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 21 txns
 Latest 21 txns

TxHash Age From To Value [TxFee]
0xbbf2d4d02d14ebc15e8250b9f728c8749fdd4dd4db7e4e4882534ebcfd135e9326 days 19 hrs ago0xd903d455ed750cea8d554e2ef306bfaae75caeed  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630 Ether0.000550685
0x023a39229a208cc2269d0487ed28fc02fd1b3493c1af1a5931a63e6417fc7ac7152 days 9 hrs ago0x69f89c05927adeceb894ca316aeaf8ae0058b696  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.25 Ether0.00298308
0xc5410bf3f1cd221563d8632e276f6b3bfc350914d867765d1e59f42e00f1f512152 days 13 hrs ago0x78781e8b58c534007655ab9e05317cd6986c1e02  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.25 Ether0.00298308
0x56b8bb3f2086cbec747a11bc1170b5cd24d617f1f0aabc911a34fd3487f64db0154 days 13 hrs ago0x808ec638ae6312a79cce984d2bffea037bdad467  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.063758289 Ether0.000485121
0x7601454190c229e878efe40fe7aef030e285a71c4e5514e487d4c679892f0203154 days 13 hrs ago0x808ec638ae6312a79cce984d2bffea037bdad467  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.06424341 Ether0.000485121
0xf60279388cd26ef84a2c9e5e6d1ef603784ab91d2bff672626146cd5f564b8f6156 days 15 hrs ago0xbe2e56dff910521d7cf22a4c42e06f84e8e085d8  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.22 Ether0.002088156
0x23f2a27449c3882434c1c7dc4f11b19fe9ffa364624f36f0e0af3a4bc1e357ba159 days 14 hrs ago0x808ec638ae6312a79cce984d2bffea037bdad467  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.12 Ether0.002088156
0xe982c206d1d3da9db75721792d6a51f2c83b3fddb2b768d80c6342e513a90b4b159 days 15 hrs ago0xfaf30436dcb56c09dd168c2d0ca5c4f78da48add  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.2 Ether0.002088156
0xb1dfea755f0f4e9586d613f6f0d554c886857eaff1d35ca114c95b38661b0573169 days 2 hrs ago0x2d45a25225e40af8b62649414453feed2ca321eb  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.3 Ether0.002088156
0x06753cb1fb7b270fe7c2362cf807781194455972e6cf449d032fe4123696764b169 days 16 hrs ago0x7802fad3984ecc0a67c00b3f1b236a739a39bf3b  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.17 Ether0.00596616
0x1bd68bd69a72aa242a068afcf3ce350e9c462ade71344eaff16d0b265d8878e5173 days 14 hrs ago0xe42f6755c87840abff26efef7e8dcaa64a4fbbd2  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9631 Ether0.00099436
0x073fe5bcd6a76bd51b39a3d6d7cf2ee7098e8831a19bf6499cbccad3bfe42b44174 days 1 hr ago0x294fbcd112b0c370acc60cda7017b5e439f37922  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.2 Ether0.004076876
0xc2fe7a7233656d57077df505add073448178470c149ed4707d25c0c499c4f360182 days 9 hrs ago0x853565f45bbda4aec1cd9d40cf43726427906666  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c96310 Ether0.003579696
0xb0f23c462ea784ac62f3396061365591bc8e14107d85b8890f24e610c6e8fb95182 days 11 hrs ago0x5266fa76a067069e59fd23eb2a41444458b09ef9  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.07 Ether0.004076876
0x2c075cb506d52293f71da79c6fc9b10714391f7ecaae45a1d53cedca2d0bcb43182 days 14 hrs ago0x5e0ed0eadfbe43adb51c194a4ea49c1534d3c834  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.17 Ether0.0049718
0xcef5ca83a0b795545bc2058389311d6e8520e8b2959831168410133576551fb4182 days 14 hrs ago0x5e0ed0eadfbe43adb51c194a4ea49c1534d3c834  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.179 Ether0.00105
0x62ba0cb61b90191970aed6b4ebb5d47b5d5ff0a9ac67a7ffc911e438a2cc25af182 days 15 hrs ago0x5e0ed0eadfbe43adb51c194a4ea49c1534d3c834  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.180585 Ether0.00105
0xed2cdc100724c021869149d098f9ad490b5511bc06e05e47d1b984271555946e183 days 3 hrs ago0x793adf4fb1e8a74dfd548b5e2b5c55b6eec9a3f8  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630.07 Ether0.002403156
0x55d7bed806a63a992c004fcf8d83ed4e03557a72e32ee087aeb69c1c29698b0d183 days 5 hrs ago0xd903d455ed750cea8d554e2ef306bfaae75caeed  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630 Ether0.009950402
0x4243a4c915dc195203a0997bf4cb4e77ec837d35f13a6384f298a99cc034282c183 days 5 hrs ago0xd903d455ed750cea8d554e2ef306bfaae75caeed  IN   0x333df93d58b730f088dcabc99833cbf1c8d0c9630 Ether0.00589798
0x87e83243a809e9f1a2e138ca5fc9fff3e9573ef5904754498e39dbfa09a8e911183 days 10 hrs ago0xd903d455ed750cea8d554e2ef306bfaae75caeed  IN    Contract Creation0 Ether0.095757266
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 14 Internal Transactions

ParentTxHash Block Age From To Value
0x023a39229a208cc2269d0487ed28fc02fd1b3493c1af1a5931a63e6417fc7ac75090233152 days 9 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.25 Ether
0xc5410bf3f1cd221563d8632e276f6b3bfc350914d867765d1e59f42e00f1f5125089089152 days 13 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.25 Ether
0xf60279388cd26ef84a2c9e5e6d1ef603784ab91d2bff672626146cd5f564b8f65064803156 days 15 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.22 Ether
0x23f2a27449c3882434c1c7dc4f11b19fe9ffa364624f36f0e0af3a4bc1e357ba5047235159 days 14 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.12 Ether
0xe982c206d1d3da9db75721792d6a51f2c83b3fddb2b768d80c6342e513a90b4b5047106159 days 15 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.2 Ether
0xb1dfea755f0f4e9586d613f6f0d554c886857eaff1d35ca114c95b38661b05734991222169 days 2 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.3 Ether
0x06753cb1fb7b270fe7c2362cf807781194455972e6cf449d032fe4123696764b4987505169 days 16 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.17 Ether
0x1bd68bd69a72aa242a068afcf3ce350e9c462ade71344eaff16d0b265d8878e54964253173 days 14 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db1 Ether
0x073fe5bcd6a76bd51b39a3d6d7cf2ee7098e8831a19bf6499cbccad3bfe42b444961501174 days 1 hr ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.2 Ether
0xc2fe7a7233656d57077df505add073448178470c149ed4707d25c0c499c4f3604913726182 days 9 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db10 Ether
0xb0f23c462ea784ac62f3396061365591bc8e14107d85b8890f24e610c6e8fb954913456182 days 11 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.07 Ether
0x2c075cb506d52293f71da79c6fc9b10714391f7ecaae45a1d53cedca2d0bcb434912799182 days 14 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.17 Ether
0xed2cdc100724c021869149d098f9ad490b5511bc06e05e47d1b984271555946e4909753183 days 3 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c9630x47130f8f1c05a7bef2088593e7177417d72543db0.07 Ether
0x55d7bed806a63a992c004fcf8d83ed4e03557a72e32ee087aeb69c1c29698b0d4909436183 days 5 hrs ago0x333df93d58b730f088dcabc99833cbf1c8d0c963  Contract Creation0 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: CrowdsaleL
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

// Project: Imigize
// v2, 2018-01-14
// This code is the property of CryptoB2B.io
// Copying in whole or in part is prohibited.
// Authors: Ivan Fedorov and Dmitry Borodin
// Do you want the same TokenSale platform? www.cryptob2b.io

// (A1)
// The main contract for the sale and management of rounds.
contract CrowdsaleL{

	// For Round0, firstMint is:
	// 0000000000000000000000000000000000000000000069e10de76676d0800000
	// (extra 500K tokens for marketing)
    
    using SafeMath for uint256;

    enum TokenSaleType {round1, round2}
    enum Roles {beneficiary, accountant, manager, observer, bounty, team, company}
    
    // Extra fee
    address constant TaxCollector = 0x0;
	// fee for round 1 & 2
    uint256[2] TaxValues = [0 finney, 0 finney];
    uint8 vaultNum;

    TokenL public token;

    bool public isFinalized;
    bool public isInitialized;
    bool public isPausedCrowdsale;

    mapping (uint8 => address) public wallets;

    struct Profit{
	    uint256 min;    // percent from 0 to 50
	    uint256 max;    // percent from 0 to 50
	    uint256 step;   // percent step, from 1 to 50 (please, read doc!)
	    uint256 maxAllProfit; 
    }
    struct Bonus {
	    uint256 value;
	    uint256 procent;
	    uint256 freezeTime;
    }

    Bonus[] public bonuses;

    Profit public profit = Profit(0, 20, 5, 100);
    
    uint256 public startTime= 1515974400;
    uint256 public endDiscountTime = 1520294400;
    uint256 public endTime = 1520294400;

    // How many tokens (excluding the bonus) are transferred to the investor in exchange for 1 ETH
    // **THOUSANDS** 10^3 for human, *10**3 for Solidity, 1e3 for MyEtherWallet (MEW).
    // Example: if 1ETH = 40.5 Token ==> use 40500
    uint256 public rate = 5668000;

    // If the round does not attain this value before the closing date, the round is recognized as a
    // failure and investors take the money back (the founders will not interfere in any way).
    // **QUINTILLIONS** 10^18 / *10**18 / 1e18. Example: softcap=15ETH ==> use 15*10**18 (Solidity) or 15e18 (MEW)
    uint256 public softCap = 0 ether;

    // The maximum possible amount of income
    // **QUINTILLIONS** 10^18 / *10**18 / 1e18. Example: hardcap=123.45ETH ==> use 123450*10**15 (Solidity) or 12345e15 (MEW)
    uint256 public hardCap = 802 ether;

    // If the last payment is slightly higher than the hardcap, then the usual contracts do
    // not accept it, because it goes beyond the hardcap. However it is more reasonable to accept the
    // last payment, very slightly raising the hardcap. The value indicates by how many ETH the
    // last payment can exceed the hardcap to allow it to be paid. Immediately after this payment, the
    // round closes. The funders should write here a small number, not more than 1% of the CAP.
    // Can be equal to zero, to cancel.
    // **QUINTILLIONS** 10^18 / *10**18 / 1e18
    uint256 public overLimit = 20 ether;

    // The minimum possible payment from an investor in ETH. Payments below this value will be rejected.
    // **QUINTILLIONS** 10^18 / *10**18 / 1e18. Example: minPay=0.1ETH ==> use 100*10**15 (Solidity) or 100e15 (MEW)
    uint256 public minPay = 70 finney;

    uint256 ethWeiRaised;
    uint256 nonEthWeiRaised;
    uint256 weiRound1;
    uint256 public tokenReserved;

    RefundVault public vault;
    SVTAllocation public lockedAllocation;

    TokenSaleType TokenSale = TokenSaleType.round1;

    uint256 allToken;

    bool public bounty;
    bool public team;
    bool public company;
    //bool public partners;

    event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);

    event Finalized();
    event Initialized();

    function CrowdsaleL(TokenL _token, uint256 firstMint) public
    {
        // Initially, all next 7 roles/wallets are given to the Manager. The Manager is an employee of the company
        // with knowledge of IT, who publishes the contract and sets it up. However, money and tokens require
        // a Beneficiary and other roles (Accountant, Team, etc.). The Manager will not have the right
        // to receive them. To enable this, the Manager must either enter specific wallets here, or perform
        // this via method changeWallet. In the finalization methods it is written which wallet and
        // what percentage of tokens are received.

        // Receives all the money (when finalizing Round1 & Round2)
        wallets[uint8(Roles.beneficiary)] = 0x07544edde0542857277188598606B32F2C28062F; //msg.sender;

        // Receives all the tokens for non-ETH investors (when finalizing Round1 & Round2)
        wallets[uint8(Roles.accountant)] = 0x31e78568a5E53C568711dd139Ec99d775E9fB80b; //msg.sender;

        // All rights except the rights to receive tokens or money. Has the right to change any other
        // wallets (Beneficiary, Accountant, ...), but only if the round has not started. Once the
        // round is initialized, the Manager has lost all rights to change the wallets.
        // If the TokenSale is conducted by one person, then nothing needs to be changed. Permit all 7 roles
        // point to a single wallet.
        wallets[uint8(Roles.manager)] = msg.sender;

        // Has only the right to call paymentsInOtherCurrency (please read the document)
        wallets[uint8(Roles.observer)] = 0x7FF83C688CaC62f5944C694CF04bF3f30ec19608; //msg.sender;

        wallets[uint8(Roles.bounty)] = 0x17194d2cA481d2533A147776BeB471DC40dc4580; //msg.sender;

        // When the round is finalized, all team tokens are transferred to a special freezing
        // contract. As soon as defrosting is over, only the Team wallet will be able to
        // collect all the tokens. It does not store the address of the freezing contract,
        // but the final wallet of the project team.
        wallets[uint8(Roles.team)] = 0x443f4Be0f50f973e3970343c6A50bcf1Ac66c6C3; //msg.sender;

        wallets[uint8(Roles.company)] = 0xb4D429B3240616FA67D1509c0C0E48D11900dd18; //msg.sender;

        token = _token;
        token.setOwner();

        token.pause(); // block exchange tokens

        token.addUnpausedWallet(wallets[uint8(Roles.accountant)]);
        token.addUnpausedWallet(msg.sender);
        token.addUnpausedWallet(wallets[uint8(Roles.bounty)]);
        token.addUnpausedWallet(wallets[uint8(Roles.company)]);

        if (firstMint > 0) {
            token.mint(msg.sender, firstMint);
        }

    }

    // Returns the name of the current round in plain text. Constant.
    function getTokenSaleType()  public constant returns(string){
        return (TokenSale == TokenSaleType.round1)?'round1':'round2';
    }

    // Transfers the funds of the investor to the contract of return of funds. Internal.
    function forwardFunds() internal {
        vault.deposit.value(msg.value)(msg.sender);
    }

    // Check for the possibility of buying tokens. Inside. Constant.
    function validPurchase() internal constant returns (bool) {

        // The round started and did not end
        bool withinPeriod = (now > startTime && now < endTime);

        // Rate is greater than or equal to the minimum
        bool nonZeroPurchase = msg.value >= minPay;

        // hardCap is not reached, and in the event of a transaction, it will not be exceeded by more than OverLimit
        bool withinCap = msg.value <= hardCap.sub(weiRaised()).add(overLimit);

        // round is initialized and no "Pause of trading" is set
        return withinPeriod && nonZeroPurchase && withinCap && isInitialized && !isPausedCrowdsale;
    }

    // Check for the ability to finalize the round. Constant.
    function hasEnded() public constant returns (bool) {

        bool timeReached = now > endTime;

        bool capReached = weiRaised() >= hardCap;

        return (timeReached || capReached) && isInitialized;
    }
    
    function finalizeAll() external {
        finalize();
        finalize1();
        finalize2();
        finalize3();
    }

    // Finalize. Only available to the Manager and the Beneficiary. If the round failed, then
    // anyone can call the finalization to unlock the return of funds to investors
    // You must call a function to finalize each round (after the Round1 & after the Round2)
    function finalize() public {

        require(wallets[uint8(Roles.manager)] == msg.sender || wallets[uint8(Roles.beneficiary)] == msg.sender || !goalReached());
        require(!isFinalized);
        require(hasEnded());

        isFinalized = true;
        finalization();
        Finalized();
    }

    // The logic of finalization. Internal
    function finalization() internal {

        // If the goal of the achievement
        if (goalReached()) {

            // Send ether to Beneficiary
            vault.close(wallets[uint8(Roles.beneficiary)]);

            // if there is anything to give
            if (tokenReserved > 0) {

                // Issue tokens of non-eth investors to Accountant account
                token.mint(wallets[uint8(Roles.accountant)],tokenReserved);

                // Reset the counter
                tokenReserved = 0;
            }

            // If the finalization is Round 1
            if (TokenSale == TokenSaleType.round1) {

                // Reset settings
                isInitialized = false;
                isFinalized = false;

                // Switch to the second round (to Round2)
                TokenSale = TokenSaleType.round2;

                // Reset the collection counter
                weiRound1 = weiRaised();
                ethWeiRaised = 0;
                nonEthWeiRaised = 0;


            }
            else // If the second round is finalized
            {

                // Record how many tokens we have issued
                allToken = token.totalSupply();

                // Permission to collect tokens to those who can pick them up
                bounty = true;
                team = true;
                company = true;
                //partners = true;

            }

        }
        else // If they failed round
        {
            // Allow investors to withdraw their funds
            vault.enableRefunds();
        }
    }

    // The Manager freezes the tokens for the Team.
    // You must call a function to finalize Round 2 (only after the Round2)
    function finalize1() public {
        require(wallets[uint8(Roles.manager)] == msg.sender || wallets[uint8(Roles.beneficiary)] == msg.sender);
        require(team);
        team = false;
        lockedAllocation = new SVTAllocation(token, wallets[uint8(Roles.team)]);
        token.addUnpausedWallet(lockedAllocation);
        // 12% - tokens to Team wallet after freeze (77% for investors)
        // *** CHECK THESE NUMBERS ***
        token.mint(lockedAllocation,allToken.mul(12).div(77));
    }

    function finalize2() public {
        require(wallets[uint8(Roles.manager)] == msg.sender || wallets[uint8(Roles.beneficiary)] == msg.sender);
        require(bounty);
        bounty = false;
        // 2% - tokens to bounty wallet after freeze (77% for investors)
        // *** CHECK THESE NUMBERS ***
        token.mint(wallets[uint8(Roles.bounty)],allToken.mul(2).div(77));
    }

    // For marketing, referral, reserve 
    // You must call a function to finalize Round 2 (only after the Round2)
    function finalize3() public {
        require(wallets[uint8(Roles.manager)] == msg.sender || wallets[uint8(Roles.beneficiary)] == msg.sender);
        require(company);
        company = false;
        // 9% - tokens to company wallet after freeze (77% for investors)
        // *** CHECK THESE NUMBERS ***
        token.mint(wallets[uint8(Roles.company)],allToken.mul(9).div(77));
    }


    // Initializing the round. Available to the manager. After calling the function,
    // the Manager loses all rights: Manager can not change the settings (setup), change
    // wallets, prevent the beginning of the round, etc. You must call a function after setup
    // for the initial round (before the Round1 and before the Round2)
    function initialize() public {

        // Only the Manager
        require(wallets[uint8(Roles.manager)] == msg.sender);

        // If not yet initialized
        require(!isInitialized);

        // And the specified start time has not yet come
        // If initialization return an error, check the start date!
        require(now <= startTime);

        initialization();

        Initialized();

        isInitialized = true;
    }

    function initialization() internal {
        uint256 taxValue = TaxValues[vaultNum];
        vaultNum++;
        uint256 arrear;
        if (address(vault) != 0x0){
            arrear = DistributorRefundVault(vault).taxValue();
            vault.del(wallets[uint8(Roles.beneficiary)]);
        }
        vault = new DistributorRefundVault(TaxCollector, taxValue.add(arrear));
    }

    // At the request of the investor, we raise the funds (if the round has failed because of the hardcap)
    function claimRefund() public{
        vault.refund(msg.sender);
    }

    // We check whether we collected the necessary minimum funds. Constant.
    function goalReached() public constant returns (bool) {
        return weiRaised() >= softCap;
    }

    // Customize. The arguments are described in the constructor above.
    function setup(uint256 _startTime, uint256 _endDiscountTime, uint256 _endTime, uint256 _softCap, uint256 _hardCap, uint256 _rate, uint256 _overLimit, uint256 _minPay, uint256 _minProfit, uint256 _maxProfit, uint256 _stepProfit, uint256 _maxAllProfit, uint256[] _value, uint256[] _procent, uint256[] _freezeTime) public{
        changePeriod(_startTime, _endDiscountTime, _endTime);
        changeTargets(_softCap, _hardCap);
        changeRate(_rate, _overLimit, _minPay);
        changeDiscount(_minProfit, _maxProfit, _stepProfit, _maxAllProfit);
        setBonuses(_value, _procent, _freezeTime);
    }

    // Change the date and time: the beginning of the round, the end of the bonus, the end of the round. Available to Manager
    // Description in the Crowdsale constructor
    function changePeriod(uint256 _startTime, uint256 _endDiscountTime, uint256 _endTime) public{

        require(wallets[uint8(Roles.manager)] == msg.sender);

        require(!isInitialized);

        // Date and time are correct
        require(now <= _startTime);
        require(_endDiscountTime > _startTime && _endDiscountTime <= _endTime);

        startTime = _startTime;
        endTime = _endTime;
        endDiscountTime = _endDiscountTime;

    }

    // We change the purpose of raising funds. Available to the manager.
    // Description in the Crowdsale constructor.
    function changeTargets(uint256 _softCap, uint256 _hardCap) public {

        require(wallets[uint8(Roles.manager)] == msg.sender);

        require(!isInitialized);

        // The parameters are correct
        require(_softCap <= _hardCap);

        softCap = _softCap;
        hardCap = _hardCap;
    }

    // Change the price (the number of tokens per 1 eth), the maximum hardCap for the last bet,
    // the minimum bet. Available to the Manager.
    // Description in the Crowdsale constructor
    function changeRate(uint256 _rate, uint256 _overLimit, uint256 _minPay) public {

        require(wallets[uint8(Roles.manager)] == msg.sender);

        require(!isInitialized);

        require(_rate > 0);

        rate = _rate;
        overLimit = _overLimit;
        minPay = _minPay;
    }

    // We change the parameters of the discount:% min bonus,% max bonus, number of steps.
    // Available to the manager. Description in the Crowdsale constructor
    function changeDiscount(uint256 _minProfit, uint256 _maxProfit, uint256 _stepProfit, uint256 _maxAllProfit) public {

        require(wallets[uint8(Roles.manager)] == msg.sender);

        require(!isInitialized);
        
        require(_maxProfit <= _maxAllProfit);

        // The parameters are correct
        require(_stepProfit <= _maxProfit.sub(_minProfit));

        // If not zero steps
        if(_stepProfit > 0){
            // We will specify the maximum percentage at which it is possible to provide
            // the specified number of steps without fractional parts
            profit.max = _maxProfit.sub(_minProfit).div(_stepProfit).mul(_stepProfit).add(_minProfit);
        }else{
            // to avoid a divide to zero error, set the bonus as static
            profit.max = _minProfit;
        }

        profit.min = _minProfit;
        profit.step = _stepProfit;
        profit.maxAllProfit = _maxAllProfit;
    }

    function setBonuses(uint256[] _value, uint256[] _procent, uint256[] _dateUnfreeze) public {

        require(wallets[uint8(Roles.manager)] == msg.sender);
        require(!isInitialized);

        require(_value.length == _procent.length && _value.length == _dateUnfreeze.length);
        bonuses.length = _value.length;
        for(uint256 i = 0; i < _value.length; i++){
            bonuses[i] = Bonus(_value[i],_procent[i],_dateUnfreeze[i]);
        }
    }

    // Collected funds for the current round. Constant.
    function weiRaised() public constant returns(uint256){
        return ethWeiRaised.add(nonEthWeiRaised);
    }

    // Returns the amount of fees for both phases. Constant.
    function weiTotalRaised() public constant returns(uint256){
        return weiRound1.add(weiRaised());
    }

    // Returns the percentage of the bonus on the current date. Constant.
    function getProfitPercent() public constant returns (uint256){
        return getProfitPercentForData(now);
    }

    // Returns the percentage of the bonus on the given date. Constant.
    function getProfitPercentForData(uint256 timeNow) public constant returns (uint256){
        // if the discount is 0 or zero steps, or the round does not start, we return the minimum discount
        if (profit.max == 0 || profit.step == 0 || timeNow > endDiscountTime){
            return profit.min;
        }

        // if the round is over - the maximum
        if (timeNow<=startTime){
            return profit.max;
        }

        // bonus period
        uint256 range = endDiscountTime.sub(startTime);

        // delta bonus percentage
        uint256 profitRange = profit.max.sub(profit.min);

        // Time left
        uint256 timeRest = endDiscountTime.sub(timeNow);

        // Divide the delta of time into
        uint256 profitProcent = profitRange.div(profit.step).mul(timeRest.mul(profit.step.add(1)).div(range));
        return profitProcent.add(profit.min);
    }

    function getBonuses(uint256 _value) public constant returns(uint256 procent, uint256 _dateUnfreeze){
        if(bonuses.length == 0 || bonuses[0].value > _value){
            return (0,0);
        }
        uint16 i = 1;
        for(i; i < bonuses.length; i++){
            if(bonuses[i].value > _value){
                break;
            }
        }
        return (bonuses[i-1].procent,bonuses[i-1].freezeTime);
    }

    // The ability to quickly check Round1 (only for Round1, only 1 time). Completes the Round1 by
    // transferring the specified number of tokens to the Accountant's wallet. Available to the Manager.
    // Use only if this is provided by the script and white paper. In the normal scenario, it
    // does not call and the funds are raised normally. We recommend that you delete this
    // function entirely, so as not to confuse the auditors. Initialize & Finalize not needed.
    // ** QUINTILIONS **  10^18 / 1**18 / 1e18
    function fastTokenSale(uint256 _totalSupply) public {
        require(wallets[uint8(Roles.manager)] == msg.sender);
        require(TokenSale == TokenSaleType.round1 && !isInitialized);
        token.mint(wallets[uint8(Roles.accountant)], _totalSupply);
        TokenSale = TokenSaleType.round2;
    }

    // Remove the "Pause of exchange". Available to the manager at any time. If the
    // manager refuses to remove the pause, then 30-120 days after the successful
    // completion of the TokenSale, anyone can remove a pause and allow the exchange to continue.
    // The manager does not interfere and will not be able to delay the term.
    // He can only cancel the pause before the appointed time.
    function tokenUnpause() public {
        require(wallets[uint8(Roles.manager)] == msg.sender
            || (now > endTime + 60 days && TokenSale == TokenSaleType.round2 && isFinalized && goalReached()));
        token.unpause();
    }

    // Enable the "Pause of exchange". Available to the manager until the TokenSale is completed.
    // The manager cannot turn on the pause, for example, 3 years after the end of the TokenSale.
    function tokenPause() public {
        require(wallets[uint8(Roles.manager)] == msg.sender && !isFinalized);
        token.pause();
    }

    // Pause of sale. Available to the manager.
    function crowdsalePause() public {
        require(wallets[uint8(Roles.manager)] == msg.sender);
        require(isPausedCrowdsale == false);
        isPausedCrowdsale = true;
    }

    // Withdrawal from the pause of sale. Available to the manager.
    function crowdsaleUnpause() public {
        require(wallets[uint8(Roles.manager)] == msg.sender);
        require(isPausedCrowdsale == true);
        isPausedCrowdsale = false;
    }

    // Checking whether the rights to address ignore the "Pause of exchange". If the
    // wallet is included in this list, it can translate tokens, ignoring the pause. By default,
    // only the following wallets are included:
    //    - Accountant wallet (he should immediately transfer tokens, but not to non-ETH investors)
    //    - Contract for freezing the tokens for the Team (but Team wallet not included)
    // Inside. Constant.
    function unpausedWallet(address _wallet) internal constant returns(bool) {
        bool _accountant = wallets[uint8(Roles.accountant)] == _wallet;
        bool _manager = wallets[uint8(Roles.manager)] == _wallet;
        bool _bounty = wallets[uint8(Roles.bounty)] == _wallet;
        bool _company = wallets[uint8(Roles.company)] == _wallet;
        return _accountant || _manager || _bounty || _company;
    }

    // For example - After 5 years of the project's existence, all of us suddenly decided collectively
    // (company + investors) that it would be more profitable for everyone to switch to another smart
    // contract responsible for tokens. The company then prepares a new token, investors
    // disassemble, study, discuss, etc. After a general agreement, the manager allows any investor:
    //      - to burn the tokens of the previous contract
    //      - generate new tokens for a new contract
    // It is understood that after a general solution through this function all investors
    // will collectively (and voluntarily) move to a new token.
    function moveTokens(address _migrationAgent) public {
        require(wallets[uint8(Roles.manager)] == msg.sender);
        token.setMigrationAgent(_migrationAgent);
    }

    function migrateAll(address[] _holders) public {
        require(wallets[uint8(Roles.manager)] == msg.sender);
        token.migrateAll(_holders);
    }

    // Change the address for the specified role.
    // Available to any wallet owner except the observer.
    // Available to the manager until the round is initialized.
    // The Observer's wallet or his own manager can change at any time.
    function changeWallet(Roles _role, address _wallet) public
    {
        require(
        (msg.sender == wallets[uint8(_role)] && _role != Roles.observer)
        ||
        (msg.sender == wallets[uint8(Roles.manager)] && (!isInitialized || _role == Roles.observer))
        );
        address oldWallet = wallets[uint8(_role)];
        wallets[uint8(_role)] = _wallet;
        if(!unpausedWallet(oldWallet))
        token.delUnpausedWallet(oldWallet);
        if(unpausedWallet(_wallet))
        token.addUnpausedWallet(_wallet);
    }

    // If a little more than a year has elapsed (Round2 start date + 400 days), a smart contract
    // will allow you to send all the money to the Beneficiary, if any money is present. This is
    // possible if you mistakenly launch the Round2 for 30 years (not 30 days), investors will transfer
    // money there and you will not be able to pick them up within a reasonable time. It is also
    // possible that in our checked script someone will make unforeseen mistakes, spoiling the
    // finalization. Without finalization, money cannot be returned. This is a rescue option to
    // get around this problem, but available only after a year (400 days).

    // Another reason - the TokenSale was a failure, but not all ETH investors took their money during the year after.
    // Some investors may have lost a wallet key, for example.

    // The method works equally with the Round1 and Round2. When the Round1 starts, the time for unlocking
    // the distructVault begins. If the TokenSale is then started, then the term starts anew from the first day of the TokenSale.

    // Next, act independently, in accordance with obligations to investors.

    // Within 400 days of the start of the Round, if it fails only investors can take money. After
    // the deadline this can also include the company as well as investors, depending on who is the first to use the method.
    function distructVault() public {
        require(wallets[uint8(Roles.beneficiary)] == msg.sender);
        require(now > startTime + 400 days);
        vault.del(wallets[uint8(Roles.beneficiary)]);
    }


    // We accept payments other than Ethereum (ETH) and other currencies, for example, Bitcoin (BTC).
    // Perhaps other types of cryptocurrency - see the original terms in the white paper and on the TokenSale website.

    // We release tokens on Ethereum. During the Round1 and Round2 with a smart contract, you directly transfer
    // the tokens there and immediately, with the same transaction, receive tokens in your wallet.

    // When paying in any other currency, for example in BTC, we accept your money via one common wallet.
    // Our manager fixes the amount received for the bitcoin wallet and calls the method of the smart
    // contract paymentsInOtherCurrency to inform him how much foreign currency has been received - on a daily basis.
    // The smart contract pins the number of accepted ETH directly and the number of BTC. Smart contract
    // monitors softcap and hardcap, so as not to go beyond this framework.

    // In theory, it is possible that when approaching hardcap, we will receive a transfer (one or several
    // transfers) to the wallet of BTC, that together with previously received money will exceed the hardcap in total.
    // In this case, we will refund all the amounts above, in order not to exceed the hardcap.

    // Collection of money in BTC will be carried out via one common wallet. The wallet's address will be published
    // everywhere (in a white paper, on the TokenSale website, on Telegram, on Bitcointalk, in this code, etc.)
    // Anyone interested can check that the administrator of the smart contract writes down exactly the amount
    // in ETH (in equivalent for BTC) there. In theory, the ability to bypass a smart contract to accept money in
    // BTC and not register them in ETH creates a possibility for manipulation by the company. Thanks to
    // paymentsInOtherCurrency however, this threat is leveled.

    // Any user can check the amounts in BTC and the variable of the smart contract that accounts for this
    // (paymentsInOtherCurrency method). Any user can easily check the incoming transactions in a smart contract
    // on a daily basis. Any hypothetical tricks on the part of the company can be exposed and panic during the TokenSale,
    // simply pointing out the incompatibility of paymentsInOtherCurrency (ie, the amount of ETH + BTC collection)
    // and the actual transactions in BTC. The company strictly adheres to the described principles of openness.

    // The company administrator is required to synchronize paymentsInOtherCurrency every working day (but you
    // cannot synchronize if there are no new BTC payments). In the case of unforeseen problems, such as
    // brakes on the Ethereum network, this operation may be difficult. You should only worry if the
    // administrator does not synchronize the amount for more than 96 hours in a row, and the BTC wallet
    // receives significant amounts.

    // This scenario ensures that for the sum of all fees in all currencies this value does not exceed hardcap.

    // BTC - 1HQahivPX2cU5Nq921wSuULpuZyi9AcXCY

    // ** QUINTILLIONS ** 10^18 / 1**18 / 1e18
    function paymentsInOtherCurrency(uint256 _token, uint256 _value) public {
        require(wallets[uint8(Roles.observer)] == msg.sender);
        bool withinPeriod = (now >= startTime && now <= endTime);

        bool withinCap = _value.add(ethWeiRaised) <= hardCap.add(overLimit);
        require(withinPeriod && withinCap && isInitialized);

        nonEthWeiRaised = _value;
        tokenReserved = _token;

    }
    
    function changeLock(address _owner, uint256 _value, uint256 _date) external {
        require(wallets[uint8(Roles.manager)] == msg.sender);
        token.changeLock(_owner, _value, _date);
    }

    function lokedMint(address _beneficiary, uint256 _value, uint256 _freezeTime) internal {
        if(_freezeTime > 0){
            
            uint256 totalBloked = token.valueBlocked(_beneficiary).add(_value);
            uint256 pastDateUnfreeze = token.blikedUntil(_beneficiary);
            uint256 newDateUnfreeze = _freezeTime + now; 
            newDateUnfreeze = (pastDateUnfreeze > newDateUnfreeze ) ? pastDateUnfreeze : newDateUnfreeze;

            token.changeLock(_beneficiary,totalBloked,newDateUnfreeze);
        }
        token.mint(_beneficiary,_value);
    }


    // The function for obtaining smart contract funds in ETH. If all the checks are true, the token is
    // transferred to the buyer, taking into account the current bonus.
    function buyTokens(address beneficiary) public payable {
        require(beneficiary != 0x0);
        require(validPurchase());

        uint256 weiAmount = msg.value;

        uint256 ProfitProcent = getProfitPercent();

        var (bonus, dateUnfreeze) = getBonuses(weiAmount);
        
        // Scenario 1 - select max from all bonuses + check profit.maxAllProfit
        //uint256 totalProfit = ProfitProcent;
        //totalProfit = (totalProfit < bonus) ? bonus : totalProfit;
        //totalProfit = (totalProfit > profit.maxAllProfit) ? profit.maxAllProfit : totalProfit;
        
        // Scenario 2 - sum both bonuses + check profit.maxAllProfit
        uint256 totalProfit = bonus.add(ProfitProcent);
        totalProfit = (totalProfit > profit.maxAllProfit)? profit.maxAllProfit: totalProfit;
        
        // calculate token amount to be created
        uint256 tokens = weiAmount.mul(rate).mul(totalProfit + 100).div(100000);

        // update state
        ethWeiRaised = ethWeiRaised.add(weiAmount);

        lokedMint(beneficiary, tokens, dateUnfreeze);

        TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);

        forwardFunds();
    }

    // buyTokens alias
    function () public payable {
        buyTokens(msg.sender);
    }

}


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this does not hold
        return c;
    }

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

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

/**
 * @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;


    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    function Ownable() 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 transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) onlyOwner public{
        require(newOwner != address(0));
        owner = newOwner;
    }

}

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

    bool _paused = false;

    function paused() public constant returns(bool)
    {
        return _paused;
    }


    /**
     * @dev modifier to allow actions only when the contract IS paused
     */
    modifier whenNotPaused() {
        require(!paused());
        _;
    }

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

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


// Contract interface for transferring current tokens to another
contract MigrationAgent
{
    function migrateFrom(address _from, uint256 _value) public;
}

contract BlockedToken is Ownable {
    using SafeMath for uint256;

    struct locked {uint256 value; uint256 date;}

    mapping (address => locked) locks;

    function blikedUntil(address _owner) external constant returns (uint256) {
        if(now < locks[_owner].date)
        {
            return locks[_owner].date;
        }else{
            return 0;
        }
    }

    function valueBlocked(address _owner) public constant returns (uint256) {
        if(now < locks[_owner].date)
        {
            return locks[_owner].value;
        }else{
            return 0;
        }
    }

    function changeLock(address _owner, uint256 _value, uint256 _date) external onlyOwner {
        locks[_owner] = locked(_value,_date);
    }
}


// (A2)
// Contract token
contract TokenL is Pausable, BlockedToken {
    using SafeMath for uint256;

    string public constant name = "Imigize";
    string public constant symbol = "IMGZ";
    uint8 public constant decimals = 18;

    uint256 public totalSupply;

    mapping(address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;

    mapping (address => bool) public unpausedWallet;

    bool public mintingFinished = false;

    uint256 public totalMigrated;
    address public migrationAgent;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    event Mint(address indexed to, uint256 amount);
    event MintFinished();

    event Migrate(address indexed _from, address indexed _to, uint256 _value);

    modifier canMint() {
        require(!mintingFinished);
        _;
    }

    function TokenL() public{
        owner = 0x0;
    }

    function setOwner() public{
        require(owner == 0x0);
        owner = msg.sender;
    }

    // Balance of the specified address
    function balanceOf(address _owner) public constant returns (uint256 balance) {
        return balances[_owner];
    }


    // Transfer of tokens from one account to another
    function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
        uint256 available = balances[msg.sender].sub(valueBlocked(msg.sender));
        require(_value <= available);
        require (_value > 0);
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(msg.sender, _to, _value);
        return true;
    }

    // Returns the number of tokens that _owner trusted to spend from his account _spender
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    // Trust _sender and spend _value tokens from your account
    function approve(address _spender, uint256 _value) public returns (bool) {

        // To change the approve amount you first have to reduce the addresses
        //  allowance to zero by calling `approve(_spender, 0)` if it is not
        //  already 0 to mitigate the race condition described here:
        //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));

        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    // Transfer of tokens from the trusted address _from to the address _to in the number _value
    function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {

        uint256 available = balances[_from].sub(valueBlocked(_from));
        require(_value <= available);

        var _allowance = allowed[_from][msg.sender];

        // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
        // require (_value <= _allowance);

        require (_value > 0);

        balances[_from] = balances[_from].sub(_value);
        balances[_to] = balances[_to].add(_value);
        allowed[_from][msg.sender] = _allowance.sub(_value);
        Transfer(_from, _to, _value);
        return true;
    }

    // Issue new tokens to the address _to in the amount _amount. Available to the owner of the contract (contract Crowdsale)
    function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) {
        totalSupply = totalSupply.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        Mint(_to, _amount);
        Transfer(0x0, _to, _amount);
        return true;
    }

    // Stop the release of tokens. This is not possible to cancel. Available to the owner of the contract.
    function finishMinting() public onlyOwner returns (bool) {
    	mintingFinished = true;
        MintFinished();
        return true;
    }

    // Redefinition of the method of the returning status of the "Exchange pause".
    // Never for the owner of an unpaused wallet.
    function paused() public constant returns(bool) {
        return super.paused() && !unpausedWallet[msg.sender];
    }

    // Add a wallet ignoring the "Exchange pause". Available to the owner of the contract.
    function addUnpausedWallet(address _wallet) public onlyOwner {
        unpausedWallet[_wallet] = true;
    }

    // Remove the wallet ignoring the "Exchange pause". Available to the owner of the contract.
    function delUnpausedWallet(address _wallet) public onlyOwner {
        unpausedWallet[_wallet] = false;
    }

    // Enable the transfer of current tokens to others. Only 1 time. Disabling this is not possible.
    // Available to the owner of the contract.
    function setMigrationAgent(address _migrationAgent) public onlyOwner {
        require(migrationAgent == 0x0);
        migrationAgent = _migrationAgent;
    }

    function migrateAll(address[] _holders) public onlyOwner {
        require(migrationAgent != 0x0);
        uint256 total = 0;
        uint256 value;
        for(uint i = 0; i < _holders.length; i++){
            value = balances[_holders[i]];
            if(value > 0){
                balances[_holders[i]] = 0;
                total = total.add(value);
                MigrationAgent(migrationAgent).migrateFrom(_holders[i], value);
                Migrate(_holders[i],migrationAgent,value);
            }
            totalSupply = totalSupply.sub(total);
            totalMigrated = totalMigrated.add(total);
        }
    }

    function migration(address _holder) internal {
        require(migrationAgent != 0x0);
        uint256 value = balances[_holder];
        require(value > 0);
        balances[_holder] = 0;
        totalSupply = totalSupply.sub(value);
        totalMigrated = totalMigrated.add(value);
        MigrationAgent(migrationAgent).migrateFrom(_holder, value);
        Migrate(_holder,migrationAgent,value);

    }

    // Reissue your tokens.
    function migrate() public
    {
        migration(msg.sender);
    }
}


// (A3)
// Contract for freezing of investors' funds. Hence, investors will be able to withdraw money if the
// round does not attain the softcap. From here the wallet of the beneficiary will receive all the
// money (namely, the beneficiary, not the manager's wallet).
contract RefundVault is Ownable {
    using SafeMath for uint256;

    enum State { Active, Refunding, Closed }

    mapping (address => uint256) public deposited;
    State public state;

    event Closed();
    event RefundsEnabled();
    event Refunded(address indexed beneficiary, uint256 weiAmount);
    event Deposited(address indexed beneficiary, uint256 weiAmount);

    function RefundVault() public {
        state = State.Active;
    }

    // Depositing funds on behalf of an TokenSale investor. Available to the owner of the contract (Crowdsale Contract).
    function deposit(address investor) onlyOwner public payable {
        require(state == State.Active);
        deposited[investor] = deposited[investor].add(msg.value);
        Deposited(investor,msg.value);
    }

    // Move the collected funds to a specified address. Available to the owner of the contract.
    function close(address _wallet) onlyOwner public {
        require(state == State.Active);
        require(_wallet != 0x0);
        state = State.Closed;
        Closed();
        _wallet.transfer(this.balance);
    }

    // Allow refund to investors. Available to the owner of the contract.
    function enableRefunds() onlyOwner public {
        require(state == State.Active);
        state = State.Refunding;
        RefundsEnabled();
    }

    // Return the funds to a specified investor. In case of failure of the round, the investor
    // should call this method of this contract (RefundVault) or call the method claimRefund of Crowdsale
    // contract. This function should be called either by the investor himself, or the company
    // (or anyone) can call this function in the loop to return funds to all investors en masse.
    function refund(address investor) public {
        require(state == State.Refunding);
        require(deposited[investor] > 0);
        uint256 depositedValue = deposited[investor];
        deposited[investor] = 0;
        investor.transfer(depositedValue);
        Refunded(investor, depositedValue);
    }

    // Destruction of the contract with return of funds to the specified address. Available to
    // the owner of the contract.
    function del(address _wallet) external onlyOwner {
        selfdestruct(_wallet);
    }
}

contract DistributorRefundVault is RefundVault{
 
    address public taxCollector;
    uint256 public taxValue;
    
    function DistributorRefundVault(address _taxCollector, uint256 _taxValue) RefundVault() public{
        taxCollector = _taxCollector;
        taxValue = _taxValue;
    }
   
    function close(address _wallet) onlyOwner public {
    
        require(state == State.Active);
        require(_wallet != 0x0);
        
        state = State.Closed;
        Closed();
        uint256 allPay = this.balance;
        uint256 forTarget1;
        uint256 forTarget2;
        if(taxValue <= allPay){
           forTarget1 = taxValue;
           forTarget2 = allPay.sub(taxValue);
           taxValue = 0;
        }else {
            taxValue = taxValue.sub(allPay);
            forTarget1 = allPay;
            forTarget2 = 0;
        }
        if(forTarget1 != 0){
            taxCollector.transfer(forTarget1);
        }
       
        if(forTarget2 != 0){
            _wallet.transfer(forTarget2);
        }

    }

}


// (B)
// The contract for freezing tokens for the team..
contract SVTAllocation {
    using SafeMath for uint256;

    TokenL public token;

    address public owner;

    uint256 public unlockedAt;

    // The contract takes the ERC20 coin address from which this contract will work and from the
    // owner (Team wallet) who owns the funds.
    function SVTAllocation(TokenL _token, address _owner) public{

        // How many days to freeze from the moment of finalizing Round2
        unlockedAt = now + 1 years;

        token = _token;
        owner = _owner;
    }

    function changeToken(TokenL _token) external{
        require(msg.sender == owner);
        token = _token;
    }


    // If the time of freezing expired will return the funds to the owner.
    function unlock() external{
        require(now >= unlockedAt);
        require(token.transfer(owner,token.balanceOf(this)));
    }
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"finalize2","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"tokenPause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"tokenUnpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_rate","type":"uint256"},{"name":"_overLimit","type":"uint256"},{"name":"_minPay","type":"uint256"}],"name":"changeRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"weiTotalRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"uint256"},{"name":"_value","type":"uint256"}],"name":"paymentsInOtherCurrency","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalize1","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"crowdsalePause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"weiRaised","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_value","type":"uint256"},{"name":"_date","type":"uint256"}],"name":"changeLock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getProfitPercent","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalizeAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_migrationAgent","type":"address"}],"name":"moveTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"profit","outputs":[{"name":"min","type":"uint256"},{"name":"max","type":"uint256"},{"name":"step","type":"uint256"},{"name":"maxAllProfit","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_holders","type":"address[]"}],"name":"migrateAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"company","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint8"}],"name":"wallets","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"goalReached","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_minProfit","type":"uint256"},{"name":"_maxProfit","type":"uint256"},{"name":"_stepProfit","type":"uint256"},{"name":"_maxAllProfit","type":"uint256"}],"name":"changeDiscount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minPay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"team","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_role","type":"uint8"},{"name":"_wallet","type":"address"}],"name":"changeWallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"softCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"timeNow","type":"uint256"}],"name":"getProfitPercentForData","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256[]"},{"name":"_procent","type":"uint256[]"},{"name":"_dateUnfreeze","type":"uint256[]"}],"name":"setBonuses","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bounty","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_endDiscountTime","type":"uint256"},{"name":"_endTime","type":"uint256"},{"name":"_softCap","type":"uint256"},{"name":"_hardCap","type":"uint256"},{"name":"_rate","type":"uint256"},{"name":"_overLimit","type":"uint256"},{"name":"_minPay","type":"uint256"},{"name":"_minProfit","type":"uint256"},{"name":"_maxProfit","type":"uint256"},{"name":"_stepProfit","type":"uint256"},{"name":"_maxAllProfit","type":"uint256"},{"name":"_value","type":"uint256[]"},{"name":"_procent","type":"uint256[]"},{"name":"_freezeTime","type":"uint256[]"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"distructVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_startTime","type":"uint256"},{"name":"_endDiscountTime","type":"uint256"},{"name":"_endTime","type":"uint256"}],"name":"changePeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"bonuses","outputs":[{"name":"value","type":"uint256"},{"name":"procent","type":"uint256"},{"name":"freezeTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_totalSupply","type":"uint256"}],"name":"fastTokenSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"endDiscountTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimRefund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalize3","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isPausedCrowdsale","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokenSaleType","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lockedAllocation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"overLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenReserved","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_value","type":"uint256"}],"name":"getBonuses","outputs":[{"name":"procent","type":"uint256"},{"name":"_dateUnfreeze","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_softCap","type":"uint256"},{"name":"_hardCap","type":"uint256"}],"name":"changeTargets","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"}],"name":"buyTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"hasEnded","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hardCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vault","outputs":[{"name":"","type":"address"}],"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":"crowdsaleUnpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"firstMint","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":true,"name":"beneficiary","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokenPurchase","type":"event"},{"anonymous":false,"inputs":[],"name":"Finalized","type":"event"},{"anonymous":false,"inputs":[],"name":"Initialized","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052604080519081016040526000808252602082018190526200002791600262000699565b5060806040519081016040908152600082526014602083015260059082018190526064606083015281518155602082015181600101556040820151816002015560608201516003919091015550635a5bef00600955635a9dda00600a819055600b5562567ca0600c556000600d55682b79fc5ed267480000600e556801158e460913d00000600f5566f8b0a10e4700006010556016805460a060020a60ff02191690553415620000d657600080fd5b60405160408062003ce9833981016040528080519190602001805160036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff8054600160a060020a03199081167307544edde0542857277188598606b32f2c28062f1790915560008051602062003c89833981519152805482167331e78568a5e53c568711dd139ec99d775e9fb80b1790557fc3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d805433600160a060020a03908116918416919091179091557fcbc4e5fb02c3d1de23a9f1e014b4d2ee5aeaea9505df5e855c9210bf472495af80548316737ff83c688cac62f5944c694cf04bf3f30ec1960817905560008051602062003cc9833981519152805483167317194d2ca481d2533a147776beb471dc40dc45801790557f405aad32e1adbac89bb7f176e338b8fc6e994ca210c9bb7bdca249b4659422508054831673443f4be0f50f973e3970343c6a50bcf1ac66c6c3179055600660005260008051602062003ca9833981519152805490921673b4d429b3240616fa67d1509c0c0e48d11900dd18179091556002805486831661010090810261010060a860020a03199092169190911791829055929450919091041690506340caae066040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1515620002f557600080fd5b6102c65a03f115156200030757600080fd5b50506002546101009004600160a060020a03169050638456cb596040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15156200036957600080fd5b6102c65a03f115156200037b57600080fd5b50506002546001600052600360205260008051602062003c8983398151915254600160a060020a036101009092048216925063abb0060191166040517c010000000000000000000000000000000000000000000000000000000063ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156200040c57600080fd5b6102c65a03f115156200041e57600080fd5b50506002546101009004600160a060020a0316905063abb00601336040517c010000000000000000000000000000000000000000000000000000000063ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156200049157600080fd5b6102c65a03f11515620004a357600080fd5b50506002546004600052600360205260008051602062003cc983398151915254600160a060020a036101009092048216925063abb0060191166040517c010000000000000000000000000000000000000000000000000000000063ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156200053457600080fd5b6102c65a03f115156200054657600080fd5b50506002546006600052600360205260008051602062003ca983398151915254600160a060020a036101009092048216925063abb0060191166040517c010000000000000000000000000000000000000000000000000000000063ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b1515620005d757600080fd5b6102c65a03f11515620005e957600080fd5b505050600081111562000691576002546101009004600160a060020a03166340c10f1933836000604051602001526040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156200067457600080fd5b6102c65a03f115156200068657600080fd5b505050604051805150505b505062000701565b8260028101928215620006cf579160200282015b82811115620006cf578251829060ff16905591602001919060010190620006ad565b50620006dd929150620006e1565b5090565b620006fe91905b80821115620006dd5760008155600101620006e8565b90565b61357880620007116000396000f30060606040526004361061026e5763ffffffff60e060020a60003504166302093ee281146102795780630abd2ba81461028c5780631b302a161461029f5780631e083cd3146102b25780632c4e722e146102ce5780632cde15d1146102f35780633197cbb614610306578063333dbda81461031957806336c35f9414610332578063392e53cd146103455780633f1740641461036c5780634042b66f1461037f5780634bb278f314610392578063541c15eb146103a5578063566fc6de146103ca5780636025d3e5146103dd57806363689b4a146103f057806366d16cc31461040f578063680b3bdf1461044d5780636904c94d1461049c578063733f28a8146104af57806378e97925146104e45780637d3d6522146104f75780637e29f2421461050a5780638129fc1c1461052957806382d186501461053c57806385f2aef21461054f5780638a0c47cd146105625780638d4e408314610587578063906a26e01461059a57806391816981146105ad57806392031600146105c3578063943dfef11461069257806395e19fab146106a557806399554fb7146107ad578063a2e65477146107c0578063ab375641146107dc578063b324c62a14610816578063b3f2ecfd1461082c578063b5545a3c1461083f578063b7992c0b14610852578063c8b43c1014610865578063caa035d614610878578063db0834cf14610902578063e06e0e4314610915578063e195d09614610928578063e59c9ada1461093b578063eb41fbca14610969578063ec8ac4d814610982578063ecb70fb714610996578063fb86a404146109a9578063fbfa77cf146109bc578063fc0c546a146109cf578063ffa67f6c146109e2575b610277336109f5565b005b341561028457600080fd5b610277610b25565b341561029757600080fd5b610277610c6c565b34156102aa57600080fd5b610277610d10565b34156102bd57600080fd5b610277600435602435604435610ddf565b34156102d957600080fd5b6102e1610e43565b60405190815260200160405180910390f35b34156102fe57600080fd5b6102e1610e49565b341561031157600080fd5b6102e1610e6b565b341561032457600080fd5b610277600435602435610e71565b341561033d57600080fd5b610277610f33565b341561035057600080fd5b6103586110f3565b604051901515815260200160405180910390f35b341561037757600080fd5b610277611103565b341561038a57600080fd5b6102e1611175565b341561039d57600080fd5b61027761118e565b34156103b057600080fd5b610277600160a060020a0360043516602435604435611286565b34156103d557600080fd5b6102e1611335565b34156103e857600080fd5b610277611340565b34156103fb57600080fd5b610277600160a060020a0360043516611362565b341561041a57600080fd5b610422611400565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b341561045857600080fd5b610277600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061140f95505050505050565b34156104a757600080fd5b6103586114ce565b34156104ba57600080fd5b6104c860ff600435166114dd565b604051600160a060020a03909116815260200160405180910390f35b34156104ef57600080fd5b6102e16114f8565b341561050257600080fd5b6103586114fe565b341561051557600080fd5b610277600435602435604435606435611512565b341561053457600080fd5b6102776115d2565b341561054757600080fd5b6102e1611686565b341561055a57600080fd5b61035861168c565b341561056d57600080fd5b61027760ff60043516600160a060020a036024351661169a565b341561059257600080fd5b6103586118a8565b34156105a557600080fd5b6102e16118b8565b34156105b857600080fd5b6102e16004356118be565b34156105ce57600080fd5b610277600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506119b595505050505050565b341561069d57600080fd5b610358611ad4565b34156106b057600080fd5b6102776004803590602480359160443591606435916084359160a4359160c4359160e435916101043591610124359161014435916101643591906101a4906101843590810190830135806020818102016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650611add95505050505050565b34156107b857600080fd5b610277611b25565b34156107cb57600080fd5b610277600435602435604435611bd7565b34156107e757600080fd5b6107f2600435611c59565b60405180848152602001838152602001828152602001935050505060405180910390f35b341561082157600080fd5b610277600435611c8a565b341561083757600080fd5b6102e1611dd1565b341561084a57600080fd5b610277611dd7565b341561085d57600080fd5b610277611e27565b341561087057600080fd5b610358611f0a565b341561088357600080fd5b61088b611f1a565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156108c75780820151838201526020016108af565b50505050905090810190601f1680156108f45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561090d57600080fd5b6104c8611fb3565b341561092057600080fd5b6102e1611fc2565b341561093357600080fd5b6102e1611fc8565b341561094657600080fd5b610951600435611fce565b60405191825260208201526040908101905180910390f35b341561097457600080fd5b6102776004356024356120bb565b610277600160a060020a03600435166109f5565b34156109a157600080fd5b61035861211c565b34156109b457600080fd5b6102e161215c565b34156109c757600080fd5b6104c8612162565b34156109da57600080fd5b6104c8612171565b34156109ed57600080fd5b610277612185565b60008080808080600160a060020a0387161515610a1157600080fd5b610a196121f5565b1515610a2457600080fd5b349550610a2f611335565b9450610a3a86611fce565b9094509250610a4f848663ffffffff61228216565b6008549092508211610a615781610a65565b6008545b9150610aa2620186a0610a9684606401610a8a600c548b61229890919063ffffffff16565b9063ffffffff61229816565b9063ffffffff6122bc16565b601154909150610ab8908763ffffffff61228216565b601155610ac68782856122d3565b86600160a060020a031633600160a060020a03167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad18888460405191825260208201526040908101905180910390a3610b1c6124fe565b50505050505050565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161480610b7d575060008052600360205260008051602061352d8339815191525433600160a060020a039081169116145b1515610b8857600080fd5b60185460ff161515610b9957600080fd5b6018805460ff1916905560028054600460005260036020527f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe9377246554601754600160a060020a036101009093048316936340c10f19939290921691610c0391604d91610a969190612298565b60006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610c4f57600080fd5b6102c65a03f11515610c6057600080fd5b50505060405180515050565b6002600052600360205260008051602061350d8339815191525433600160a060020a039081169116148015610cab575060025460a860020a900460ff16155b1515610cb657600080fd5b6002546101009004600160a060020a0316638456cb596040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610cfa57600080fd5b6102c65a03f11515610d0b57600080fd5b505050565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161480610d905750600b54624f1a000142118015610d6c5750600160165460a060020a900460ff166001811115610d6a57fe5b145b8015610d81575060025460a860020a900460ff165b8015610d905750610d906114fe565b1515610d9b57600080fd5b6002546101009004600160a060020a0316633f4ba83a6040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610cfa57600080fd5b6002600052600360205260008051602061350d8339815191525433600160a060020a03908116911614610e1157600080fd5b60025460b060020a900460ff1615610e2857600080fd5b60008311610e3557600080fd5b600c92909255600f55601055565b600c5481565b6000610e65610e56611175565b6013549063ffffffff61228216565b90505b90565b600b5481565b600360008181526020919091527fcbc4e5fb02c3d1de23a9f1e014b4d2ee5aeaea9505df5e855c9210bf472495af54819033600160a060020a03908116911614610eba57600080fd5b6009544210158015610ece5750600b544211155b9150610ee7600f54600e5461228290919063ffffffff16565b601154610efb90859063ffffffff61228216565b11159050818015610f095750805b8015610f1e575060025460b060020a900460ff165b1515610f2957600080fd5b5050601255601455565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161480610f8b575060008052600360205260008051602061352d8339815191525433600160a060020a039081169116145b1515610f9657600080fd5b601854610100900460ff161515610fac57600080fd5b6018805461ff0019169055600254600560005260036020527f405aad32e1adbac89bb7f176e338b8fc6e994ca210c9bb7bdca249b46594225054600160a060020a0361010090920482169116611000612a7a565b600160a060020a0392831681529116602082015260409081019051809103906000f080151561102e57600080fd5b6016805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039283161790819055600254610100900482169163abb00601911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156110a957600080fd5b6102c65a03f115156110ba57600080fd5b5050600254601654601754610100909204600160a060020a0390811693506340c10f1992911690610c0390604d90610a9690600c612298565b60025460b060020a900460ff1681565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161461113557600080fd5b60025460b860020a900460ff161561114c57600080fd5b6002805477ff0000000000000000000000000000000000000000000000191660b860020a179055565b6000610e6560125460115461228290919063ffffffff16565b6002600052600360205260008051602061350d8339815191525433600160a060020a03908116911614806111e6575060008052600360205260008051602061352d8339815191525433600160a060020a039081169116145b806111f657506111f46114fe565b155b151561120157600080fd5b60025460a860020a900460ff161561121857600080fd5b61122061211c565b151561122b57600080fd5b6002805475ff000000000000000000000000000000000000000000191660a860020a17905561125861255f565b7f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768160405160405180910390a1565b6002600052600360205260008051602061350d8339815191525433600160a060020a039081169116146112b857600080fd5b6002546101009004600160a060020a031663541c15eb84848460405160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091526044820152606401600060405180830381600087803b151561131c57600080fd5b6102c65a03f1151561132d57600080fd5b505050505050565b6000610e65426118be565b61134861118e565b611350610f33565b611358610b25565b611360611e27565b565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161461139457600080fd5b6002546101009004600160a060020a03166375e2ff658260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156113e957600080fd5b6102c65a03f115156113fa57600080fd5b50505050565b60055460065460075460085484565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161461144157600080fd5b6002546101009004600160a060020a031663680b3bdf826040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019060200280838360005b838110156114aa578082015183820152602001611492565b5050505090500192505050600060405180830381600087803b15156113e957600080fd5b60185462010000900460ff1681565b600360205260009081526040902054600160a060020a031681565b60095481565b6000600d5461150b611175565b1015905090565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161461154457600080fd5b60025460b060020a900460ff161561155b57600080fd5b8083111561156857600080fd5b611578838563ffffffff61280416565b82111561158457600080fd5b60008211156115bd576115b5846115a984610a8a81610a96898663ffffffff61280416565b9063ffffffff61228216565b6006556115c3565b60068490555b60059390935560075550600855565b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161461160457600080fd5b60025460b060020a900460ff161561161b57600080fd5b60095442111561162a57600080fd5b611632612816565b7f5daa87a0e9463431830481fd4b6e3403442dfb9a12b9c07597e9f61d50b633c860405160405180910390a16002805476ff00000000000000000000000000000000000000000000191660b060020a179055565b60105481565b601854610100900460ff1681565b6000600360008460068111156116ac57fe5b60ff16815260208101919091526040016000205433600160a060020a0390811691161480156116e7575060038360068111156116e457fe5b14155b8061174157506002600052600360205260008051602061350d8339815191525433600160a060020a039081169116148015611741575060025460b060020a900460ff1615806117415750600383600681111561173f57fe5b145b151561174c57600080fd5b6003600084600681111561175c57fe5b60ff1681526020810191909152604001600090812054600160a060020a03169150829060039085600681111561178e57fe5b60ff1681526020810191909152604001600020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790556117d5816129b9565b1515611845576002546101009004600160a060020a03166306301ce88260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561183057600080fd5b6102c65a03f1151561184157600080fd5b5050505b61184e826129b9565b15610d0b576002546101009004600160a060020a031663abb006018360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561131c57600080fd5b60025460a860020a900460ff1681565b600d5481565b6000806000806000600560010154600014806118da5750600754155b806118e65750600a5486115b156118f55760055494506119ac565b60095486116119085760065494506119ac565b600954600a5461191d9163ffffffff61280416565b600554600654919550611936919063ffffffff61280416565b600a5490935061194c908763ffffffff61280416565b915061199261197e85610a96611971600160056002015461228290919063ffffffff16565b869063ffffffff61229816565b600754610a8a90869063ffffffff6122bc16565b6005549091506119a990829063ffffffff61228216565b94505b50505050919050565b60026000908152600360205260008051602061350d8339815191525433600160a060020a039081169116146119e957600080fd5b60025460b060020a900460ff1615611a0057600080fd5b82518451148015611a12575081518451145b1515611a1d57600080fd5b8351611a2a600482612a8a565b50600090505b83518110156113fa57606060405190810160405280858381518110611a5157fe5b906020019060200201518152602001848381518110611a6c57fe5b906020019060200201518152602001838381518110611a8757fe5b9060200190602002015190526004805483908110611aa157fe5b90600052602060002090600302016000820151815560208201518160010155604082015160029091015550600101611a30565b60185460ff1681565b611ae88f8f8f611bd7565b611af28c8c6120bb565b611afd8a8a8a610ddf565b611b0987878787611512565b611b148383836119b5565b505050505050505050505050505050565b60008052600360205260008051602061352d8339815191525433600160a060020a03908116911614611b5657600080fd5b60095463020f5800014211611b6a57600080fd5b60155460008052600360205260008051602061352d83398151915254600160a060020a039182169163b9caebf4911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b1515610cfa57600080fd5b6002600052600360205260008051602061350d8339815191525433600160a060020a03908116911614611c0957600080fd5b60025460b060020a900460ff1615611c2057600080fd5b4283901115611c2e57600080fd5b8282118015611c3d5750808211155b1515611c4857600080fd5b600992909255600b91909155600a55565b6004805482908110611c6757fe5b600091825260209091206003909102018054600182015460029092015490925083565b6002600052600360205260008051602061350d8339815191525433600160a060020a03908116911614611cbc57600080fd5b600060165460a060020a900460ff166001811115611cd657fe5b148015611ced575060025460b060020a900460ff16155b1515611cf857600080fd5b6002546001600090815260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c54600160a060020a036101009093048316926340c10f199291169084906040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515611d8f57600080fd5b6102c65a03f11515611da057600080fd5b505050604051805150506016805474ff0000000000000000000000000000000000000000191660a060020a17905550565b600a5481565b601554600160a060020a031663fa89401a3360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b1515610cfa57600080fd5b6002600052600360205260008051602061350d8339815191525433600160a060020a0390811691161480611e7f575060008052600360205260008051602061352d8339815191525433600160a060020a039081169116145b1515611e8a57600080fd5b60185462010000900460ff161515611ea157600080fd5b6018805462ff000019169055600254600660005260036020527fc69056f16cbaa3c616b828e333ab7d3a32310765507f8f58359e99ebb7a885f354601754600160a060020a036101009093048316926340c10f19921690610c0390604d90610a96906009612298565b60025460b860020a900460ff1681565b611f22612ab6565b600060165460a060020a900460ff166001811115611f3c57fe5b14611f7a5760408051908101604052600681527f726f756e643200000000000000000000000000000000000000000000000000006020820152610e65565b60408051908101604052600681527f726f756e643100000000000000000000000000000000000000000000000000006020820152905090565b601654600160a060020a031681565b600f5481565b60145481565b60045460009081908190158061200457508360046000815481101515611ff057fe5b906000526020600020906003020160000154115b1561201557600092508291506120b5565b5060015b60045461ffff82161015612060578360048261ffff1681548110151561203b57fe5b906000526020600020906003020160000154111561205857612060565b600101612019565b6004805461ffff60001984011690811061207657fe5b90600052602060002090600302016001015460046001830361ffff1681548110151561209e57fe5b906000526020600020906003020160020154925092505b50915091565b6002600052600360205260008051602061350d8339815191525433600160a060020a039081169116146120ed57600080fd5b60025460b060020a900460ff161561210457600080fd5b8082111561211157600080fd5b600d91909155600e55565b6000806000600b5442119150600e54612133611175565b1015905081806121405750805b8015612155575060025460b060020a900460ff165b9250505090565b600e5481565b601554600160a060020a031681565b6002546101009004600160a060020a031681565b6002600052600360205260008051602061350d8339815191525433600160a060020a039081169116146121b757600080fd5b60025460b860020a900460ff1615156001146121d257600080fd5b6002805477ff000000000000000000000000000000000000000000000019169055565b6000806000806009544211801561220d5750600b5442105b92506010543410159150612237600f546115a9612228611175565b600e549063ffffffff61280416565b34111590508280156122465750815b801561224f5750805b8015612264575060025460b060020a900460ff165b801561227a575060025460b860020a900460ff16155b935050505090565b60008282018381101561229157fe5b9392505050565b60008282028315806122b457508284828115156122b157fe5b04145b151561229157fe5b60008082848115156122ca57fe5b04949350505050565b6000806000808411156124775760025461236b9086906101009004600160a060020a0316638b745ff28960006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561234457600080fd5b6102c65a03f1151561235557600080fd5b505050604051805191905063ffffffff61228216565b6002549093506101009004600160a060020a031663708484db8760006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156123cc57600080fd5b6102c65a03f115156123dd57600080fd5b5050506040518051925050504283018082116123f957806123fb565b815b6002549091506101009004600160a060020a031663541c15eb87858460405160e060020a63ffffffff8616028152600160a060020a03909316600484015260248301919091526044820152606401600060405180830381600087803b151561246257600080fd5b6102c65a03f1151561247357600080fd5b5050505b6002546101009004600160a060020a03166340c10f19878760006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156124db57600080fd5b6102c65a03f115156124ec57600080fd5b50505060405180515050505050505050565b601554600160a060020a031663f340fa01343360405160e060020a63ffffffff8516028152600160a060020a0390911660048201526024016000604051808303818588803b151561254e57600080fd5b6125ee5a03f115156113fa57600080fd5b6125676114fe565b156127c55760155460008052600360205260008051602061352d83398151915254600160a060020a039182169163c74073a1911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156125d957600080fd5b6102c65a03f115156125ea57600080fd5b505050600060145411156126b1576002546001600090815260036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c54601454600160a060020a036101009094048416936340c10f19939216916040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561269057600080fd5b6102c65a03f115156126a157600080fd5b5050506040518051505060006014555b600060165460a060020a900460ff1660018111156126cb57fe5b141561272f576002805476ffff000000000000000000000000000000000000000000191690556016805474ff0000000000000000000000000000000000000000191660a060020a17905561271d611175565b601355600060118190556012556127c0565b6002546101009004600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561277c57600080fd5b6102c65a03f1151561278d57600080fd5b5050506040518051601755506018805462ff00001961ff001960ff19909216600117919091166101001716620100001790555b611360565b601554600160a060020a0316638c52dc416040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515610cfa57600080fd5b60008282111561281057fe5b50900390565b600280546000918291829160ff90911690811061282f57fe5b01546002805460ff8082166001011660ff19909116179055601554909250600160a060020a03161561294257601554600160a060020a031663c9894b5c6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156128a357600080fd5b6102c65a03f115156128b457600080fd5b505050604051805160155460008052600360205260008051602061352d83398151915254919350600160a060020a03908116925063b9caebf4911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561292d57600080fd5b6102c65a03f1151561293e57600080fd5b5050505b6000612954838363ffffffff61228216565b61295c612ac8565b600160a060020a039092168252602082015260409081019051809103906000f080151561298857600080fd5b6015805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555050565b60036020527fa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c5460008051602061350d833981519152547f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe9377246554600660009081527fc69056f16cbaa3c616b828e333ab7d3a32310765507f8f58359e99ebb7a885f3549093600160a060020a038681169181168214948116821493811682149216148380612a635750825b80612a6b5750815b806119a9575095945050505050565b60405161030b80612b0483390190565b815481835581811511610d0b57600302816003028360005260206000209182019101610d0b9190612ad8565b60206040519081016040526000815290565b6040516106fe80612e0f83390190565b610e6891905b80821115612aff576000808255600182018190556002820155600301612ade565b509056006060604052341561000f57600080fd5b60405160408061030b83398101604052808051919060200180516301e13380420160025560008054600160a060020a03958616600160a060020a03199182161790915560018054959092169416939093179092555050610297806100746000396000f3006060604052600436106100535763ffffffff60e060020a60003504166366829b1681146100585780638cb1e9c1146100795780638da5cb5b1461009e578063a69df4b5146100cd578063fc0c546a146100e0575b600080fd5b341561006357600080fd5b610077600160a060020a03600435166100f3565b005b341561008457600080fd5b61008c61013d565b60405190815260200160405180910390f35b34156100a957600080fd5b6100b1610143565b604051600160a060020a03909116815260200160405180910390f35b34156100d857600080fd5b610077610152565b34156100eb57600080fd5b6100b161025c565b60015433600160a060020a0390811691161461010e57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60025481565b600154600160a060020a031681565b60025442101561016157600080fd5b60008054600154600160a060020a039182169263a9059cbb929091169083906370a082319030906040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156101cd57600080fd5b6102c65a03f115156101de57600080fd5b5050506040518051905060006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561023457600080fd5b6102c65a03f1151561024557600080fd5b50505060405180519050151561025a57600080fd5b565b600054600160a060020a0316815600a165627a7a723058204318dca880e89437c471702453091248e47d5ef62abc07fcbbe80c5a4dbe0fac00296060604052341561000f57600080fd5b6040516040806106fe833981016040528080519190602001805160008054600160a060020a03338116600160a060020a031990921691909117825560028054600160a860020a031916610100979092169690960217909455600355506106829182915061007c90396000f3006060604052600436106100ae5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416638c52dc4181146100b35780638da5cb5b146100c8578063b9caebf4146100f7578063bea1dcf814610116578063c19d93fb14610129578063c74073a114610160578063c9894b5c1461017f578063cb13cddb146101a4578063f2fde38b146101c3578063f340fa01146101e2578063fa89401a146101f6575b600080fd5b34156100be57600080fd5b6100c6610215565b005b34156100d357600080fd5b6100db610288565b604051600160a060020a03909116815260200160405180910390f35b341561010257600080fd5b6100c6600160a060020a0360043516610297565b341561012157600080fd5b6100db6102be565b341561013457600080fd5b61013c6102d2565b6040518082600281111561014c57fe5b60ff16815260200191505060405180910390f35b341561016b57600080fd5b6100c6600160a060020a03600435166102db565b341561018a57600080fd5b610192610435565b60405190815260200160405180910390f35b34156101af57600080fd5b610192600160a060020a036004351661043b565b34156101ce57600080fd5b6100c6600160a060020a036004351661044d565b6100c6600160a060020a03600435166104ac565b341561020157600080fd5b6100c6600160a060020a0360043516610562565b60005433600160a060020a0390811691161461023057600080fd5b60006002805460ff169081111561024357fe5b1461024d57600080fd5b6002805460ff191660011790557f599d8e5a83cffb867d051598c4d70e805d59802d8081c1c7d6dffc5b6aca2b8960405160405180910390a1565b600054600160a060020a031681565b60005433600160a060020a039081169116146102b257600080fd5b80600160a060020a0316ff5b6002546101009004600160a060020a031681565b60025460ff1681565b600080548190819033600160a060020a039081169116146102fb57600080fd5b60006002805460ff169081111561030e57fe5b1461031857600080fd5b600160a060020a038416151561032d57600080fd5b6002805460ff1916811790557f1cdde67b72a90f19919ac732a437ac2f7a10fc128d28c2a6e525d89ce5cd9d3a60405160405180910390a1600354600160a060020a03301631935083901161039d576003549150610391838363ffffffff61062e16565b600060035590506103ba565b6003546103b0908463ffffffff61062e16565b6003555081905060005b81156103f8576002546101009004600160a060020a03166108fc83150283604051600060405180830381858888f1935050505015156103f857600080fd5b801561042f57600160a060020a03841681156108fc0282604051600060405180830381858888f19350505050151561042f57600080fd5b50505050565b60035481565b60016020526000908152604090205481565b60005433600160a060020a0390811691161461046857600080fd5b600160a060020a038116151561047d57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60005433600160a060020a039081169116146104c757600080fd5b60006002805460ff16908111156104da57fe5b146104e457600080fd5b600160a060020a03811660009081526001602052604090205461050d903463ffffffff61064016565b600160a060020a0382166000818152600160205260409081902092909255907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c49034905190815260200160405180910390a250565b600060016002805460ff169081111561057757fe5b1461058157600080fd5b600160a060020a038216600090815260016020526040812054116105a457600080fd5b50600160a060020a038116600081815260016020526040808220805492905590919082156108fc0290839051600060405180830381858888f1935050505015156105ed57600080fd5b81600160a060020a03167fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d06518260405190815260200160405180910390a25050565b60008282111561063a57fe5b50900390565b60008282018381101561064f57fe5b93925050505600a165627a7a723058204a83bc93998921cac6c1ccc102a6a8e923fcfce11db880ed27fb9b5e8a38eb280029c3a24b0501bd2c13a7e57f2db4369ec4c223447539fc0724a9d55ac4a06ebd4d3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92effa165627a7a7230582049dbda70e8f049b0802560947f5414b97198cd64e76892386be0dbb58650fd680029a15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054cc69056f16cbaa3c616b828e333ab7d3a32310765507f8f58359e99ebb7a885f383ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe93772465000000000000000000000000707f0612cbbfa02284e02b0010b4f859bb7308ec0000000000000000000000000000000000000000000069e10de76676d0800000

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

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 000000000000000000000000707f0612cBbfa02284e02B0010B4f859bb7308ec
Arg [1] : 0000000000000000000000000000000000000000000069e10de76676d0800000


   Swarm Source:
bzzr://49dbda70e8f049b0802560947f5414b97198cd64e76892386be0dbb58650fd68

 

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