ETH Price: $2,256.94 (-1.02%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EstateRegistry

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-08-30
*/

pragma solidity ^0.4.24;

// File: contracts/estate/EstateStorage.sol

contract LANDRegistry {
  function ping() public;
  function ownerOf(uint256 tokenId) public returns (address);
  function safeTransferFrom(address, address, uint256) public;
  function decodeTokenId(uint value) external pure returns (int, int);
  function updateLandData(int x, int y, string data) external;
}


contract EstateStorage {
  bytes4 internal constant InterfaceId_GetMetadata = bytes4(keccak256("getMetadata(uint256)"));

  LANDRegistry public registry;

  // From Estate to list of owned LAND ids (LANDs)
  mapping(uint256 => uint256[]) public estateLandIds;

  // From LAND id (LAND) to its owner Estate id
  mapping(uint256 => uint256) public landIdEstate;

  // From Estate id to mapping of LAND id to index on the array above (estateLandIds)
  mapping(uint256 => mapping(uint256 => uint256)) public estateLandIndex;

  // Metadata of the Estate
  mapping(uint256 => string) internal estateData;

  // Operator of the Estate
  mapping (uint256 => address) internal updateOperator;
}

// File: contracts/estate/IEstateRegistry.sol

contract IEstateRegistry {
  function mint(address to, string metadata) external returns (uint256);

  // Events

  event CreateEstate(
    address indexed _owner,
    uint256 indexed _estateId,
    string _data
  );

  event AddLand(
    uint256 indexed _estateId,
    uint256 indexed _landId
  );

  event RemoveLand(
    uint256 indexed _estateId,
    uint256 indexed _landId,
    address indexed _destinatary
  );

  event Update(
    uint256 indexed _assetId,
    address indexed _holder,
    address indexed _operator,
    string _data
  );

  event UpdateOperator(
    uint256 indexed _estateId,
    address indexed _operator
  );

  event SetLANDRegistry(
    address indexed _registry
  );
}

// File: zos-lib/contracts/migrations/Migratable.sol

/**
 * @title Migratable
 * Helper contract to support intialization and migration schemes between
 * different implementations of a contract in the context of upgradeability.
 * To use it, replace the constructor with a function that has the
 * `isInitializer` modifier starting with `"0"` as `migrationId`.
 * When you want to apply some migration code during an upgrade, increase
 * the `migrationId`. Or, if the migration code must be applied only after
 * another migration has been already applied, use the `isMigration` modifier.
 * This helper supports multiple inheritance.
 * WARNING: It is the developer's responsibility to ensure that migrations are
 * applied in a correct order, or that they are run at all.
 * See `Initializable` for a simpler version.
 */
contract Migratable {
  /**
   * @dev Emitted when the contract applies a migration.
   * @param contractName Name of the Contract.
   * @param migrationId Identifier of the migration applied.
   */
  event Migrated(string contractName, string migrationId);

  /**
   * @dev Mapping of the already applied migrations.
   * (contractName => (migrationId => bool))
   */
  mapping (string => mapping (string => bool)) internal migrated;

  /**
   * @dev Internal migration id used to specify that a contract has already been initialized.
   */
  string constant private INITIALIZED_ID = "initialized";


  /**
   * @dev Modifier to use in the initialization function of a contract.
   * @param contractName Name of the contract.
   * @param migrationId Identifier of the migration.
   */
  modifier isInitializer(string contractName, string migrationId) {
    validateMigrationIsPending(contractName, INITIALIZED_ID);
    validateMigrationIsPending(contractName, migrationId);
    _;
    emit Migrated(contractName, migrationId);
    migrated[contractName][migrationId] = true;
    migrated[contractName][INITIALIZED_ID] = true;
  }

  /**
   * @dev Modifier to use in the migration of a contract.
   * @param contractName Name of the contract.
   * @param requiredMigrationId Identifier of the previous migration, required
   * to apply new one.
   * @param newMigrationId Identifier of the new migration to be applied.
   */
  modifier isMigration(string contractName, string requiredMigrationId, string newMigrationId) {
    require(isMigrated(contractName, requiredMigrationId), "Prerequisite migration ID has not been run yet");
    validateMigrationIsPending(contractName, newMigrationId);
    _;
    emit Migrated(contractName, newMigrationId);
    migrated[contractName][newMigrationId] = true;
  }

  /**
   * @dev Returns true if the contract migration was applied.
   * @param contractName Name of the contract.
   * @param migrationId Identifier of the migration.
   * @return true if the contract migration was applied, false otherwise.
   */
  function isMigrated(string contractName, string migrationId) public view returns(bool) {
    return migrated[contractName][migrationId];
  }

  /**
   * @dev Initializer that marks the contract as initialized.
   * It is important to run this if you had deployed a previous version of a Migratable contract.
   * For more information see https://github.com/zeppelinos/zos-lib/issues/158.
   */
  function initialize() isInitializer("Migratable", "1.2.1") public {
  }

  /**
   * @dev Reverts if the requested migration was already executed.
   * @param contractName Name of the contract.
   * @param migrationId Identifier of the migration.
   */
  function validateMigrationIsPending(string contractName, string migrationId) private view {
    require(!isMigrated(contractName, migrationId), "Requested target migration ID has already been run");
  }
}

// File: openzeppelin-zos/contracts/ownership/Ownable.sol

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable is Migratable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function initialize(address _sender) public isInitializer("Ownable", "1.9.0") {
    owner = _sender;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

// File: openzeppelin-zos/contracts/token/ERC721/ERC721Receiver.sol

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract ERC721Receiver {
  /**
   * @dev Magic value to be returned upon successful reception of an NFT
   *  Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`,
   *  which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
   */
  bytes4 internal constant ERC721_RECEIVED = 0x150b7a02;

  /**
   * @notice Handle the receipt of an NFT
   * @dev The ERC721 smart contract calls this function on the recipient
   * after a `safetransfer`. This function MAY throw to revert and reject the
   * transfer. Return of other than the magic value MUST result in the 
   * transaction being reverted.
   * Note: the contract address is always the message sender.
   * @param _operator The address which called `safeTransferFrom` function
   * @param _from The address which previously owned the token
   * @param _tokenId The NFT identifier which is being transfered
   * @param _data Additional data with no specified format
   * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
   */
  function onERC721Received(
    address _operator,
    address _from,
    uint256 _tokenId,
    bytes _data
  )
    public
    returns(bytes4);
}

// File: openzeppelin-zos/contracts/introspection/ERC165.sol

/**
 * @title ERC165
 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
interface ERC165 {

  /**
   * @notice Query if a contract implements an interface
   * @param _interfaceId The interface identifier, as specified in ERC-165
   * @dev Interface identification is specified in ERC-165. This function
   * uses less than 30,000 gas.
   */
  function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool);
}

// File: openzeppelin-zos/contracts/token/ERC721/ERC721Basic.sol

/**
 * @title ERC721 Non-Fungible Token Standard basic interface
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Basic is ERC165 {
  event Transfer(
    address indexed _from,
    address indexed _to,
    uint256 indexed _tokenId
  );
  event Approval(
    address indexed _owner,
    address indexed _approved,
    uint256 indexed _tokenId
  );
  event ApprovalForAll(
    address indexed _owner,
    address indexed _operator,
    bool _approved
  );

  function balanceOf(address _owner) public view returns (uint256 _balance);
  function ownerOf(uint256 _tokenId) public view returns (address _owner);
  function exists(uint256 _tokenId) public view returns (bool _exists);

  function approve(address _to, uint256 _tokenId) public;
  function getApproved(uint256 _tokenId)
    public view returns (address _operator);

  function setApprovalForAll(address _operator, bool _approved) public;
  function isApprovedForAll(address _owner, address _operator)
    public view returns (bool);

  function transferFrom(address _from, address _to, uint256 _tokenId) public;
  function safeTransferFrom(address _from, address _to, uint256 _tokenId)
    public;

  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    public;
}

// File: openzeppelin-zos/contracts/token/ERC721/ERC721.sol

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Enumerable is ERC721Basic {
  function totalSupply() public view returns (uint256);
  function tokenOfOwnerByIndex(
    address _owner,
    uint256 _index
  )
    public
    view
    returns (uint256 _tokenId);

  function tokenByIndex(uint256 _index) public view returns (uint256);
}


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Metadata is ERC721Basic {
  function name() external view returns (string _name);
  function symbol() external view returns (string _symbol);
  function tokenURI(uint256 _tokenId) public view returns (string);
}


/**
 * @title ERC-721 Non-Fungible Token Standard, full implementation interface
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721 is ERC721Basic, ERC721Enumerable, ERC721Metadata {
}

// File: openzeppelin-zos/contracts/AddressUtils.sol

/**
 * Utility library of inline functions on addresses
 */
library AddressUtils {

  /**
   * Returns whether the target address is a contract
   * @dev This function will return false if invoked during the constructor of a contract,
   *  as the code is not actually created until after the constructor finishes.
   * @param addr address to check
   * @return whether the target address is a contract
   */
  function isContract(address addr) internal view returns (bool) {
    uint256 size;
    // XXX Currently there is no better way to check if there is a contract in an address
    // than to check the size of the code at that address.
    // See https://ethereum.stackexchange.com/a/14016/36603
    // for more details about how this works.
    // TODO Check this again before the Serenity release, because all addresses will be
    // contracts then.
    assembly { size := extcodesize(addr) }  // solium-disable-line security/no-inline-assembly
    return size > 0;
  }

}

// File: openzeppelin-zos/contracts/introspection/ERC165Support.sol

/**
 * @title ERC165Support
 * @dev Implements ERC165 returning true for ERC165 interface identifier
 */
contract ERC165Support is ERC165 {

  bytes4 internal constant InterfaceId_ERC165 = 0x01ffc9a7;
  /**
   * 0x01ffc9a7 ===
   *   bytes4(keccak256('supportsInterface(bytes4)'))
   */

  function supportsInterface(bytes4 _interfaceId)
    external
    view
    returns (bool) 
  {
    return _supportsInterface(_interfaceId);
  }

  function _supportsInterface(bytes4 _interfaceId)
    internal
    view
    returns (bool) 
  {
    return _interfaceId == InterfaceId_ERC165;
  }
}

// File: openzeppelin-zos/contracts/math/SafeMath.sol

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

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    assert(c / a == b);
    return c;
  }

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

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

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

// File: openzeppelin-zos/contracts/token/ERC721/ERC721BasicToken.sol

/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721BasicToken is ERC165Support, ERC721Basic {

  bytes4 private constant InterfaceId_ERC721 = 0x80ac58cd;
  /*
   * 0x80ac58cd ===
   *   bytes4(keccak256('balanceOf(address)')) ^
   *   bytes4(keccak256('ownerOf(uint256)')) ^
   *   bytes4(keccak256('approve(address,uint256)')) ^
   *   bytes4(keccak256('getApproved(uint256)')) ^
   *   bytes4(keccak256('setApprovalForAll(address,bool)')) ^
   *   bytes4(keccak256('isApprovedForAll(address,address)')) ^
   *   bytes4(keccak256('transferFrom(address,address,uint256)')) ^
   *   bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^
   *   bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)'))
   */

  bytes4 private constant InterfaceId_ERC721Exists = 0x4f558e79;
  /*
   * 0x4f558e79 ===
   *   bytes4(keccak256('exists(uint256)'))
   */

  using SafeMath for uint256;
  using AddressUtils for address;

  // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
  // which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
  bytes4 private constant ERC721_RECEIVED = 0x150b7a02;

  // Mapping from token ID to owner
  mapping (uint256 => address) internal tokenOwner;

  // Mapping from token ID to approved address
  mapping (uint256 => address) internal tokenApprovals;

  // Mapping from owner to number of owned token
  mapping (address => uint256) internal ownedTokensCount;

  // Mapping from owner to operator approvals
  mapping (address => mapping (address => bool)) internal operatorApprovals;

  /**
   * @dev Guarantees msg.sender is owner of the given token
   * @param _tokenId uint256 ID of the token to validate its ownership belongs to msg.sender
   */
  modifier onlyOwnerOf(uint256 _tokenId) {
    require(ownerOf(_tokenId) == msg.sender);
    _;
  }

  /**
   * @dev Checks msg.sender can transfer a token, by being owner, approved, or operator
   * @param _tokenId uint256 ID of the token to validate
   */
  modifier canTransfer(uint256 _tokenId) {
    require(isApprovedOrOwner(msg.sender, _tokenId));
    _;
  }

  function _supportsInterface(bytes4 _interfaceId)
    internal
    view
    returns (bool)
  {
    return super._supportsInterface(_interfaceId) || 
      _interfaceId == InterfaceId_ERC721 || _interfaceId == InterfaceId_ERC721Exists;
  }

  /**
   * @dev Gets the balance of the specified address
   * @param _owner address to query the balance of
   * @return uint256 representing the amount owned by the passed address
   */
  function balanceOf(address _owner) public view returns (uint256) {
    require(_owner != address(0));
    return ownedTokensCount[_owner];
  }

  /**
   * @dev Gets the owner of the specified token ID
   * @param _tokenId uint256 ID of the token to query the owner of
   * @return owner address currently marked as the owner of the given token ID
   */
  function ownerOf(uint256 _tokenId) public view returns (address) {
    address owner = tokenOwner[_tokenId];
    require(owner != address(0));
    return owner;
  }

  /**
   * @dev Returns whether the specified token exists
   * @param _tokenId uint256 ID of the token to query the existence of
   * @return whether the token exists
   */
  function exists(uint256 _tokenId) public view returns (bool) {
    address owner = tokenOwner[_tokenId];
    return owner != address(0);
  }

  /**
   * @dev Approves another address to transfer the given token ID
   * The zero address indicates there is no approved address.
   * There can only be one approved address per token at a given time.
   * Can only be called by the token owner or an approved operator.
   * @param _to address to be approved for the given token ID
   * @param _tokenId uint256 ID of the token to be approved
   */
  function approve(address _to, uint256 _tokenId) public {
    address owner = ownerOf(_tokenId);
    require(_to != owner);
    require(msg.sender == owner || isApprovedForAll(owner, msg.sender));

    tokenApprovals[_tokenId] = _to;
    emit Approval(owner, _to, _tokenId);
  }

  /**
   * @dev Gets the approved address for a token ID, or zero if no address set
   * @param _tokenId uint256 ID of the token to query the approval of
   * @return address currently approved for the given token ID
   */
  function getApproved(uint256 _tokenId) public view returns (address) {
    return tokenApprovals[_tokenId];
  }

  /**
   * @dev Sets or unsets the approval of a given operator
   * An operator is allowed to transfer all tokens of the sender on their behalf
   * @param _to operator address to set the approval
   * @param _approved representing the status of the approval to be set
   */
  function setApprovalForAll(address _to, bool _approved) public {
    require(_to != msg.sender);
    operatorApprovals[msg.sender][_to] = _approved;
    emit ApprovalForAll(msg.sender, _to, _approved);
  }

  /**
   * @dev Tells whether an operator is approved by a given owner
   * @param _owner owner address which you want to query the approval of
   * @param _operator operator address which you want to query the approval of
   * @return bool whether the given operator is approved by the given owner
   */
  function isApprovedForAll(
    address _owner,
    address _operator
  )
    public
    view
    returns (bool)
  {
    return operatorApprovals[_owner][_operator];
  }

  /**
   * @dev Transfers the ownership of a given token ID to another address
   * Usage of this method is discouraged, use `safeTransferFrom` whenever possible
   * Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
  */
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
    canTransfer(_tokenId)
  {
    require(_from != address(0));
    require(_to != address(0));

    clearApproval(_from, _tokenId);
    removeTokenFrom(_from, _tokenId);
    addTokenTo(_to, _tokenId);

    emit Transfer(_from, _to, _tokenId);
  }

  /**
   * @dev Safely transfers the ownership of a given token ID to another address
   * If the target address is a contract, it must implement `onERC721Received`,
   * which is called upon a safe transfer, and return the magic value
   * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
   * the transfer is reverted.
   *
   * Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
  */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
    canTransfer(_tokenId)
  {
    // solium-disable-next-line arg-overflow
    safeTransferFrom(_from, _to, _tokenId, "");
  }

  /**
   * @dev Safely transfers the ownership of a given token ID to another address
   * If the target address is a contract, it must implement `onERC721Received`,
   * which is called upon a safe transfer, and return the magic value
   * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
   * the transfer is reverted.
   * Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
   * @param _data bytes data to send along with a safe transfer check
   */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    public
    canTransfer(_tokenId)
  {
    transferFrom(_from, _to, _tokenId);
    // solium-disable-next-line arg-overflow
    require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));
  }

  /**
   * @dev Returns whether the given spender can transfer a given token ID
   * @param _spender address of the spender to query
   * @param _tokenId uint256 ID of the token to be transferred
   * @return bool whether the msg.sender is approved for the given token ID,
   *  is an operator of the owner, or is the owner of the token
   */
  function isApprovedOrOwner(
    address _spender,
    uint256 _tokenId
  )
    internal
    view
    returns (bool)
  {
    address owner = ownerOf(_tokenId);
    // Disable solium check because of
    // https://github.com/duaraghav8/Solium/issues/175
    // solium-disable-next-line operator-whitespace
    return (
      _spender == owner ||
      getApproved(_tokenId) == _spender ||
      isApprovedForAll(owner, _spender)
    );
  }

  /**
   * @dev Internal function to mint a new token
   * Reverts if the given token ID already exists
   * @param _to The address that will own the minted token
   * @param _tokenId uint256 ID of the token to be minted by the msg.sender
   */
  function _mint(address _to, uint256 _tokenId) internal {
    require(_to != address(0));
    addTokenTo(_to, _tokenId);
    emit Transfer(address(0), _to, _tokenId);
  }

  /**
   * @dev Internal function to burn a specific token
   * Reverts if the token does not exist
   * @param _tokenId uint256 ID of the token being burned by the msg.sender
   */
  function _burn(address _owner, uint256 _tokenId) internal {
    clearApproval(_owner, _tokenId);
    removeTokenFrom(_owner, _tokenId);
    emit Transfer(_owner, address(0), _tokenId);
  }

  /**
   * @dev Internal function to clear current approval of a given token ID
   * Reverts if the given address is not indeed the owner of the token
   * @param _owner owner of the token
   * @param _tokenId uint256 ID of the token to be transferred
   */
  function clearApproval(address _owner, uint256 _tokenId) internal {
    require(ownerOf(_tokenId) == _owner);
    if (tokenApprovals[_tokenId] != address(0)) {
      tokenApprovals[_tokenId] = address(0);
    }
  }

  /**
   * @dev Internal function to add a token ID to the list of a given address
   * @param _to address representing the new owner of the given token ID
   * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
   */
  function addTokenTo(address _to, uint256 _tokenId) internal {
    require(tokenOwner[_tokenId] == address(0));
    tokenOwner[_tokenId] = _to;
    ownedTokensCount[_to] = ownedTokensCount[_to].add(1);
  }

  /**
   * @dev Internal function to remove a token ID from the list of a given address
   * @param _from address representing the previous owner of the given token ID
   * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
   */
  function removeTokenFrom(address _from, uint256 _tokenId) internal {
    require(ownerOf(_tokenId) == _from);
    ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
    tokenOwner[_tokenId] = address(0);
  }

  /**
   * @dev Internal function to invoke `onERC721Received` on a target address
   * The call is not executed if the target address is not a contract
   * @param _from address representing the previous owner of the given token ID
   * @param _to target address that will receive the tokens
   * @param _tokenId uint256 ID of the token to be transferred
   * @param _data bytes optional data to send along with the call
   * @return whether the call correctly returned the expected magic value
   */
  function checkAndCallSafeTransfer(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    internal
    returns (bool)
  {
    if (!_to.isContract()) {
      return true;
    }
    bytes4 retval = ERC721Receiver(_to).onERC721Received(
      msg.sender, _from, _tokenId, _data);
    return (retval == ERC721_RECEIVED);
  }
}

// File: openzeppelin-zos/contracts/token/ERC721/ERC721Token.sol

/**
 * @title Full ERC721 Token
 * This implementation includes all the required and some optional functionality of the ERC721 standard
 * Moreover, it includes approve all functionality using operator terminology
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Token is Migratable, ERC165Support, ERC721BasicToken, ERC721 {

  bytes4 private constant InterfaceId_ERC721Enumerable = 0x780e9d63;
  /**
   * 0x780e9d63 ===
   *   bytes4(keccak256('totalSupply()')) ^
   *   bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^
   *   bytes4(keccak256('tokenByIndex(uint256)'))
   */

  bytes4 private constant InterfaceId_ERC721Metadata = 0x5b5e139f;
  /**
   * 0x5b5e139f ===
   *   bytes4(keccak256('name()')) ^
   *   bytes4(keccak256('symbol()')) ^
   *   bytes4(keccak256('tokenURI(uint256)'))
   */

  // Token name
  string internal name_;

  // Token symbol
  string internal symbol_;

  // Mapping from owner to list of owned token IDs
  mapping(address => uint256[]) internal ownedTokens;

  // Mapping from token ID to index of the owner tokens list
  mapping(uint256 => uint256) internal ownedTokensIndex;

  // Array with all token ids, used for enumeration
  uint256[] internal allTokens;

  // Mapping from token id to position in the allTokens array
  mapping(uint256 => uint256) internal allTokensIndex;

  // Optional mapping for token URIs
  mapping(uint256 => string) internal tokenURIs;

  /**
   * @dev Constructor function
   */
  function initialize(string _name, string _symbol) public isInitializer("ERC721Token", "1.9.0") {
    name_ = _name;
    symbol_ = _symbol;
  }

  function _supportsInterface(bytes4 _interfaceId)
    internal
    view
    returns (bool)
  {
    return super._supportsInterface(_interfaceId) || 
      _interfaceId == InterfaceId_ERC721Enumerable || _interfaceId == InterfaceId_ERC721Metadata;
  }

  /**
   * @dev Gets the token name
   * @return string representing the token name
   */
  function name() external view returns (string) {
    return name_;
  }

  /**
   * @dev Gets the token symbol
   * @return string representing the token symbol
   */
  function symbol() external view returns (string) {
    return symbol_;
  }

  /**
   * @dev Returns an URI for a given token ID
   * Throws if the token ID does not exist. May return an empty string.
   * @param _tokenId uint256 ID of the token to query
   */
  function tokenURI(uint256 _tokenId) public view returns (string) {
    require(exists(_tokenId));
    return tokenURIs[_tokenId];
  }

  /**
   * @dev Gets the token ID at a given index of the tokens list of the requested owner
   * @param _owner address owning the tokens list to be accessed
   * @param _index uint256 representing the index to be accessed of the requested tokens list
   * @return uint256 token ID at the given index of the tokens list owned by the requested address
   */
  function tokenOfOwnerByIndex(
    address _owner,
    uint256 _index
  )
    public
    view
    returns (uint256)
  {
    require(_index < balanceOf(_owner));
    return ownedTokens[_owner][_index];
  }

  /**
   * @dev Gets the total amount of tokens stored by the contract
   * @return uint256 representing the total amount of tokens
   */
  function totalSupply() public view returns (uint256) {
    return allTokens.length;
  }

  /**
   * @dev Gets the token ID at a given index of all the tokens in this contract
   * Reverts if the index is greater or equal to the total number of tokens
   * @param _index uint256 representing the index to be accessed of the tokens list
   * @return uint256 token ID at the given index of the tokens list
   */
  function tokenByIndex(uint256 _index) public view returns (uint256) {
    require(_index < totalSupply());
    return allTokens[_index];
  }

  /**
   * @dev Internal function to set the token URI for a given token
   * Reverts if the token ID does not exist
   * @param _tokenId uint256 ID of the token to set its URI
   * @param _uri string URI to assign
   */
  function _setTokenURI(uint256 _tokenId, string _uri) internal {
    require(exists(_tokenId));
    tokenURIs[_tokenId] = _uri;
  }

  /**
   * @dev Internal function to add a token ID to the list of a given address
   * @param _to address representing the new owner of the given token ID
   * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
   */
  function addTokenTo(address _to, uint256 _tokenId) internal {
    super.addTokenTo(_to, _tokenId);
    uint256 length = ownedTokens[_to].length;
    ownedTokens[_to].push(_tokenId);
    ownedTokensIndex[_tokenId] = length;
  }

  /**
   * @dev Internal function to remove a token ID from the list of a given address
   * @param _from address representing the previous owner of the given token ID
   * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
   */
  function removeTokenFrom(address _from, uint256 _tokenId) internal {
    super.removeTokenFrom(_from, _tokenId);

    uint256 tokenIndex = ownedTokensIndex[_tokenId];
    uint256 lastTokenIndex = ownedTokens[_from].length.sub(1);
    uint256 lastToken = ownedTokens[_from][lastTokenIndex];

    ownedTokens[_from][tokenIndex] = lastToken;
    ownedTokens[_from][lastTokenIndex] = 0;
    // Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to
    // be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping
    // the lastToken to the first position, and then dropping the element placed in the last position of the list

    ownedTokens[_from].length--;
    ownedTokensIndex[_tokenId] = 0;
    ownedTokensIndex[lastToken] = tokenIndex;
  }

  /**
   * @dev Internal function to mint a new token
   * Reverts if the given token ID already exists
   * @param _to address the beneficiary that will own the minted token
   * @param _tokenId uint256 ID of the token to be minted by the msg.sender
   */
  function _mint(address _to, uint256 _tokenId) internal {
    super._mint(_to, _tokenId);

    allTokensIndex[_tokenId] = allTokens.length;
    allTokens.push(_tokenId);
  }

  /**
   * @dev Internal function to burn a specific token
   * Reverts if the token does not exist
   * @param _owner owner of the token to burn
   * @param _tokenId uint256 ID of the token being burned by the msg.sender
   */
  function _burn(address _owner, uint256 _tokenId) internal {
    super._burn(_owner, _tokenId);

    // Clear metadata (if any)
    if (bytes(tokenURIs[_tokenId]).length != 0) {
      delete tokenURIs[_tokenId];
    }

    // Reorg all tokens array
    uint256 tokenIndex = allTokensIndex[_tokenId];
    uint256 lastTokenIndex = allTokens.length.sub(1);
    uint256 lastToken = allTokens[lastTokenIndex];

    allTokens[tokenIndex] = lastToken;
    allTokens[lastTokenIndex] = 0;

    allTokens.length--;
    allTokensIndex[_tokenId] = 0;
    allTokensIndex[lastToken] = tokenIndex;
  }

}

// File: contracts/estate/EstateRegistry.sol

/**
 * @title ERC721 registry of every minted Estate and their owned LANDs
 * @dev Usings we are inheriting and depending on:
 * From ERC721Token:
 *   - using SafeMath for uint256;
 *   - using AddressUtils for address;
 */
// solium-disable-next-line max-len
contract EstateRegistry is Migratable, ERC721Token, ERC721Receiver, Ownable, IEstateRegistry, EstateStorage {
  modifier canTransfer(uint256 estateId) {
    require(isApprovedOrOwner(msg.sender, estateId), "Only owner or operator can transfer");
    _;
  }

  modifier onlyRegistry() {
    require(msg.sender == address(registry), "Only the registry can make this operation");
    _;
  }

  modifier onlyUpdateAuthorized(uint256 estateId) {
    require(_isUpdateAuthorized(msg.sender, estateId), "Unauthorized user");
    _;
  }

  /**
   * @dev Mint a new Estate with some metadata
   * @param to The address that will own the minted token
   * @param metadata Set an initial metadata
   * @return An uint256 representing the new token id
   */
  function mint(address to, string metadata) external onlyRegistry returns (uint256) {
    return _mintEstate(to, metadata);
  }

  /**
   * @notice Handle the receipt of an NFT
   * @dev The ERC721 smart contract calls this function on the recipient
   * after a `safetransfer`. This function MAY throw to revert and reject the
   * transfer. Return of other than the magic value MUST result in the
   * transaction being reverted.
   * Note: the contract address is always the message sender.
   * @param _operator The address which called `safeTransferFrom` function
   * @param _from The address which previously owned the token
   * @param _tokenId The NFT identifier which is being transferred
   * @param _data Additional data with no specified format
   * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
   */
  function onERC721Received(
    address _operator,
    address _from,
    uint256 _tokenId,
    bytes _data
  )
    public
    onlyRegistry
    returns (bytes4)
  {
    uint256 estateId = _bytesToUint(_data);
    _pushLandId(estateId, _tokenId);
    return ERC721_RECEIVED;
  }

  /**
   * @notice Transfer a LAND owned by an Estate to a new owner
   * @param estateId Current owner of the token
   * @param landId LAND to be transfered
   * @param destinatary New owner
   */
  function transferLand(
    uint256 estateId,
    uint256 landId,
    address destinatary
  )
    external
    canTransfer(estateId)
  {
    return _transferLand(estateId, landId, destinatary);
  }

  /**
   * @notice Transfer many tokens owned by an Estate to a new owner
   * @param estateId Current owner of the token
   * @param landIds Lands to be transfered
   * @param destinatary New owner
   */
  function transferManyLands(
    uint256 estateId,
    uint256[] landIds,
    address destinatary
  )
    external
    canTransfer(estateId)
  {
    uint length = landIds.length;
    for (uint i = 0; i < length; i++) {
      _transferLand(estateId, landIds[i], destinatary);
    }
  }

  /**
   * @notice Get the Estate id for a given LAND id
   * @dev This information also lives on estateLandIds,
   *   but it being a mapping you need to know the Estate id beforehand.
   * @param landId LAND to search
   * @return The corresponding Estate id
   */
  function getLandEstateId(uint256 landId) external view returns (uint256) {
    return landIdEstate[landId];
  }

  function setLANDRegistry(address _registry) external onlyOwner {
    require(_registry.isContract(), "The LAND registry address should be a contract");
    require(_registry != 0, "The LAND registry address should be valid");
    registry = LANDRegistry(_registry);
    emit SetLANDRegistry(registry);
  }

  function ping() external {
    registry.ping();
  }

  /**
   * @notice Return the amount of tokens for a given Estate
   * @param estateId Estate id to search
   * @return Tokens length
   */
  function getEstateSize(uint256 estateId) external view returns (uint256) {
    return estateLandIds[estateId].length;
  }

  /**
   * @notice Update the metadata of an Estate
   * @dev Reverts if the Estate does not exist or the user is not authorized
   * @param estateId Estate id to update
   * @param metadata string metadata
   */
  function updateMetadata(
    uint256 estateId,
    string metadata
  )
    external
    onlyUpdateAuthorized(estateId)
  {
    _updateMetadata(estateId, metadata);

    emit Update(
      estateId,
      ownerOf(estateId),
      msg.sender,
      metadata
    );
  }

  function getMetadata(uint256 estateId) external view returns (string) {
    return estateData[estateId];
  }

  function setUpdateOperator(uint256 estateId, address operator) external canTransfer(estateId) {
    updateOperator[estateId] = operator;
    emit UpdateOperator(estateId, operator);
  }

  function isUpdateAuthorized(address operator, uint256 estateId) external view returns (bool) {
    return _isUpdateAuthorized(operator, estateId);
  }

  function initialize(
    string _name,
    string _symbol,
    address _registry
  )
    public
    isInitializer("EstateRegistry", "0.0.1")
  {
    require(_registry != 0, "The registry should be a valid address");
    
    ERC721Token.initialize(_name, _symbol);
    Ownable.initialize(msg.sender);
    registry = LANDRegistry(_registry);
  }

  // check the supported interfaces via ERC165
  function _supportsInterface(bytes4 _interfaceId)
    internal
    view
    returns (bool)
  {
    return super._supportsInterface(_interfaceId) || 
      _interfaceId == InterfaceId_GetMetadata;
  }

  /**
   * @dev Safely transfers the ownership of multiple Estate IDs to another address
   * @dev Delegates to safeTransferFrom for each transfer
   * @dev Requires the msg sender to be the owner, approved, or operator
   * @param from current owner of the token
   * @param to address to receive the ownership of the given token ID
   * @param estateIds uint256 array of IDs to be transferred
  */
  function safeTransferManyFrom(address from, address to, uint256[] estateIds) public {
    safeTransferManyFrom(
      from,
      to,
      estateIds,
      ""
    );
  }

  /**
   * @dev Safely transfers the ownership of multiple Estate IDs to another address
   * @dev Delegates to safeTransferFrom for each transfer
   * @dev Requires the msg sender to be the owner, approved, or operator
   * @param from current owner of the token
   * @param to address to receive the ownership of the given token ID
   * @param estateIds uint256 array of IDs to be transferred
   * @param data bytes data to send along with a safe transfer check
  */
  function safeTransferManyFrom(
    address from,
    address to,
    uint256[] estateIds,
    bytes data
  )
    public
  {
    for (uint i = 0; i < estateIds.length; i++) {
      safeTransferFrom(
        from,
        to,
        estateIds[i],
        data
      );
    }
  }

  /**
   * @dev Internal function to mint a new Estate with some metadata
   * @param to The address that will own the minted token
   * @param metadata Set an initial metadata
   * @return An uint256 representing the new token id
   */
  function _mintEstate(address to, string metadata) internal returns (uint256) {
    require(to != address(0), "You can not mint to an empty address");
    uint256 estateId = _getNewEstateId();
    _mint(to, estateId);
    _updateMetadata(estateId, metadata);
    emit CreateEstate(to, estateId, metadata);
    return estateId;
  }

  /**
   * @dev Internal function to update an Estate metadata
   * @dev Does not require the Estate to exist, for a public interface use `updateMetadata`
   * @param estateId Estate id to update
   * @param metadata string metadata
   */
  function _updateMetadata(uint256 estateId, string metadata) internal {
    estateData[estateId] = metadata;
  }

  /**
   * @notice Return a new unique id
   * @dev It uses totalSupply to determine the next id
   * @return uint256 Representing the new Estate id
   */
  function _getNewEstateId() internal view returns (uint256) {
    return totalSupply().add(1);
  }

  /**
   * @dev Appends a new LAND id to an Estate updating all related storage
   * @param estateId Estate where the LAND should go
   * @param landId Transfered LAND
   */
  function _pushLandId(uint256 estateId, uint256 landId) internal {
    require(exists(estateId), "The Estate id should exist");
    require(landIdEstate[landId] == 0, "The LAND is already owned by an Estate");
    require(registry.ownerOf(landId) == address(this), "The Estate Registry cannot manage this LAND");

    estateLandIds[estateId].push(landId);

    landIdEstate[landId] = estateId;

    estateLandIndex[estateId][landId] = estateLandIds[estateId].length;

    emit AddLand(estateId, landId);
  }

  /**
   * @dev Removes a LAND from an Estate and transfers it to a new owner
   * @param estateId Current owner of the LAND
   * @param landId LAND to be transfered
   * @param destinatary New owner
   */
  function _transferLand(
    uint256 estateId,
    uint256 landId,
    address destinatary
  )
    internal
  {
    require(destinatary != address(0), "You can not transfer LAND to an empty address");

    uint256[] storage landIds = estateLandIds[estateId];
    mapping(uint256 => uint256) landIndex = estateLandIndex[estateId];

    /**
     * Using 1-based indexing to be able to make this check
     */
    require(landIndex[landId] != 0, "The LAND is not part of the Estate");

    uint lastIndexInArray = landIds.length.sub(1);

    /**
     * Get the landIndex of this token in the landIds list
     */
    uint indexInArray = landIndex[landId].sub(1);

    /**
     * Get the landId at the end of the landIds list
     */
    uint tempTokenId = landIds[lastIndexInArray];

    /**
     * Store the last token in the position previously occupied by landId
     */
    landIndex[tempTokenId] = indexInArray.add(1);
    landIds[indexInArray] = tempTokenId;

    /**
     * Delete the landIds[last element]
     */
    delete landIds[lastIndexInArray];
    landIds.length = lastIndexInArray;

    /**
     * Drop this landId from both the landIndex and landId list
     */
    landIndex[landId] = 0;

    /**
     * Drop this landId Estate
     */
    landIdEstate[landId] = 0;

    registry.safeTransferFrom(this, destinatary, landId);

    emit RemoveLand(estateId, landId, destinatary);
  }

  function _isUpdateAuthorized(address operator, uint256 estateId) internal view returns (bool) {
    return isApprovedOrOwner(operator, estateId) || updateOperator[estateId] == operator;
  }

  function _bytesToUint(bytes b) internal pure returns (uint256) {
    bytes32 out;

    for (uint i = 0; i < b.length; i++) {
      out |= bytes32(b[i] & 0xFF) >> i.mul(8);
    }

    return uint256(out);
  }

  /**
   * @dev update LAND data owned by an Estate
   * @param estateId Estate
   * @param landId LAND to be updated
   * @param data string metadata
   */
  function updateLandData(uint256 estateId, uint256 landId, string data) public {
    _updateLandData(estateId, landId, data);
  }

  /**
   * @dev update LANDs data owned by an Estate
   * @param estateId Estate id
   * @param landIds LANDs to be updated
   * @param data string metadata
   */
  function updateManyLandData(uint256 estateId, uint256[] landIds, string data) public {
    uint length = landIds.length;
    for (uint i = 0; i < length; i++) {
      _updateLandData(estateId, landIds[i], data);
    }
  }

  function _updateLandData(uint256 estateId, uint256 landId, string data) internal onlyUpdateAuthorized(estateId) {
    require(landIdEstate[landId] == estateId, "The LAND is not part of the Estate");
    int x;
    int y;
    (x, y) = registry.decodeTokenId(landId);
    registry.updateLandData(x, y, data);
  }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_registry","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"landIdEstate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_operator","type":"address"},{"name":"_from","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"onERC721Received","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"data","type":"string"}],"name":"updateLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"estateLandIds","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landIds","type":"uint256[]"},{"name":"destinatary","type":"address"}],"name":"transferManyLands","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landIds","type":"uint256[]"},{"name":"data","type":"string"}],"name":"updateManyLandData","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_registry","type":"address"}],"name":"setLANDRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"metadata","type":"string"}],"name":"updateMetadata","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"ping","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"operator","type":"address"},{"name":"estateId","type":"uint256"}],"name":"isUpdateAuthorized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"estateIds","type":"uint256[]"}],"name":"safeTransferManyFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"registry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"estateLandIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"landId","type":"uint256"},{"name":"destinatary","type":"address"}],"name":"transferLand","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getMetadata","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"estateId","type":"uint256"},{"name":"operator","type":"address"}],"name":"setUpdateOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"landId","type":"uint256"}],"name":"getLandEstateId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"contractName","type":"string"},{"name":"migrationId","type":"string"}],"name":"isMigrated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"metadata","type":"string"}],"name":"mint","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"estateIds","type":"uint256[]"},{"name":"data","type":"bytes"}],"name":"safeTransferManyFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"estateId","type":"uint256"}],"name":"getEstateSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":false,"name":"_data","type":"string"}],"name":"CreateEstate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_landId","type":"uint256"}],"name":"AddLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_landId","type":"uint256"},{"indexed":true,"name":"_destinatary","type":"address"}],"name":"RemoveLand","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_assetId","type":"uint256"},{"indexed":true,"name":"_holder","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_data","type":"string"}],"name":"Update","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_estateId","type":"uint256"},{"indexed":true,"name":"_operator","type":"address"}],"name":"UpdateOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_registry","type":"address"}],"name":"SetLANDRegistry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"contractName","type":"string"},{"indexed":false,"name":"migrationId","type":"string"}],"name":"Migrated","type":"event"}]

608060405234801561001057600080fd5b50613c97806100206000396000f3006080604052600436106102195763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a7811461021e57806306fdde0314610254578063077f224a146102de578063081812fc14610382578063095ea7b3146103b65780630a354fce146103da578063150b7a021461040457806318160ddd1461049057806323b872dd146104a557806328b34ef6146104cf5780632f745c591461052f5780633970bfd314610553578063408070491461056e578063426a0af31461059e57806342842e0e146106365780634cd88b76146106605780634f558e79146106f75780634f6ccce71461070f578063535a920c1461072757806353c8388e146107485780635c36b1861461076c5780636352211e1461078157806365937ab91461079957806370a08231146107bd57806373b913fa146107de5780637b103999146108495780638129fc1c1461085e5780638da5cb5b1461087357806395d89b41146108885780639f813b1b1461089d578063a22cb465146108b8578063a506e5dc146108de578063a574cea414610905578063b0b02c601461091d578063b88d4fde14610941578063bb969132146109b0578063c0bac1a8146109c8578063c4d66de814610a5f578063c87b56dd14610a80578063d0def52114610a98578063d93eeb5c14610ac5578063e985e9c514610b6e578063f2fde38b14610b95578063f4a4344814610bb6575b600080fd5b34801561022a57600080fd5b50610240600160e060020a031960043516610bce565b604080519115158252519081900360200190f35b34801561026057600080fd5b50610269610bdf565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a357818101518382015260200161028b565b50505050905090810190601f1680156102d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ea57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261038094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050509235600160a060020a03169350610c7692505050565b005b34801561038e57600080fd5b5061039a60043561107d565b60408051600160a060020a039092168252519081900360200190f35b3480156103c257600080fd5b50610380600160a060020a0360043516602435611098565b3480156103e657600080fd5b506103f2600435611141565b60408051918252519081900360200190f35b34801561041057600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261047394600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506111539650505050505050565b60408051600160e060020a03199092168252519081900360200190f35b34801561049c57600080fd5b506103f2611222565b3480156104b157600080fd5b50610380600160a060020a0360043581169060243516604435611228565b3480156104db57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526103809482359460248035953695946064949201919081908401838280828437509497506113159650505050505050565b34801561053b57600080fd5b506103f2600160a060020a0360043516602435611325565b34801561055f57600080fd5b506103f2600435602435611372565b34801561057a57600080fd5b50610380600480359060248035908101910135600160a060020a03604435166113a2565b3480156105aa57600080fd5b506040805160206004602480358281013584810280870186019097528086526103809684359636966044959194909101929182918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506114449650505050505050565b34801561064257600080fd5b50610380600160a060020a0360043581169060243516604435611482565b34801561066c57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261038094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506115029650505050505050565b34801561070357600080fd5b50610240600435611879565b34801561071b57600080fd5b506103f2600435611896565b34801561073357600080fd5b50610380600160a060020a03600435166118cb565b34801561075457600080fd5b50610380600480359060248035908101910135611a46565b34801561077857600080fd5b50610380611b4b565b34801561078d57600080fd5b5061039a600435611bcb565b3480156107a557600080fd5b50610240600160a060020a0360043516602435611bef565b3480156107c957600080fd5b506103f2600160a060020a0360043516611c02565b3480156107ea57600080fd5b506040805160206004604435818101358381028086018501909652808552610380958335600160a060020a039081169660248035909216963696956064959294930192829185019084908082843750949750611c359650505050505050565b34801561085557600080fd5b5061039a611c51565b34801561086a57600080fd5b50610380611c60565b34801561087f57600080fd5b5061039a611fad565b34801561089457600080fd5b50610269611fbc565b3480156108a957600080fd5b506103f260043560243561201d565b3480156108c457600080fd5b50610380600160a060020a0360043516602435151561203a565b3480156108ea57600080fd5b50610380600435602435600160a060020a03604435166120be565b34801561091157600080fd5b50610269600435612127565b34801561092957600080fd5b50610380600435600160a060020a03602435166121c8565b34801561094d57600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261038094600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506122809650505050505050565b3480156109bc57600080fd5b506103f2600435612300565b3480156109d457600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261024094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506123129650505050505050565b348015610a6b57600080fd5b50610380600160a060020a03600435166123d9565b348015610a8c57600080fd5b50610269600435612745565b348015610aa457600080fd5b506103f260048035600160a060020a031690602480359081019101356127c3565b348015610ad157600080fd5b506040805160206004604435818101358381028086018501909652808552610380958335600160a060020a03908116966024803590921696369695606495929493019282918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506128909650505050505050565b348015610b7a57600080fd5b50610240600160a060020a03600435811690602435166128c7565b348015610ba157600080fd5b50610380600160a060020a03600435166128f5565b348015610bc257600080fd5b506103f260043561297d565b6000610bd98261298f565b92915050565b60058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b820191906000526020600020905b815481529060010190602001808311610c4e57829003601f168201915b505050505090505b90565b6040805190810160405280600e81526020017f45737461746552656769737472790000000000000000000000000000000000008152506040805190810160405280600581526020017f302e302e31000000000000000000000000000000000000000000000000000000815250610d0f826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b610d1982826129e8565b600160a060020a0383161515610d9f576040805160e560020a62461bcd02815260206004820152602660248201527f5468652072656769737472792073686f756c6420626520612076616c6964206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610da98585611502565b610db2336123d9565b600d8054600160a060020a031916600160a060020a038516179055604080518181528351918101919091528251600080516020613c0c8339815191529184918491908190602080830191606084019187019080838360005b83811015610e22578181015183820152602001610e0a565b50505050905090810190601f168015610e4f5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015610e82578181015183820152602001610e6a565b50505050905090810190601f168015610eaf5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310610ef25780518252601f199092019160209182019101610ed3565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b60208310610f4e5780518252601f199092019160209182019101610f2f565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b60208310610fc05780518252601f199092019160209182019101610fa1565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b602083106110395780518252601f19909201916020918201910161101a565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff19169315159390931790925550505050505050565b600090815260026020526040902054600160a060020a031690565b60006110a382611bcb565b9050600160a060020a0383811690821614156110be57600080fd5b33600160a060020a03821614806110da57506110da81336128c7565b15156110e557600080fd5b6000828152600260205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600f6020526000908152604090205481565b600d546000908190600160a060020a031633146111e0576040805160e560020a62461bcd02815260206004820152602960248201527f4f6e6c79207468652072656769737472792063616e206d616b6520746869732060448201527f6f7065726174696f6e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6111e983612a71565b90506111f58185612b09565b7f150b7a020000000000000000000000000000000000000000000000000000000091505b50949350505050565b60095490565b806112333382612d7d565b1515611286576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b600160a060020a038416151561129b57600080fd5b600160a060020a03831615156112b057600080fd5b6112ba8483612dd4565b6112c48483612e36565b6112ce8383612f6f565b8183600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b611320838383612fb8565b505050565b600061133083611c02565b821061133b57600080fd5b600160a060020a038316600090815260076020526040902080548390811061135f57fe5b9060005260206000200154905092915050565b600e6020528160005260406000208181548110151561138d57fe5b90600052602060002001600091509150505481565b600080856113b03382612d7d565b1515611403576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b849250600091505b8282101561143b576114308787878581811061142357fe5b905060200201358661323e565b60019091019061140b565b50505050505050565b815160005b8181101561147b5761147385858381518110151561146357fe5b9060200190602002015185612fb8565b600101611449565b5050505050565b8061148d3382612d7d565b15156114e0576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6114fc8484846020604051908101604052806000815250612280565b50505050565b6040805190810160405280600b81526020017f455243373231546f6b656e0000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e3000000000000000000000000000000000000000000000000000000081525061159b826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b6115a582826129e8565b83516115b8906005906020870190613b53565b5082516115cc906006906020860190613b53565b50600080516020613c0c8339815191528282604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561161f578181015183820152602001611607565b50505050905090810190601f16801561164c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561167f578181015183820152602001611667565b50505050905090810190601f1680156116ac5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083106116ef5780518252601f1990920191602091820191016116d0565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b6020831061174b5780518252601f19909201916020918201910161172c565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b602083106117bd5780518252601f19909201916020918201910161179e565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b602083106118365780518252601f199092019160209182019101611817565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff191693151593909317909255505050505050565b600090815260016020526040902054600160a060020a0316151590565b60006118a0611222565b82106118ab57600080fd5b60098054839081106118b957fe5b90600052602060002001549050919050565b600c54600160a060020a031633146118e257600080fd5b6118f481600160a060020a0316613506565b1515611970576040805160e560020a62461bcd02815260206004820152602e60248201527f546865204c414e4420726567697374727920616464726573732073686f756c6460448201527f206265206120636f6e7472616374000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03811615156119f6576040805160e560020a62461bcd02815260206004820152602960248201527f546865204c414e4420726567697374727920616464726573732073686f756c6460448201527f2062652076616c69640000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600d8054600160a060020a031916600160a060020a0383811691909117918290556040519116907f2e88792af6f2248ed486ffffc86edf9bc197596990f7b406d5f867a1dd930ba590600090a250565b82611a51338261350e565b1515611aa7576040805160e560020a62461bcd02815260206004820152601160248201527f556e617574686f72697a65642075736572000000000000000000000000000000604482015290519081900360640190fd5b611ae18484848080601f01602080910402602001604051908101604052809392919081815260200183838082843750613541945050505050565b33611aeb85611bcb565b600160a060020a0316857f47c705b9219229ad762fca605f08fb024a3415d0ae78af5d319820c72e51041486866040518080602001828103825284848281815260200192508082843760405192018290039550909350505050a450505050565b600d60009054906101000a9004600160a060020a0316600160a060020a0316635c36b1866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b158015611bb757600080fd5b505af11580156114fc573d6000803e3d6000fd5b600081815260016020526040812054600160a060020a0316801515610bd957600080fd5b6000611bfb838361350e565b9392505050565b6000600160a060020a0382161515611c1957600080fd5b50600160a060020a031660009081526003602052604090205490565b6113208383836020604051908101604052806000815250612890565b600d54600160a060020a031681565b6040805190810160405280600a81526020017f4d696772617461626c65000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e322e31000000000000000000000000000000000000000000000000000000815250611cf9826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b611d0382826129e8565b600080516020613c0c8339815191528282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611d55578181015183820152602001611d3d565b50505050905090810190601f168015611d825780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611db5578181015183820152602001611d9d565b50505050905090810190601f168015611de25780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310611e255780518252601f199092019160209182019101611e06565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b60208310611e815780518252601f199092019160209182019101611e62565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b60208310611ef35780518252601f199092019160209182019101611ed4565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b60208310611f6c5780518252601f199092019160209182019101611f4d565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff19169315159390931790925550505050565b600c54600160a060020a031681565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b601060209081526000928352604080842090915290825290205481565b600160a060020a03821633141561205057600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b826120c93382612d7d565b151561211c576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6114fc84848461323e565b60008181526011602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156121bc5780601f10612191576101008083540402835291602001916121bc565b820191906000526020600020905b81548152906001019060200180831161219f57829003601f168201915b50505050509050919050565b816121d33382612d7d565b1515612226576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6000838152601260205260408082208054600160a060020a031916600160a060020a0386169081179091559051909185917f9d9dd80a56a16f715df6eb40b771e24ff8cbea6eed9de28473ce0f28fe5602a99190a3505050565b8161228b3382612d7d565b15156122de576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6122e9858585611228565b6122f585858585613560565b151561147b57600080fd5b6000908152600f602052604090205490565b600080836040518082805190602001908083835b602083106123455780518252601f199092019160209182019101612326565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b602083106123a15780518252601f199092019160209182019101612382565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff1695945050505050565b6040805190810160405280600781526020017f4f776e61626c65000000000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250612472826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b61247c82826129e8565b600c8054600160a060020a031916600160a060020a038516179055604080518181528351918101919091528251600080516020613c0c8339815191529184918491908190602080830191606084019187019080838360005b838110156124ec5781810151838201526020016124d4565b50505050905090810190601f1680156125195780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561254c578181015183820152602001612534565b50505050905090810190601f1680156125795780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083106125bc5780518252601f19909201916020918201910161259d565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b602083106126185780518252601f1990920191602091820191016125f9565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b6020831061268a5780518252601f19909201916020918201910161266b565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b602083106127035780518252601f1990920191602091820191016126e4565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff1916931515939093179092555050505050565b606061275082611879565b151561275b57600080fd5b6000828152600b602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156121bc5780601f10612191576101008083540402835291602001916121bc565b600d54600090600160a060020a0316331461284e576040805160e560020a62461bcd02815260206004820152602960248201527f4f6e6c79207468652072656769737472792063616e206d616b6520746869732060448201527f6f7065726174696f6e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6128888484848080601f016020809104026020016040519081016040528093929190818152602001838380828437506136c8945050505050565b949350505050565b60005b825181101561147b576128bf858585848151811015156128af57fe5b9060200190602002015185612280565b600101612893565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600c54600160a060020a0316331461290c57600080fd5b600160a060020a038116151561292157600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c8054600160a060020a031916600160a060020a0392909216919091179055565b6000908152600e602052604090205490565b600061299a82613819565b80610bd95750604080517f6765744d657461646174612875696e743235362900000000000000000000000081529051908190036014019020600160e060020a03198381169116149050919050565b6129f28282612312565b15612a6d576040805160e560020a62461bcd02815260206004820152603260248201527f52657175657374656420746172676574206d6967726174696f6e20494420686160448201527f7320616c7265616479206265656e2072756e0000000000000000000000000000606482015290519081900360840190fd5b5050565b600080805b8351811015612b0257612a9081600863ffffffff61388e16565b8482815181101515612a9e57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff0000000000000000000000000000000000000000000000000000000000000016049190911790600101612a76565b5092915050565b612b1282611879565b1515612b68576040805160e560020a62461bcd02815260206004820152601a60248201527f546865204573746174652069642073686f756c64206578697374000000000000604482015290519081900360640190fd5b6000818152600f602052604090205415612bf2576040805160e560020a62461bcd02815260206004820152602660248201527f546865204c414e4420697320616c7265616479206f776e656420627920616e2060448201527f4573746174650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600d54604080517f6352211e0000000000000000000000000000000000000000000000000000000081526004810184905290513092600160a060020a031691636352211e9160248083019260209291908290030181600087803b158015612c5857600080fd5b505af1158015612c6c573d6000803e3d6000fd5b505050506040513d6020811015612c8257600080fd5b5051600160a060020a031614612d08576040805160e560020a62461bcd02815260206004820152602b60248201527f546865204573746174652052656769737472792063616e6e6f74206d616e616760448201527f652074686973204c414e44000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000828152600e60209081526040808320805460018101825581855283852001859055848452600f835281842086905585845254601083528184208585529092528083209190915551829184917fff0e52667d53255667dc777a00af81038a4646367b0d73d8ee8540ca5b0c9a2e9190a35050565b600080612d8983611bcb565b905080600160a060020a031684600160a060020a03161480612dc4575083600160a060020a0316612db98461107d565b600160a060020a0316145b80612888575061288881856128c7565b81600160a060020a0316612de782611bcb565b600160a060020a031614612dfa57600080fd5b600081815260026020526040902054600160a060020a031615612a6d5760009081526002602052604090208054600160a060020a031916905550565b6000806000612e4585856138b7565b600084815260086020908152604080832054600160a060020a0389168452600790925290912054909350612e8090600163ffffffff61394016565b600160a060020a038616600090815260076020526040902080549193509083908110612ea857fe5b90600052602060002001549050806007600087600160a060020a0316600160a060020a0316815260200190815260200160002084815481101515612ee857fe5b6000918252602080832090910192909255600160a060020a0387168152600790915260408120805484908110612f1a57fe5b6000918252602080832090910192909255600160a060020a0387168152600790915260409020805490612f51906000198301613bd1565b50600093845260086020526040808520859055908452909220555050565b6000612f7b8383613952565b50600160a060020a039091166000908152600760209081526040808320805460018101825590845282842081018590559383526008909152902055565b60008084612fc6338261350e565b151561301c576040805160e560020a62461bcd02815260206004820152601160248201527f556e617574686f72697a65642075736572000000000000000000000000000000604482015290519081900360640190fd5b6000858152600f602052604090205486146130a7576040805160e560020a62461bcd02815260206004820152602260248201527f546865204c414e44206973206e6f742070617274206f6620746865204573746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600d54604080517f7efd9112000000000000000000000000000000000000000000000000000000008152600481018890528151600160a060020a0390931692637efd9112926024808401939192918290030181600087803b15801561310b57600080fd5b505af115801561311f573d6000803e3d6000fd5b505050506040513d604081101561313557600080fd5b508051602091820151600d546040517fd4dd159400000000000000000000000000000000000000000000000000000000815260048101848152602482018490526060604483019081528a5160648401528a51959950939750600160a060020a039092169463d4dd159494899489948c949093919260849091019185019080838360005b838110156131d05781810151838201526020016131b8565b50505050905090810190601f1680156131fd5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561321e57600080fd5b505af1158015613232573d6000803e3d6000fd5b50505050505050505050565b600080808080600160a060020a03861615156132ca576040805160e560020a62461bcd02815260206004820152602d60248201527f596f752063616e206e6f74207472616e73666572204c414e4420746f20616e2060448201527f656d707479206164647265737300000000000000000000000000000000000000606482015290519081900360840190fd5b6000888152600e60209081526040808320601083528184208b8552928390529220549196509450151561336d576040805160e560020a62461bcd02815260206004820152602260248201527f546865204c414e44206973206e6f742070617274206f6620746865204573746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b845461338090600163ffffffff61394016565b6000888152602086905260409020549093506133a390600163ffffffff61394016565b915084838154811015156133b357fe5b60009182526020909120015490506133d282600163ffffffff6139d516565b600082815260208690526040902055845481908690849081106133f157fe5b600091825260209091200155845485908490811061340b57fe5b6000918252602082200155826134218682613bd1565b50600087815260208581526040808320839055600f909152808220829055600d5481517f42842e0e000000000000000000000000000000000000000000000000000000008152306004820152600160a060020a038a81166024830152604482018c9052925192909116926342842e0e9260648084019382900301818387803b1580156134ac57600080fd5b505af11580156134c0573d6000803e3d6000fd5b5050505085600160a060020a031687897f7932eb5ab0d4d4d172776074ee15d13d708465ff5476902ed15a4965434fcab160405160405180910390a45050505050505050565b6000903b1190565b600061351a8383612d7d565b80611bfb575050600090815260126020526040902054600160a060020a0391821691161490565b6000828152601160209081526040909120825161132092840190613b53565b60008061357585600160a060020a0316613506565b15156135845760019150611219565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b838110156136175781810151838201526020016135ff565b50505050905090810190601f1680156136445780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561366657600080fd5b505af115801561367a573d6000803e3d6000fd5b505050506040513d602081101561369057600080fd5b5051600160e060020a0319167f150b7a0200000000000000000000000000000000000000000000000000000000149695505050505050565b600080600160a060020a0384161515613750576040805160e560020a62461bcd028152602060048201526024808201527f596f752063616e206e6f74206d696e7420746f20616e20656d7074792061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6137586139e2565b90506137648482613a02565b61376e8184613541565b8084600160a060020a03167fd66691e9db811aef0bc0900328bd314b23f1f2285d5cb6d4baa4d959b3645a3c856040518080602001828103825283818151815260200191508051906020019080838360005b838110156137d85781810151838201526020016137c0565b50505050905090810190601f1680156138055780820380516001836020036101000a031916815260200191505b509250505060405180910390a39392505050565b600061382482613a51565b806138585750600160e060020a031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b80610bd9575050600160e060020a0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b600082151561389f57506000610bd9565b508181028183828115156138af57fe5b0414610bd957fe5b81600160a060020a03166138ca82611bcb565b600160a060020a0316146138dd57600080fd5b600160a060020a03821660009081526003602052604090205461390790600163ffffffff61394016565b600160a060020a039092166000908152600360209081526040808320949094559181526001909152208054600160a060020a0319169055565b60008282111561394c57fe5b50900390565b600081815260016020526040902054600160a060020a03161561397457600080fd5b60008181526001602081815260408084208054600160a060020a031916600160a060020a03881690811790915584526003909152909120546139b5916139d5565b600160a060020a0390921660009081526003602052604090209190915550565b81810182811015610bd957fe5b60006139fd60016139f1611222565b9063ffffffff6139d516565b905090565b613a0c8282613ac6565b600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af015550565b6000613a5c82613b21565b80613a905750600160e060020a031982167f80ac58cd00000000000000000000000000000000000000000000000000000000145b80610bd9575050600160e060020a0319167f4f558e79000000000000000000000000000000000000000000000000000000001490565b600160a060020a0382161515613adb57600080fd5b613ae58282612f6f565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600160e060020a031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b9457805160ff1916838001178555613bc1565b82800160010185558215613bc1579182015b82811115613bc1578251825591602001919060010190613ba6565b50613bcd929150613bf1565b5090565b815481835581811115611320576000838152602090206113209181019083015b610c7391905b80821115613bcd5760008155600101613bf75600dd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea3696e697469616c697a65640000000000000000000000000000000000000000004f6e6c79206f776e6572206f72206f70657261746f722063616e207472616e73a165627a7a7230582097c1068c19aef8da87c1846774d505a436603e7dbf11a73d906a5d3ddd8c305c0029

Deployed Bytecode

0x6080604052600436106102195763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a7811461021e57806306fdde0314610254578063077f224a146102de578063081812fc14610382578063095ea7b3146103b65780630a354fce146103da578063150b7a021461040457806318160ddd1461049057806323b872dd146104a557806328b34ef6146104cf5780632f745c591461052f5780633970bfd314610553578063408070491461056e578063426a0af31461059e57806342842e0e146106365780634cd88b76146106605780634f558e79146106f75780634f6ccce71461070f578063535a920c1461072757806353c8388e146107485780635c36b1861461076c5780636352211e1461078157806365937ab91461079957806370a08231146107bd57806373b913fa146107de5780637b103999146108495780638129fc1c1461085e5780638da5cb5b1461087357806395d89b41146108885780639f813b1b1461089d578063a22cb465146108b8578063a506e5dc146108de578063a574cea414610905578063b0b02c601461091d578063b88d4fde14610941578063bb969132146109b0578063c0bac1a8146109c8578063c4d66de814610a5f578063c87b56dd14610a80578063d0def52114610a98578063d93eeb5c14610ac5578063e985e9c514610b6e578063f2fde38b14610b95578063f4a4344814610bb6575b600080fd5b34801561022a57600080fd5b50610240600160e060020a031960043516610bce565b604080519115158252519081900360200190f35b34801561026057600080fd5b50610269610bdf565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a357818101518382015260200161028b565b50505050905090810190601f1680156102d05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102ea57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261038094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a99988101979196509182019450925082915084018382808284375094975050509235600160a060020a03169350610c7692505050565b005b34801561038e57600080fd5b5061039a60043561107d565b60408051600160a060020a039092168252519081900360200190f35b3480156103c257600080fd5b50610380600160a060020a0360043516602435611098565b3480156103e657600080fd5b506103f2600435611141565b60408051918252519081900360200190f35b34801561041057600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261047394600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506111539650505050505050565b60408051600160e060020a03199092168252519081900360200190f35b34801561049c57600080fd5b506103f2611222565b3480156104b157600080fd5b50610380600160a060020a0360043581169060243516604435611228565b3480156104db57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526103809482359460248035953695946064949201919081908401838280828437509497506113159650505050505050565b34801561053b57600080fd5b506103f2600160a060020a0360043516602435611325565b34801561055f57600080fd5b506103f2600435602435611372565b34801561057a57600080fd5b50610380600480359060248035908101910135600160a060020a03604435166113a2565b3480156105aa57600080fd5b506040805160206004602480358281013584810280870186019097528086526103809684359636966044959194909101929182918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506114449650505050505050565b34801561064257600080fd5b50610380600160a060020a0360043581169060243516604435611482565b34801561066c57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261038094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506115029650505050505050565b34801561070357600080fd5b50610240600435611879565b34801561071b57600080fd5b506103f2600435611896565b34801561073357600080fd5b50610380600160a060020a03600435166118cb565b34801561075457600080fd5b50610380600480359060248035908101910135611a46565b34801561077857600080fd5b50610380611b4b565b34801561078d57600080fd5b5061039a600435611bcb565b3480156107a557600080fd5b50610240600160a060020a0360043516602435611bef565b3480156107c957600080fd5b506103f2600160a060020a0360043516611c02565b3480156107ea57600080fd5b506040805160206004604435818101358381028086018501909652808552610380958335600160a060020a039081169660248035909216963696956064959294930192829185019084908082843750949750611c359650505050505050565b34801561085557600080fd5b5061039a611c51565b34801561086a57600080fd5b50610380611c60565b34801561087f57600080fd5b5061039a611fad565b34801561089457600080fd5b50610269611fbc565b3480156108a957600080fd5b506103f260043560243561201d565b3480156108c457600080fd5b50610380600160a060020a0360043516602435151561203a565b3480156108ea57600080fd5b50610380600435602435600160a060020a03604435166120be565b34801561091157600080fd5b50610269600435612127565b34801561092957600080fd5b50610380600435600160a060020a03602435166121c8565b34801561094d57600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261038094600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506122809650505050505050565b3480156109bc57600080fd5b506103f2600435612300565b3480156109d457600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261024094369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506123129650505050505050565b348015610a6b57600080fd5b50610380600160a060020a03600435166123d9565b348015610a8c57600080fd5b50610269600435612745565b348015610aa457600080fd5b506103f260048035600160a060020a031690602480359081019101356127c3565b348015610ad157600080fd5b506040805160206004604435818101358381028086018501909652808552610380958335600160a060020a03908116966024803590921696369695606495929493019282918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a9998810197919650918201945092508291508401838280828437509497506128909650505050505050565b348015610b7a57600080fd5b50610240600160a060020a03600435811690602435166128c7565b348015610ba157600080fd5b50610380600160a060020a03600435166128f5565b348015610bc257600080fd5b506103f260043561297d565b6000610bd98261298f565b92915050565b60058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b820191906000526020600020905b815481529060010190602001808311610c4e57829003601f168201915b505050505090505b90565b6040805190810160405280600e81526020017f45737461746552656769737472790000000000000000000000000000000000008152506040805190810160405280600581526020017f302e302e31000000000000000000000000000000000000000000000000000000815250610d0f826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b610d1982826129e8565b600160a060020a0383161515610d9f576040805160e560020a62461bcd02815260206004820152602660248201527f5468652072656769737472792073686f756c6420626520612076616c6964206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b610da98585611502565b610db2336123d9565b600d8054600160a060020a031916600160a060020a038516179055604080518181528351918101919091528251600080516020613c0c8339815191529184918491908190602080830191606084019187019080838360005b83811015610e22578181015183820152602001610e0a565b50505050905090810190601f168015610e4f5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015610e82578181015183820152602001610e6a565b50505050905090810190601f168015610eaf5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310610ef25780518252601f199092019160209182019101610ed3565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b60208310610f4e5780518252601f199092019160209182019101610f2f565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b60208310610fc05780518252601f199092019160209182019101610fa1565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b602083106110395780518252601f19909201916020918201910161101a565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff19169315159390931790925550505050505050565b600090815260026020526040902054600160a060020a031690565b60006110a382611bcb565b9050600160a060020a0383811690821614156110be57600080fd5b33600160a060020a03821614806110da57506110da81336128c7565b15156110e557600080fd5b6000828152600260205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600f6020526000908152604090205481565b600d546000908190600160a060020a031633146111e0576040805160e560020a62461bcd02815260206004820152602960248201527f4f6e6c79207468652072656769737472792063616e206d616b6520746869732060448201527f6f7065726174696f6e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6111e983612a71565b90506111f58185612b09565b7f150b7a020000000000000000000000000000000000000000000000000000000091505b50949350505050565b60095490565b806112333382612d7d565b1515611286576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b600160a060020a038416151561129b57600080fd5b600160a060020a03831615156112b057600080fd5b6112ba8483612dd4565b6112c48483612e36565b6112ce8383612f6f565b8183600160a060020a031685600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b611320838383612fb8565b505050565b600061133083611c02565b821061133b57600080fd5b600160a060020a038316600090815260076020526040902080548390811061135f57fe5b9060005260206000200154905092915050565b600e6020528160005260406000208181548110151561138d57fe5b90600052602060002001600091509150505481565b600080856113b03382612d7d565b1515611403576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b849250600091505b8282101561143b576114308787878581811061142357fe5b905060200201358661323e565b60019091019061140b565b50505050505050565b815160005b8181101561147b5761147385858381518110151561146357fe5b9060200190602002015185612fb8565b600101611449565b5050505050565b8061148d3382612d7d565b15156114e0576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6114fc8484846020604051908101604052806000815250612280565b50505050565b6040805190810160405280600b81526020017f455243373231546f6b656e0000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e3000000000000000000000000000000000000000000000000000000081525061159b826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b6115a582826129e8565b83516115b8906005906020870190613b53565b5082516115cc906006906020860190613b53565b50600080516020613c0c8339815191528282604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561161f578181015183820152602001611607565b50505050905090810190601f16801561164c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561167f578181015183820152602001611667565b50505050905090810190601f1680156116ac5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083106116ef5780518252601f1990920191602091820191016116d0565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b6020831061174b5780518252601f19909201916020918201910161172c565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b602083106117bd5780518252601f19909201916020918201910161179e565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b602083106118365780518252601f199092019160209182019101611817565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff191693151593909317909255505050505050565b600090815260016020526040902054600160a060020a0316151590565b60006118a0611222565b82106118ab57600080fd5b60098054839081106118b957fe5b90600052602060002001549050919050565b600c54600160a060020a031633146118e257600080fd5b6118f481600160a060020a0316613506565b1515611970576040805160e560020a62461bcd02815260206004820152602e60248201527f546865204c414e4420726567697374727920616464726573732073686f756c6460448201527f206265206120636f6e7472616374000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03811615156119f6576040805160e560020a62461bcd02815260206004820152602960248201527f546865204c414e4420726567697374727920616464726573732073686f756c6460448201527f2062652076616c69640000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600d8054600160a060020a031916600160a060020a0383811691909117918290556040519116907f2e88792af6f2248ed486ffffc86edf9bc197596990f7b406d5f867a1dd930ba590600090a250565b82611a51338261350e565b1515611aa7576040805160e560020a62461bcd02815260206004820152601160248201527f556e617574686f72697a65642075736572000000000000000000000000000000604482015290519081900360640190fd5b611ae18484848080601f01602080910402602001604051908101604052809392919081815260200183838082843750613541945050505050565b33611aeb85611bcb565b600160a060020a0316857f47c705b9219229ad762fca605f08fb024a3415d0ae78af5d319820c72e51041486866040518080602001828103825284848281815260200192508082843760405192018290039550909350505050a450505050565b600d60009054906101000a9004600160a060020a0316600160a060020a0316635c36b1866040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b158015611bb757600080fd5b505af11580156114fc573d6000803e3d6000fd5b600081815260016020526040812054600160a060020a0316801515610bd957600080fd5b6000611bfb838361350e565b9392505050565b6000600160a060020a0382161515611c1957600080fd5b50600160a060020a031660009081526003602052604090205490565b6113208383836020604051908101604052806000815250612890565b600d54600160a060020a031681565b6040805190810160405280600a81526020017f4d696772617461626c65000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e322e31000000000000000000000000000000000000000000000000000000815250611cf9826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b611d0382826129e8565b600080516020613c0c8339815191528282604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611d55578181015183820152602001611d3d565b50505050905090810190601f168015611d825780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611db5578181015183820152602001611d9d565b50505050905090810190601f168015611de25780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b60208310611e255780518252601f199092019160209182019101611e06565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b60208310611e815780518252601f199092019160209182019101611e62565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b60208310611ef35780518252601f199092019160209182019101611ed4565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b60208310611f6c5780518252601f199092019160209182019101611f4d565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff19169315159390931790925550505050565b600c54600160a060020a031681565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c6b5780601f10610c4057610100808354040283529160200191610c6b565b601060209081526000928352604080842090915290825290205481565b600160a060020a03821633141561205057600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b826120c93382612d7d565b151561211c576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6114fc84848461323e565b60008181526011602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156121bc5780601f10612191576101008083540402835291602001916121bc565b820191906000526020600020905b81548152906001019060200180831161219f57829003601f168201915b50505050509050919050565b816121d33382612d7d565b1515612226576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6000838152601260205260408082208054600160a060020a031916600160a060020a0386169081179091559051909185917f9d9dd80a56a16f715df6eb40b771e24ff8cbea6eed9de28473ce0f28fe5602a99190a3505050565b8161228b3382612d7d565b15156122de576040805160e560020a62461bcd0281526020600482015260236024820152600080516020613c4c833981519152604482015260e960020a623332b902606482015290519081900360840190fd5b6122e9858585611228565b6122f585858585613560565b151561147b57600080fd5b6000908152600f602052604090205490565b600080836040518082805190602001908083835b602083106123455780518252601f199092019160209182019101612326565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b602083106123a15780518252601f199092019160209182019101612382565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff1695945050505050565b6040805190810160405280600781526020017f4f776e61626c65000000000000000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e30000000000000000000000000000000000000000000000000000000815250612472826040805190810160405280600b8152602001600080516020613c2c8339815191528152506129e8565b61247c82826129e8565b600c8054600160a060020a031916600160a060020a038516179055604080518181528351918101919091528251600080516020613c0c8339815191529184918491908190602080830191606084019187019080838360005b838110156124ec5781810151838201526020016124d4565b50505050905090810190601f1680156125195780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561254c578181015183820152602001612534565b50505050905090810190601f1680156125795780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b602083106125bc5780518252601f19909201916020918201910161259d565b51815160209384036101000a6000190180199092169116179052920194855250604051938490038101842086519094879450925082918401908083835b602083106126185780518252601f1990920191602091820191016125f9565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420805460ff19169515159590951790945550508351600192600092869290918291908401908083835b6020831061268a5780518252601f19909201916020918201910161266b565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208582018252600b808752600080516020613c2c83398151915293870193845291519095945092508291908083835b602083106127035780518252601f1990920191602091820191016126e4565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff1916931515939093179092555050505050565b606061275082611879565b151561275b57600080fd5b6000828152600b602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156121bc5780601f10612191576101008083540402835291602001916121bc565b600d54600090600160a060020a0316331461284e576040805160e560020a62461bcd02815260206004820152602960248201527f4f6e6c79207468652072656769737472792063616e206d616b6520746869732060448201527f6f7065726174696f6e0000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6128888484848080601f016020809104026020016040519081016040528093929190818152602001838380828437506136c8945050505050565b949350505050565b60005b825181101561147b576128bf858585848151811015156128af57fe5b9060200190602002015185612280565b600101612893565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b600c54600160a060020a0316331461290c57600080fd5b600160a060020a038116151561292157600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c8054600160a060020a031916600160a060020a0392909216919091179055565b6000908152600e602052604090205490565b600061299a82613819565b80610bd95750604080517f6765744d657461646174612875696e743235362900000000000000000000000081529051908190036014019020600160e060020a03198381169116149050919050565b6129f28282612312565b15612a6d576040805160e560020a62461bcd02815260206004820152603260248201527f52657175657374656420746172676574206d6967726174696f6e20494420686160448201527f7320616c7265616479206265656e2072756e0000000000000000000000000000606482015290519081900360840190fd5b5050565b600080805b8351811015612b0257612a9081600863ffffffff61388e16565b8482815181101515612a9e57fe5b60209101015160029190910a7f0100000000000000000000000000000000000000000000000000000000000000918290049091027fff0000000000000000000000000000000000000000000000000000000000000016049190911790600101612a76565b5092915050565b612b1282611879565b1515612b68576040805160e560020a62461bcd02815260206004820152601a60248201527f546865204573746174652069642073686f756c64206578697374000000000000604482015290519081900360640190fd5b6000818152600f602052604090205415612bf2576040805160e560020a62461bcd02815260206004820152602660248201527f546865204c414e4420697320616c7265616479206f776e656420627920616e2060448201527f4573746174650000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600d54604080517f6352211e0000000000000000000000000000000000000000000000000000000081526004810184905290513092600160a060020a031691636352211e9160248083019260209291908290030181600087803b158015612c5857600080fd5b505af1158015612c6c573d6000803e3d6000fd5b505050506040513d6020811015612c8257600080fd5b5051600160a060020a031614612d08576040805160e560020a62461bcd02815260206004820152602b60248201527f546865204573746174652052656769737472792063616e6e6f74206d616e616760448201527f652074686973204c414e44000000000000000000000000000000000000000000606482015290519081900360840190fd5b6000828152600e60209081526040808320805460018101825581855283852001859055848452600f835281842086905585845254601083528184208585529092528083209190915551829184917fff0e52667d53255667dc777a00af81038a4646367b0d73d8ee8540ca5b0c9a2e9190a35050565b600080612d8983611bcb565b905080600160a060020a031684600160a060020a03161480612dc4575083600160a060020a0316612db98461107d565b600160a060020a0316145b80612888575061288881856128c7565b81600160a060020a0316612de782611bcb565b600160a060020a031614612dfa57600080fd5b600081815260026020526040902054600160a060020a031615612a6d5760009081526002602052604090208054600160a060020a031916905550565b6000806000612e4585856138b7565b600084815260086020908152604080832054600160a060020a0389168452600790925290912054909350612e8090600163ffffffff61394016565b600160a060020a038616600090815260076020526040902080549193509083908110612ea857fe5b90600052602060002001549050806007600087600160a060020a0316600160a060020a0316815260200190815260200160002084815481101515612ee857fe5b6000918252602080832090910192909255600160a060020a0387168152600790915260408120805484908110612f1a57fe5b6000918252602080832090910192909255600160a060020a0387168152600790915260409020805490612f51906000198301613bd1565b50600093845260086020526040808520859055908452909220555050565b6000612f7b8383613952565b50600160a060020a039091166000908152600760209081526040808320805460018101825590845282842081018590559383526008909152902055565b60008084612fc6338261350e565b151561301c576040805160e560020a62461bcd02815260206004820152601160248201527f556e617574686f72697a65642075736572000000000000000000000000000000604482015290519081900360640190fd5b6000858152600f602052604090205486146130a7576040805160e560020a62461bcd02815260206004820152602260248201527f546865204c414e44206973206e6f742070617274206f6620746865204573746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600d54604080517f7efd9112000000000000000000000000000000000000000000000000000000008152600481018890528151600160a060020a0390931692637efd9112926024808401939192918290030181600087803b15801561310b57600080fd5b505af115801561311f573d6000803e3d6000fd5b505050506040513d604081101561313557600080fd5b508051602091820151600d546040517fd4dd159400000000000000000000000000000000000000000000000000000000815260048101848152602482018490526060604483019081528a5160648401528a51959950939750600160a060020a039092169463d4dd159494899489948c949093919260849091019185019080838360005b838110156131d05781810151838201526020016131b8565b50505050905090810190601f1680156131fd5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561321e57600080fd5b505af1158015613232573d6000803e3d6000fd5b50505050505050505050565b600080808080600160a060020a03861615156132ca576040805160e560020a62461bcd02815260206004820152602d60248201527f596f752063616e206e6f74207472616e73666572204c414e4420746f20616e2060448201527f656d707479206164647265737300000000000000000000000000000000000000606482015290519081900360840190fd5b6000888152600e60209081526040808320601083528184208b8552928390529220549196509450151561336d576040805160e560020a62461bcd02815260206004820152602260248201527f546865204c414e44206973206e6f742070617274206f6620746865204573746160448201527f7465000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b845461338090600163ffffffff61394016565b6000888152602086905260409020549093506133a390600163ffffffff61394016565b915084838154811015156133b357fe5b60009182526020909120015490506133d282600163ffffffff6139d516565b600082815260208690526040902055845481908690849081106133f157fe5b600091825260209091200155845485908490811061340b57fe5b6000918252602082200155826134218682613bd1565b50600087815260208581526040808320839055600f909152808220829055600d5481517f42842e0e000000000000000000000000000000000000000000000000000000008152306004820152600160a060020a038a81166024830152604482018c9052925192909116926342842e0e9260648084019382900301818387803b1580156134ac57600080fd5b505af11580156134c0573d6000803e3d6000fd5b5050505085600160a060020a031687897f7932eb5ab0d4d4d172776074ee15d13d708465ff5476902ed15a4965434fcab160405160405180910390a45050505050505050565b6000903b1190565b600061351a8383612d7d565b80611bfb575050600090815260126020526040902054600160a060020a0391821691161490565b6000828152601160209081526040909120825161132092840190613b53565b60008061357585600160a060020a0316613506565b15156135845760019150611219565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b838110156136175781810151838201526020016135ff565b50505050905090810190601f1680156136445780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561366657600080fd5b505af115801561367a573d6000803e3d6000fd5b505050506040513d602081101561369057600080fd5b5051600160e060020a0319167f150b7a0200000000000000000000000000000000000000000000000000000000149695505050505050565b600080600160a060020a0384161515613750576040805160e560020a62461bcd028152602060048201526024808201527f596f752063616e206e6f74206d696e7420746f20616e20656d7074792061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b6137586139e2565b90506137648482613a02565b61376e8184613541565b8084600160a060020a03167fd66691e9db811aef0bc0900328bd314b23f1f2285d5cb6d4baa4d959b3645a3c856040518080602001828103825283818151815260200191508051906020019080838360005b838110156137d85781810151838201526020016137c0565b50505050905090810190601f1680156138055780820380516001836020036101000a031916815260200191505b509250505060405180910390a39392505050565b600061382482613a51565b806138585750600160e060020a031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b80610bd9575050600160e060020a0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b600082151561389f57506000610bd9565b508181028183828115156138af57fe5b0414610bd957fe5b81600160a060020a03166138ca82611bcb565b600160a060020a0316146138dd57600080fd5b600160a060020a03821660009081526003602052604090205461390790600163ffffffff61394016565b600160a060020a039092166000908152600360209081526040808320949094559181526001909152208054600160a060020a0319169055565b60008282111561394c57fe5b50900390565b600081815260016020526040902054600160a060020a03161561397457600080fd5b60008181526001602081815260408084208054600160a060020a031916600160a060020a03881690811790915584526003909152909120546139b5916139d5565b600160a060020a0390921660009081526003602052604090209190915550565b81810182811015610bd957fe5b60006139fd60016139f1611222565b9063ffffffff6139d516565b905090565b613a0c8282613ac6565b600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af015550565b6000613a5c82613b21565b80613a905750600160e060020a031982167f80ac58cd00000000000000000000000000000000000000000000000000000000145b80610bd9575050600160e060020a0319167f4f558e79000000000000000000000000000000000000000000000000000000001490565b600160a060020a0382161515613adb57600080fd5b613ae58282612f6f565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600160e060020a031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b9457805160ff1916838001178555613bc1565b82800160010185558215613bc1579182015b82811115613bc1578251825591602001919060010190613ba6565b50613bcd929150613bf1565b5090565b815481835581811115611320576000838152602090206113209181019083015b610c7391905b80821115613bcd5760008155600101613bf75600dd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea3696e697469616c697a65640000000000000000000000000000000000000000004f6e6c79206f776e6572206f72206f70657261746f722063616e207472616e73a165627a7a7230582097c1068c19aef8da87c1846774d505a436603e7dbf11a73d906a5d3ddd8c305c0029

Swarm Source

bzzr://97c1068c19aef8da87c1846774d505a436603e7dbf11a73d906a5d3ddd8c305c

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

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