Contract 0xac52881718493432b40ecbd31d818a60acf97d38

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6d117fc0aaf02d3519eaede9dc941203a56fd33c847c5fba35846e85d54843abStake Batch197369432022-08-08 16:50:2244 mins ago0x49b144d329b096d2772533f936b5fda6ddf8dbdb IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000111929628 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6Mint197369072022-08-08 16:50:2244 mins ago0x49b144d329b096d2772533f936b5fda6ddf8dbdb IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000104435181 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8Mint197357122022-08-08 16:34:081 hr ago0x66d8eaa495d20ba36cd0ee471079707d714a7c19 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000104679293 ETH
0xcef22092b20ee75d080ab267c290c61ab08f25a603391ea6cefd1f1c1ae12012Unstake Batch197342032022-08-08 16:17:171 hr 17 mins ago0xcb37f1fe07988e6ff6c21b28b986fed13ebfa549 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000166424923 ETH
0xbf2bc81141002a399eb13f7655251f8ff1621b5e751a9605a4abd1782b268589Stake Batch197341362022-08-08 16:15:481 hr 18 mins ago0xcb37f1fe07988e6ff6c21b28b986fed13ebfa549 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000165681872 ETH
0x5b6ba5e706951f6b4823fe036227b1c31c05df8fbbb76fbaa7bf83dd10d1de8dMint197338262022-08-08 16:11:311 hr 23 mins ago0xcb37f1fe07988e6ff6c21b28b986fed13ebfa549 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000082693888 ETH
0x5ce20eda7f1f9bd19d59dd5e0a6856e8a03a1da9498e51ba3fd4f704fcd313b6Unstake Batch197337612022-08-08 16:11:311 hr 23 mins ago0xcb37f1fe07988e6ff6c21b28b986fed13ebfa549 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000101077485 ETH
0x49819eb7b16a2bbac1fb5be7702041aed30fe9eb0eab019614a88e6cd3c53accMint197336202022-08-08 16:09:091 hr 25 mins ago0xcb37f1fe07988e6ff6c21b28b986fed13ebfa549 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.00008278248 ETH
0x43b1f97a1d07dbaf59080ecbcd631c01f8d6f6b5b3e4665f334ad7904ee1f88eStake Batch197335272022-08-08 16:08:401 hr 25 mins ago0xcb37f1fe07988e6ff6c21b28b986fed13ebfa549 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000107855904 ETH
0xa1dafe9e45c6641158a8071e73dc81cdd389e2b5ec9829bd20866b1078a2b7afMint197275482022-08-08 14:57:392 hrs 36 mins ago0x70a9c497536e98f2dbb7c66911700fe2b2550900 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000077128498 ETH
0x633be18d9c131f67a6f4774e608fa8de6e2338af7a0d6f453d1ab0434577c22aMint197269162022-08-08 14:48:232 hrs 46 mins ago0x98e82fcbe2ba4fbb9a089654b7f7ea6470a9d876 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000071159309 ETH
0xff345ffe0dbc74d21ba44184386a9a74aaba530511d035eb91cddcad33887d61Stake Batch197261942022-08-08 14:39:502 hrs 54 mins ago0x97520b3d5a30be0d09c114adc8017c2b1ee49e4c IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000071139996 ETH
0xddd478fd246446af7600d4be4e4242708a7fbec00bdb44d67eafd036ba49e656Mint197261142022-08-08 14:38:502 hrs 55 mins ago0x97520b3d5a30be0d09c114adc8017c2b1ee49e4c IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000071413931 ETH
0x8e14f8fa5a081696a216aa553d5401e552cd0a6340eb91d379dcea69268912ebStake Batch197248522022-08-08 14:23:483 hrs 10 mins ago0x002947f3add48ed81d3575bc4e1e9f50744ef856 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000070271351 ETH
0xe96c0b66d832f46ddc3e0249040f5a3d195c4f2d71287131bcee73d1fa877db0Mint197248122022-08-08 14:23:483 hrs 10 mins ago0x002947f3add48ed81d3575bc4e1e9f50744ef856 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000076579184 ETH
0x121e95e4b41c535d0ddd004f3e2bb8c6e54cc6f3cd72ab785d78678282dc2df6Stake Batch197044672022-08-08 10:22:537 hrs 11 mins ago0xf75fb45d296a5822ad68e8b6084a0ad507965313 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000062767781 ETH
0x3aeb2a0b840cc1eb6e0ad7b201f865a66c8ab015bfe39a696b419a7c11b24571Stake Batch197044162022-08-08 10:22:537 hrs 11 mins ago0xb587cbaec20ef78296e1d3b105b5b6aa4ff0c3b4 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000101263398 ETH
0xc1d7b2584f67d9dc150aca4ae33d80a5a46e3eca7aa823d91b63d154fa83d966Mint197043852022-08-08 10:22:367 hrs 11 mins ago0xf75fb45d296a5822ad68e8b6084a0ad507965313 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000063136285 ETH
0xe12fd4a989810d330c98fb6d21e25662f8a1be95f1f818c53ba4a5040da3e8edStake Batch196989152022-08-08 9:18:508 hrs 15 mins ago0xcc0960243d099bcae96c0d1aeacdda01434d2ebc IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000057489144 ETH
0x17229a72cd5e4f0b21efe0f74b1238c97841dac7a1f69e53e3101506c6ce84e7Mint196988532022-08-08 9:18:468 hrs 15 mins ago0xcc0960243d099bcae96c0d1aeacdda01434d2ebc IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000062288832 ETH
0x341942613811a3b19214c026b5fccc417d5c33e16ea436721b29e33ccee31462Stake Batch196951012022-08-08 8:43:118 hrs 51 mins ago0x38ffc1ba00005ba6d5294a364fb583df16d09f9b IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000057489144 ETH
0x99ac7bc55549f2171a8d69a0fd87a59bcc5bbb15739a471b55207389bc671b1eStake Batch196891862022-08-08 7:25:4910 hrs 8 mins ago0x54e6f151504a660cd114b5841fe32e9832f76aa7 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000060047099 ETH
0x240cedfffc1f53e49d6481c771163e5e9d0d8496a4ae34355c4e32ce4c49c36fStake Batch196890632022-08-08 7:25:0510 hrs 9 mins ago0x54e6f151504a660cd114b5841fe32e9832f76aa7 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000059915081 ETH
0xb9998b2fdec39fec5e915ffd7327ec45dee66018d3579cba4e382beb5c604e60Mint196889672022-08-08 7:23:4310 hrs 10 mins ago0x54e6f151504a660cd114b5841fe32e9832f76aa7 IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000060234005 ETH
0x68f7c653686227a1f25e9c110a102b4a7388d9301e4b427299c5ac10da6f59c1Stake Batch196829302022-08-08 5:53:2411 hrs 41 mins ago0x2e3c2c418ac043ae1027a2f1bf8134e36cf6f94c IN  0xac52881718493432b40ecbd31d818a60acf97d380 ETH0.000064889079 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x6d117fc0aaf02d3519eaede9dc941203a56fd33c847c5fba35846e85d54843ab197369432022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x58362cb2dee7074b1dea3f9f34339f500f6123230 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6197369072022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6197369072022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0xce3051ff2ed963406b55ef505751ef88b8f0d7910 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6197369072022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6197369072022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x20251f0ee19917bde625ba9ebf79ad3b7769f6730 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6197369072022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x58362cb2dee7074b1dea3f9f34339f500f6123230 ETH
0x88e15b07235a356b856c5d1818b2f72d95ea7a6f3a8a3af84bd50e80092c8af6197369072022-08-08 16:50:2244 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x4de95c1e202102e22e801590c51d7b979f167fbb0 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8197357122022-08-08 16:34:081 hr ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8197357122022-08-08 16:34:081 hr ago 0xac52881718493432b40ecbd31d818a60acf97d38 0xce3051ff2ed963406b55ef505751ef88b8f0d7910 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8197357122022-08-08 16:34:081 hr ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8197357122022-08-08 16:34:081 hr ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x20251f0ee19917bde625ba9ebf79ad3b7769f6730 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8197357122022-08-08 16:34:081 hr ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x58362cb2dee7074b1dea3f9f34339f500f6123230 ETH
0x53de5cf2b12b7584117ca35abe6ca2efe925ea8b0b4a29b7870e137860247dd8197357122022-08-08 16:34:081 hr ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x4de95c1e202102e22e801590c51d7b979f167fbb0 ETH
0xcef22092b20ee75d080ab267c290c61ab08f25a603391ea6cefd1f1c1ae12012197342032022-08-08 16:17:171 hr 17 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x58362cb2dee7074b1dea3f9f34339f500f6123230 ETH
0xcef22092b20ee75d080ab267c290c61ab08f25a603391ea6cefd1f1c1ae12012197342032022-08-08 16:17:171 hr 17 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x1d3d8f71c87c93103cc02e6895fb4b85e21b14bb0 ETH
0xbf2bc81141002a399eb13f7655251f8ff1621b5e751a9605a4abd1782b268589197341362022-08-08 16:15:481 hr 18 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x58362cb2dee7074b1dea3f9f34339f500f6123230 ETH
0x5b6ba5e706951f6b4823fe036227b1c31c05df8fbbb76fbaa7bf83dd10d1de8d197338262022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x5b6ba5e706951f6b4823fe036227b1c31c05df8fbbb76fbaa7bf83dd10d1de8d197338262022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0xce3051ff2ed963406b55ef505751ef88b8f0d7910 ETH
0x5b6ba5e706951f6b4823fe036227b1c31c05df8fbbb76fbaa7bf83dd10d1de8d197338262022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x5b6ba5e706951f6b4823fe036227b1c31c05df8fbbb76fbaa7bf83dd10d1de8d197338262022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x20251f0ee19917bde625ba9ebf79ad3b7769f6730 ETH
0x5b6ba5e706951f6b4823fe036227b1c31c05df8fbbb76fbaa7bf83dd10d1de8d197338262022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x4de95c1e202102e22e801590c51d7b979f167fbb0 ETH
0x5ce20eda7f1f9bd19d59dd5e0a6856e8a03a1da9498e51ba3fd4f704fcd313b6197337612022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x58362cb2dee7074b1dea3f9f34339f500f6123230 ETH
0x5ce20eda7f1f9bd19d59dd5e0a6856e8a03a1da9498e51ba3fd4f704fcd313b6197337612022-08-08 16:11:311 hr 23 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x1d3d8f71c87c93103cc02e6895fb4b85e21b14bb0 ETH
0x49819eb7b16a2bbac1fb5be7702041aed30fe9eb0eab019614a88e6cd3c53acc197336202022-08-08 16:09:091 hr 25 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0x3240feb8fe823761554948d537892db15df520b00 ETH
0x49819eb7b16a2bbac1fb5be7702041aed30fe9eb0eab019614a88e6cd3c53acc197336202022-08-08 16:09:091 hr 25 mins ago 0xac52881718493432b40ecbd31d818a60acf97d38 0xce3051ff2ed963406b55ef505751ef88b8f0d7910 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CityMinter

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : CityMinter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

import "../Realm/IRealm.sol";
import "./ICity.sol";
import "../RealmLock/IRealmLock.sol";
import "../Collectible/ICollectible.sol";
import "../BatchStaker/IBatchStaker.sol";
import "./ICityStorage.sol";

import "../Manager/ManagerModifier.sol";

contract CityMinter is ReentrancyGuard, Pausable, ManagerModifier {
  //=======================================
  // Immutables
  //=======================================
  IRealm public immutable REALM;
  ICity public immutable CITY;
  IRealmLock public immutable REALM_LOCK;
  ICollectible public immutable COLLECTIBLE;
  IBatchStaker public immutable BATCH_STAKER;
  ICityStorage public immutable CITY_STORAGE;
  address public immutable COLLECTIBLE_HOLDER;

  //=======================================
  // Ints
  //=======================================
  uint256 public collectibleCostPerCity = 10;
  uint256 public maxCities = 15;
  uint256 public hoursPerCity = 24;

  //=======================================
  // Arrays
  //=======================================
  uint256[] public cityRequirements;
  uint256[] public cityRequirementAmounts;

  //=======================================
  // Mappings
  //=======================================
  mapping(uint256 => uint256[]) public primeCollectibles;

  //=======================================
  // Events
  //=======================================
  event Minted(uint256 realmId, uint256 cityId, uint256 quantity);
  event CollectiblesUsed(
    uint256 realmId,
    uint256 collectibleId,
    uint256 amount
  );
  event StakedCities(
    uint256 realmId,
    address addr,
    uint256[] cityIds,
    uint256[] amounts
  );
  event UnstakedCities(
    uint256 realmId,
    address addr,
    uint256[] cityIds,
    uint256[] amounts
  );

  //=======================================
  // Constructor
  //=======================================
  constructor(
    address _realm,
    address _manager,
    address _collectible,
    address _batchStaker,
    address _cityStorage,
    address _city,
    address _realmLock,
    address _collectibleHolder,
    uint256[][] memory _primeCollectible,
    uint256[] memory _cityRequirements,
    uint256[] memory _cityRequirementAmounts
  ) ManagerModifier(_manager) {
    REALM = IRealm(_realm);
    COLLECTIBLE = ICollectible(_collectible);
    BATCH_STAKER = IBatchStaker(_batchStaker);
    CITY_STORAGE = ICityStorage(_cityStorage);
    CITY = ICity(_city);
    REALM_LOCK = IRealmLock(_realmLock);
    COLLECTIBLE_HOLDER = _collectibleHolder;

    primeCollectibles[0] = _primeCollectible[0];
    primeCollectibles[1] = _primeCollectible[1];
    primeCollectibles[2] = _primeCollectible[2];
    primeCollectibles[3] = _primeCollectible[3];
    primeCollectibles[4] = _primeCollectible[4];
    primeCollectibles[5] = _primeCollectible[5];
    primeCollectibles[6] = _primeCollectible[6];

    cityRequirements = _cityRequirements;
    cityRequirementAmounts = _cityRequirementAmounts;
  }

  //=======================================
  // External
  //=======================================
  function mint(
    uint256 _realmId,
    uint256[] calldata _collectibleIds,
    uint256[] calldata _cityIds,
    uint256[] calldata _quantities
  ) external nonReentrant whenNotPaused {
    // Check if Realm owner
    require(
      REALM.ownerOf(_realmId) == msg.sender,
      "CityMinter: Must be Realm owner"
    );

    uint256 totalQuantity;

    for (uint256 j = 0; j < _cityIds.length; j++) {
      uint256 collectibleId = _collectibleIds[j];
      uint256 cityId = _cityIds[j];
      uint256 desiredQuantity = _quantities[j];

      // Check collectibleId is prime collectible
      _checkPrimeCollectibles(cityId, collectibleId);

      // Check city requirements
      _checkCityRequirements(_realmId, cityId);

      // Mint
      _mint(_realmId, cityId, desiredQuantity);

      // Add to quantity
      totalQuantity = totalQuantity + desiredQuantity;

      uint256 collectibleAmount = collectibleCostPerCity * desiredQuantity;

      // Burn collectibles
      COLLECTIBLE.safeTransferFrom(
        msg.sender,
        COLLECTIBLE_HOLDER,
        collectibleId,
        collectibleAmount,
        ""
      );

      emit CollectiblesUsed(_realmId, collectibleId, collectibleAmount);
    }

    // Check if totalQuantity is below max cities
    require(
      totalQuantity <= maxCities,
      "CityMinter: Max cities per transaction reached"
    );

    // Build
    CITY_STORAGE.build(_realmId, totalQuantity * hoursPerCity);
  }

  function stakeBatch(
    uint256[] calldata _realmIds,
    uint256[][] calldata _cityIds,
    uint256[][] calldata _amounts
  ) external nonReentrant whenNotPaused {
    for (uint256 j = 0; j < _realmIds.length; j++) {
      uint256 realmId = _realmIds[j];
      uint256[] memory cityIds = _cityIds[j];
      uint256[] memory amounts = _amounts[j];

      BATCH_STAKER.stakeBatchFor(
        msg.sender,
        address(CITY),
        realmId,
        cityIds,
        amounts
      );

      emit StakedCities(realmId, address(CITY), cityIds, amounts);
    }
  }

  function unstakeBatch(
    uint256[] calldata _realmIds,
    uint256[][] calldata _cityIds,
    uint256[][] calldata _amounts
  ) external nonReentrant whenNotPaused {
    for (uint256 j = 0; j < _realmIds.length; j++) {
      uint256 realmId = _realmIds[j];

      // Check if Realm is locked
      require(REALM_LOCK.isUnlocked(realmId), "CityMinter: Realm is locked");

      uint256[] memory cityIds = _cityIds[j];
      uint256[] memory amounts = _amounts[j];

      BATCH_STAKER.unstakeBatchFor(
        msg.sender,
        address(CITY),
        realmId,
        cityIds,
        amounts
      );

      emit UnstakedCities(realmId, address(CITY), cityIds, amounts);
    }
  }

  //=======================================
  // Admin
  //=======================================
  function pause() external onlyAdmin {
    _pause();
  }

  function unpause() external onlyAdmin {
    _unpause();
  }

  function updateCollectibleCostPerCity(uint256 _collectibleCostPerCity)
    external
    onlyAdmin
  {
    collectibleCostPerCity = _collectibleCostPerCity;
  }

  function updateMaxCities(uint256 _maxCities) external onlyAdmin {
    maxCities = _maxCities;
  }

  function updateHoursPerCity(uint256 _hoursPerCity) external onlyAdmin {
    hoursPerCity = _hoursPerCity;
  }

  function updateCityRequirements(uint256[] calldata _cityRequirements)
    external
    onlyAdmin
  {
    cityRequirements = _cityRequirements;
  }

  function updateCityRequirementAmounts(
    uint256[] calldata _cityRequirementAmounts
  ) external onlyAdmin {
    cityRequirementAmounts = _cityRequirementAmounts;
  }

  //=======================================
  // Internal
  //=======================================
  function _checkCityRequirements(uint256 _realmId, uint256 _cityId)
    internal
    view
  {
    // Town does not require any staked cities
    if (_cityId == 0) return;

    // Check they have right amount of staked cities
    require(
      BATCH_STAKER.hasStaked(
        _realmId,
        address(CITY),
        cityRequirements[_cityId],
        cityRequirementAmounts[_cityId]
      ),
      "CityMinter: Don't have the required Cities staked"
    );
  }

  function _checkPrimeCollectibles(uint256 _cityId, uint256 _collectibleId)
    internal
    view
  {
    bool invalid;

    for (uint256 j = 0; j < primeCollectibles[_cityId].length; j++) {
      // Check collectibleId matches prime collectible IDs
      if (_collectibleId == primeCollectibles[_cityId][j]) {
        invalid = false;
        break;
      }

      invalid = true;
    }

    require(
      !invalid,
      "CityMinter: Collectible doesn't match City requirements"
    );
  }

  function _mint(
    uint256 _realmId,
    uint256 _cityId,
    uint256 _desiredQuantity
  ) internal {
    // Mint
    CITY.mintFor(msg.sender, _cityId, _desiredQuantity);

    // Add Nourishment credits
    CITY_STORAGE.addNourishmentCredit(_realmId, _desiredQuantity);

    emit Minted(_realmId, _cityId, _desiredQuantity);
  }
}

File 2 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 3 of 12 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 12 : IRealm.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface IRealm {
  function balanceOf(address owner) external view returns (uint256);

  function ownerOf(uint256 _realmId) external view returns (address owner);

  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId
  ) external;

  function isApprovedForAll(address owner, address operator)
    external
    returns (bool);

  function realmFeatures(uint256 realmId, uint256 index)
    external
    view
    returns (uint256);
}

File 5 of 12 : ICity.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface ICity {
  function mintFor(
    address _for,
    uint256 _id,
    uint256 _amount
  ) external;

  function mintBatchFor(
    address _for,
    uint256[] calldata _ids,
    uint256[] calldata _amounts
  ) external;

  function burn(uint256 _id, uint256 _amount) external;

  function burnBatch(uint256[] calldata ids, uint256[] calldata amounts)
    external;
}

File 6 of 12 : IRealmLock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface IRealmLock {
  function lock(uint256 _realmId, uint256 _hours) external;

  function unlock(uint256 _realmId) external;

  function isUnlocked(uint256 _realmId) external view returns (bool);
}

File 7 of 12 : ICollectible.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface ICollectible {
  function mintFor(
    address _for,
    uint256 _id,
    uint256 _amount
  ) external;

  function mintBatchFor(
    address _for,
    uint256[] memory _ids,
    uint256[] memory _amounts
  ) external;

  function burn(uint256 _id, uint256 _amount) external;

  function burnBatch(uint256[] memory ids, uint256[] memory amounts) external;

  function safeBatchTransferFrom(
    address _from,
    address _to,
    uint256[] calldata _ids,
    uint256[] calldata _amounts,
    bytes calldata data
  ) external;

  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _ids,
    uint256 _amounts,
    bytes calldata data
  ) external;
}

File 8 of 12 : IBatchStaker.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface IBatchStaker {
  function stakeBatchFor(
    address _staker,
    address _addr,
    uint256 _realmId,
    uint256[] calldata _ids,
    uint256[] calldata _amounts
  ) external;

  function unstakeBatchFor(
    address _staker,
    address _addr,
    uint256 _realmId,
    uint256[] calldata _ids,
    uint256[] calldata _amounts
  ) external;

  function hasStaked(
    uint256 _realmId,
    address _addr,
    uint256 _id,
    uint256 _count
  ) external view returns (bool);
}

File 9 of 12 : ICityStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface ICityStorage {
  function build(uint256 _realmId, uint256 _hours) external;

  function addNourishmentCredit(uint256 _realmId, uint256 _amount) external;

  function canBuild(uint256 _realmId) external view returns (bool);
}

File 10 of 12 : ManagerModifier.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "../Manager/IManager.sol";

abstract contract ManagerModifier {
  //=======================================
  // Immutables
  //=======================================
  IManager public immutable MANAGER;

  //=======================================
  // Constructor
  //=======================================
  constructor(address _manager) {
    MANAGER = IManager(_manager);
  }

  //=======================================
  // Modifiers
  //=======================================
  modifier onlyAdmin() {
    require(MANAGER.isAdmin(msg.sender), "Manager: Not an Admin");
    _;
  }

  modifier onlyManager() {
    require(MANAGER.isManager(msg.sender, 0), "Manager: Not manager");
    _;
  }

  modifier onlyMinter() {
    require(MANAGER.isManager(msg.sender, 1), "Manager: Not minter");
    _;
  }
}

File 11 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 12 of 12 : IManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface IManager {
  function isAdmin(address _addr) external view returns (bool);

  function isManager(address _addr, uint256 _type) external view returns (bool);

  function addManager(address _addr, uint256 _type) external;

  function removeManager(address _addr, uint256 _type) external;

  function addAdmin(address _addr) external;

  function removeAdmin(address _addr) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_realm","type":"address"},{"internalType":"address","name":"_manager","type":"address"},{"internalType":"address","name":"_collectible","type":"address"},{"internalType":"address","name":"_batchStaker","type":"address"},{"internalType":"address","name":"_cityStorage","type":"address"},{"internalType":"address","name":"_city","type":"address"},{"internalType":"address","name":"_realmLock","type":"address"},{"internalType":"address","name":"_collectibleHolder","type":"address"},{"internalType":"uint256[][]","name":"_primeCollectible","type":"uint256[][]"},{"internalType":"uint256[]","name":"_cityRequirements","type":"uint256[]"},{"internalType":"uint256[]","name":"_cityRequirementAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"realmId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"collectibleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CollectiblesUsed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"realmId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cityId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"realmId","type":"uint256"},{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"cityIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"StakedCities","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"realmId","type":"uint256"},{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"cityIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"UnstakedCities","type":"event"},{"inputs":[],"name":"BATCH_STAKER","outputs":[{"internalType":"contract IBatchStaker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CITY","outputs":[{"internalType":"contract ICity","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CITY_STORAGE","outputs":[{"internalType":"contract ICityStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COLLECTIBLE","outputs":[{"internalType":"contract ICollectible","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COLLECTIBLE_HOLDER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER","outputs":[{"internalType":"contract IManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REALM","outputs":[{"internalType":"contract IRealm","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REALM_LOCK","outputs":[{"internalType":"contract IRealmLock","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cityRequirementAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cityRequirements","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectibleCostPerCity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hoursPerCity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCities","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_realmId","type":"uint256"},{"internalType":"uint256[]","name":"_collectibleIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_cityIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"primeCollectibles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_realmIds","type":"uint256[]"},{"internalType":"uint256[][]","name":"_cityIds","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_amounts","type":"uint256[][]"}],"name":"stakeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_realmIds","type":"uint256[]"},{"internalType":"uint256[][]","name":"_cityIds","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_amounts","type":"uint256[][]"}],"name":"unstakeBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_cityRequirementAmounts","type":"uint256[]"}],"name":"updateCityRequirementAmounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_cityRequirements","type":"uint256[]"}],"name":"updateCityRequirements","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectibleCostPerCity","type":"uint256"}],"name":"updateCollectibleCostPerCity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_hoursPerCity","type":"uint256"}],"name":"updateHoursPerCity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxCities","type":"uint256"}],"name":"updateMaxCities","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610180604052600a600255600f60035560186004553480156200002157600080fd5b50604051620025343803806200253483398101604081905262000044916200053f565b60016000818155815460ff19169091556001600160601b031960608c811b82166080528d811b821660a0528b811b8216610100528a811b82166101205289811b82166101405288811b821660c05287811b821660e05286901b16610160528351849190620000c257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516000805260078252805162000107927f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df920190620003bb565b50826001815181106200012a57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600160005260078252805162000170927fb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b828920190620003bb565b50826002815181106200019357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516002600052600782528051620001d9927fb7c774451310d1be4108bc180d1b52823cb0ee0274a6c0081bcaf94f115fb96d920190620003bb565b5082600381518110620001fc57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600360005260078252805162000242927f3be6fd20d5acfde5b873b48692cd31f4d3c7e8ee8a813af4696af8859e5ca6c6920190620003bb565b50826004815181106200026557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516004600052600782528051620002ab927fb805995a7ec585a251200611a61d179cfd7fb105e1ab17dc415a7336783786f7920190620003bb565b5082600581518110620002ce57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600560005260078252805162000314927fbcdda56b5d08466ec462cbbe0adfa57cb0a15fcc8940ef68f702f21b787bc935920190620003bb565b50826006815181106200033757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160066000526007825280516200037d927f55c5b153ab560fcde54a63b18c7f53d75501706907cef8767fbded79ab9997c7920190620003bb565b50815162000393906005906020850190620003bb565b508051620003a9906006906020840190620003bb565b505050505050505050505050620006e3565b828054828255906000526020600020908101928215620003f9579160200282015b82811115620003f9578251825591602001919060010190620003dc565b50620004079291506200040b565b5090565b5b808211156200040757600081556001016200040c565b80516001600160a01b03811681146200043a57600080fd5b919050565b600082601f83011262000450578081fd5b81516020620004696200046383620006a7565b62000674565b80838252828201915082860187848660051b890101111562000489578586fd5b855b85811015620004ce5781516001600160401b03811115620004aa578788fd5b620004ba8a87838c0101620004db565b85525092840192908401906001016200048b565b5090979650505050505050565b600082601f830112620004ec578081fd5b81516020620004ff6200046383620006a7565b80838252828201915082860187848660051b89010111156200051f578586fd5b855b85811015620004ce5781518452928401929084019060010162000521565b60008060008060008060008060008060006101608c8e03121562000561578687fd5b6200056c8c62000422565b9a506200057c60208d0162000422565b99506200058c60408d0162000422565b98506200059c60608d0162000422565b9750620005ac60808d0162000422565b9650620005bc60a08d0162000422565b9550620005cc60c08d0162000422565b9450620005dc60e08d0162000422565b6101008d01519094506001600160401b03811115620005f9578384fd5b620006078e828f016200043f565b6101208e015190945090506001600160401b0381111562000626578283fd5b620006348e828f01620004db565b6101408e015190935090506001600160401b0381111562000653578182fd5b620006618e828f01620004db565b9150509295989b509295989b9093969950565b604051601f8201601f191681016001600160401b03811182821017156200069f576200069f620006cd565b604052919050565b60006001600160401b03821115620006c357620006c3620006cd565b5060051b60200190565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c6101605160601c611d39620007fb60003960008181610351015261084c01526000818161032a015281816109c001526116b40152600081816102e801528181610e5f0152818161127b01526114770152600081816103ba01526108930152600081816102100152610c9101526000818161019201528181610e8f01528181610f13015281816112ab0152818161132f015281816114a701526116350152600081816102ae01526106970152600081816101d601528181610404015281816104c50152818161058901528181610a7601528181610b6401528181610f8501526110710152611d396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806379604a17116100de578063a46c6ec111610097578063e09f3b1611610071578063e09f3b161461038f578063e34ed27d146103a2578063e80d2cc2146103b5578063ecc5ef00146103dc57600080fd5b8063a46c6ec11461034c578063abf3658e14610373578063c4fc930c1461037c57600080fd5b806379604a17146102a95780637b6b95b7146102d057806380c08107146102e357806382554cf31461030a5780638456cb591461031d5780639047ff201461032557600080fd5b806332b9a42b1161013057806332b9a42b146102455780633f4ba83a146102585780635c975abb14610260578063679ab47c146102765780636b3ef0ce146102975780637359430f146102a057600080fd5b806305b03b3a1461017857806308675cd31461018d5780631b2df850146101d157806327c63e2d146101f857806328d1ce761461020b5780632aef7f4514610232575b600080fd5b61018b610186366004611a18565b6103ef565b005b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b61018b610206366004611922565b6104b0565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b61018b610240366004611a18565b610574565b61018b610253366004611a30565b61062c565b61018b610a61565b60015460ff1660405190151581526020016101c8565b610289610284366004611ad0565b610b1e565b6040519081526020016101c8565b61028960035481565b61028960045481565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b61018b6102de366004611922565b610b4f565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b61018b610318366004611962565b610c0e565b61018b610f70565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b61028960025481565b61028961038a366004611a18565b61102b565b61028961039d366004611a18565b61104c565b61018b6103b0366004611a18565b61105c565b6101b47f000000000000000000000000000000000000000000000000000000000000000081565b61018b6103ea366004611962565b611114565b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b15801561044e57600080fd5b505afa158015610462573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048691906119f8565b6104ab5760405162461bcd60e51b81526004016104a290611bdd565b60405180910390fd5b600455565b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b15801561050f57600080fd5b505afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054791906119f8565b6105635760405162461bcd60e51b81526004016104a290611bdd565b61056f6006838361184a565b505050565b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b1580156105d357600080fd5b505afa1580156105e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060b91906119f8565b6106275760405162461bcd60e51b81526004016104a290611bdd565b600255565b6002600054141561064f5760405162461bcd60e51b81526004016104a290611ba6565b600260005560015460ff16156106775760405162461bcd60e51b81526004016104a290611b7c565b6040516331a9108f60e11b81526004810188905233906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e9060240160206040518083038186803b1580156106d957600080fd5b505afa1580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071191906118f4565b6001600160a01b0316146107675760405162461bcd60e51b815260206004820152601f60248201527f436974794d696e7465723a204d757374206265205265616c6d206f776e65720060448201526064016104a2565b6000805b8481101561095457600088888381811061079557634e487b7160e01b600052603260045260246000fd5b90506020020135905060008787848181106107c057634e487b7160e01b600052603260045260246000fd5b90506020020135905060008686858181106107eb57634e487b7160e01b600052603260045260246000fd5b9050602002013590506107fe828461137e565b6108088c8361146c565b6108138c8383611612565b61081d8186611c9b565b945060008160025461082f9190611cb3565b604051637921219560e11b81523360048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018790526064820183905260a06084830152600060a48301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063f242432a9060c401600060405180830381600087803b1580156108d957600080fd5b505af11580156108ed573d6000803e3d6000fd5b505050507f97835d42100fa0e45cd58577ffd701f2343d3933b1d68b091ee64b0d59b2ce538d8583604051610935939291909283526020830191909152604082015260600190565b60405180910390a150505050808061094c90611cd2565b91505061076b565b506003548111156109be5760405162461bcd60e51b815260206004820152602e60248201527f436974794d696e7465723a204d61782063697469657320706572207472616e7360448201526d1858dd1a5bdb881c995858da195960921b60648201526084016104a2565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663271acaf389600454846109fc9190611cb3565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015610a3a57600080fd5b505af1158015610a4e573d6000803e3d6000fd5b5050600160005550505050505050505050565b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b158015610ac057600080fd5b505afa158015610ad4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af891906119f8565b610b145760405162461bcd60e51b81526004016104a290611bdd565b610b1c611761565b565b60076020528160005260406000208181548110610b3a57600080fd5b90600052602060002001600091509150505481565b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b158015610bae57600080fd5b505afa158015610bc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be691906119f8565b610c025760405162461bcd60e51b81526004016104a290611bdd565b61056f6005838361184a565b60026000541415610c315760405162461bcd60e51b81526004016104a290611ba6565b600260005560015460ff1615610c595760405162461bcd60e51b81526004016104a290611b7c565b60005b85811015610f62576000878783818110610c8657634e487b7160e01b600052603260045260246000fd5b9050602002013590507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166372abc8b7826040518263ffffffff1660e01b8152600401610cdd91815260200190565b60206040518083038186803b158015610cf557600080fd5b505afa158015610d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2d91906119f8565b610d795760405162461bcd60e51b815260206004820152601b60248201527f436974794d696e7465723a205265616c6d206973206c6f636b6564000000000060448201526064016104a2565b6000868684818110610d9b57634e487b7160e01b600052603260045260246000fd5b9050602002810190610dad9190611c53565b808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250939450889250879150869050818110610e0357634e487b7160e01b600052603260045260246000fd5b9050602002810190610e159190611c53565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516329d421bd60e21b8152929350506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a75086f49150610ebd9033907f000000000000000000000000000000000000000000000000000000000000000090889088908890600401611b2b565b600060405180830381600087803b158015610ed757600080fd5b505af1158015610eeb573d6000803e3d6000fd5b505050507fbd2824e0e6ab7345c668ad4a2c04d7544cdfde7807cf459acfa25bb83c365c92837f00000000000000000000000000000000000000000000000000000000000000008484604051610f449493929190611c0c565b60405180910390a15050508080610f5a90611cd2565b915050610c5c565b505060016000555050505050565b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b158015610fcf57600080fd5b505afa158015610fe3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100791906119f8565b6110235760405162461bcd60e51b81526004016104a290611bdd565b610b1c6117f4565b6005818154811061103b57600080fd5b600091825260209091200154905081565b6006818154811061103b57600080fd5b604051630935e01b60e21b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906324d7806c9060240160206040518083038186803b1580156110bb57600080fd5b505afa1580156110cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f391906119f8565b61110f5760405162461bcd60e51b81526004016104a290611bdd565b600355565b600260005414156111375760405162461bcd60e51b81526004016104a290611ba6565b600260005560015460ff161561115f5760405162461bcd60e51b81526004016104a290611b7c565b60005b85811015610f6257600087878381811061118c57634e487b7160e01b600052603260045260246000fd5b90506020020135905060008686848181106111b757634e487b7160e01b600052603260045260246000fd5b90506020028101906111c99190611c53565b80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093945088925087915086905081811061121f57634e487b7160e01b600052603260045260246000fd5b90506020028101906112319190611c53565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060405163f959732760e01b8152929350506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163f959732791506112d99033907f000000000000000000000000000000000000000000000000000000000000000090889088908890600401611b2b565b600060405180830381600087803b1580156112f357600080fd5b505af1158015611307573d6000803e3d6000fd5b505050507f40abae93f555c0f311afc454253786c0a6f03454b533a2682dd168160547e848837f000000000000000000000000000000000000000000000000000000000000000084846040516113609493929190611c0c565b60405180910390a1505050808061137690611cd2565b915050611162565b6000805b6000848152600760205260409020548110156113f75760008481526007602052604090208054829081106113c657634e487b7160e01b600052603260045260246000fd5b90600052602060002001548314156113e157600091506113f7565b60019150806113ef81611cd2565b915050611382565b50801561056f5760405162461bcd60e51b815260206004820152603760248201527f436974794d696e7465723a20436f6c6c65637469626c6520646f65736e27742060448201527f6d61746368204369747920726571756972656d656e747300000000000000000060648201526084016104a2565b80611475575050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639ded5a82837f0000000000000000000000000000000000000000000000000000000000000000600585815481106114e757634e487b7160e01b600052603260045260246000fd5b90600052602060002001546006868154811061151357634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516001600160e01b031960e087901b16815260048101949094526001600160a01b0390921660248401526044830152606482015260840160206040518083038186803b15801561157057600080fd5b505afa158015611584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a891906119f8565b61160e5760405162461bcd60e51b815260206004820152603160248201527f436974794d696e7465723a20446f6e27742068617665207468652072657175696044820152701c99590810da5d1a595cc81cdd185ad959607a1b60648201526084016104a2565b5050565b60405163aab68bdb60e01b815233600482015260248101839052604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063aab68bdb90606401600060405180830381600087803b15801561168157600080fd5b505af1158015611695573d6000803e3d6000fd5b50506040516315e93d7160e31b815260048101869052602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063af49eb889150604401600060405180830381600087803b15801561170257600080fd5b505af1158015611716573d6000803e3d6000fd5b505060408051868152602081018690529081018490527f488bbf7ce8682b98371a0bb07d4e838ce2e533a907ceda8ac6ee658fdbd162e09250606001905060405180910390a1505050565b60015460ff166117aa5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104a2565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16156118175760405162461bcd60e51b81526004016104a290611b7c565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258336117d7565b828054828255906000526020600020908101928215611885579160200282015b8281111561188557823582559160200191906001019061186a565b50611891929150611895565b5090565b5b808211156118915760008155600101611896565b60008083601f8401126118bb578182fd5b50813567ffffffffffffffff8111156118d2578182fd5b6020830191508360208260051b85010111156118ed57600080fd5b9250929050565b600060208284031215611905578081fd5b81516001600160a01b038116811461191b578182fd5b9392505050565b60008060208385031215611934578081fd5b823567ffffffffffffffff81111561194a578182fd5b611956858286016118aa565b90969095509350505050565b6000806000806000806060878903121561197a578182fd5b863567ffffffffffffffff80821115611991578384fd5b61199d8a838b016118aa565b909850965060208901359150808211156119b5578384fd5b6119c18a838b016118aa565b909650945060408901359150808211156119d9578384fd5b506119e689828a016118aa565b979a9699509497509295939492505050565b600060208284031215611a09578081fd5b8151801515811461191b578182fd5b600060208284031215611a29578081fd5b5035919050565b60008060008060008060006080888a031215611a4a578081fd5b87359650602088013567ffffffffffffffff80821115611a68578283fd5b611a748b838c016118aa565b909850965060408a0135915080821115611a8c578283fd5b611a988b838c016118aa565b909650945060608a0135915080821115611ab0578283fd5b50611abd8a828b016118aa565b989b979a50959850939692959293505050565b60008060408385031215611ae2578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015611b2057815187529582019590820190600101611b04565b509495945050505050565b6001600160a01b038681168252851660208201526040810184905260a060608201819052600090611b5e90830185611af1565b8281036080840152611b708185611af1565b98975050505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526015908201527426b0b730b3b2b91d102737ba1030b71020b236b4b760591b604082015260600190565b8481526001600160a01b0384166020820152608060408201819052600090611c3690830185611af1565b8281036060840152611c488185611af1565b979650505050505050565b6000808335601e19843603018112611c69578283fd5b83018035915067ffffffffffffffff821115611c83578283fd5b6020019150600581901b36038213156118ed57600080fd5b60008219821115611cae57611cae611ced565b500190565b6000816000190483118215151615611ccd57611ccd611ced565b500290565b6000600019821415611ce657611ce6611ced565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220ca427c58208d8e5790fc1db7d9ae11de710ad65afefa1f70ca23511df5c2533e64736f6c634300080400330000000000000000000000004de95c1e202102e22e801590c51d7b979f167fbb0000000000000000000000004e572433a3bfa336b6396d13afc9f69b58252861000000000000000000000000ce3051ff2ed963406b55ef505751ef88b8f0d79100000000000000000000000058362cb2dee7074b1dea3f9f34339f500f6123230000000000000000000000003240feb8fe823761554948d537892db15df520b000000000000000000000000020251f0ee19917bde625ba9ebf79ad3b7769f6730000000000000000000000001d3d8f71c87c93103cc02e6895fb4b85e21b14bb000000000000000000000000106d0fd9321d63627cf813c30622ee251c773b7b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000004800000000000000000000000000000000000000000000000000000000000000580000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000023000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000270000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007

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

0000000000000000000000004de95c1e202102e22e801590c51d7b979f167fbb0000000000000000000000004e572433a3bfa336b6396d13afc9f69b58252861000000000000000000000000ce3051ff2ed963406b55ef505751ef88b8f0d79100000000000000000000000058362cb2dee7074b1dea3f9f34339f500f6123230000000000000000000000003240feb8fe823761554948d537892db15df520b000000000000000000000000020251f0ee19917bde625ba9ebf79ad3b7769f6730000000000000000000000001d3d8f71c87c93103cc02e6895fb4b85e21b14bb000000000000000000000000106d0fd9321d63627cf813c30622ee251c773b7b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000004800000000000000000000000000000000000000000000000000000000000000580000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000023000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000270000000000000000000000000000000000000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000007
-----Encoded View---------------
52 Constructor Arguments found :
Arg [0] : 0000000000000000000000004de95c1e202102e22e801590c51d7b979f167fbb
Arg [1] : 0000000000000000000000004e572433a3bfa336b6396d13afc9f69b58252861
Arg [2] : 000000000000000000000000ce3051ff2ed963406b55ef505751ef88b8f0d791
Arg [3] : 00000000000000000000000058362cb2dee7074b1dea3f9f34339f500f612323
Arg [4] : 0000000000000000000000003240feb8fe823761554948d537892db15df520b0
Arg [5] : 00000000000000000000000020251f0ee19917bde625ba9ebf79ad3b7769f673
Arg [6] : 0000000000000000000000001d3d8f71c87c93103cc02e6895fb4b85e21b14bb
Arg [7] : 000000000000000000000000106d0fd9321d63627cf813c30622ee251c773b7b
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000480
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000580
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [12] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [14] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [18] : 00000000000000000000000000000000000000000000000000000000000002c0
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [20] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [21] : 000000000000000000000000000000000000000000000000000000000000001f
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000021
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000022
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000023
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [29] : 0000000000000000000000000000000000000000000000000000000000000024
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [31] : 0000000000000000000000000000000000000000000000000000000000000025
Arg [32] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [33] : 0000000000000000000000000000000000000000000000000000000000000026
Arg [34] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [35] : 0000000000000000000000000000000000000000000000000000000000000027
Arg [36] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [37] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [38] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [39] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [40] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [41] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [42] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [43] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [44] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [45] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [46] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [47] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [48] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [49] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [50] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [51] : 0000000000000000000000000000000000000000000000000000000000000007


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.