Contract 0x3C4eAce49c96a6e6412dcFfD08D5a8FebcC70FbD

 
Txn Hash
Method
Block
From
To
Value
0xdf9ea167980026c04060510ebe7d20dc058f2ac18e902821d26472b86fdaf33bWithdraw84583732019-08-31 13:54:281083 days 9 hrs ago0xeb1badcdb9bcfb7c4c5e8d4b99f483a70173d76c IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000030351
0x2002d041238c304188cd6752d5e0f5ebd084635f2671ff8867b4a27130db858eRun Super Privil...74542992019-03-28 2:10:021239 days 21 hrs ago0x4eaf17ff7d3198a580c5fcbb48f0d4534c2a143a IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000176212
0x99aa9105bb06322619f57c86a5f200449c61532d793dc7705ab3d84f15fd470aClaim My Token74409542019-03-26 0:09:491241 days 23 hrs ago0x4eaf17ff7d3198a580c5fcbb48f0d4534c2a143a IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000044141
0x983278d809f911ee790dd153dfccef39c9be5f5bf9afca6b57eaad7bf6d27fa6Run Super Privil...73694342019-03-14 21:09:561253 days 2 hrs ago0xbfaa495a2940167bdf4c16bb857758ff4ef4ba92 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000176212
0xcecca892f135bbced4afc73dad3680086ec54facf49cb27b7d92edae643f8c13Run Super Privil...73043832019-03-04 17:55:141263 days 5 hrs ago0xbfaa495a2940167bdf4c16bb857758ff4ef4ba92 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000361244.‍1
0x6ea99d2cea5e5e7faff06442d39b03e1c33bc951906eb19c0d7371ced5beb1f9Run Super Privil...73043692019-03-04 17:51:491263 days 6 hrs ago0xbfaa495a2940167bdf4c16bb857758ff4ef4ba92 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000440545
0xb2d5dafbd49e8a0a03ad2df712846604ae792206989774b6a0e290841b7be645Run Super Privil...73034262019-03-04 14:18:231263 days 9 hrs ago0xbfaa495a2940167bdf4c16bb857758ff4ef4ba92 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000319633.‍1
0x9a61b232173ed8757c3042302b330352db9e928ed087621a6d5f09e587dfab0ePurchase Company72331922019-02-17 19:52:341278 days 4 hrs ago0xbfaa495a2940167bdf4c16bb857758ff4ef4ba92 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0.‍02 Ether0.‍000686835
0x34db06f75ce26bc4880ceaa5cdedc12a207aead3349469fc7bd5115377019b1fRun Super Privil...72081632019-02-11 20:37:241284 days 3 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000176212
0x92f29ba48d7a97bc484d69a5b38e6b2122fbf51fb78cafc8be655c6549564eebRun Super Privil...72056592019-02-11 6:28:591284 days 17 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000440545
0x1439841464b8cbe996f2c226c638119aeb941b0f07983056bd363c490b0ef343Create Company72043302019-02-10 22:41:121285 days 1 hr ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍001141344
0xe5d956f20c3712d5b6f1345e129b8f293a891d9e6059bc2a9da403c8a5a38dd6Claim My Token72043202019-02-10 22:38:391285 days 1 hr ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000137733.‍12
0x3503f320b297be7a82ed3532b76336854385cc36b3e6eb142d1b93dae157d6fbClaim My Token72043182019-02-10 22:38:051285 days 1 hr ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000176584
0x454391c591f088759fa6031d7e1938177a8f7d81f04eb8ad693ea57d199a0f0aPurchase Company72037262019-02-10 19:22:231285 days 4 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0.‍008 Ether0.‍000178941.‍5
0x8e1e6eeb15eb7d5ebf27002ef3e4624602bff66b9b76cd82b704c56857ce81faPurchase Company72037232019-02-10 19:21:261285 days 4 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0.‍006 Ether0.‍000240022
0x16f09404f5967b374a93b00cb6e0410dd23eec3c160e8b95fae9e8d65c5d4a5ePurchase Company72037212019-02-10 19:21:071285 days 4 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0.‍005 Ether0.‍000181332
0x73a3fbab2464da44e713b8160058b6e46365f78a97cc365ddeb4f39b4dd141cdPurchase Company72037212019-02-10 19:21:071285 days 4 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0.‍004 Ether0.‍000270392
0xb65f59f42b489fe76b311719278d9eb47574371b07ad22439bfbed051ce4ecd4Purchase Company72037192019-02-10 19:20:211285 days 4 hrs ago0x06f35f1970a127accd58eed252dab11488456198 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0.‍001 Ether0.‍000268052
0xe2b00dbffe7d1ba8d679c0a3917ec2688708cc1bf039d17feaec9fe1a1fe1f29Run Super Privil...67343642018-11-19 15:57:401368 days 7 hrs ago0x03c4dcdbd7efc4fd32e2c0e92d4e1f8b778e1a56 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍001145413
0x48a35e7fec7e19bc6dc16396dca6517bb39fb71e1477028cbfe14ae75ceb6cfdClaim My Token66701062018-11-09 3:39:491378 days 20 hrs ago0x4eaf17ff7d3198a580c5fcbb48f0d4534c2a143a IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍00039739
0xf22dbed5cd8159f1d8154a7583f371b283d1e3e5c209d2eb0da367cddb9ca87dPut Company Onsa...66449912018-11-05 0:34:471382 days 23 hrs ago0x03c4dcdbd7efc4fd32e2c0e92d4e1f8b778e1a56 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000521177
0x58d0f32d05a660e0f1519b6624de60d2f69260ecc9df16643f8c05de1e00347aPut Company Onsa...66449902018-11-05 0:34:391382 days 23 hrs ago0x03c4dcdbd7efc4fd32e2c0e92d4e1f8b778e1a56 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍00037085
0x01bded5a8fc5b960e6808f9da68e5cb487d112b15cce6b24d2e1589178529075Run Super Privil...66449882018-11-05 0:34:211382 days 23 hrs ago0x03c4dcdbd7efc4fd32e2c0e92d4e1f8b778e1a56 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000440545
0x2c84bc538902b7e93d7aad1d74520ce2aff0508e1fad8ce7812d07d839569f89Claim My Token66017052018-10-28 22:12:061390 days 1 hr ago0x4eaf17ff7d3198a580c5fcbb48f0d4534c2a143a IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍00012422.‍1
0x332efb8f73a1b46adb6d463581512d25af6db2bd9362307c2dfa20a607ec8910Run Super Privil...66009502018-10-28 19:15:141390 days 4 hrs ago0x03c4dcdbd7efc4fd32e2c0e92d4e1f8b778e1a56 IN  0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0 Ether0.‍000222912.‍5300001
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xdf9ea167980026c04060510ebe7d20dc058f2ac18e902821d26472b86fdaf33b84583732019-08-31 13:54:281083 days 9 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xeb1badcdb9bcfb7c4c5e8d4b99f483a70173d76c0.‍6416 Ether
0x9a61b232173ed8757c3042302b330352db9e928ed087621a6d5f09e587dfab0e72331922019-02-17 19:52:341278 days 4 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xbca79742dc51406634491f2c4cee04db69f766f20.‍018 Ether
0x454391c591f088759fa6031d7e1938177a8f7d81f04eb8ad693ea57d199a0f0a72037262019-02-10 19:22:231285 days 4 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x15ff1e97059cdf053a512a463e9818d50ac2c7ba0.‍0072 Ether
0x8e1e6eeb15eb7d5ebf27002ef3e4624602bff66b9b76cd82b704c56857ce81fa72037232019-02-10 19:21:261285 days 4 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x98db579f9d4c5548482bca4d271b14a7ad6dcc890.‍0054 Ether
0x16f09404f5967b374a93b00cb6e0410dd23eec3c160e8b95fae9e8d65c5d4a5e72037212019-02-10 19:21:071285 days 4 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x98db579f9d4c5548482bca4d271b14a7ad6dcc890.‍0045 Ether
0x73a3fbab2464da44e713b8160058b6e46365f78a97cc365ddeb4f39b4dd141cd72037212019-02-10 19:21:071285 days 4 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x98db579f9d4c5548482bca4d271b14a7ad6dcc890.‍0036 Ether
0xb65f59f42b489fe76b311719278d9eb47574371b07ad22439bfbed051ce4ecd472037192019-02-10 19:20:211285 days 4 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xefa6270a9f324771635ead418a4f63d103e448b60.‍0009 Ether
0x32a977eaf5753664ef99dec93b58cae946cfd61bade9af46cf5f0fd03c049ce165953802018-10-27 21:23:571391 days 2 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xfea0904acc8df0f3288b6583f60b86c36ea52acd0.‍036 Ether
0xda5049c96593e141280b5428639caebcbf597b18c0b3bbcb813f43691cca34e065829882018-10-25 20:46:171393 days 3 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xc24f97bb1d7a75d9f986c99dfcfa2a558058904c0.‍036 Ether
0xb1027a0e2fe5a2a53db3761db8b0481884b64e1980fef18432e8ba67b96ae9aa65780632018-10-25 1:29:241393 days 22 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xc24f97bb1d7a75d9f986c99dfcfa2a558058904c0.‍036 Ether
0x1d02a344d0a9f14b75028f08a0c9fa294f0773afe84b473814d3a7202e043ef765780602018-10-25 1:28:411393 days 22 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x9ddbe1f25a0ce69c073e8fb9c9e56c8483d99a900.‍036 Ether
0x3dffd063e0d0ae2ab3ebc1af8c7dd4ee5bf8bb3c9348589a33f796a8a4415a2765780422018-10-25 1:24:281393 days 22 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xfea0904acc8df0f3288b6583f60b86c36ea52acd0.‍072 Ether
0x8b438accdabbe187781462549604284a7e11d11b6db85e774bf2ac49c270059264410912018-10-02 18:25:271416 days 5 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xd47df21207181152dffc749eb3a66d8d91eb204a0.‍072 Ether
0xf5481b71813572d295050cd0549ab6fdf10a06c706f6e79e9707e6d61669e2d363282762018-09-14 5:02:121434 days 18 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x603506ea4a154b256bcba721c9681afaa2f3fe660.‍0009 Ether
0x79ca2fa9905d5f19f2195c39ee480df93baa900a1ccd039624e23cc674da631362870122018-09-07 7:30:261441 days 16 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x98db579f9d4c5548482bca4d271b14a7ad6dcc890.‍0018 Ether
0x6c6567a3d07683383d3cafd64e549e662018bb714f24564baa51456f31e5faa662869792018-09-07 7:19:191441 days 16 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x5fc84234455784e8bceefc82d0fbd6130aa229950.‍0036 Ether
0x85db8816ba90b681d0d3d9b34a58aad537f7c5af6be66ee3535e1ffd7852b7b462869662018-09-07 7:16:321441 days 16 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xc24f97bb1d7a75d9f986c99dfcfa2a558058904c0.‍036 Ether
0xffa82064febefcf129fd0d32d5e5698a3d878bf6f47fba8226f1306d91d8fd2560517702018-07-29 14:37:151481 days 9 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x603506ea4a154b256bcba721c9681afaa2f3fe660.‍0009 Ether
0xd5472edd190f1d7c093df0722e1e2cebaef7bf5821c61d6a14e227bae833a09e60495382018-07-29 5:39:231481 days 18 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x98db579f9d4c5548482bca4d271b14a7ad6dcc890.‍018 Ether
0x08306c5161c2ddf7f1e68f33569a9dcd84b0ecc89045440b380d32808cde3d3960495362018-07-29 5:38:531481 days 18 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xbca79742dc51406634491f2c4cee04db69f766f20.‍018 Ether
0x9783354bc7d634849e2fcc14647da70c5cc378ed08c0f5fce8a4e4a6044aef9460123162018-07-22 22:17:371488 days 1 hr ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0x603506ea4a154b256bcba721c9681afaa2f3fe660.‍0018 Ether
0x433ef5f53e0214de38adf4756b8236d6b3d103ee2c930874e1b7a297495e235259892852018-07-19 0:33:561491 days 23 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xefa6270a9f324771635ead418a4f63d103e448b60.‍0009 Ether
0xdf13349813bfe3afd409584e167f499e0492138199629f74cb2410068252010459292852018-07-08 20:41:061502 days 3 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xbca79742dc51406634491f2c4cee04db69f766f20.‍018 Ether
0x2defde8274a70dc2947fc667cb36f0c6c0e14c72325167bcb507881d5cfc0c4859292852018-07-08 20:41:061502 days 3 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xbca79742dc51406634491f2c4cee04db69f766f20.‍018 Ether
0x57675c117803a9feabf13a6a63cda503376835b6fe0b7931ba3c619e5531121b59292802018-07-08 20:39:521502 days 3 hrs ago 0x3c4eace49c96a6e6412dcffd08d5a8febcc70fbd0xbca79742dc51406634491f2c4cee04db69f766f20.‍018 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Ethecom

Compiler Version
v0.4.23+commit.124ca40d

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-06-05
*/

/*
Copyright 2018 Ethecom.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

pragma solidity ^0.4.21;

contract Ownable {
    address public owner;
    constructor() public {
        owner = msg.sender;
    }

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

    function transferOwnership(address newOwner) public onlyOwner {
        if (newOwner != address(0)) {
            owner = newOwner;
        }
    }
}

contract Utils {
    function sqrt(uint256 x) public pure returns (uint256 y) {
        uint z = (x + 1) / 2;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }

    function lowerCase(bytes32 value) public pure returns (bytes32) {
        bytes32 result = value;
        for (uint i = 0; i < 32; i++) {
            if (uint(value[i]) >= 65 && uint(value[i]) <= 90) {
                result |= bytes32(0x20) << (31-i)*8;
            }
        }
        return result;
    }
    
    function validateCompanyName(bytes32 name) public pure returns (bool) {
        for (uint i = 0; i < 32; i++) {
            if (uint(name[i]) != 0 && (uint(name[i]) < 32 || uint(name[i]) > 126)) {
                return false;
            }
        }
        return true;
    }
}

contract CompanyCostInterface is Ownable {
    function getCreationCost() public view returns (uint256); // in ECOM without decimals
    function getCompanyCount() public view returns (uint256);
    function getOffsaleCount() public view returns (uint256);
    function increaseCompanyCountByOne() public;
    function increaseOffsaleCountByOne() public;
    function decreaseOffsaleCountByOne() public;

    function calculateNextPrice(uint256 oldPrice) public view returns (uint256);
    function calculatePreviousPrice(uint256 newPrice) public view returns (uint256);
}

contract RandomGeneratorInterface {
    function rand(address sender) public returns (uint256);
}

contract TopCompanyFactoryInterface is Ownable {
    struct TopCompany {
        bytes32 name;
        uint256 performance;
        bytes32 logoUrl;
    }

    uint256 public startPrice; // First available value of a top company (In wei)
    int256 public startBlock;
    uint256 public initialAvailableCount;

    // Release a new company every 2 hours (given that a block is generated every 15 seconds)
    uint256 public blocksBetweenNewCompany;

    uint256 public companyCount;
    TopCompany[] public companies;
    mapping(bytes32 => uint256) public companiesIndex;
    function canBuyCompany(bytes32 nameLowercase) public view returns (bool);
    function getCompanyByName(bytes32 nameLowercase) public view returns (bytes32 name, uint256 performance, bytes32 logoUrl);
    function getCompany(uint256 index) public view returns (bytes32 name, uint256 performance, bytes32 logoUrl);
    function removeCompany(bytes32 nameLowercase) public returns (uint256);
}

contract ECOMTokenInterface is Ownable {
    uint256 public totalSupply;
    function balanceOf(address _owner) public view returns (uint256 balance);
    function transfer(address _to, uint256 _value) public returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
    function approve(address _spender, uint256 _value) public returns (bool success);
    function ownerApprove(address _sender, uint256 _value) public returns (bool success);
    function allowance(address _owner, address _spender) public view returns (uint256 remaining);

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

contract Ethecom is Ownable {
    struct Company {
        bytes32 name;
        bytes32 logoUrl;
        uint performance;
        address owner;
        uint price;
        uint lastPrice;
        bool isOnsale;
    }

    event CompanyCreated(bytes32 name, bytes32 logoUrl,uint256 performance, uint256 price, address owner);
    event CompanyTransferred(bytes32 name, uint256 newPrice, address oldOwner, address owner);
    event CompanyLogoUpdated(bytes32 name, bytes32 logoUrl, address owner);
    event CompanySaleStatusChanged(bytes32 name, bool saleStatus, uint256 lastPrice, address owner);
    event SuperPrivilegeLuckyDrawResult(uint256 resultValue, bool status, address owner);

    ECOMTokenInterface public tokenContract;
    TopCompanyFactoryInterface public factoryContract;
    RandomGeneratorInterface public randContract;
    CompanyCostInterface public costContract;
    Utils private utils;
    uint ECOMDecimal = 100000000;

    // Owner can update this value
    uint256 public blocksPerDay = 5000;

    // Map company name to company object
    mapping(bytes32 => Company) public companies;

    // Total performance of all companies owned by a user
    mapping(address => uint256) public ownedPerformance;

    // The last time a user claim their ECOM token so that it will be transferred to their eth account
    mapping(address => uint256) public lastTokenClaimedBlock;

    // Number of super privileges an account has 
    mapping (address => uint256) public superPrivilegeCount;

    // Minimum random value required to get a super privilege
    uint256 public minRandomPrivilegeValue = 90;
    uint256 public superPrivilegeCost = 30; // in ECOM token

    uint256 public maxUserCreatedPerformance = 35;// Max performance of a user created company
    uint256 public oldOwnerProfit = 80;
    uint256 public logoFee = 10; // In ECOM
    uint256 public minCompanyValue = 1000000000000000; // in wei
    uint256 public maxCompanyValue = 100000000000000000000; // in wei

    constructor(address ECOMToken, address topCompanyFactory, address randomGenerator, address companyCost) public {
        factoryContract = TopCompanyFactoryInterface(topCompanyFactory);
        randContract = RandomGeneratorInterface(randomGenerator);
        costContract = CompanyCostInterface(companyCost);
        tokenContract = ECOMTokenInterface(ECOMToken);

        utils = new Utils();
    }

    /**
     *  For configurations
     */

    function updateBlocksPerDay(uint256 value) public onlyOwner {
        blocksPerDay = value;
    }

    function updateSuperPrivilegeParams(uint256 minRandom, uint256 cost) public onlyOwner {
        minRandomPrivilegeValue = minRandom;
        superPrivilegeCost = cost;
    }

    function updateUserCreatedPerformance(uint256 max) public onlyOwner {
        maxUserCreatedPerformance = max;
    }

    function updateLogoFee(uint256 newFee) public onlyOwner {
        logoFee = newFee;
    }

    function updateOldOwnerProfit(uint256 newProfit) public onlyOwner {
        oldOwnerProfit = newProfit;
    }

    function updateMinCompanyValue(uint256 minValue) public onlyOwner {
        minCompanyValue = minValue;
    }

    /**
     * Core methods
     * ------------------------------------------------------------------------------------------
     */

    function purchaseCompany(bytes32 nameFromUser, bool superPrivilege) public payable {
        bytes32 nameLowercase = utils.lowerCase(nameFromUser);
        Company storage c = companies[nameLowercase];
        require(c.owner != address(0));
        require(c.owner != msg.sender);
        require(c.price == msg.value);
        require(c.isOnsale == true);
        if (superPrivilege) {
            require(superPrivilegeCount[msg.sender] > 0);
        }

        address oldOwner = c.owner;
        uint256 profit = c.price - c.lastPrice;
        oldOwner.transfer(c.lastPrice + profit * 8/10);

        c.owner = msg.sender;
        c.lastPrice = c.price;
        c.price = costContract.calculateNextPrice(c.price);
        
        emit CompanyTransferred(c.name, c.price, oldOwner, msg.sender);

        claimToken(oldOwner);
        ownedPerformance[oldOwner] -= c.performance;

        claimToken(msg.sender);
        ownedPerformance[msg.sender] += c.performance;

        if (superPrivilege) {
            c.isOnsale = false;
            superPrivilegeCount[msg.sender]--;
            emit CompanySaleStatusChanged(c.name, c.isOnsale, c.price, msg.sender);
        }
    }

    function purchaseTopCompany(bytes32 nameFromUser, bool superPrivilege) public payable {
        // Check for sending enough eth
        uint256 startPrice = factoryContract.startPrice();
        require(msg.value == startPrice);

        bytes32 nameLowercase = utils.lowerCase(nameFromUser);
        // uint256 index = factoryContract.companiesIndex(nameLowercase);

        // Check for company name availability
        // require(index != 0);
        require(companies[nameLowercase].owner == address(0));

        // Check if it is avaialble for purchase
        require(factoryContract.canBuyCompany(nameLowercase));
        if (superPrivilege) {
            require(superPrivilegeCount[msg.sender] > 0);
        }

        bytes32 name;
        uint256 performance;
        bytes32 logoUrl;
        (name, performance, logoUrl) = factoryContract.getCompanyByName(nameLowercase);
        uint256 price = costContract.calculateNextPrice(startPrice);
        Company memory c = Company(name, logoUrl, performance, msg.sender, price, startPrice, !superPrivilege);
        companies[nameLowercase] = c;

        claimToken(msg.sender);
        ownedPerformance[msg.sender] += performance;

        factoryContract.removeCompany(nameLowercase);
        //emit CompanyCreated(name, logoUrl, performance, price, msg.sender);
        emit CompanyTransferred(name, price, address(0), msg.sender);

        if (superPrivilege) {
            superPrivilegeCount[msg.sender]--;
            emit CompanySaleStatusChanged(c.name, c.isOnsale, c.price, msg.sender);
        }
    }

    // Anyone with enough ECOM token can create a company
    // Companies are unique by name
    // User can set the inital value for their company (without knowing it performance)
    // Newly created company will be put on sale immediately
    function createCompany(bytes32 name, bytes32 logoUrl, uint256 value) public {
        require(value >= minCompanyValue);
        require(value <= maxCompanyValue);
        require(utils.validateCompanyName(name) == true);

        bytes32 nameLowercase = utils.lowerCase(name);

        // If company doesn't exists, owner address will be address 0
        require(factoryContract.companiesIndex(nameLowercase) == 0);
        require(companies[nameLowercase].owner == address(0));

        uint256 cost = costContract.getCreationCost() * ECOMDecimal;
        claimToken(msg.sender);
        transferECOMTokenToContract(cost);

        uint256 performance = generateRandomPerformance();
        Company memory c = Company(name, logoUrl, performance, msg.sender, value, costContract.calculatePreviousPrice(value), true);
        companies[nameLowercase] = c;

        ownedPerformance[msg.sender] += performance;

        costContract.increaseCompanyCountByOne();
        emit CompanyCreated(name, logoUrl, performance, value, msg.sender);
    }

    // Use 1 super privilege to permanently own a company
    function permanentlyOwnMyCompany(bytes32 nameFromUser) public {
        bytes32 nameLowercase = utils.lowerCase(nameFromUser);
        Company storage c = companies[nameLowercase];
        require(superPrivilegeCount[msg.sender] > 0);
        require(c.owner != address(0));
        require(c.owner == msg.sender);
        require(c.isOnsale == true);
        
        c.isOnsale = false;
        superPrivilegeCount[msg.sender]--;

        emit CompanySaleStatusChanged(c.name, false, c.price, msg.sender);
    }

    // Put a permanently owned company on sale again
    function putCompanyOnsale(bytes32 nameFromUser, uint256 startPrice) public {
        require(startPrice >= minCompanyValue);
        require(startPrice <= maxCompanyValue);
        bytes32 nameLowercase = utils.lowerCase(nameFromUser);
        Company storage c = companies[nameLowercase];
        require(c.owner != address(0));
        require(c.owner == msg.sender);
        require(c.isOnsale == false);

        c.price = startPrice;
        c.lastPrice = costContract.calculatePreviousPrice(c.price);
        c.isOnsale = true;

        emit CompanySaleStatusChanged(c.name, c.isOnsale, c.price, msg.sender);
    }

    // Anyone can call to this method to try to get a super privileged
    function runSuperPrivilegeLuckyDraw() public {
        claimToken(msg.sender);
        transferECOMTokenToContract(superPrivilegeCost*ECOMDecimal);
        uint256 rand = randContract.rand(msg.sender);
        rand = rand % 100;
        bool status = false;
        if (rand >= minRandomPrivilegeValue) {
            superPrivilegeCount[msg.sender] = superPrivilegeCount[msg.sender] + 1;
            status = true;
        }

        emit SuperPrivilegeLuckyDrawResult(rand, status, msg.sender);
    }

    // Anyone who owned some companies can claim their token
    function claimMyToken() public {
        require(ownedPerformance[msg.sender] > 0);

        claimToken(msg.sender);
    }

    function updateLogoUrl(bytes32 companyName, bytes32 logoUrl) public {
        bytes32 nameLowercase = utils.lowerCase(companyName);
        Company storage c = companies[nameLowercase];
        require(c.owner == msg.sender);
        claimToken(msg.sender);
        transferECOMTokenToContract(logoFee * ECOMDecimal);
        c.logoUrl = logoUrl;
        emit CompanyLogoUpdated(c.name, c.logoUrl, msg.sender);
    }

    /**
     * End core methods
     * ------------------------------------------------------------------------------------------
     */

     /**
     *  For migration
     */

    function updateTokenContract(address addr) public onlyOwner {
        tokenContract = ECOMTokenInterface(addr);
    }

    function updateRandContract(address addr) public onlyOwner {
        randContract = RandomGeneratorInterface(addr);
    }

    function updateCostContract(address addr) public onlyOwner {
        costContract = CompanyCostInterface(addr);
    }

    function updateFactoryContract(address addr) public onlyOwner {
        factoryContract = TopCompanyFactoryInterface(addr);
    }

    function transferSubcontractsOwnership(address addr) public onlyOwner {
        tokenContract.transferOwnership(addr);
        costContract.transferOwnership(addr);
        factoryContract.transferOwnership(addr);

        // Random generator contract doesn't need to be transferred
    }

    /**
     * For owner
     */
    function withdraw(uint256 amount) public onlyOwner {
        if (amount == 0) {
            owner.transfer(address(this).balance);
        } else {
            owner.transfer(amount);
        }
    }

    /**
     * View methods
     */

    function getTopCompanyStartPrice() public view returns (uint256) {
        return factoryContract.startPrice();
    }

    function getTopCompanyStartBlock() public view returns (int256) {
        return factoryContract.startBlock();
    }

    function getTopCompanyBlocksInBetween() public view returns (uint256) {
        return factoryContract.blocksBetweenNewCompany();
    }

    function getTopCompanyCount() public view returns (uint256) {
        return factoryContract.companyCount();
    }

    function getTopCompanyAtIndex(uint256 index) public view returns (bytes32 name, uint256 performance, bytes32 logoUrl) {
        return factoryContract.getCompany(index);
    }

    function getCompanyCreationCost() public view returns (uint256) {
        return costContract.getCreationCost();
    }

    function checkCompanyNameAvailability(bytes32 name) public view returns (uint256) {
        uint256 result = 1;
        bytes32 nameLowercase = utils.lowerCase(name);
        if (utils.validateCompanyName(name) != true) {
            result = 0;
        } else if (factoryContract.companiesIndex(nameLowercase) != 0) {
            result = 0;
        } else if (companies[nameLowercase].owner != address(0)) {
            result = 0;
        }
        return result;
    }

    // Private methods
    function transferECOMTokenToContract(uint256 amount) private {
        require(tokenContract.balanceOf(msg.sender) >= amount);
        tokenContract.ownerApprove(msg.sender, amount);
        tokenContract.transferFrom(msg.sender, address(this), amount);
    }

    function generateRandomPerformance() private returns (uint256) {
        uint256 rand = randContract.rand(msg.sender);
        rand = rand % (maxUserCreatedPerformance * maxUserCreatedPerformance);
        rand = utils.sqrt(rand);
        return maxUserCreatedPerformance - rand;
    }

    function claimToken(address receiver) private {
        uint256 numBlock = block.number - lastTokenClaimedBlock[receiver];
        uint256 profitPerBlock = ownedPerformance[receiver] * ECOMDecimal / blocksPerDay;
        uint256 profit = numBlock * profitPerBlock;
        if (profit > 0) {
            tokenContract.transfer(receiver, profit);
        }
        lastTokenClaimedBlock[receiver] = block.number;
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"getTopCompanyStartPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"superPrivilegeCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newFee","type":"uint256"}],"name":"updateLogoFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"updateCostContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"nameFromUser","type":"bytes32"},{"name":"startPrice","type":"uint256"}],"name":"putCompanyOnsale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"nameFromUser","type":"bytes32"},{"name":"superPrivilege","type":"bool"}],"name":"purchaseTopCompany","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"getCompanyCreationCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"randContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"costContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"name","type":"bytes32"}],"name":"checkCompanyNameAvailability","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minCompanyValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"nameFromUser","type":"bytes32"},{"name":"superPrivilege","type":"bool"}],"name":"purchaseCompany","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"maxUserCreatedPerformance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"blocksPerDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"updateRandContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"superPrivilegeCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTopCompanyCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"transferSubcontractsOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minRandomPrivilegeValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newProfit","type":"uint256"}],"name":"updateOldOwnerProfit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTopCompanyBlocksInBetween","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ownedPerformance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"nameFromUser","type":"bytes32"}],"name":"permanentlyOwnMyCompany","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"companyName","type":"bytes32"},{"name":"logoUrl","type":"bytes32"}],"name":"updateLogoUrl","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"lastTokenClaimedBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"companies","outputs":[{"name":"name","type":"bytes32"},{"name":"logoUrl","type":"bytes32"},{"name":"performance","type":"uint256"},{"name":"owner","type":"address"},{"name":"price","type":"uint256"},{"name":"lastPrice","type":"uint256"},{"name":"isOnsale","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"max","type":"uint256"}],"name":"updateUserCreatedPerformance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"minValue","type":"uint256"}],"name":"updateMinCompanyValue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"logoFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"updateTokenContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimMyToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"runSuperPrivilegeLuckyDraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"oldOwnerProfit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"updateFactoryContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"updateBlocksPerDay","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxCompanyValue","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"bytes32"},{"name":"logoUrl","type":"bytes32"},{"name":"value","type":"uint256"}],"name":"createCompany","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTopCompanyStartBlock","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factoryContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"minRandom","type":"uint256"},{"name":"cost","type":"uint256"}],"name":"updateSuperPrivilegeParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"getTopCompanyAtIndex","outputs":[{"name":"name","type":"bytes32"},{"name":"performance","type":"uint256"},{"name":"logoUrl","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"ECOMToken","type":"address"},{"name":"topCompanyFactory","type":"address"},{"name":"randomGenerator","type":"address"},{"name":"companyCost","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"name","type":"bytes32"},{"indexed":false,"name":"logoUrl","type":"bytes32"},{"indexed":false,"name":"performance","type":"uint256"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"owner","type":"address"}],"name":"CompanyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"name","type":"bytes32"},{"indexed":false,"name":"newPrice","type":"uint256"},{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"owner","type":"address"}],"name":"CompanyTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"name","type":"bytes32"},{"indexed":false,"name":"logoUrl","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"CompanyLogoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"name","type":"bytes32"},{"indexed":false,"name":"saleStatus","type":"bool"},{"indexed":false,"name":"lastPrice","type":"uint256"},{"indexed":false,"name":"owner","type":"address"}],"name":"CompanySaleStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"resultValue","type":"uint256"},{"indexed":false,"name":"status","type":"bool"},{"indexed":false,"name":"owner","type":"address"}],"name":"SuperPrivilegeLuckyDrawResult","type":"event"}]

60806040526305f5e100600655611388600755605a600c55601e600d556023600e556050600f55600a60105566038d7ea4c6800060115568056bc75e2d631000006012553480156200005057600080fd5b5060405160808062002d0c833981016040908152815160208301519183015160609093015160008054600160a060020a03338116600160a060020a0319928316179092556002805483871690831617905560038054838816908316179055600480548385169083161790556001805492851692909116919091179055909290620000d962000122565b604051809103906000f080158015620000f6573d6000803e3d6000fd5b5060058054600160a060020a031916600160a060020a0392909216919091179055506200013392505050565b6040516102578062002ab583390190565b61297280620001436000396000f30060806040526004361061020b5763ffffffff60e060020a60003504166307be6ef881146102105780630965f6ac14610237578063126d98821461024c578063130067ca1461026657806319b587ad146102875780631ae8494e146102a257806321e866be146102b25780632ad3ef70146102c75780632bd30ca3146102f85780632d5a858c1461030d5780632e1a7d4d14610325578063386ca47e1461033d57806342173c9814610352578063447ee48f146103625780634cfea68a1461037757806355a373d61461038c57806357c3b376146103a15780635cf67ba5146103c25780635ffce121146103e3578063655bb0e8146103f85780636a011ae5146104195780636a7d6b521461042e5780636e3d5a9d1461044657806376bbf0071461045b5780637b7d88881461047c57806385e57f3c14610494578063863c2fab146104af5780638a0bdeb7146104d05780638aa94f561461052a5780638da5cb5b146105425780638f48c14a1461055757806390bf693b1461056f578063989ced26146105845780639c58be11146105a5578063b488f00e146105ba578063bb72b12d146105cf578063c2fb538e146105e4578063c6a5d5da14610605578063cb79d5731461061d578063cf45686514610632578063d598b2c514610650578063de11c94a14610665578063df117c471461067a578063f2fde38b14610695578063fdcf6f16146106b6575b600080fd5b34801561021c57600080fd5b506102256106ec565b60408051918252519081900360200190f35b34801561024357600080fd5b5061022561077c565b34801561025857600080fd5b50610264600435610782565b005b34801561027257600080fd5b50610264600160a060020a03600435166107a2565b34801561029357600080fd5b506102646004356024356107df565b61026460043560243515156109d5565b3480156102be57600080fd5b50610225610f8b565b3480156102d357600080fd5b506102dc610fe0565b60408051600160a060020a039092168252519081900360200190f35b34801561030457600080fd5b506102dc610fef565b34801561031957600080fd5b50610225600435610ffe565b34801561033157600080fd5b506102646004356111f7565b34801561034957600080fd5b5061022561129c565b61026460043560243515156112a2565b34801561036e57600080fd5b50610225611604565b34801561038357600080fd5b5061022561160a565b34801561039857600080fd5b506102dc611610565b3480156103ad57600080fd5b50610264600160a060020a036004351661161f565b3480156103ce57600080fd5b50610225600160a060020a036004351661165c565b3480156103ef57600080fd5b5061022561166e565b34801561040457600080fd5b50610264600160a060020a03600435166116cd565b34801561042557600080fd5b5061022561186c565b34801561043a57600080fd5b50610264600435611872565b34801561045257600080fd5b50610225611892565b34801561046757600080fd5b50610225600160a060020a03600435166118f1565b34801561048857600080fd5b50610264600435611903565b3480156104a057600080fd5b50610264600435602435611a74565b3480156104bb57600080fd5b50610225600160a060020a0360043516611b93565b3480156104dc57600080fd5b506104e8600435611ba5565b60408051978852602088019690965286860194909452600160a060020a039092166060860152608085015260a0840152151560c0830152519081900360e00190f35b34801561053657600080fd5b50610264600435611bef565b34801561054e57600080fd5b506102dc611c0f565b34801561056357600080fd5b50610264600435611c1e565b34801561057b57600080fd5b50610225611c3e565b34801561059057600080fd5b50610264600160a060020a0360043516611c44565b3480156105b157600080fd5b50610264611c81565b3480156105c657600080fd5b50610264611caf565b3480156105db57600080fd5b50610225611de3565b3480156105f057600080fd5b50610264600160a060020a0360043516611de9565b34801561061157600080fd5b50610264600435611e26565b34801561062957600080fd5b50610225611e46565b34801561063e57600080fd5b50610264600435602435604435611e4c565b34801561065c57600080fd5b50610225612326565b34801561067157600080fd5b506102dc612385565b34801561068657600080fd5b50610264600435602435612394565b3480156106a157600080fd5b50610264600160a060020a03600435166123ba565b3480156106c257600080fd5b506106ce600435612404565b60408051938452602084019290925282820152519081900360600190f35b600254604080517ff1a9af890000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163f1a9af8991600480830192602092919082900301818787803b15801561074b57600080fd5b505af115801561075f573d6000803e3d6000fd5b505050506040513d602081101561077557600080fd5b5051905090565b600d5481565b60005433600160a060020a0390811691161461079d57600080fd5b601055565b60005433600160a060020a039081169116146107bd57600080fd5b60048054600160a060020a031916600160a060020a0392909216919091179055565b60008060115483101515156107f357600080fd5b60125483111561080257600080fd5b6005546040805160e060020a638c7698df028152600481018790529051600160a060020a0390921691638c7698df916024808201926020929091908290030181600087803b15801561085357600080fd5b505af1158015610867573d6000803e3d6000fd5b505050506040513d602081101561087d57600080fd5b5051600081815260086020526040902060038101549193509150600160a060020a031615156108ab57600080fd5b600381015433600160a060020a039081169116146108c857600080fd5b600681015460ff16156108da57600080fd5b60048082018490558054604080517f8c2f645800000000000000000000000000000000000000000000000000000000815292830186905251600160a060020a0390911691638c2f64589160248083019260209291908290030181600087803b15801561094557600080fd5b505af1158015610959573d6000803e3d6000fd5b505050506040513d602081101561096f57600080fd5b5051600582015560068101805460ff191660011790819055815460048301546040805192835260ff939093161515602083015281830152600160a060020a033316606082015290516000805160206129278339815191529181900360800190a150505050565b6000806000806000806109e66128ea565b600260009054906101000a9004600160a060020a0316600160a060020a031663f1a9af896040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610a3957600080fd5b505af1158015610a4d573d6000803e3d6000fd5b505050506040513d6020811015610a6357600080fd5b50519650348714610a7357600080fd5b6005546040805160e060020a638c7698df028152600481018c90529051600160a060020a0390921691638c7698df916024808201926020929091908290030181600087803b158015610ac457600080fd5b505af1158015610ad8573d6000803e3d6000fd5b505050506040513d6020811015610aee57600080fd5b5051600081815260086020526040902060030154909650600160a060020a031615610b1857600080fd5b600254604080517f335665c4000000000000000000000000000000000000000000000000000000008152600481018990529051600160a060020a039092169163335665c4916024808201926020929091908290030181600087803b158015610b7f57600080fd5b505af1158015610b93573d6000803e3d6000fd5b505050506040513d6020811015610ba957600080fd5b50511515610bb657600080fd5b8715610bdf57600160a060020a0333166000908152600b602052604081205411610bdf57600080fd5b600254604080517f64a5a632000000000000000000000000000000000000000000000000000000008152600481018990529051600160a060020a03909216916364a5a632916024808201926060929091908290030181600087803b158015610c4657600080fd5b505af1158015610c5a573d6000803e3d6000fd5b505050506040513d6060811015610c7057600080fd5b5080516020808301516040938401516004805486517fe08503ec0000000000000000000000000000000000000000000000000000000081529182018e90529551949a509198509650600160a060020a039093169263e08503ec92602480830193928290030181600087803b158015610ce757600080fd5b505af1158015610cfb573d6000803e3d6000fd5b505050506040513d6020811015610d1157600080fd5b8101908080519060200190929190505050915060e060405190810160405280866000191681526020018460001916815260200185815260200133600160a060020a031681526020018381526020018881526020018915151581525090508060086000886000191660001916815260200190815260200160002060008201518160000190600019169055602082015181600101906000191690556040820151816002015560608201518160030160006101000a815481600160a060020a030219169083600160a060020a031602179055506080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff021916908315150217905550905050610e21336124b5565b600160a060020a03338116600090815260096020908152604080832080548901905560025481517e60c778000000000000000000000000000000000000000000000000000000008152600481018c905291519416936260c77893602480840194938390030190829087803b158015610e9857600080fd5b505af1158015610eac573d6000803e3d6000fd5b505050506040513d6020811015610ec257600080fd5b50506040805186815260208101849052600081830152600160a060020a033316606082015290517f1811c086c632e7f882bf975ff0cc365bd54946ac4e3e58adf3bee679c2ea10589181900360800190a18715610f8057600160a060020a0333166000818152600b60209081526040918290208054600019019055835160c085015160808087015185519384529115159383019390935281840152606081019390935290516000805160206129278339815191529281900390910190a15b505050505050505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a031663a17868036040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561074b57600080fd5b600354600160a060020a031681565b600454600160a060020a031681565b6005546040805160e060020a638c7698df0281526004810184905290516000926001928492600160a060020a0390921691638c7698df9160248082019260209290919082900301818787803b15801561105657600080fd5b505af115801561106a573d6000803e3d6000fd5b505050506040513d602081101561108057600080fd5b5051600554604080517f5732788a000000000000000000000000000000000000000000000000000000008152600481018890529051929350600160a060020a0390911691635732788a916024808201926020929091908290030181600087803b1580156110ec57600080fd5b505af1158015611100573d6000803e3d6000fd5b505050506040513d602081101561111657600080fd5b5051151560011461112a57600091506111f0565b600254604080517f7bde59e0000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a0390921691637bde59e0916024808201926020929091908290030181600087803b15801561119157600080fd5b505af11580156111a5573d6000803e3d6000fd5b505050506040513d60208110156111bb57600080fd5b5051156111cb57600091506111f0565b600081815260086020526040902060030154600160a060020a0316156111f057600091505b5092915050565b60005433600160a060020a0390811691161461121257600080fd5b80151561125e5760008054604051600160a060020a0391821692309092163180156108fc0292909190818181858888f19350505050158015611258573d6000803e3d6000fd5b50611299565b60008054604051600160a060020a039091169183156108fc02918491818181858888f19350505050158015611297573d6000803e3d6000fd5b505b50565b60115481565b6005546040805160e060020a638c7698df028152600481018590529051600092839283928392600160a060020a031691638c7698df91602480830192602092919082900301818787803b1580156112f857600080fd5b505af115801561130c573d6000803e3d6000fd5b505050506040513d602081101561132257600080fd5b5051600081815260086020526040902060038101549195509350600160a060020a0316151561135057600080fd5b600383015433600160a060020a039081169116141561136e57600080fd5b6004830154341461137e57600080fd5b600683015460ff16151560011461139457600080fd5b84156113bd57600160a060020a0333166000908152600b6020526040812054116113bd57600080fd5b5050600381015460058201546004830154604051600160a060020a039093169290829003918391600a600885020490910180156108fc02916000818181858888f19350505050158015611414573d6000803e3d6000fd5b50600383018054600160a060020a03191633600160a060020a0390811691909117909155600480850154600586018190558154604080517fe08503ec00000000000000000000000000000000000000000000000000000000815293840192909252905192169163e08503ec916024808201926020929091908290030181600087803b1580156114a257600080fd5b505af11580156114b6573d6000803e3d6000fd5b505050506040513d60208110156114cc57600080fd5b5051600484018190558354604080519182526020820192909252600160a060020a03808516828401523316606082015290517f1811c086c632e7f882bf975ff0cc365bd54946ac4e3e58adf3bee679c2ea10589181900360800190a1611531826124b5565b6002830154600160a060020a0383166000908152600960205260409020805491909103905561155f336124b5565b6002830154600160a060020a03331660009081526009602052604090208054909101905584156115fc5760068301805460ff19168155600160a060020a0333166000818152600b60209081526040918290208054600019019055865493546004880154835195865260ff91909116151591850191909152838201526060830191909152516000805160206129278339815191529181900360800190a15b505050505050565b600e5481565b60075481565b600154600160a060020a031681565b60005433600160a060020a0390811691161461163a57600080fd5b60038054600160a060020a031916600160a060020a0392909216919091179055565b600b6020526000908152604090205481565b600254604080517f8e75dd470000000000000000000000000000000000000000000000000000000081529051600092600160a060020a031691638e75dd4791600480830192602092919082900301818787803b15801561074b57600080fd5b60005433600160a060020a039081169116146116e857600080fd5b600154604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561174f57600080fd5b505af1158015611763573d6000803e3d6000fd5b505060048054604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0387811694820194909452905192909116935063f2fde38b925060248082019260009290919082900301818387803b1580156117d257600080fd5b505af11580156117e6573d6000803e3d6000fd5b5050600254604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a038681166004830152915191909216935063f2fde38b9250602480830192600092919082900301818387803b15801561185157600080fd5b505af1158015611865573d6000803e3d6000fd5b5050505050565b600c5481565b60005433600160a060020a0390811691161461188d57600080fd5b600f55565b600254604080517fd114b5fb0000000000000000000000000000000000000000000000000000000081529051600092600160a060020a03169163d114b5fb91600480830192602092919082900301818787803b15801561074b57600080fd5b60096020526000908152604090205481565b6005546040805160e060020a638c7698df0281526004810184905290516000928392600160a060020a0390911691638c7698df9160248082019260209290919082900301818787803b15801561195857600080fd5b505af115801561196c573d6000803e3d6000fd5b505050506040513d602081101561198257600080fd5b50516000818152600860209081526040808320600160a060020a0333168452600b9092528220549294509250106119b857600080fd5b6003810154600160a060020a031615156119d157600080fd5b600381015433600160a060020a039081169116146119ee57600080fd5b600681015460ff161515600114611a0457600080fd5b60068101805460ff19169055600160a060020a0333166000818152600b6020908152604080832080546000190190558454600486015482519182529281019390935282810191909152606082019290925290516000805160206129278339815191529181900360800190a1505050565b6005546040805160e060020a638c7698df0281526004810185905290516000928392600160a060020a0390911691638c7698df9160248082019260209290919082900301818787803b158015611ac957600080fd5b505af1158015611add573d6000803e3d6000fd5b505050506040513d6020811015611af357600080fd5b505160008181526008602052604090206003810154919350915033600160a060020a03908116911614611b2557600080fd5b611b2e336124b5565b611b3d600654601054026125bf565b6001810183905580546040805191825260208201859052600160a060020a03331682820152517f5f482e596ace76ffee16aa0e480a13fd6fdaed3eef37b7461c9cb8cddaf459e09181900360600190a150505050565b600a6020526000908152604090205481565b6008602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949593949293600160a060020a039092169290919060ff1687565b60005433600160a060020a03908116911614611c0a57600080fd5b600e55565b600054600160a060020a031681565b60005433600160a060020a03908116911614611c3957600080fd5b601155565b60105481565b60005433600160a060020a03908116911614611c5f57600080fd5b60018054600160a060020a031916600160a060020a0392909216919091179055565b600160a060020a03331660009081526009602052604081205411611ca457600080fd5b611cad336124b5565b565b600080611cbb336124b5565b611cca600654600d54026125bf565b600354604080517fc7c625ee000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529151919092169163c7c625ee9160248083019260209291908290030181600087803b158015611d3257600080fd5b505af1158015611d46573d6000803e3d6000fd5b505050506040513d6020811015611d5c57600080fd5b5051600c5460649091069250600091508210611d965750600160a060020a0333166000908152600b60205260409020805460019081019091555b604080518381528215156020820152600160a060020a0333168183015290517fe4f42b944520e367022c74b7f66756616f3fc226c2b0be282f9b04e1d03b82159181900360600190a15050565b600f5481565b60005433600160a060020a03908116911614611e0457600080fd5b60028054600160a060020a031916600160a060020a0392909216919091179055565b60005433600160a060020a03908116911614611e4157600080fd5b600755565b60125481565b6000806000611e596128ea565b601154851015611e6857600080fd5b601254851115611e7757600080fd5b600554604080517f5732788a000000000000000000000000000000000000000000000000000000008152600481018a90529051600160a060020a0390921691635732788a916024808201926020929091908290030181600087803b158015611ede57600080fd5b505af1158015611ef2573d6000803e3d6000fd5b505050506040513d6020811015611f0857600080fd5b50511515600114611f1857600080fd5b6005546040805160e060020a638c7698df028152600481018a90529051600160a060020a0390921691638c7698df916024808201926020929091908290030181600087803b158015611f6957600080fd5b505af1158015611f7d573d6000803e3d6000fd5b505050506040513d6020811015611f9357600080fd5b5051600254604080517f7bde59e0000000000000000000000000000000000000000000000000000000008152600481018490529051929650600160a060020a0390911691637bde59e0916024808201926020929091908290030181600087803b158015611fff57600080fd5b505af1158015612013573d6000803e3d6000fd5b505050506040513d602081101561202957600080fd5b50511561203557600080fd5b600084815260086020526040902060030154600160a060020a03161561205a57600080fd5b60065460048054604080517fa17868030000000000000000000000000000000000000000000000000000000081529051600160a060020a039092169263a17868039282820192602092908290030181600087803b1580156120ba57600080fd5b505af11580156120ce573d6000803e3d6000fd5b505050506040513d60208110156120e457600080fd5b50510292506120f2336124b5565b6120fb836125bf565b6121036127a2565b6040805160e08101825289815260208082018a9052818301849052600160a060020a033381166060840152608083018a90526004805485517f8c2f64580000000000000000000000000000000000000000000000000000000081529182018c90529451959750929460a086019490911692638c2f64589260248083019391928290030181600087803b15801561219857600080fd5b505af11580156121ac573d6000803e3d6000fd5b505050506040513d60208110156121c257600080fd5b505181526001602091820181905260008781526008835260408082208551815585850151938101939093558481015160028401556060850151600384018054600160a060020a031916600160a060020a03928316179055608086015160048086019190915560a0870151600586015560c08701516006909501805460ff19169515159590951790945533811683526009909452808220805488019055825481517f2959275d000000000000000000000000000000000000000000000000000000008152915195965090931693632959275d93808401939082900301818387803b1580156122ae57600080fd5b505af11580156122c2573d6000803e3d6000fd5b5050604080518a8152602081018a905280820186905260608101899052600160a060020a033316608082015290517f5b7d51554f6e38d52b9134d9fc47b1ebd38f231135a44991aadb1498fc84169193509081900360a0019150a150505050505050565b600254604080517f48cd4cb10000000000000000000000000000000000000000000000000000000081529051600092600160a060020a0316916348cd4cb191600480830192602092919082900301818787803b15801561074b57600080fd5b600254600160a060020a031681565b60005433600160a060020a039081169116146123af57600080fd5b600c91909155600d55565b60005433600160a060020a039081169116146123d557600080fd5b600160a060020a038116156112995760008054600160a060020a038316600160a060020a031990911617905550565b600254604080517f57d1391700000000000000000000000000000000000000000000000000000000815260048101849052905160009283928392600160a060020a03909216916357d139179160248082019260609290919082900301818787803b15801561247157600080fd5b505af1158015612485573d6000803e3d6000fd5b505050506040513d606081101561249b57600080fd5b508051602082015160409092015190969195509350915050565b600160a060020a0381166000908152600a602090815260408083205460075460065460099094529184205443919091039392839291028115156124f457fe5b0491505081810260008111156125a057600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561257357600080fd5b505af1158015612587573d6000803e3d6000fd5b505050506040513d602081101561259d57600080fd5b50505b505050600160a060020a03166000908152600a60205260409020439055565b600154604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a0333811660048301529151849392909216916370a08231916024808201926020929091908290030181600087803b15801561262a57600080fd5b505af115801561263e573d6000803e3d6000fd5b505050506040513d602081101561265457600080fd5b5051101561266157600080fd5b600154604080517f029d1ecd000000000000000000000000000000000000000000000000000000008152600160a060020a033381166004830152602482018590529151919092169163029d1ecd9160448083019260209291908290030181600087803b1580156126d057600080fd5b505af11580156126e4573d6000803e3d6000fd5b505050506040513d60208110156126fa57600080fd5b5050600154604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a033381166004830152308116602483015260448201859052915191909216916323b872dd9160648083019260209291908290030181600087803b15801561277357600080fd5b505af1158015612787573d6000803e3d6000fd5b505050506040513d602081101561279d57600080fd5b505050565b600354604080517fc7c625ee000000000000000000000000000000000000000000000000000000008152600160a060020a03338116600483015291516000938493169163c7c625ee91602480830192602092919082900301818787803b15801561280b57600080fd5b505af115801561281f573d6000803e3d6000fd5b505050506040513d602081101561283557600080fd5b5051600e5490915080028181151561284957fe5b600554604080517f677342ce00000000000000000000000000000000000000000000000000000000815293909206600484018190529151919350600160a060020a03169163677342ce9160248083019260209291908290030181600087803b1580156128b457600080fd5b505af11580156128c8573d6000803e3d6000fd5b505050506040513d60208110156128de57600080fd5b5051600e540392915050565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091529056007e961709c92e9b446c9b87783bf599ba6927e8b3ea50ba5972ef821b53ee8c09a165627a7a72305820e8bbee57a97a2e661f826ce65a897ca7a3213c5d8188a249c1295f5e54c215320029608060405234801561001057600080fd5b50610237806100206000396000f3006080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635732788a811461005b578063677342ce146100875780638c7698df146100b1575b600080fd5b34801561006757600080fd5b506100736004356100c9565b604080519115158252519081900360200190f35b34801561009357600080fd5b5061009f60043561015c565b60408051918252519081900360200190f35b3480156100bd57600080fd5b5061009f600435610191565b6000805b6020811015610151578281602081106100e257fe5b1a60f860020a0260f860020a900460001415801561013b57506020838282811061010857fe5b1a60f860020a0260f860020a9004108061013b5750607e83826020811061012b57fe5b1a60f860020a0260f860020a9004115b156101495760009150610156565b6001016100cd565b600191505b50919050565b80600260018201045b8181101561015657809150600281828581151561017e57fe5b040181151561018957fe5b049050610165565b600081815b60208110156102045760418482602081106101ad57fe5b1a60f860020a0260f860020a9004101580156101e35750605a8482602081106101d257fe5b1a60f860020a0260f860020a900411155b156101fc576008601f8290030260020a60200291909117905b600101610196565b50929150505600a165627a7a723058203b28b2d4787282b442f770f0519958f1d741e57cdd170c9005caf5d20dc61194002900000000000000000000000092625b0f3f72886a1574a949384ad40f127d2a180000000000000000000000001354ffae968cfa8079a4887c173aede79e738ebf0000000000000000000000009f6ddc4e4f43078e85560b1f9d07f7ca04c69c740000000000000000000000002f1f944aefd26ee779a6bcc1dfaf929341a7b908

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

00000000000000000000000092625b0f3f72886a1574a949384ad40f127d2a180000000000000000000000001354ffae968cfa8079a4887c173aede79e738ebf0000000000000000000000009f6ddc4e4f43078e85560b1f9d07f7ca04c69c740000000000000000000000002f1f944aefd26ee779a6bcc1dfaf929341a7b908

-----Decoded View---------------
Arg [0] : ECOMToken (address): 0x92625b0f3f72886a1574a949384ad40f127d2a18
Arg [1] : topCompanyFactory (address): 0x1354ffae968cfa8079a4887c173aede79e738ebf
Arg [2] : randomGenerator (address): 0x9f6ddc4e4f43078e85560b1f9d07f7ca04c69c74
Arg [3] : companyCost (address): 0x2f1f944aefd26ee779a6bcc1dfaf929341a7b908

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000092625b0f3f72886a1574a949384ad40f127d2a18
Arg [1] : 0000000000000000000000001354ffae968cfa8079a4887c173aede79e738ebf
Arg [2] : 0000000000000000000000009f6ddc4e4f43078e85560b1f9d07f7ca04c69c74
Arg [3] : 0000000000000000000000002f1f944aefd26ee779a6bcc1dfaf929341a7b908


Swarm Source

bzzr://3b28b2d4787282b442f770f0519958f1d741e57cdd170c9005caf5d20dc61194
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.