Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 1204 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x699de541253f253a4eff0d3c006d70c43f2e2daeat txn 0x415a9083997d43dca95f6777ac2f381ea6d98749188196d0a0382e8575aea00b
Token Balance:
 Latest 25 transactions from a total of 1204 transactions

TxHash Age From To Value [TxFee]
0xa5719344d6f8f742a42fef766212234c27ac6d9f99fb48c05003939ca3d602ec12 days 13 hrs ago0x3dca25d72528249a844e64a762cc3bfd12da514e  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60 Ether0.000161988
0xf197bb9a83b29993e42058c10b91382e945b2aad5de647f57b50240b249ccc3748 days 8 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60 Ether0.00008916
0x82daba488fbf4039e0c98382f64fcdef753e3b0f1cb21e264574b62b2caa337248 days 8 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60 Ether0.000768824
0xb28e4ee53f1baadf97e70b56f5349009fa6a36f4db8acb202fa8661ac742d0a649 days 8 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.011772774
0xde97801ce0a877d22cebecbbf2ba9d1a2b8372aeec574f934cc8832ae3039bcb50 days 14 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.005906697
0x91da9f447f8483762251ab0cd0df23c84040b358ff795e15d5467cacd0aba60350 days 21 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.009803345
0x1fed32dbd0d1126cf806911f4ffff4f8b2099e5b9fc5cda7eb4ddc3b1f79bd2e51 days 9 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.005857317
0x125081c4d1e338db298a2573d2b6de117c8ba272ce9c270468c17f42eb12de2e51 days 9 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.021 Ether0.005951325
0xeb4b4937b8b5c13d326b67a54a3c11940ccafeee78a6817907ed38f99f0d1c0d51 days 12 hrs ago0x9f34450abe7203c58d3b5a431269b89740f55d5f  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60 Ether0.000692565
0x88184d4f5949ecf555b30cfe5c0517bcd76ef384a417f0c42399ba3ddb73365d51 days 12 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.15 Ether0.000153804
0x1e78e1a005ba6c3ec406afefb35a3040280d42510db814baf85ec1388037660351 days 12 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60 Ether0.00008916
0x30bd648e238336b9eeb323505c335dc0d31920d7094d61bfc4aa0e7b0d8c8dd351 days 12 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60 Ether0.001171896
0x78a3105c787402fa5065fd1e5486a09e42c5be37da036b6aa1d6568b80b88a0c51 days 12 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.02 Ether0.005892942
0x6c93d31f6df875de09cd52e133d1e763bb3f8ad27304cc6cd1475980795bf5fb51 days 13 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.005792499
0xe86dbecfb0f93ac7be454a249629e881acc6d07b40b295b42c3798ba43c737dc51 days 13 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.005766159
0xfa5b43ef374ded465ae77e73fdbb8a0296250038fd2d1a3d4d1c47d04e2e217751 days 15 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.009569115
0xccba89cf7a2dc4e92f37bd4025d94efb7865649ffcbef88a20dc4f1d05c5f9f451 days 15 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.028 Ether0.005763105
0x5ec5fe9ab087fa9e8eb02add487b15203c7aa611416ff5d4824b393aa4791a4851 days 15 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.021 Ether0.005753844
0xeb07036bc152c27b3c3de57d0d657672a3b0e193baa3db15490af6acd454086f51 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.016 Ether0.000107028
0x18edf175081dc2210487adf5973562fa4fbac088df8e52ac6c9333641769299e51 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.016 Ether0.007692404
0xefafc3a996aa7b2fe6d95b204d077671be87f10443f49a5160ca1d2b26f607ad51 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.000080271
0x1a08cdbae0f3a67edf9f428dd351ce9e7b64167fc47974cdbaba4208bff3d26d51 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.005741961
0x4b11602fce60424fc6e587de65f421319274193c323f0034bd1d173737abf9d751 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.000080271
0x5a7b6e890972478bb4dcf7dd15a1929f4dd871f5b647e956865dbfb9288c540751 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.015 Ether0.005763921
0x151d695b8cc08509b280393fe832d15d6419f9b0720c9b477f6d64ac1ce2ecef51 days 16 hrs ago0xa62a7a20c38fd87d0ba3f06bfc84a3bce7596120  IN   0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60.05 Ether0.000426054
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0xb28e4ee53f1baadf97e70b56f5349009fa6a36f4db8acb202fa8661ac742d0a6660933649 days 8 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x70580ea14d98a53fd59376dc7e959f4a6129bb9b0.015 Ether
0xde97801ce0a877d22cebecbbf2ba9d1a2b8372aeec574f934cc8832ae3039bcb660186150 days 14 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x70580ea14d98a53fd59376dc7e959f4a6129bb9b0.015 Ether
0x91da9f447f8483762251ab0cd0df23c84040b358ff795e15d5467cacd0aba603659983450 days 21 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x70580ea14d98a53fd59376dc7e959f4a6129bb9b0.015 Ether
0x1fed32dbd0d1126cf806911f4ffff4f8b2099e5b9fc5cda7eb4ddc3b1f79bd2e659693851 days 9 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x70580ea14d98a53fd59376dc7e959f4a6129bb9b0.015 Ether
0x125081c4d1e338db298a2573d2b6de117c8ba272ce9c270468c17f42eb12de2e659689651 days 9 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x36e058332ae39efad2315776b9c844e30d07388b0.021 Ether
0x88184d4f5949ecf555b30cfe5c0517bcd76ef384a417f0c42399ba3ddb73365d659604851 days 12 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x699de541253f253a4eff0d3c006d70c43f2e2dae0.15 Ether
0x78a3105c787402fa5065fd1e5486a09e42c5be37da036b6aa1d6568b80b88a0c659598651 days 12 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60xf3c2f29bd3199c33d26cbc31d440f66d2065c4b30.02 Ether
0x6c93d31f6df875de09cd52e133d1e763bb3f8ad27304cc6cd1475980795bf5fb659597851 days 13 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x70580ea14d98a53fd59376dc7e959f4a6129bb9b0.015 Ether
0xe86dbecfb0f93ac7be454a249629e881acc6d07b40b295b42c3798ba43c737dc659597451 days 13 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x8214f1c750ad8e08d1cfb19077ad471222cb59f90.015 Ether
0xfa5b43ef374ded465ae77e73fdbb8a0296250038fd2d1a3d4d1c47d04e2e2177659533751 days 15 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x8214f1c750ad8e08d1cfb19077ad471222cb59f90.015 Ether
0xccba89cf7a2dc4e92f37bd4025d94efb7865649ffcbef88a20dc4f1d05c5f9f4659533751 days 15 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60xeae26500a557e9318e9c84deee51f939f6c3633f0.028 Ether
0x5ec5fe9ab087fa9e8eb02add487b15203c7aa611416ff5d4824b393aa4791a48659532251 days 15 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x3f1247b50d5ef5b0ca7146bce3c2b313447205f40.01974 Ether
0x5ec5fe9ab087fa9e8eb02add487b15203c7aa611416ff5d4824b393aa4791a48659532251 days 15 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x3f1247b50d5ef5b0ca7146bce3c2b313447205f40.00126 Ether
0x18edf175081dc2210487adf5973562fa4fbac088df8e52ac6c9333641769299e659520351 days 16 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x54d6fca0ca37382b01304e6716420538604b447b0.01568 Ether
0x18edf175081dc2210487adf5973562fa4fbac088df8e52ac6c9333641769299e659520351 days 16 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x54d6fca0ca37382b01304e6716420538604b447b0.00032 Ether
0x1a08cdbae0f3a67edf9f428dd351ce9e7b64167fc47974cdbaba4208bff3d26d659514351 days 16 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x8214f1c750ad8e08d1cfb19077ad471222cb59f90.015 Ether
0x5a7b6e890972478bb4dcf7dd15a1929f4dd871f5b647e956865dbfb9288c5407659511751 days 16 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x70580ea14d98a53fd59376dc7e959f4a6129bb9b0.015 Ether
0x151d695b8cc08509b280393fe832d15d6419f9b0720c9b477f6d64ac1ce2ecef659510451 days 16 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60xa2381223639181689cd6c46d38a1a4884bb6d83c0.05 Ether
0xae4f10f487bdb0d8e21ad64e3c98500d03ab8414208889db5afeec7ca277ad5d654722659 days 12 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x699de541253f253a4eff0d3c006d70c43f2e2dae0.05 Ether
0x7bd2cfe1bf6fecffaf076ca1dfd118e5713bd57f1daa049d6ece31a5e0cfeb5c654721559 days 12 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x36e058332ae39efad2315776b9c844e30d07388b0.021 Ether
0x75f0c084562c23382502df7a57ce01c241ebc9c7a890020b88dcb4af05888ebc654719859 days 12 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x29a9c76ad091c015c12081a1b201c3ea568845790.02716 Ether
0x75f0c084562c23382502df7a57ce01c241ebc9c7a890020b88dcb4af05888ebc654719859 days 12 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x29a9c76ad091c015c12081a1b201c3ea568845790.00084 Ether
0x714c86c3b941c2f7b07d20e0e24213afa94b72461cb1b23e606772cc687021fd6245708109 days 3 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x29a9c76ad091c015c12081a1b201c3ea568845790.02328 Ether
0x714c86c3b941c2f7b07d20e0e24213afa94b72461cb1b23e606772cc687021fd6245708109 days 3 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60x29a9c76ad091c015c12081a1b201c3ea568845790.00072 Ether
0xba595e9f168a762ec29491c599af392e124ce6aa0b4c9cb3655784d16d1633f56245604109 days 4 hrs ago0xbc145bc6bfc6af7370bba5baf6a70dcf4789a3c60xfd8a63085804dcb95417fe33f9e49253522c68dd0.016 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: MyEtherCityGame
Compiler Text: v0.4.20+commit.3155dd80
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

/*
This is the main contract for MyEtherCity. Join us at https://myethercity.com/  
Game Name: MyEtherCity (The first city-building game built on top of the Ethereum Blockchain)
Game Link: https://myethercity.com/
*/

contract MyEtherCityGame {

    address ceoAddress = 0x699dE541253f253a4eFf0D3c006D70c43F2E2DaE;
    address InitiateLandsAddress = 0xa93a135e3c73ab77ea00e194bd080918e65149c3;
    
    modifier onlyCeo() {
        require (
            msg.sender == ceoAddress||
            msg.sender == InitiateLandsAddress
            );
        _;
    }

    uint256 priceMetal = 5000000000000000;     // The developer can update the price of metak to regulate the market

    struct Land {
        address ownerAddress;
        uint256 landPrice;
        bool landForSale;
        bool landForRent;
        uint landOwnerCommission;
        bool isOccupied;
        uint cityRentingId;
    }
    Land[] lands;

    struct City {
        uint landId;
        address ownerAddress;
        uint256 cityPrice;
        uint256 cityGdp; 
        bool cityForSale;
        uint squaresOccupied; // Equals 0 when we create the city
        uint metalStock;
    }
    City[] cities;

    struct Business {
        uint itemToProduce;
        uint256 itemPrice;
        uint cityId;
        uint32 readyTime;
    }
    Business[] businesses;

    /*
    Building type:
    0 = house => Can house 5 citizens
    1 = school => Can educate 30 citizens
    2 = clean energy => Can energize 20 citizens
    3 = fossil energy => Can energize 30 citizens
    4 = hospital => Can heal 30 citizens
    5 = amusement => Can amuse 35 citizens
    6 = businesses
    */

    struct Building {
        uint buildingType;
        uint cityId;
        uint32 readyTime;
    }
    Building[] buildings;

    struct Transaction {
        uint buyerId;
        uint sellerId;
        uint256 transactionValue;
        uint itemId;
        uint blockId;
    }
    Transaction[] transactions;

    mapping (uint => uint) public CityBuildingsCount;        // The amount of buildings owned by this address
    mapping (uint => uint) public BuildingTypeMetalNeeded;   // The amount of metal needed to build all the buildings
    mapping (uint => uint) public BuildingTypeSquaresOccupied;  // The land occupied by each building
    mapping (uint => uint) public CountBusinessesPerType;       // We keep track of the amount of businesses created per type
    mapping (uint => uint) public CityBusinessCount;            // We keep track of the amount of businesses owned by a city
    mapping (uint => uint) public CitySalesTransactionsCount;    // We keep track of the sales generated by a city

    ///
    /// GET
    ///

    // This function will return the details for a land
    function getLand(uint _landId) public view returns (
        address ownerAddress,
        uint256 landPrice,
        bool landForSale,
        bool landForRent,
        uint landOwnerCommission,
        bool isOccupied,
        uint cityRentingId
    ) {
        Land storage _land = lands[_landId];

        ownerAddress = _land.ownerAddress;
        landPrice = _land.landPrice;
        landForSale = _land.landForSale;
        landForRent = _land.landForRent;
        landOwnerCommission = _land.landOwnerCommission;
        isOccupied = _land.isOccupied;
        cityRentingId = _land.cityRentingId;
    }

    // This function will return the details for a city
    function getCity(uint _cityId) public view returns (
        uint landId,
        address landOwner,
        address cityOwner,
        uint256 cityPrice,
        uint256 cityGdp,
        bool cityForSale,
        uint squaresOccupied,
        uint metalStock,
        uint cityPopulation,
        uint healthCitizens,
        uint educationCitizens,
        uint happinessCitizens,
        uint productivityCitizens
    ) {
        City storage _city = cities[_cityId];

        landId = _city.landId;
        landOwner = lands[_city.landId].ownerAddress;
        cityOwner = _city.ownerAddress;
        cityPrice = _city.cityPrice;
        cityGdp = _city.cityGdp;
        cityForSale = _city.cityForSale;
        squaresOccupied = _city.squaresOccupied;
        metalStock = _city.metalStock;
        cityPopulation = getCityPopulation(_cityId);
        healthCitizens = getHealthCitizens(_cityId);
        educationCitizens = getEducationCitizens(_cityId);
        happinessCitizens = getHappinessCitizens(_cityId);
        productivityCitizens = getProductivityCitizens(_cityId);
    }

    // This function will return the details for a business
    function getBusiness(uint _businessId) public view returns (
        uint itemToProduce,
        uint256 itemPrice,
        uint cityId,
        uint cityMetalStock,
        uint readyTime,
        uint productionTime,
        uint cityLandId,
        address cityOwner
    ) {
        Business storage _business = businesses[_businessId];

        itemToProduce = _business.itemToProduce;
        itemPrice = _business.itemPrice;
        cityId = _business.cityId;
        cityMetalStock = cities[_business.cityId].metalStock;
        readyTime = _business.readyTime;
        productionTime = getProductionTimeBusiness(_businessId);
        cityLandId = cities[_business.cityId].landId;
        cityOwner = cities[_business.cityId].ownerAddress;
        
    }

    // This function will return the details for a building
    function getBuilding(uint _buildingId) public view returns (
        uint buildingType,
        uint cityId,
        uint32 readyTime
    ) {
        Building storage _building = buildings[_buildingId];

        buildingType = _building.buildingType;
        cityId = _building.cityId;
        readyTime = _building.readyTime;
    }

    // This function will return the details for a transaction
    function getTransaction(uint _transactionId) public view returns (
        uint buyerId,
        uint sellerId,
        uint256 transactionValue,
        uint itemId,
        uint blockId
    ) {
        Transaction storage _transaction = transactions[_transactionId];

        buyerId = _transaction.buyerId;
        sellerId = _transaction.sellerId;
        transactionValue = _transaction.transactionValue;
        itemId = _transaction.itemId;
        blockId = _transaction.blockId;
    }

    // Returns the count of buildings for a city 
    function getCityBuildings(uint _cityId, bool _active) public view returns (
        uint countBuildings,
        uint countHouses,
        uint countSchools,
        uint countHospital,
        uint countAmusement
    ) {
        countBuildings = getCountAllBuildings(_cityId, _active);
        countHouses = getCountBuildings(_cityId, 0, _active);
        countSchools = getCountBuildings(_cityId, 1, _active);
        countHospital = getCountBuildings(_cityId, 2, _active);
        countAmusement = getCountBuildings(_cityId, 3, _active);
    }
        
    // Get all the lands owned by a city
    function getSenderLands(address _senderAddress) public view returns(uint[]) {
        uint[] memory result = new uint[](getCountSenderLands(_senderAddress));
        uint counter = 0;
        for (uint i = 0; i < lands.length; i++) {
          if (lands[i].ownerAddress == _senderAddress) {
            result[counter] = i;
            counter++;
          }
        }
        return result;
    }
    
    function getCountSenderLands(address _senderAddress) public view returns(uint) {
        uint counter = 0;
        for (uint i = 0; i < lands.length; i++) {
          if (lands[i].ownerAddress == _senderAddress) {
            counter++;
          }
        }
        return(counter);
    }
    
     // Get all the lands owned by a city
    function getSenderCities(address _senderAddress) public view returns(uint[]) {
        uint[] memory result = new uint[](getCountSenderCities(_senderAddress));
        uint counter = 0;
        for (uint i = 0; i < cities.length; i++) {
          if (cities[i].ownerAddress == _senderAddress) {
            result[counter] = i;
            counter++;
          }
        }
        return result;
    }
    
    function getCountSenderCities(address _senderAddress) public view returns(uint) {
        uint counter = 0;
        for (uint i = 0; i < cities.length; i++) {
          if (cities[i].ownerAddress == _senderAddress) {
            counter++;
          }
        }
        return(counter);
    }

    // We use this function to return the population of a city
    function getCityPopulation(uint _cityId) public view returns (uint) {
        // We multiply the number of houses per 5 to get the population of a city
        uint _cityActiveBuildings = getCountBuildings(_cityId, 0, true);
        return(_cityActiveBuildings * 5);
    }

    // Count the number of active or pending buildings
    function getCountAllBuildings(uint _cityId, bool _active) public view returns(uint) {
        uint counter = 0;
        for (uint i = 0; i < buildings.length; i++) {
            if(_active == true) {
                // If active == true we loop through the active buildings
                if(buildings[i].cityId == _cityId && buildings[i].readyTime < now) {
                    counter++;
                }
            } else {
                // If active == false we loop through the pending buildings
                if(buildings[i].cityId == _cityId && buildings[i].readyTime >= now) {
                    counter++;
                }
            }
            
        }
        return counter;
    }
    
    // Count the number of active or pending buildings
    function getCountBuildings(uint _cityId, uint _buildingType, bool _active) public view returns(uint) {
        uint counter = 0;
        for (uint i = 0; i < buildings.length; i++) {
            if(_active == true) {
                // If active == true we loop through the active buildings
                if(buildings[i].buildingType == _buildingType && buildings[i].cityId == _cityId && buildings[i].readyTime < now) {
                    counter++;
                }
            } else {
                // If active == false we loop through the pending buildings
                if(buildings[i].buildingType == _buildingType && buildings[i].cityId == _cityId && buildings[i].readyTime >= now) {
                    counter++;
                }
            }
        }
        return counter;
    }

    // Get the active buildings (by type) owned by a specific city
    function getCityActiveBuildings(uint _cityId, uint _buildingType) public view returns(uint[]) {
        uint[] memory result = new uint[](getCountBuildings(_cityId, _buildingType, true));
        uint counter = 0;
        for (uint i = 0; i < buildings.length; i++) {
            // We add the ready building owned by this user
            if (buildings[i].buildingType == _buildingType && buildings[i].cityId == _cityId && buildings[i].readyTime < now) {
                result[counter] = i;
                counter++;
            }
        }
        return result;
    }

    // Get the pending buildings (by type) owned by a specific city
    function getCityPendingBuildings(uint _cityId, uint _buildingType) public view returns(uint[]) {
        uint[] memory result = new uint[](getCountBuildings(_cityId, _buildingType, false));
        uint counter = 0;
        for (uint i = 0; i < buildings.length; i++) {
            // We add the pending building owned by this user
            if (buildings[i].buildingType == _buildingType && buildings[i].cityId == _cityId && buildings[i].readyTime >= now) {
                result[counter] = i;
                counter++;
            }
        }
        return result;
    }

    // Get Businesses per type
    function getActiveBusinessesPerType(uint _businessType) public view returns(uint[]) {
        uint[] memory result = new uint[](CountBusinessesPerType[_businessType]);
        uint counter = 0;
        for (uint i = 0; i < businesses.length; i++) {
            // We add the pending building owned by this user
            if (businesses[i].itemToProduce == _businessType) {
                result[counter] = i;
                counter++;
            }
        }
        // returns an array of id for the active businesses
        return result;
    }

    // Get Businesses per city
    function getActiveBusinessesPerCity(uint _cityId) public view returns(uint[]) {
        uint[] memory result = new uint[](CityBusinessCount[_cityId]);
        uint counter = 0;
        for (uint i = 0; i < businesses.length; i++) {
            // We add the pending building owned by this user
            if (businesses[i].cityId == _cityId) {
                result[counter] = i;
                counter++;
            }
        }
        // returns an array of id for the active businesses
        return result;
    }
    
    // Get the sales generated by a city
    function getSalesCity(uint _cityId) public view returns(uint[]) {
        uint[] memory result = new uint[](CitySalesTransactionsCount[_cityId]);
        uint counter = 0;
        uint startId = transactions.length - 1;
        for (uint i = 0; i < transactions.length; i++) {
            uint _tId = startId - i;
            // We add the pending building owned by this user
            if (transactions[_tId].sellerId == _cityId) {
                result[counter] = _tId;
                counter++;
            }
        }
        // returns an array of id for the sales generated by the city (the most recent sales comes in first)
        return result;
    }

    // Return the health of the citizens of a city
    function getHealthCitizens(uint _cityId) public view returns(uint) {
        uint _hospitalsCount = getCountBuildings(_cityId, 2, true);
        uint pointsHealth = (_hospitalsCount * 500) + 50;
        uint _population = getCityPopulation(_cityId);
        uint256 _healthPopulation = 10;
        
        if(_population > 0) {
            _healthPopulation = (pointsHealth / uint256(_population));
        } else {
            _healthPopulation = 0;
        }
        
        // The indicator can't be more than 10
        if(_healthPopulation > 10) {
            _healthPopulation = 10;
        }
        return(_healthPopulation);
    }

    // Return the education of the citizens of a city
    function getEducationCitizens(uint _cityId) public view returns(uint) {
        uint _schoolsCount = getCountBuildings(_cityId, 1, true);
        uint pointsEducation = (_schoolsCount * 250) + 25;
        uint _population = getCityPopulation(_cityId);
        uint256 _educationPopulation = 10;

        if(_population > 0) {
            _educationPopulation = (pointsEducation / uint256(_population));
        } else {
            _educationPopulation = 0;
        }
        
        if(_educationPopulation > 10) {
            _educationPopulation = 10;
        }
        return(_educationPopulation);
    }

    // Return the happiness of the citizens of a city
    function getHappinessCitizens(uint _cityId) public view returns(uint) {
        uint _amusementCount = getCountBuildings(_cityId, 3, true);
        uint pointsAmusement = (_amusementCount * 350) + 35;
        uint _population = getCityPopulation(_cityId);
        uint256 _amusementPopulation = 10;
        
        if(_population > 0) {
            _amusementPopulation = (pointsAmusement / uint256(_population));
        } else {
            _amusementPopulation = 0;
        }
        
        // The indicator can't be more than 10
        if(_amusementPopulation > 10) {
            _amusementPopulation = 10;
        }
        return(_amusementPopulation);
    }

    // Return the productivity of the citizens of a city
    function getProductivityCitizens(uint _cityId) public view returns(uint) {
        return((getEducationCitizens(_cityId) + getHealthCitizens(_cityId) + getHappinessCitizens(_cityId)) / 3);
    }

    // This function returns the maximum businesses a city can build (according to its population)
    function getMaxBusinessesPerCity(uint _cityId) public view returns(uint) {
        uint _citizens = getCityPopulation(_cityId);
        uint _maxBusinesses;

        // Calculate the max amount of businesses available per city
        if(_citizens >= 75) {
            _maxBusinesses = 4;
        } else if(_citizens >= 50) {
            _maxBusinesses = 3;
        } else if(_citizens >= 25) {
            _maxBusinesses = 2;
        } else {
            _maxBusinesses = 1;
        }

        return(_maxBusinesses);
    }
    
    function getCountCities() public view returns(uint) {
        return(cities.length);
    }

    ///
    /// ACTIONS
    ///
    
    // Land owner can use this function to remove a city from their land 
    function removeTenant(uint _landId) public {
        require(lands[_landId].ownerAddress == msg.sender);
        lands[_landId].landForRent = false;
        lands[_landId].isOccupied = false;
        cities[lands[_landId].cityRentingId].landId = 0;
        lands[_landId].cityRentingId = 0;
    }

    // We use this function to purchase a business
    // Businesses are free to create but each city can run only one business.
    function createBusiness(uint _itemId, uint256 _itemPrice, uint _cityId) public {
        // We check if the price of the item sold is enough regarding the current price of the metal
        require(_itemPrice >= BuildingTypeMetalNeeded[_itemId] * priceMetal);

        // We verifiy that the sender is the owner of the city
        require(cities[_cityId].ownerAddress == msg.sender);

        // We check that the city has enough squares to host this new building
        require((cities[_cityId].squaresOccupied + BuildingTypeSquaresOccupied[4]) <= 100);
        
        // We check if the city has enough population to create this business (1 building / 25 citizens)
        require(CityBusinessCount[_cityId] < getMaxBusinessesPerCity(_cityId));

        // We create the business
        businesses.push(Business(_itemId, _itemPrice, _cityId, 0));

        // We increment the businesses count for this type and city
        CountBusinessesPerType[_itemId]++;

        // We increment the count of businesses for this city
        CityBusinessCount[_cityId]++;

        // Increment the squares used in this land
        cities[_cityId].squaresOccupied = cities[_cityId].squaresOccupied + BuildingTypeSquaresOccupied[4];
    }

    // This function can let business owner update the price of the building they are selling
    function updateBusiness(uint _businessId, uint256 _itemPrice) public {
        // We check if the user is the owner of the business
        require(cities[businesses[_businessId].cityId].ownerAddress == msg.sender);

        // We check if the price of the item sold is enough regarding the current price of the metal
        require(_itemPrice >= BuildingTypeMetalNeeded[businesses[_businessId].itemToProduce] * priceMetal);

        businesses[_businessId].itemPrice = _itemPrice;
    }

    // We use this function to purchase metal
    function purchaseMetal(uint _cityId, uint _amount) public payable {
        // We check that the user is paying the correct price 
        require(msg.value == _amount * priceMetal);

        // We verifiy that the sender is the owner of the city
        require(cities[_cityId].ownerAddress == msg.sender);

        // Transfer the amount paid to the ceo
        ceoAddress.transfer(msg.value);

        // Add the metal to the city stock
        cities[_cityId].metalStock = cities[_cityId].metalStock + _amount;
    }
    
    // This function will return the production time for a specific business
    function getProductionTimeBusiness(uint _businessId) public view returns(uint256) {
        uint _productivityIndicator = getProductivityCitizens(businesses[_businessId].cityId);
        uint _countCitizens = getCityPopulation(businesses[_businessId].cityId);
        
        uint256 productivityFinal;
        
        if(_countCitizens == 0) {
            // The min production time with 0 citizens should be 7000
            productionTime = 7000; 
        } else {
            // We calculat the production time
            if(_productivityIndicator <= 1) {
            productivityFinal = _countCitizens;
            } else {
                productivityFinal = _countCitizens * (_productivityIndicator / 2);
            }
            
            uint256 productionTime = 60000 / uint256(productivityFinal);
        }
        return(productionTime);
    }

    // We use this function to purchase a building from a business
    function purchaseBuilding(uint _itemId, uint _businessId, uint _cityId) public payable {
        // We verify that the user is paying the correct price
        require(msg.value == businesses[_businessId].itemPrice);

        // We verifiy that the sender is the owner of the city
        require(cities[_cityId].ownerAddress == msg.sender);

        // We check if this business is authorized to produce this building
        require(_itemId == businesses[_businessId].itemToProduce);

        // We check if the city where the business is located as enough Metal in Stock
        require(cities[businesses[_businessId].cityId].metalStock >= BuildingTypeMetalNeeded[_itemId]);

        // We check that the city has enough squares to host this new building
        require((cities[_cityId].squaresOccupied + BuildingTypeSquaresOccupied[_itemId]) <= 100);

        // We check if the business is ready to produce another building
        require(businesses[_businessId].readyTime < now);

        uint256 onePercent = msg.value / 100;

        // Send commission of the amount paid to land owner of where the business is located
        uint _landId = cities[businesses[_businessId].cityId].landId;
        address landOwner = lands[_landId].ownerAddress;
        uint256 landOwnerCommission = onePercent * lands[cities[businesses[_businessId].cityId].landId].landOwnerCommission;
        landOwner.transfer(landOwnerCommission);

        // Send the rest to the business owner
        cities[businesses[_businessId].cityId].ownerAddress.transfer(msg.value - landOwnerCommission);

        // Reduce the metal stock of the city where the business is located
        cities[businesses[_businessId].cityId].metalStock = cities[businesses[_businessId].cityId].metalStock - BuildingTypeMetalNeeded[_itemId];

        // Calculate production time
        uint productionTime = getProductionTimeBusiness(_businessId);
        uint32 _buildingReadyTime = uint32(now + productionTime);

        // Update production time for the business
        businesses[_businessId].readyTime = uint32(now + productionTime);

        // Create the building
        buildings.push(Building(_itemId, _cityId, _buildingReadyTime));

        // Increment the squares used in this land
        cities[_cityId].squaresOccupied = cities[_cityId].squaresOccupied + BuildingTypeSquaresOccupied[_itemId];

        // Increment the GDP generated by this city
        cities[_cityId].cityGdp = cities[_cityId].cityGdp + msg.value;

        // Increment the buildings count in this city
        CityBuildingsCount[_cityId]++;

        // Save transaction in smart contract
        transactions.push(Transaction(_cityId, businesses[_businessId].cityId, msg.value, _itemId, block.number));
        CitySalesTransactionsCount[businesses[_businessId].cityId]++;
    }

    // We use this function to let the land owner update its land
    function updateLand(uint _landId, uint256 _landPrice, uint _typeUpdate, uint _commission) public {
        require(lands[_landId].ownerAddress == msg.sender);

        /// Types update:
        /// 0: Sell land
        /// 1: Put the land for rent

        if(_typeUpdate == 0) {

            // Land is for sale
            lands[_landId].landForSale = true;
            lands[_landId].landForRent = false;
            lands[_landId].landPrice = _landPrice;
            
        } else if(_typeUpdate == 1) {
            // The owner can't change the commission if the land is occupied
            require(lands[_landId].isOccupied == false);
            
            // Land is for rent
            lands[_landId].landForRent = true;
            lands[_landId].landForSale = false;
            lands[_landId].landOwnerCommission = _commission;

        } else if(_typeUpdate == 2) {
            // The owner cancel the sale of its land
            lands[_landId].landForRent = false;
            lands[_landId].landForSale = false;
        }
    }

    function purchaseLand(uint _landId, uint _typePurchase, uint _commission) public payable {
        require(lands[_landId].landForSale == true);
        require(msg.value == lands[_landId].landPrice);

        // Transfer the amount paid to the previous land owner
        lands[_landId].ownerAddress.transfer(msg.value);

        // Update the land
        lands[_landId].ownerAddress = msg.sender;
        lands[_landId].landForSale = false;

        /// _typePurchase:
        /// 0: Create city
        /// 1: Rent the land
        /// 2: Cancel sale
        
        if(_typePurchase == 0) {
            // The user in purchasing the land to build the city on top of it we create the city directly
            createCity(_landId);
        } else if(_typePurchase == 1) {
            // The user is purchasing the land to rent it to another user
            lands[_landId].landForRent = true;
            lands[_landId].landForSale = false;
            lands[_landId].landOwnerCommission = _commission;
        } 
    }
    
    // We use this function to let users rent lands.
    function rentLand(uint _landId, bool _createCity, uint _cityId) public {
        // The owner can rent the land even if it's not marked forRent
        if(lands[_landId].ownerAddress != msg.sender) {
            require(lands[_landId].landForRent == true);
        }

        // Cities can't rent a land if it's already occupied
        require(lands[_landId].isOccupied == false);
                    
        if(_createCity == true) {
            // We create the city if the user is renting this land for a new city
            createCity(_landId);
        } else {
            // Cities can't rent a land if they are already landing one
            require(cities[_cityId].landId == 0);
        
            // We update the land and city if the user is renting the land for an existing city
            cities[_cityId].landId = _landId;
            lands[_landId].cityRentingId = _cityId;
            lands[_landId].landForSale == false;
            lands[_landId].landForRent == true;
            lands[_landId].isOccupied = true;
        }
    }

    function createCity(uint _landId) public {
        require(lands[_landId].isOccupied == false);

        // Create the city
        uint cityId = cities.push(City(_landId, msg.sender, 0, 0, false, 0, 0)) - 1;

        lands[_landId].landForSale == false;
        lands[_landId].landForRent == false;
        lands[_landId].cityRentingId = cityId;
        lands[_landId].isOccupied = true;
    }
    
    // The dev can use this function to create an innocupied land
    function CreateLand(uint256 _landPrice, address _owner) public onlyCeo {
        // We can't create more than 300 lands.
        if(lands.length < 300) {
            lands.push(Land(_owner, _landPrice, false, false, 0, false, 0));
        }
        
    }
    
    function UpdateInitiateContractAddress(address _newAddress) public onlyCeo { 
        InitiateLandsAddress = _newAddress;
    }
    
    // We initialize some datas with this function
    function Initialize() public onlyCeo {
        // To be able to use the land id in the city struct
        lands.push(Land(ceoAddress, 0, false, false, 5, true, 0)); // Fake Land #0 is created here

        // Save the amount of metal needed to produce the buildings
        BuildingTypeMetalNeeded[0] = 3;
        BuildingTypeMetalNeeded[1] = 4;
        BuildingTypeMetalNeeded[2] = 5;
        BuildingTypeMetalNeeded[3] = 4;

        // Save the squares used by buildings
        BuildingTypeSquaresOccupied[0] = 2;
        BuildingTypeSquaresOccupied[1] = 4;
        BuildingTypeSquaresOccupied[2] = 6;
        BuildingTypeSquaresOccupied[3] = 4;
        BuildingTypeSquaresOccupied[4] = 5; // Businesses
    }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"},{"name":"_active","type":"bool"}],"name":"getCityBuildings","outputs":[{"name":"countBuildings","type":"uint256"},{"name":"countHouses","type":"uint256"},{"name":"countSchools","type":"uint256"},{"name":"countHospital","type":"uint256"},{"name":"countAmusement","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"},{"name":"_buildingType","type":"uint256"},{"name":"_active","type":"bool"}],"name":"getCountBuildings","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_landPrice","type":"uint256"},{"name":"_owner","type":"address"}],"name":"CreateLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_cityId","type":"uint256"},{"name":"_amount","type":"uint256"}],"name":"purchaseMetal","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_senderAddress","type":"address"}],"name":"getCountSenderCities","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"BuildingTypeSquaresOccupied","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"BuildingTypeMetalNeeded","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"},{"name":"_buildingType","type":"uint256"}],"name":"getCityActiveBuildings","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_transactionId","type":"uint256"}],"name":"getTransaction","outputs":[{"name":"buyerId","type":"uint256"},{"name":"sellerId","type":"uint256"},{"name":"transactionValue","type":"uint256"},{"name":"itemId","type":"uint256"},{"name":"blockId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_businessId","type":"uint256"},{"name":"_itemPrice","type":"uint256"}],"name":"updateBusiness","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getHealthCitizens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getProductivityCitizens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_businessId","type":"uint256"}],"name":"getProductionTimeBusiness","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_itemId","type":"uint256"},{"name":"_itemPrice","type":"uint256"},{"name":"_cityId","type":"uint256"}],"name":"createBusiness","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_businessId","type":"uint256"}],"name":"getBusiness","outputs":[{"name":"itemToProduce","type":"uint256"},{"name":"itemPrice","type":"uint256"},{"name":"cityId","type":"uint256"},{"name":"cityMetalStock","type":"uint256"},{"name":"readyTime","type":"uint256"},{"name":"productionTime","type":"uint256"},{"name":"cityLandId","type":"uint256"},{"name":"cityOwner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_landId","type":"uint256"}],"name":"createCity","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getMaxBusinessesPerCity","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"CityBusinessCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_senderAddress","type":"address"}],"name":"getCountSenderLands","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_itemId","type":"uint256"},{"name":"_businessId","type":"uint256"},{"name":"_cityId","type":"uint256"}],"name":"purchaseBuilding","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_landId","type":"uint256"},{"name":"_createCity","type":"bool"},{"name":"_cityId","type":"uint256"}],"name":"rentLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getSalesCity","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_landId","type":"uint256"},{"name":"_typePurchase","type":"uint256"},{"name":"_commission","type":"uint256"}],"name":"purchaseLand","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_landId","type":"uint256"}],"name":"removeTenant","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"CityBuildingsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"Initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"},{"name":"_buildingType","type":"uint256"}],"name":"getCityPendingBuildings","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getActiveBusinessesPerCity","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAddress","type":"address"}],"name":"UpdateInitiateContractAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getHappinessCitizens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getEducationCitizens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_senderAddress","type":"address"}],"name":"getSenderLands","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_buildingId","type":"uint256"}],"name":"getBuilding","outputs":[{"name":"buildingType","type":"uint256"},{"name":"cityId","type":"uint256"},{"name":"readyTime","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"CitySalesTransactionsCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getCityPopulation","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_senderAddress","type":"address"}],"name":"getSenderCities","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_businessType","type":"uint256"}],"name":"getActiveBusinessesPerType","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"CountBusinessesPerType","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_landId","type":"uint256"},{"name":"_landPrice","type":"uint256"},{"name":"_typeUpdate","type":"uint256"},{"name":"_commission","type":"uint256"}],"name":"updateLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"}],"name":"getCity","outputs":[{"name":"landId","type":"uint256"},{"name":"landOwner","type":"address"},{"name":"cityOwner","type":"address"},{"name":"cityPrice","type":"uint256"},{"name":"cityGdp","type":"uint256"},{"name":"cityForSale","type":"bool"},{"name":"squaresOccupied","type":"uint256"},{"name":"metalStock","type":"uint256"},{"name":"cityPopulation","type":"uint256"},{"name":"healthCitizens","type":"uint256"},{"name":"educationCitizens","type":"uint256"},{"name":"happinessCitizens","type":"uint256"},{"name":"productivityCitizens","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_cityId","type":"uint256"},{"name":"_active","type":"bool"}],"name":"getCountAllBuildings","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_landId","type":"uint256"}],"name":"getLand","outputs":[{"name":"ownerAddress","type":"address"},{"name":"landPrice","type":"uint256"},{"name":"landForSale","type":"bool"},{"name":"landForRent","type":"bool"},{"name":"landOwnerCommission","type":"uint256"},{"name":"isOccupied","type":"bool"},{"name":"cityRentingId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCountCities","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]

  Contract Creation Code Switch To Opcodes View
606060405273699de541253f253a4eff0d3c006d70c43f2e2dae6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073a93a135e3c73ab77ea00e194bd080918e65149c3600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506611c37937e0800060025534156100c357600080fd5b613fc8806100d26000396000f30060606040526004361061020f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806303b718ee146102145780630b9f2ca61461027257806311c3fec5146102bd5780631353e7b3146102ff57806317c63141146103205780631b94b8451461036d5780632c399cf8146103a45780632d10d4d1146103db57806333ea3dc81461045c5780633609bf09146104af57806337072ec7146104db5780633c23716714610512578063409bd95b14610549578063463ee88a146105805780634d7439cb146105b557806357230ff8146106495780635ae613771461066c5780635e44d056146106a35780636391d3b2146106da57806368d5cb1a146107275780636a91205a1461075157806375dc6471146107885780637cc4ef14146108005780637dd2e9931461082a5780638050c9b91461084d57806380f86009146108845780638106d57a14610899578063827d084a1461091a578063856b3108146109925780638759c2f1146109cb5780638a359d6e14610a02578063991257a214610a395780639dfd8b0214610ac7578063a72d33e814610b18578063b28241f914610b4f578063ba87fdd414610b86578063cf25e4e814610c14578063d0d98ee014610c8c578063d32a7ee014610cc3578063d713065114610d01578063e94d7af614610de8578063f02dd53f14610e2a578063f5e7ef7a14610ec3575b600080fd5b341561021f57600080fd5b61024060048080359060200190919080351515906020019091905050610eec565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b341561027d57600080fd5b6102a760048080359060200190919080359060200190919080351515906020019091905050610f42565b6040518082815260200191505060405180910390f35b34156102c857600080fd5b6102fd600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506110c3565b005b61031e60048080359060200190919080359060200190919050506112d0565b005b341561032b57600080fd5b610357600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611408565b6040518082815260200191505060405180910390f35b341561037857600080fd5b61038e60048080359060200190919050506114b6565b6040518082815260200191505060405180910390f35b34156103af57600080fd5b6103c560048080359060200190919050506114ce565b6040518082815260200191505060405180910390f35b34156103e657600080fd5b61040560048080359060200190919080359060200190919050506114e6565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561044857808201518184015260208101905061042d565b505050509050019250505060405180910390f35b341561046757600080fd5b61047d600480803590602001909190505061160e565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b34156104ba57600080fd5b6104d96004808035906020019091908035906020019091905050611663565b005b34156104e657600080fd5b6104fc600480803590602001909190505061176c565b6040518082815260200191505060405180910390f35b341561051d57600080fd5b61053360048080359060200190919050506117d7565b6040518082815260200191505060405180910390f35b341561055457600080fd5b61056a6004808035906020019091905050611809565b6040518082815260200191505060405180910390f35b341561058b57600080fd5b6105b360048080359060200190919080359060200190919080359060200190919050506118bb565b005b34156105c057600080fd5b6105d66004808035906020019091905050611b0a565b604051808981526020018881526020018781526020018681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019850505050505050505060405180910390f35b341561065457600080fd5b61066a6004808035906020019091905050611c15565b005b341561067757600080fd5b61068d6004808035906020019091905050611e34565b6040518082815260200191505060405180910390f35b34156106ae57600080fd5b6106c46004808035906020019091905050611e8e565b6040518082815260200191505060405180910390f35b34156106e557600080fd5b610711600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611ea6565b6040518082815260200191505060405180910390f35b61074f6004808035906020019091908035906020019091908035906020019091905050611f54565b005b341561075c57600080fd5b61078660048080359060200190919080351515906020019091908035906020019091905050612626565b005b341561079357600080fd5b6107a96004808035906020019091905050612851565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107ec5780820151818401526020810190506107d1565b505050509050019250505060405180910390f35b6108286004808035906020019091908035906020019091908035906020019091905050612929565b005b341561083557600080fd5b61084b6004808035906020019091905050612b6d565b005b341561085857600080fd5b61086e6004808035906020019091905050612cc8565b6040518082815260200191505060405180910390f35b341561088f57600080fd5b610897612ce0565b005b34156108a457600080fd5b6108c36004808035906020019091908035906020019091905050612fe5565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156109065780820151818401526020810190506108eb565b505050509050019250505060405180910390f35b341561092557600080fd5b61093b600480803590602001909190505061310e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561097e578082015181840152602081019050610963565b505050509050019250505060405180910390f35b341561099d57600080fd5b6109c9600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506131d1565b005b34156109d657600080fd5b6109ec60048080359060200190919050506132c8565b6040518082815260200191505060405180910390f35b3415610a0d57600080fd5b610a236004808035906020019091905050613333565b6040518082815260200191505060405180910390f35b3415610a4457600080fd5b610a70600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061339c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610ab3578082015181840152602081019050610a98565b505050509050019250505060405180910390f35b3415610ad257600080fd5b610ae860048080359060200190919050506134a0565b604051808481526020018381526020018263ffffffff1663ffffffff168152602001935050505060405180910390f35b3415610b2357600080fd5b610b3960048080359060200190919050506134f2565b6040518082815260200191505060405180910390f35b3415610b5a57600080fd5b610b70600480803590602001909190505061350a565b6040518082815260200191505060405180910390f35b3415610b9157600080fd5b610bbd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613528565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c00578082015181840152602081019050610be5565b505050509050019250505060405180910390f35b3415610c1f57600080fd5b610c35600480803590602001909190505061362c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610c78578082015181840152602081019050610c5d565b505050509050019250505060405180910390f35b3415610c9757600080fd5b610cad60048080359060200190919050506136ef565b6040518082815260200191505060405180910390f35b3415610cce57600080fd5b610cff6004808035906020019091908035906020019091908035906020019091908035906020019091905050613707565b005b3415610d0c57600080fd5b610d22600480803590602001909190505061398f565b604051808e81526020018d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a8152602001891515151581526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019d505050505050505050505050505060405180910390f35b3415610df357600080fd5b610e1460048080359060200190919080351515906020019091905050613ab1565b6040518082815260200191505060405180910390f35b3415610e3557600080fd5b610e4b6004808035906020019091905050613bdb565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186151515158152602001851515151581526020018481526020018315151515815260200182815260200197505050505050505060405180910390f35b3415610ece57600080fd5b610ed6613c8a565b6040518082815260200191505060405180910390f35b6000806000806000610efe8787613ab1565b9450610f0c87600088610f42565b9350610f1a87600188610f42565b9250610f2887600288610f42565b9150610f3687600388610f42565b90509295509295909350565b6000806000809150600090505b6006805490508110156110b75760011515841515141561100b5784600682815481101515610f7957fe5b906000526020600020906003020160000154148015610fb7575085600682815481101515610fa357fe5b906000526020600020906003020160010154145b8015610ff8575042600682815481101515610fce57fe5b906000526020600020906003020160020160009054906101000a900463ffffffff1663ffffffff16105b156110065781806001019250505b6110aa565b8460068281548110151561101b57fe5b90600052602060002090600302016000015414801561105957508560068281548110151561104557fe5b906000526020600020906003020160010154145b801561109b57504260068281548110151561107057fe5b906000526020600020906003020160020160009054906101000a900463ffffffff1663ffffffff1610155b156110a95781806001019250505b5b8080600101915050610f4f565b81925050509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061116b5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561117657600080fd5b61012c60038054905010156112cc57600380548060010182816111999190613c97565b9160005260206000209060060201600060e0604051908101604052808573ffffffffffffffffffffffffffffffffffffffff168152602001868152602001600015158152602001600015158152602001600081526020016000151581526020016000815250909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff0219169083151502179055506080820151816003015560a08201518160040160006101000a81548160ff02191690831515021790555060c082015181600501555050505b5050565b6002548102341415156112e257600080fd5b3373ffffffffffffffffffffffffffffffffffffffff1660048381548110151561130857fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561135c57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156113bd57600080fd5b806004838154811015156113cd57fe5b906000526020600020906007020160060154016004838154811015156113ef57fe5b9060005260206000209060070201600601819055505050565b6000806000809150600090505b6004805490508110156114ac578373ffffffffffffffffffffffffffffffffffffffff1660048281548110151561144857fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561149f5781806001019250505b8080600101915050611415565b8192505050919050565b600a6020528060005260406000206000915090505481565b60096020528060005260406000206000915090505481565b6114ee613cc9565b6114f6613cc9565b60008061150586866001610f42565b6040518059106115125750595b9080825280602002602001820160405250925060009150600090505b600680549050811015611602578460068281548110151561154b57fe5b90600052602060002090600302016000015414801561158957508560068281548110151561157557fe5b906000526020600020906003020160010154145b80156115ca5750426006828154811015156115a057fe5b906000526020600020906003020160020160009054906101000a900463ffffffff1663ffffffff16105b156115f5578083838151811015156115de57fe5b906020019060200201818152505081806001019250505b808060010191505061152e565b82935050505092915050565b60008060008060008060078781548110151561162657fe5b9060005260206000209060050201905080600001549550806001015494508060020154935080600301549250806004015491505091939590929450565b3373ffffffffffffffffffffffffffffffffffffffff16600460058481548110151561168b57fe5b9060005260206000209060040201600201548154811015156116a957fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156116fd57600080fd5b6002546009600060058581548110151561171357fe5b90600052602060002090600402016000015481526020019081526020016000205402811015151561174357600080fd5b8060058381548110151561175357fe5b9060005260206000209060040201600101819055505050565b60008060008060006117818660026001610f42565b935060326101f485020192506117968661350a565b9150600a905060008211156117b85781838115156117b057fe5b0490506117bd565b600090505b600a8111156117cb57600a90505b80945050505050919050565b600060036117e4836132c8565b6117ed8461176c565b6117f685613333565b010181151561180157fe5b049050919050565b600080600080600061183a60058781548110151561182357fe5b9060005260206000209060040201600201546117d7565b935061186560058781548110151561184e57fe5b90600052602060002090600402016002015461350a565b9250600083141561187a57611b5890506118af565b60018411151561188c5782915061189e565b60028481151561189857fe5b04830291505b8161ea608115156118ab57fe5b0490505b80945050505050919050565b60025460096000858152602001908152602001600020540282101515156118e157600080fd5b3373ffffffffffffffffffffffffffffffffffffffff1660048281548110151561190757fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561195b57600080fd5b6064600a6000600481526020019081526020016000205460048381548110151561198157fe5b90600052602060002090600702016005015401111515156119a157600080fd5b6119aa81611e34565b600c6000838152602001908152602001600020541015156119ca57600080fd5b600580548060010182816119de9190613cdd565b91600052602060002090600402016000608060405190810160405280878152602001868152602001858152602001600063ffffffff16815250909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548163ffffffff021916908363ffffffff160217905550505050600b600084815260200190815260200160002060008154809291906001019190505550600c600082815260200190815260200160002060008154809291906001019190505550600a60006004815260200190815260200160002054600482815481101515611ace57fe5b90600052602060002090600702016005015401600482815481101515611af057fe5b906000526020600020906007020160050181905550505050565b600080600080600080600080600060058a815481101515611b2757fe5b9060005260206000209060040201905080600001549850806001015497508060020154965060048160020154815481101515611b5f57fe5b90600052602060002090600702016006015495508060030160009054906101000a900463ffffffff1663ffffffff169450611b998a611809565b935060048160020154815481101515611bae57fe5b906000526020600020906007020160000154925060048160020154815481101515611bd557fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919395975091939597565b6000801515600383815481101515611c2957fe5b906000526020600020906006020160040160009054906101000a900460ff161515141515611c5657600080fd5b600160048054806001018281611c6c9190613d0f565b9160005260206000209060070201600060e0604051908101604052808781526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160001515815260200160008152602001600081525090919091506000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003015560808201518160040160006101000a81548160ff02191690831515021790555060a0820151816005015560c08201518160060155505003905060001515600383815481101515611d8357fe5b906000526020600020906006020160020160009054906101000a9050505060001515600383815481101515611db457fe5b906000526020600020906006020160020160019054906101000a9050505080600383815481101515611de257fe5b9060005260206000209060060201600501819055506001600383815481101515611e0857fe5b906000526020600020906006020160040160006101000a81548160ff0219169083151502179055505050565b6000806000611e428461350a565b9150604b82101515611e575760049050611e84565b603282101515611e6a5760039050611e83565b601982101515611e7d5760029050611e82565b600190505b5b5b8092505050919050565b600c6020528060005260406000206000915090505481565b6000806000809150600090505b600380549050811015611f4a578373ffffffffffffffffffffffffffffffffffffffff16600382815481101515611ee657fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611f3d5781806001019250505b8080600101915050611eb3565b8192505050919050565b600080600080600080600588815481101515611f6c57fe5b90600052602060002090600402016001015434141515611f8b57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff16600488815481101515611fb157fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561200557600080fd5b60058881548110151561201457fe5b9060005260206000209060040201600001548914151561203357600080fd5b600960008a815260200190815260200160002054600460058a81548110151561205857fe5b90600052602060002090600402016002015481548110151561207657fe5b9060005260206000209060070201600601541015151561209557600080fd5b6064600a60008b8152602001908152602001600020546004898154811015156120ba57fe5b90600052602060002090600702016005015401111515156120da57600080fd5b426005898154811015156120ea57fe5b906000526020600020906004020160030160009054906101000a900463ffffffff1663ffffffff1610151561211e57600080fd5b60643481151561212a57fe5b049550600460058981548110151561213e57fe5b90600052602060002090600402016002015481548110151561215c57fe5b906000526020600020906007020160000154945060038581548110151561217f57fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1693506003600460058a8154811015156121c657fe5b9060005260206000209060040201600201548154811015156121e457fe5b90600052602060002090600702016000015481548110151561220257fe5b906000526020600020906006020160030154860292508373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050151561225857600080fd5b600460058981548110151561226957fe5b90600052602060002090600402016002015481548110151561228757fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8434039081150290604051600060405180830381858888f1935050505015156122fa57600080fd5b600960008a815260200190815260200160002054600460058a81548110151561231f57fe5b90600052602060002090600402016002015481548110151561233d57fe5b90600052602060002090600702016006015403600460058a81548110151561236157fe5b90600052602060002090600402016002015481548110151561237f57fe5b90600052602060002090600702016006018190555061239d88611809565b915081420190508142016005898154811015156123b657fe5b906000526020600020906004020160030160006101000a81548163ffffffff021916908363ffffffff160217905550600680548060010182816123f99190613d41565b916000526020600020906003020160006060604051908101604052808d81526020018b81526020018563ffffffff168152509091909150600082015181600001556020820151816001015560408201518160020160006101000a81548163ffffffff021916908363ffffffff160217905550505050600a60008a81526020019081526020016000205460048881548110151561249157fe5b906000526020600020906007020160050154016004888154811015156124b357fe5b906000526020600020906007020160050181905550346004888154811015156124d857fe5b906000526020600020906007020160030154016004888154811015156124fa57fe5b9060005260206000209060070201600301819055506008600088815260200190815260200160002060008154809291906001019190505550600780548060010182816125469190613d73565b9160005260206000209060050201600060a0604051908101604052808b815260200160058d81548110151561257757fe5b90600052602060002090600402016002015481526020013481526020018d81526020014381525090919091506000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040155505050600d600060058a8154811015156125eb57fe5b906000526020600020906004020160020154815260200190815260200160002060008154809291906001019190505550505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff1660038481548110151561264c57fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156126dc57600115156003848154811015156126ae57fe5b906000526020600020906006020160020160019054906101000a900460ff1615151415156126db57600080fd5b5b600015156003848154811015156126ef57fe5b906000526020600020906006020160040160009054906101000a900460ff16151514151561271c57600080fd5b6001151582151514156127375761273283611c15565b61284c565b600060048281548110151561274857fe5b90600052602060002090600702016000015414151561276657600080fd5b8260048281548110151561277657fe5b9060005260206000209060070201600001819055508060038481548110151561279b57fe5b906000526020600020906006020160050181905550600015156003848154811015156127c357fe5b906000526020600020906006020160020160009054906101000a90505050600115156003848154811015156127f457fe5b906000526020600020906006020160020160019054906101000a90505050600160038481548110151561282357fe5b906000526020600020906006020160040160006101000a81548160ff0219169083151502179055505b505050565b612859613cc9565b612861613cc9565b600080600080600d6000888152602001908152602001600020546040518059106128885750595b90808252806020026020018201604052509450600093506001600780549050039250600091505b60078054905082101561291c578183039050866007828154811015156128d157fe5b906000526020600020906005020160010154141561290f578085858151811015156128f857fe5b906020019060200201818152505083806001019450505b81806001019250506128af565b8495505050505050919050565b6001151560038481548110151561293c57fe5b906000526020600020906006020160020160009054906101000a900460ff16151514151561296957600080fd5b60038381548110151561297857fe5b9060005260206000209060060201600101543414151561299757600080fd5b6003838154811015156129a657fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515612a1757600080fd5b33600384815481101515612a2757fe5b906000526020600020906006020160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600384815481101515612a8757fe5b906000526020600020906006020160020160006101000a81548160ff0219169083151502179055506000821415612ac657612ac183611c15565b612b68565b6001821415612b67576001600384815481101515612ae057fe5b906000526020600020906006020160020160016101000a81548160ff0219169083151502179055506000600384815481101515612b1957fe5b906000526020600020906006020160020160006101000a81548160ff02191690831515021790555080600384815481101515612b5157fe5b9060005260206000209060060201600301819055505b5b505050565b3373ffffffffffffffffffffffffffffffffffffffff16600382815481101515612b9357fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612be757600080fd5b6000600382815481101515612bf857fe5b906000526020600020906006020160020160016101000a81548160ff0219169083151502179055506000600382815481101515612c3157fe5b906000526020600020906006020160040160006101000a81548160ff02191690831515021790555060006004600383815481101515612c6c57fe5b906000526020600020906006020160050154815481101515612c8a57fe5b9060005260206000209060070201600001819055506000600382815481101515612cb057fe5b90600052602060002090600602016005018190555050565b60086020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612d885750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515612d9357600080fd5b60038054806001018281612da79190613c97565b9160005260206000209060060201600060e0604051908101604052806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600015158152602001600015158152602001600581526020016001151581526020016000815250909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff0219169083151502179055506080820151816003015560a08201518160040160006101000a81548160ff02191690831515021790555060c08201518160050155505050600360096000808152602001908152602001600020819055506004600960006001815260200190815260200160002081905550600560096000600281526020019081526020016000208190555060046009600060038152602001908152602001600020819055506002600a6000808152602001908152602001600020819055506004600a600060018152602001908152602001600020819055506006600a600060028152602001908152602001600020819055506004600a600060038152602001908152602001600020819055506005600a60006004815260200190815260200160002081905550565b612fed613cc9565b612ff5613cc9565b60008061300486866000610f42565b6040518059106130115750595b9080825280602002602001820160405250925060009150600090505b600680549050811015613102578460068281548110151561304a57fe5b90600052602060002090600302016000015414801561308857508560068281548110151561307457fe5b906000526020600020906003020160010154145b80156130ca57504260068281548110151561309f57fe5b906000526020600020906003020160020160009054906101000a900463ffffffff1663ffffffff1610155b156130f5578083838151811015156130de57fe5b906020019060200201818152505081806001019250505b808060010191505061302d565b82935050505092915050565b613116613cc9565b61311e613cc9565b600080600c6000868152602001908152602001600020546040518059106131425750595b9080825280602002602001820160405250925060009150600090505b6005805490508110156131c6578460058281548110151561317b57fe5b90600052602060002090600402016002015414156131b9578083838151811015156131a257fe5b906020019060200201818152505081806001019250505b808060010191505061315e565b829350505050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806132795750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561328457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060008060006132dd8660036001610f42565b9350602361015e85020192506132f28661350a565b9150600a9050600082111561331457818381151561330c57fe5b049050613319565b600090505b600a81111561332757600a90505b80945050505050919050565b600080600080600061334786600180610f42565b9350601960fa850201925061335b8661350a565b9150600a9050600082111561337d57818381151561337557fe5b049050613382565b600090505b600a81111561339057600a90505b80945050505050919050565b6133a4613cc9565b6133ac613cc9565b6000806133b885611ea6565b6040518059106133c55750595b9080825280602002602001820160405250925060009150600090505b600380549050811015613495578473ffffffffffffffffffffffffffffffffffffffff1660038281548110151561341457fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156134885780838381518110151561347157fe5b906020019060200201818152505081806001019250505b80806001019150506133e1565b829350505050919050565b6000806000806006858154811015156134b557fe5b9060005260206000209060030201905080600001549350806001015492508060020160009054906101000a900463ffffffff169150509193909250565b600d6020528060005260406000206000915090505481565b60008061351a8360006001610f42565b905060058102915050919050565b613530613cc9565b613538613cc9565b60008061354485611408565b6040518059106135515750595b9080825280602002602001820160405250925060009150600090505b600480549050811015613621578473ffffffffffffffffffffffffffffffffffffffff166004828154811015156135a057fe5b906000526020600020906007020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415613614578083838151811015156135fd57fe5b906020019060200201818152505081806001019250505b808060010191505061356d565b829350505050919050565b613634613cc9565b61363c613cc9565b600080600b6000868152602001908152602001600020546040518059106136605750595b9080825280602002602001820160405250925060009150600090505b6005805490508110156136e4578460058281548110151561369957fe5b90600052602060002090600402016000015414156136d7578083838151811015156136c057fe5b906020019060200201818152505081806001019250505b808060010191505061367c565b829350505050919050565b600b6020528060005260406000206000915090505481565b3373ffffffffffffffffffffffffffffffffffffffff1660038581548110151561372d57fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561378157600080fd5b600082141561382657600160038581548110151561379b57fe5b906000526020600020906006020160020160006101000a81548160ff02191690831515021790555060006003858154811015156137d457fe5b906000526020600020906006020160020160016101000a81548160ff0219169083151502179055508260038581548110151561380c57fe5b906000526020600020906006020160010181905550613989565b600182141561390b576000151560038581548110151561384257fe5b906000526020600020906006020160040160009054906101000a900460ff16151514151561386f57600080fd5b600160038581548110151561388057fe5b906000526020600020906006020160020160016101000a81548160ff02191690831515021790555060006003858154811015156138b957fe5b906000526020600020906006020160020160006101000a81548160ff021916908315150217905550806003858154811015156138f157fe5b906000526020600020906006020160030181905550613988565b600282141561398757600060038581548110151561392557fe5b906000526020600020906006020160020160016101000a81548160ff021916908315150217905550600060038581548110151561395e57fe5b906000526020600020906006020160020160006101000a81548160ff0219169083151502179055505b5b5b50505050565b60008060008060008060008060008060008060008060048f8154811015156139b357fe5b9060005260206000209060070201905080600001549d50600381600001548154811015156139dd57fe5b906000526020600020906006020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169c508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169b5080600201549a50806003015499508060040160009054906101000a900460ff1698508060050154975080600601549650613a718f61350a565b9550613a7c8f61176c565b9450613a878f613333565b9350613a928f6132c8565b9250613a9d8f6117d7565b91505091939597999b9d90929496989a9c50565b6000806000809150600090505b600680549050811015613bd057600115158415151415613b4f5784600682815481101515613ae857fe5b906000526020600020906003020160010154148015613b3c575042600682815481101515613b1257fe5b906000526020600020906003020160020160009054906101000a900463ffffffff1663ffffffff16105b15613b4a5781806001019250505b613bc3565b84600682815481101515613b5f57fe5b906000526020600020906003020160010154148015613bb4575042600682815481101515613b8957fe5b906000526020600020906003020160020160009054906101000a900463ffffffff1663ffffffff1610155b15613bc25781806001019250505b5b8080600101915050613abe565b819250505092915050565b600080600080600080600080600389815481101515613bf657fe5b906000526020600020906006020190508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169750806001015496508060020160009054906101000a900460ff1695508060020160019054906101000a900460ff169450806003015493508060040160009054906101000a900460ff1692508060050154915050919395979092949650565b6000600480549050905090565b815481835581811511613cc457600602816006028360005260206000209182019101613cc39190613da5565b5b505050565b602060405190810160405280600081525090565b815481835581811511613d0a57600402816004028360005260206000209182019101613d099190613e3f565b5b505050565b815481835581811511613d3c57600702816007028360005260206000209182019101613d3b9190613e8d565b5b505050565b815481835581811511613d6e57600302816003028360005260206000209182019101613d6d9190613f0f565b5b505050565b815481835581811511613da057600502816005028360005260206000209182019101613d9f9190613f55565b5b505050565b613e3c91905b80821115613e3857600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549060ff021916905560038201600090556004820160006101000a81549060ff0219169055600582016000905550600601613dab565b5090565b90565b613e8a91905b80821115613e8657600080820160009055600182016000905560028201600090556003820160006101000a81549063ffffffff021916905550600401613e45565b5090565b90565b613f0c91905b80821115613f08576000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600282016000905560038201600090556004820160006101000a81549060ff02191690556005820160009055600682016000905550600701613e93565b5090565b90565b613f5291905b80821115613f4e5760008082016000905560018201600090556002820160006101000a81549063ffffffff021916905550600301613f15565b5090565b90565b613f9991905b80821115613f9557600080820160009055600182016000905560028201600090556003820160009055600482016000905550600501613f5b565b5090565b905600a165627a7a72305820965d4cf3a9a20d7b92cb2e77c48345fe9814984a8bc8fa2e39accbe9ddbe375b0029

   Swarm Source:
bzzr://965d4cf3a9a20d7b92cb2e77c48345fe9814984a8bc8fa2e39accbe9ddbe375b

 

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