Contract 0x003Ad9c18BC279f40632E7e5De2fd213931215d0

 

Contract Overview

Balance:
0 Ether

EtherValue:
$0.00

Token:
 
Txn Hash
Method
Block
From
To
Value
0x81dc60125350f05ad7dd6b6b6ef990da2ddc83a2e7d9f184f235e673ea1fa54eBuy Land With To...71630482019-02-02 10:14:501404 days 1 hr ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.005494683
0xfa26d7b4b50b8496609db984a58e711ca0d4b95c14407ca627311610d8268455Buy Land With To...71630462019-02-02 10:14:441404 days 1 hr ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.007822141
0xe49cdd4989a948e58476992c36d6f35f7c309c4ba3a13b53a1611b30ee2a4f2aM67455032018-11-21 12:13:061476 days 23 hrs agoPlanetCrypto: Deployer IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000132356
0xc986da3f8c85752bf2dd15c8acd4a2cbe1620a1cb2a94ac7a79698d145e09decM67454372018-11-21 11:56:361476 days 23 hrs ago0x58f7746ca1eee36b668fb91ddd2f89efcb9b99ae IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000086033.9
0xaf8cf932ed2f5dd2cb1bda3e161f362113d62f256ecdad03787a6fae8066390eM67454312018-11-21 11:55:161476 days 23 hrs ago0x216a1bc765963a85f7932bfa8e024de3c9e22572 IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000086033.9
0xbd7f40c17fdfa47ad4eb6f317757fb9f02909543110bd04394a0ba62a81d39d3M67452852018-11-21 11:22:231477 days ago0xb632a6a8f24f83a4db6d66ea8a784dccff8b062d IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000088234
0x1821271e1a2670ac3254506257e6c5157b78ead9b3ae46c8da887bef0614977fM67452782018-11-21 11:20:561477 days 2 mins ago0x0e78207c8e3510264ce0063fc02acc46d7d655d1 IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000088234
0xcd44705d3444851e62b422a99958bb90835c06f806a97cc8c7a3ec03d5b988f8M67452412018-11-21 11:11:251477 days 11 mins ago0x285b29f6fd14f1785c01a2065ca8de319e009da3 IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000088234
0x1d4d7fe46fd2213146587020eec31352e6edbdfe1914d0be90b156b3589add76M67452392018-11-21 11:10:571477 days 12 mins ago0x27f1680513bfb0a65a395621c076d03d8254a865 IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000088234
0x8b390861f4c1a7f086bb01c2fb61a099156acf0e1c8ec3c5a90816fba9fe5b81M67448562018-11-21 9:37:431477 days 1 hr agoPlanetCrypto: Deployer IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000088234
0x982cd5f93c7167b9f67a5fb0ef503c2d2c3773bd5abbb0eeb044c0fc682e0357Buy Land With To...67051812018-11-14 21:23:051483 days 14 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.021211078
0xbb520b2cd2e5c38bf17aa0e32542e782b6b9093e4c7b5c6d6c9999dc5be51ab5Buy Land With To...67051442018-11-14 21:14:401483 days 14 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.021330568
0xb4b50f7fc7712505e9980f42e1ff18cda0a435ddc54d3a37d35627cd7e2373e5Buy Land With To...67050992018-11-14 21:03:271483 days 14 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.012295569
0xfe517a45508632b7fed5c72ebaa27b360a80623a6dabc9722d88d3fc50748620Buy Land With To...67049742018-11-14 20:36:081483 days 14 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.010151448
0xddb21badbad211725f73d730bfa8c729df567050a120844048df188b47420e3fBuy Land With To...67049032018-11-14 20:19:291483 days 15 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.118700215
0xd8dc54b83499aedd6d2fe0ca4c5de17ade803da67e4db5b1edc8ab6366106207P_update_tokens ...67031352018-11-14 13:26:431483 days 21 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  0x003ad9c18bc279f40632e7e5de2fd213931215d00 Ether0.000339198
0x5ea2ad067a5006a95af3695ba1fc6cbb9bab151c5c23136733e3a5d01da9e9340x600f805466991962018-11-13 21:56:301484 days 13 hrs ago0x32fea738d8fa275aca80747600a56eedb0d791ca IN  Create: PlanetCryptoToken0 Ether0.036748645
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlanetCryptoToken

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-11-16
*/

pragma solidity ^0.4.24;

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

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



/**
 * @title ERC165
 * @author Matt Condon (@shrugs)
 * @dev Implements ERC165 using a lookup table.
 */
contract ERC165 is IERC165 {

  bytes4 private constant _InterfaceId_ERC165 = 0x01ffc9a7;
  /**
   * 0x01ffc9a7 ===
   *   bytes4(keccak256('supportsInterface(bytes4)'))
   */

  /**
   * @dev a mapping of interface id to whether or not it's supported
   */
  mapping(bytes4 => bool) private _supportedInterfaces;

  /**
   * @dev A contract implementing SupportsInterfaceWithLookup
   * implement ERC165 itself
   */
  constructor()
    internal
  {
    _registerInterface(_InterfaceId_ERC165);
  }

  /**
   * @dev implement supportsInterface(bytes4) using a lookup table
   */
  function supportsInterface(bytes4 interfaceId)
    external
    view
    returns (bool)
  {
    return _supportedInterfaces[interfaceId];
  }

  /**
   * @dev internal method for registering an interface
   */
  function _registerInterface(bytes4 interfaceId)
    internal
  {
    require(interfaceId != 0xffffffff);
    _supportedInterfaces[interfaceId] = true;
  }
}

// current address: 0x499E33164116002329Bf4bB8f7B2dfc97A31F223












/**
 * @title ERC721 Non-Fungible Token Standard basic interface
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract IERC721 is IERC165 {

  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 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;
}


/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract IERC721Receiver {
  /**
   * @notice Handle the receipt of an NFT
   * @dev The ERC721 smart contract calls this function on the recipient
   * after a `safeTransfer`. This function MUST return the function selector,
   * otherwise the caller will revert the transaction. The selector to be
   * returned can be obtained as `this.onERC721Received.selector`. This
   * function MAY throw to revert and reject the transfer.
   * Note: the ERC721 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
    returns(bytes4);
}


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

  /**
  * @dev Multiplies two numbers, reverts on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }

  /**
  * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0); // Solidity only automatically asserts 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 c;
  }

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

    return c;
  }

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

    return c;
  }

  /**
  * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
  * reverts when dividing by zero.
  */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}


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

  /**
   * 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 account address of the account to check
   * @return whether the target address is a contract
   */
  function isContract(address account) 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.
    // solium-disable-next-line security/no-inline-assembly
    assembly { size := extcodesize(account) }
    return size > 0;
  }

}


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

  using SafeMath for uint256;
  using Address for address;

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

  // Mapping from token ID to owner
  mapping (uint256 => address) private _tokenOwner;

  // Mapping from token ID to approved address
  mapping (uint256 => address) private _tokenApprovals;

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

  // Mapping from owner to operator approvals
  mapping (address => mapping (address => bool)) private _operatorApprovals;

  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)'))
   */

  constructor()
    public
  {
    // register the supported interfaces to conform to ERC721 via ERC165
    _registerInterface(_InterfaceId_ERC721);
  }

  /**
   * @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 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
   * Reverts if the token ID does not exist.
   * @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) {
    require(_exists(tokenId));
    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
  {
    require(_isApprovedOrOwner(msg.sender, tokenId));
    require(to != address(0));

    _clearApproval(from, tokenId);
    _removeTokenFrom(from, tokenId);
    _addTokenTo(to, tokenId);

    emit Transfer(from, to, tokenId);
  }
  
  
  
  
    function internal_transferFrom(
        address _from,
        address to,
        uint256 tokenId
    )
    internal
  {
    // permissions already checked on price basis
    
    require(to != address(0));

    if (_tokenApprovals[tokenId] != address(0)) {
      _tokenApprovals[tokenId] = address(0);
    }
    
    //_removeTokenFrom(from, tokenId);
    if(_ownedTokensCount[_from] > 1) {
    _ownedTokensCount[_from] = _ownedTokensCount[_from] -1; //.sub(1); // error here
    // works without .sub()????
    
    }
    _tokenOwner[tokenId] = address(0); 
    
    _addTokenTo(to, tokenId); // error here?

    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
  {
    // 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
  {
    transferFrom(from, to, tokenId);
    // solium-disable-next-line arg-overflow
    require(_checkOnERC721Received(from, to, tokenId, _data));
  }

  /**
   * @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) internal view returns (bool) {
    address owner = _tokenOwner[tokenId];
    return owner != address(0);
  }

  /**
   * @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 add a token ID to the list of a given address
   * Note that this function is left internal to make ERC721Enumerable possible, but is not
   * intended to be called by custom derived contracts: in particular, it emits no Transfer event.
   * @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
   * Note that this function is left internal to make ERC721Enumerable possible, but is not
   * intended to be called by custom derived contracts: in particular, it emits no Transfer event,
   * and doesn't clear approvals.
   * @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 _checkOnERC721Received(
    address from,
    address to,
    uint256 tokenId,
    bytes _data
  )
    internal
    returns (bool)
  {
    if (!to.isContract()) {
      return true;
    }
    bytes4 retval = IERC721Receiver(to).onERC721Received(
      msg.sender, from, tokenId, _data);
    return (retval == _ERC721_RECEIVED);
  }

  /**
   * @dev Private 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) private {
    require(ownerOf(tokenId) == owner);
    if (_tokenApprovals[tokenId] != address(0)) {
      _tokenApprovals[tokenId] = address(0);
    }
  }
}






/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract IERC721Enumerable is IERC721 {
  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 with optional enumeration extension logic
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Enumerable_custom is ERC165, ERC721_custom, IERC721Enumerable {
  // Mapping from owner to list of owned token IDs
  mapping(address => uint256[]) private _ownedTokens;

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

  // Array with all token ids, used for enumeration
  uint256[] private _allTokens;

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

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

  /**
   * @dev Constructor function
   */
  constructor() public {
    // register the supported interface to conform to ERC721 via ERC165
    _registerInterface(_InterfaceId_ERC721Enumerable);
  }

  /**
   * @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 add a token ID to the list of a given address
   * This function is internal due to language limitations, see the note in ERC721.sol.
   * It is not intended to be called by custom derived contracts: in particular, it emits no Transfer event.
   * @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
   * This function is internal due to language limitations, see the note in ERC721.sol.
   * It is not intended to be called by custom derived contracts: in particular, it emits no Transfer event,
   * and doesn't clear approvals.
   * @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);

    // To prevent a gap in the array, we store the last token in the index of the token to delete, and
    // then delete the last slot.
    uint256 tokenIndex = _ownedTokensIndex[tokenId];
    uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);
    uint256 lastToken = _ownedTokens[from][lastTokenIndex];

    _ownedTokens[from][tokenIndex] = lastToken;
    // This also deletes the contents at the last position of the array
    _ownedTokens[from].length--;

    // 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

    _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);

    // 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;
  }
}








contract IERC721Metadata is IERC721 {
  function name() external view returns (string);
  function symbol() external view returns (string);
  function tokenURI(uint256 tokenId) external view returns (string);
}


contract ERC721Metadata_custom is ERC165, ERC721_custom, IERC721Metadata {
  // Token name
  string private _name;

  // Token symbol
  string private _symbol;

  // Optional mapping for token URIs
  mapping(uint256 => string) private _tokenURIs;

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

  /**
   * @dev Constructor function
   */
  constructor(string name, string symbol) public {
    _name = name;
    _symbol = symbol;

    // register the supported interfaces to conform to ERC721 via ERC165
    _registerInterface(InterfaceId_ERC721Metadata);
  }

  function name() external view returns (string) {
    return _name;
  }

  
  function symbol() external view returns (string) {
    return _symbol;
  }

  
  function tokenURI(uint256 tokenId) external view returns (string) {
    require(_exists(tokenId));
    return _tokenURIs[tokenId];
  }

  
  function _setTokenURI(uint256 tokenId, string uri) internal {
    require(_exists(tokenId));
    _tokenURIs[tokenId] = uri;
  }

  
  function _burn(address owner, uint256 tokenId) internal {
    super._burn(owner, tokenId);

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


contract ERC721Full_custom is ERC721_custom, ERC721Enumerable_custom, ERC721Metadata_custom {
  constructor(string name, string symbol) ERC721Metadata_custom(name, symbol)
    public
  {
  }
}


interface PlanetCryptoCoin_I {
    function balanceOf(address owner) external returns(uint256);
    function transfer(address to, uint256 value) external returns (bool);
    function transferFrom(address from, address to, uint256 value) external returns(bool);
}

interface PlanetCryptoUtils_I {
    function validateLand(address _sender, int256[] plots_lat, int256[] plots_lng) external returns(bool);
    function validatePurchase(address _sender, uint256 _value, int256[] plots_lat, int256[] plots_lng) external returns(bool);
    function validateTokenPurchase(address _sender, int256[] plots_lat, int256[] plots_lng) external returns(bool);
    function validateResale(address _sender, uint256 _value, uint256 _token_id) external returns(bool);

    //UTILS
    function strConcat(string _a, string _b, string _c, string _d, string _e, string _f) external view returns (string);
    function strConcat(string _a, string _b, string _c, string _d, string _e) external view returns (string);
    function strConcat(string _a, string _b, string _c, string _d) external view returns (string);
    function strConcat(string _a, string _b, string _c) external view returns (string);
    function strConcat(string _a, string _b) external view returns (string);
    function int2str(int i) external view returns (string);
    function uint2str(uint i) external view returns (string);
    function substring(string str, uint startIndex, uint endIndex) external view returns (string);
    function utfStringLength(string str) external view returns (uint length);
    function ceil1(int256 a, int256 m) external view returns (int256 );
    function parseInt(string _a, uint _b) external view returns (uint);
}

library Percent {

  struct percent {
    uint num;
    uint den;
  }
  function mul(percent storage p, uint a) internal view returns (uint) {
    if (a == 0) {
      return 0;
    }
    return a*p.num/p.den;
  }

  function div(percent storage p, uint a) internal view returns (uint) {
    return a/p.num*p.den;
  }

  function sub(percent storage p, uint a) internal view returns (uint) {
    uint b = mul(p, a);
    if (b >= a) return 0;
    return a - b;
  }

  function add(percent storage p, uint a) internal view returns (uint) {
    return a + mul(p, a);
  }
}



contract PlanetCryptoToken is ERC721Full_custom{
    
    using Percent for Percent.percent;
    
    
    // EVENTS
        
    event referralPaid(address indexed search_to,
                    address to, uint256 amnt, uint256 timestamp);
    
    event issueCoinTokens(address indexed searched_to, 
                    address to, uint256 amnt, uint256 timestamp);
    
    event landPurchased(uint256 indexed search_token_id, address indexed search_buyer, 
            uint256 token_id, address buyer, bytes32 name, int256 center_lat, int256 center_lng, uint256 size, uint256 bought_at, uint256 empire_score, uint256 timestamp);
    
    event taxDistributed(uint256 amnt, uint256 total_players, uint256 timestamp);
    
    event cardBought(
                    uint256 indexed search_token_id, address indexed search_from, address indexed search_to,
                    uint256 token_id, address from, address to, 
                    bytes32 name,
                    uint256 orig_value, 
                    uint256 new_value,
                    uint256 empireScore, uint256 newEmpireScore, uint256 now);

    // CONTRACT MANAGERS
    address owner;
    address devBankAddress; // where marketing funds are sent
    address tokenBankAddress; 

    // MODIFIERS
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
    
    modifier validateLand(int256[] plots_lat, int256[] plots_lng) {
        
        require(planetCryptoUtils_interface.validateLand(msg.sender, plots_lat, plots_lng) == true, "Some of this land already owned!");

        
        _;
    }
    
    modifier validatePurchase(int256[] plots_lat, int256[] plots_lng) {

        require(planetCryptoUtils_interface.validatePurchase(msg.sender, msg.value, plots_lat, plots_lng) == true, "Not enough ETH!");
        _;
    }
    
    
    modifier validateTokenPurchase(int256[] plots_lat, int256[] plots_lng) {

        require(planetCryptoUtils_interface.validateTokenPurchase(msg.sender, plots_lat, plots_lng) == true, "Not enough COINS to buy these plots!");
        

        

        require(planetCryptoCoin_interface.transferFrom(msg.sender, tokenBankAddress, plots_lat.length) == true, "Token transfer failed");
        
        
        _;
    }
    
    
    modifier validateResale(uint256 _token_id) {
        require(planetCryptoUtils_interface.validateResale(msg.sender, msg.value, _token_id) == true, "Not enough ETH to buy this card!");
        _;
    }
    
    
    modifier updateUsersLastAccess() {
        
        uint256 allPlyersIdx = playerAddressToPlayerObjectID[msg.sender];
        if(allPlyersIdx == 0){

            all_playerObjects.push(player(msg.sender,now,0,0));
            playerAddressToPlayerObjectID[msg.sender] = all_playerObjects.length-1;
        } else {
            all_playerObjects[allPlyersIdx].lastAccess = now;
        }
        
        _;
    }
    
    // STRUCTS
    struct plotDetail {
        bytes32 name;
        uint256 orig_value;
        uint256 current_value;
        uint256 empire_score;
        int256[] plots_lat;
        int256[] plots_lng;
    }
    
    struct plotBasic {
        int256 lat;
        int256 lng;
    }
    
    struct player {
        address playerAddress;
        uint256 lastAccess;
        uint256 totalEmpireScore;
        uint256 totalLand;
        
        
    }
    

    // INTERFACES
    address planetCryptoCoinAddress = 0xEF5B27207bD9Cd7B7708755CDF1A4523CB0b1f7D;
    PlanetCryptoCoin_I internal planetCryptoCoin_interface;
    

    address planetCryptoUtilsAddress = 0x6cd067629939290C5aBFf20E1F6fC8bd750508C0;
    PlanetCryptoUtils_I internal planetCryptoUtils_interface;
    
    
    // settings
    Percent.percent private m_newPlot_devPercent = Percent.percent(75,100); //75/100*100% = 75%
    Percent.percent private m_newPlot_taxPercent = Percent.percent(25,100); //25%
    
    Percent.percent private m_resalePlot_devPercent = Percent.percent(10,100); // 10%
    Percent.percent private m_resalePlot_taxPercent = Percent.percent(10,100); // 10%
    Percent.percent private m_resalePlot_ownerPercent = Percent.percent(80,100); // 80%
    
    Percent.percent private m_refPercent = Percent.percent(5,100); // 5% referral 
    
    Percent.percent private m_empireScoreMultiplier = Percent.percent(150,100); // 150%
    Percent.percent private m_resaleMultipler = Percent.percent(200,100); // 200%;

    
    
    
    uint256 public devHoldings = 0; // holds dev funds in cases where the instant transfer fails


    mapping(address => uint256) internal playersFundsOwed; // can sit within all_playerObjects





    // add in limit of land plots before tokens stop being distributed
    uint256 public tokens_rewards_available;
    uint256 public tokens_rewards_allocated;
    
    // add in spend amount required to earn tokens
    uint256 public min_plots_purchase_for_token_reward = 10;
    uint256 public plots_token_reward_divisor = 10;
    
    
    // GAME SETTINGS
    uint256 public current_plot_price = 20000000000000000;
    uint256 public price_update_amount = 2000000000000;

    uint256 public current_plot_empire_score = 100;

    
    
    uint256 public tax_fund = 0;
    uint256 public tax_distributed = 0;


    // GAME STATS
    uint256 public total_land_sold = 0;
    uint256 public total_trades = 0;

    
    uint256 public total_empire_score; 
    player[] public all_playerObjects;
    mapping(address => uint256) internal playerAddressToPlayerObjectID;
    
    
    
    
    plotDetail[] plotDetails;
    mapping(uint256 => uint256) internal tokenIDplotdetailsIndexId; // e.g. tokenIDplotdetailsIndexId shows us the index of the detail obj for each token



    
    mapping(int256 => mapping(int256 => uint256)) internal latlngTokenID_grids;
    mapping(uint256 => plotBasic[]) internal tokenIDlatlngLookup;
    
    
    
    mapping(uint8 => mapping(int256 => mapping(int256 => uint256))) internal latlngTokenID_zoomAll;

    mapping(uint8 => mapping(uint256 => plotBasic[])) internal tokenIDlatlngLookup_zoomAll;


   
    
    constructor() ERC721Full_custom("PlanetCrypto", "PTC") public {
        owner = msg.sender;
        tokenBankAddress = owner;
        devBankAddress = owner;
        planetCryptoCoin_interface = PlanetCryptoCoin_I(planetCryptoCoinAddress);
        planetCryptoUtils_interface = PlanetCryptoUtils_I(planetCryptoUtilsAddress);
        
        // empty playerAddressToPlayerObjectID player to allow easy checks...

        all_playerObjects.push(player(address(0x0),0,0,0));
        playerAddressToPlayerObjectID[address(0x0)] = 0;
    }

    

    

    function getToken(uint256 _tokenId, bool isBasic) public view returns(
        address token_owner,
        bytes32  name,
        uint256 orig_value,
        uint256 current_value,
        uint256 empire_score,
        int256[] plots_lat,
        int256[] plots_lng
        ) {
        token_owner = ownerOf(_tokenId);
        plotDetail memory _plotDetail = plotDetails[tokenIDplotdetailsIndexId[_tokenId]];
        name = _plotDetail.name;
        empire_score = _plotDetail.empire_score;
        orig_value = _plotDetail.orig_value;
        current_value = _plotDetail.current_value;
        if(!isBasic){
            plots_lat = _plotDetail.plots_lat;
            plots_lng = _plotDetail.plots_lng;
        } else {
        }
    }
    
    

    function taxEarningsAvailable() public view returns(uint256) {
        return playersFundsOwed[msg.sender];
    }

    function withdrawTaxEarning() public {
        uint256 taxEarnings = playersFundsOwed[msg.sender];
        playersFundsOwed[msg.sender] = 0;
        tax_fund = tax_fund.sub(taxEarnings);
        
        if(!msg.sender.send(taxEarnings)) {
            playersFundsOwed[msg.sender] = playersFundsOwed[msg.sender] + taxEarnings;
            tax_fund = tax_fund.add(taxEarnings);
        }
    }

    function buyLandWithTokens(bytes32 _name, int256[] _plots_lat, int256[] _plots_lng)
     validateTokenPurchase(_plots_lat, _plots_lng) validateLand(_plots_lat, _plots_lng) updateUsersLastAccess() public {
        require(_name.length > 4);
        

        processPurchase(_name, _plots_lat, _plots_lng); 
    }
    

    
    function buyLand(bytes32 _name, 
            int256[] _plots_lat, int256[] _plots_lng,
            address _referrer
            )
                validatePurchase(_plots_lat, _plots_lng) 
                validateLand(_plots_lat, _plots_lng) 
                updateUsersLastAccess()
                public payable {
       require(_name.length > 4);
       
        // split payment
        uint256 _runningTotal = msg.value;
        uint256 _referrerAmnt = 0;
        if(_referrer != msg.sender && _referrer != address(0)) {
            _referrerAmnt = m_refPercent.mul(msg.value);
            if(_referrer.send(_referrerAmnt)) {
                emit referralPaid(_referrer, _referrer, _referrerAmnt, now);
                _runningTotal = _runningTotal.sub(_referrerAmnt);
            }
        }
        
        tax_fund = tax_fund.add(m_newPlot_taxPercent.mul(_runningTotal));
        
        
        
        if(!devBankAddress.send(m_newPlot_devPercent.mul(_runningTotal))){
            devHoldings = devHoldings.add(m_newPlot_devPercent.mul(_runningTotal));
        }
        
        
        

        processPurchase(_name, _plots_lat, _plots_lng);
        
        calcPlayerDivs(m_newPlot_taxPercent.mul(_runningTotal));
        
        if(_plots_lat.length >= min_plots_purchase_for_token_reward
            && tokens_rewards_available > 0) {
                
            uint256 _token_rewards = _plots_lat.length / plots_token_reward_divisor;
            if(_token_rewards > tokens_rewards_available)
                _token_rewards = tokens_rewards_available;
                
                
            planetCryptoCoin_interface.transfer(msg.sender, _token_rewards);
                
            emit issueCoinTokens(msg.sender, msg.sender, _token_rewards, now);
            tokens_rewards_allocated = tokens_rewards_allocated + _token_rewards;
            tokens_rewards_available = tokens_rewards_available - _token_rewards;
        }
    
    }
    
    

    function buyCard(uint256 _token_id, address _referrer) validateResale(_token_id) updateUsersLastAccess() public payable {
        
        
        // split payment
        uint256 _runningTotal = msg.value;
        uint256 _referrerAmnt = 0;
        if(_referrer != msg.sender && _referrer != address(0)) {
            _referrerAmnt = m_refPercent.mul(msg.value);
            if(_referrer.send(_referrerAmnt)) {
                emit referralPaid(_referrer, _referrer, _referrerAmnt, now);
                _runningTotal = _runningTotal.sub(_referrerAmnt);
            }
        }
        
        
        tax_fund = tax_fund.add(m_resalePlot_taxPercent.mul(_runningTotal));
        
        
        
        if(!devBankAddress.send(m_resalePlot_devPercent.mul(_runningTotal))){
            devHoldings = devHoldings.add(m_resalePlot_devPercent.mul(_runningTotal));
        }
        
        

        address from = ownerOf(_token_id);
        
        if(!from.send(m_resalePlot_ownerPercent.mul(_runningTotal))) {
            playersFundsOwed[from] = playersFundsOwed[from].add(m_resalePlot_ownerPercent.mul(_runningTotal));
        }
        
        

        our_transferFrom(from, msg.sender, _token_id);
        

        plotDetail memory _plotDetail = plotDetails[tokenIDplotdetailsIndexId[_token_id]];
        uint256 _empireScore = _plotDetail.empire_score;
        uint256 _newEmpireScore = m_empireScoreMultiplier.mul(_empireScore);
        uint256 _origValue = _plotDetail.current_value;
        
        uint256 _playerObject_idx = playerAddressToPlayerObjectID[msg.sender];
        

        all_playerObjects[_playerObject_idx].totalEmpireScore
            = all_playerObjects[_playerObject_idx].totalEmpireScore + (_newEmpireScore - _empireScore);
        
        
        plotDetails[tokenIDplotdetailsIndexId[_token_id]].empire_score = _newEmpireScore;

        total_empire_score = total_empire_score + (_newEmpireScore - _empireScore);
        
        plotDetails[tokenIDplotdetailsIndexId[_token_id]].current_value = 
            m_resaleMultipler.mul(plotDetails[tokenIDplotdetailsIndexId[_token_id]].current_value);
        
        total_trades = total_trades + 1;
        
        
        calcPlayerDivs(m_resalePlot_taxPercent.mul(_runningTotal));
        
        
        // emit event
        emit cardBought(_token_id, from, msg.sender,
                    _token_id, from, msg.sender, 
                    _plotDetail.name,
                    _origValue, 
                    msg.value,
                    _empireScore, _newEmpireScore, now);
    }
    
    function processPurchase(bytes32 _name, 
            int256[] _plots_lat, int256[] _plots_lng) internal {
    
        uint256 _token_id = totalSupply().add(1);
        _mint(msg.sender, _token_id);
        

        

        uint256 _empireScore =
                    current_plot_empire_score * _plots_lng.length;
            
            
        plotDetails.push(plotDetail(
            _name,
            current_plot_price * _plots_lat.length,
            current_plot_price * _plots_lat.length,
            _empireScore,
            _plots_lat, _plots_lng
        ));
        
        tokenIDplotdetailsIndexId[_token_id] = plotDetails.length-1;
        
        
        setupPlotOwnership(_token_id, _plots_lat, _plots_lng);
        
        
        
        uint256 _playerObject_idx = playerAddressToPlayerObjectID[msg.sender];
        all_playerObjects[_playerObject_idx].totalEmpireScore
            = all_playerObjects[_playerObject_idx].totalEmpireScore + _empireScore;
            
        total_empire_score = total_empire_score + _empireScore;
            
        all_playerObjects[_playerObject_idx].totalLand
            = all_playerObjects[_playerObject_idx].totalLand + _plots_lat.length;
            
        
        emit landPurchased(
                _token_id, msg.sender,
                _token_id, msg.sender, _name, _plots_lat[0], _plots_lng[0], _plots_lat.length, current_plot_price, _empireScore, now);


        current_plot_price = current_plot_price + (price_update_amount * _plots_lat.length);
        total_land_sold = total_land_sold + _plots_lat.length;
        
    }




    uint256 internal tax_carried_forward = 0;
    
    function calcPlayerDivs(uint256 _value) internal {
        // total up amount split so we can emit it
        if(totalSupply() > 1) {
            uint256 _totalDivs = 0;
            uint256 _totalPlayers = 0;
            
            uint256 _taxToDivide = _value + tax_carried_forward;
            
            // ignore player 0
            for(uint256 c=1; c< all_playerObjects.length; c++) {
                
                // allow for 0.0001 % =  * 10000
                
                uint256 _playersPercent 
                    = (all_playerObjects[c].totalEmpireScore*10000000 / total_empire_score * 10000000) / 10000000;
                uint256 _playerShare = _taxToDivide / 10000000 * _playersPercent;
                
                //uint256 _playerShare =  _taxToDivide * (all_playerObjects[c].totalEmpireScore / total_empire_score);
                //_playerShare = _playerShare / 10000;
                
                if(_playerShare > 0) {
                    
                    incPlayerOwed(all_playerObjects[c].playerAddress,_playerShare);
                    _totalDivs = _totalDivs + _playerShare;
                    _totalPlayers = _totalPlayers + 1;
                
                }
            }

            tax_carried_forward = 0;
            emit taxDistributed(_totalDivs, _totalPlayers, now);

        } else {
            // first land purchase - no divs this time, carried forward
            tax_carried_forward = tax_carried_forward + _value;
        }
    }
    
    
    function incPlayerOwed(address _playerAddr, uint256 _amnt) internal {
        playersFundsOwed[_playerAddr] = playersFundsOwed[_playerAddr].add(_amnt);
        tax_distributed = tax_distributed.add(_amnt);
    }
    
    
    function setupPlotOwnership(uint256 _token_id, int256[] _plots_lat, int256[] _plots_lng) internal {

       for(uint256 c=0;c< _plots_lat.length;c++) {
         
            //mapping(int256 => mapping(int256 => uint256)) internal latlngTokenID_grids;
            latlngTokenID_grids[_plots_lat[c]]
                [_plots_lng[c]] = _token_id;
                
            //mapping(uint256 => plotBasic[]) internal tokenIDlatlngLookup;
            tokenIDlatlngLookup[_token_id].push(plotBasic(
                _plots_lat[c], _plots_lng[c]
            ));
            
        }
       
        
        int256 _latInt = _plots_lat[0];
        int256 _lngInt = _plots_lng[0];



        setupZoomLvl(1,_latInt, _lngInt, _token_id); // correct rounding / 10 on way out
        setupZoomLvl(2,_latInt, _lngInt, _token_id); // correct rounding / 100
        setupZoomLvl(3,_latInt, _lngInt, _token_id); // correct rounding / 1000
        setupZoomLvl(4,_latInt, _lngInt, _token_id); // correct rounding / 10000
      
    }

    function setupZoomLvl(uint8 zoom, int256 lat, int256 lng, uint256 _token_id) internal  {
        
        lat = roundLatLng(zoom, lat);
        lng  = roundLatLng(zoom, lng); 
        
        
        uint256 _remover = 5;
        if(zoom == 1)
            _remover = 5;
        if(zoom == 2)
            _remover = 4;
        if(zoom == 3)
            _remover = 3;
        if(zoom == 4)
            _remover = 2;
        
        string memory _latStr;  // = int2str(lat);
        string memory _lngStr; // = int2str(lng);

        
        
        bool _tIsNegative = false;
        
        if(lat < 0) {
            _tIsNegative = true;   
            lat = lat * -1;
        }
        _latStr = planetCryptoUtils_interface.int2str(lat);
        _latStr = planetCryptoUtils_interface.substring(_latStr,0,planetCryptoUtils_interface.utfStringLength(_latStr)-_remover); //_lat_len-_remover);
        lat = int256(planetCryptoUtils_interface.parseInt(_latStr,0));
        if(_tIsNegative)
            lat = lat * -1;
        
        
        //emit debugInt("ZOOM LNG1", lng); // 1.1579208923731619542...
        
        if(lng < 0) {
            _tIsNegative = true;
            lng = lng * -1;
        } else {
            _tIsNegative = false;
        }
            
        //emit debugInt("ZOOM LNG2", lng); // 100000
            
        _lngStr = planetCryptoUtils_interface.int2str(lng);
        
        _lngStr = planetCryptoUtils_interface.substring(_lngStr,0,planetCryptoUtils_interface.utfStringLength(_lngStr)-_remover);
        
        lng = int256(planetCryptoUtils_interface.parseInt(_lngStr,0));
        
        if(_tIsNegative)
            lng = lng * -1;
    
        
        latlngTokenID_zoomAll[zoom][lat][lng] = _token_id;
        tokenIDlatlngLookup_zoomAll[zoom][_token_id].push(plotBasic(lat,lng));
        
      
   
        
        
    }




    


    function getAllPlayerObjectLen() public view returns(uint256){
        return all_playerObjects.length;
    }
    

    function queryMap(uint8 zoom, int256[] lat_rows, int256[] lng_columns) public view returns(string _outStr) {
        
        
        for(uint256 y=0; y< lat_rows.length; y++) {

            for(uint256 x=0; x< lng_columns.length; x++) {
                
                
                
                if(zoom == 0){
                    if(latlngTokenID_grids[lat_rows[y]][lng_columns[x]] > 0){
                        
                        
                      _outStr = planetCryptoUtils_interface.strConcat(
                            _outStr, '[', planetCryptoUtils_interface.int2str(lat_rows[y]) , ':', planetCryptoUtils_interface.int2str(lng_columns[x]) );
                      _outStr = planetCryptoUtils_interface.strConcat(_outStr, ':', 
                                    planetCryptoUtils_interface.uint2str(latlngTokenID_grids[lat_rows[y]][lng_columns[x]]), ']');
                    }
                    
                } else {
                    //_out[c] = latlngTokenID_zoomAll[zoom][lat_rows[y]][lng_columns[x]];
                    if(latlngTokenID_zoomAll[zoom][lat_rows[y]][lng_columns[x]] > 0){
                      _outStr = planetCryptoUtils_interface.strConcat(_outStr, '[', planetCryptoUtils_interface.int2str(lat_rows[y]) , ':', planetCryptoUtils_interface.int2str(lng_columns[x]) );
                      _outStr = planetCryptoUtils_interface.strConcat(_outStr, ':', 
                                    planetCryptoUtils_interface.uint2str(latlngTokenID_zoomAll[zoom][lat_rows[y]][lng_columns[x]]), ']');
                    }
                    
                }
                //c = c+1;
                
            }
        }
        
        //return _out;
    }

    function queryPlotExists(uint8 zoom, int256[] lat_rows, int256[] lng_columns) public view returns(bool) {
        
        
        for(uint256 y=0; y< lat_rows.length; y++) {

            for(uint256 x=0; x< lng_columns.length; x++) {
                
                if(zoom == 0){
                    if(latlngTokenID_grids[lat_rows[y]][lng_columns[x]] > 0){
                        return true;
                    } 
                } else {
                    if(latlngTokenID_zoomAll[zoom][lat_rows[y]][lng_columns[x]] > 0){

                        return true;
                        
                    }                     
                }
           
                
            }
        }
        
        return false;
    }

    
    function roundLatLng(uint8 _zoomLvl, int256 _in) internal view returns(int256) {
        int256 multipler = 100000;
        if(_zoomLvl == 1)
            multipler = 100000;
        if(_zoomLvl == 2)
            multipler = 10000;
        if(_zoomLvl == 3)
            multipler = 1000;
        if(_zoomLvl == 4)
            multipler = 100;
        if(_zoomLvl == 5)
            multipler = 10;
        
        if(_in > 0){
            // round it
            _in = planetCryptoUtils_interface.ceil1(_in, multipler);
        } else {
            _in = _in * -1;
            _in = planetCryptoUtils_interface.ceil1(_in, multipler);
            _in = _in * -1;
        }
        
        return (_in);
        
    }
    

   




    // ERC721 overrides
    
    function safeTransferFrom(address from, address to, uint256 tokenId) public {
        safeTransferFrom(from, to, tokenId, "");
    }
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) public {
        transferFrom(from, to, tokenId);
        // solium-disable-next-line arg-overflow
        require(_checkOnERC721Received(from, to, tokenId, _data));
    }
    
    function our_transferFrom(address from, address to, uint256 tokenId) internal {
        // permissions already checked on buycard
        process_swap(from,to,tokenId);
        
        internal_transferFrom(from, to, tokenId);
    }
function debug_transfer(address from, address to, uint256 tokenId) public {
    super.internal_transferFrom(from, to, tokenId);
}

    function transferFrom(address from, address to, uint256 tokenId) public {
        // check permission on the from address first
        require(_isApprovedOrOwner(msg.sender, tokenId));
        require(to != address(0));
        
        process_swap(from,to,tokenId);
        
        super.transferFrom(from, to, tokenId);

    }
    
    function process_swap(address from, address to, uint256 tokenId) internal {

        
        // remove the empire score & total land owned...
        uint256 _empireScore;
        uint256 _size;
        
        plotDetail memory _plotDetail = plotDetails[tokenIDplotdetailsIndexId[tokenId]];
        _empireScore = _plotDetail.empire_score;
        _size = _plotDetail.plots_lat.length;
        
        uint256 _playerObject_idx = playerAddressToPlayerObjectID[from];
        
        all_playerObjects[_playerObject_idx].totalEmpireScore
            = all_playerObjects[_playerObject_idx].totalEmpireScore - _empireScore;
            
        all_playerObjects[_playerObject_idx].totalLand
            = all_playerObjects[_playerObject_idx].totalLand - _size;
            
        // and increment on the other side...
        
        _playerObject_idx = playerAddressToPlayerObjectID[to];
        
        all_playerObjects[_playerObject_idx].totalEmpireScore
            = all_playerObjects[_playerObject_idx].totalEmpireScore + _empireScore;
            
        all_playerObjects[_playerObject_idx].totalLand
            = all_playerObjects[_playerObject_idx].totalLand + _size;
    }


    function burnToken(uint256 _tokenId) external onlyOwner {
        address _token_owner = ownerOf(_tokenId);
        _burn(_token_owner, _tokenId);
        
        
        // remove the empire score & total land owned...
        uint256 _empireScore;
        uint256 _size;
        
        plotDetail memory _plotDetail = plotDetails[tokenIDplotdetailsIndexId[_tokenId]];
        _empireScore = _plotDetail.empire_score;
        _size = _plotDetail.plots_lat.length;
        
        uint256 _playerObject_idx = playerAddressToPlayerObjectID[_token_owner];
        
        all_playerObjects[_playerObject_idx].totalEmpireScore
            = all_playerObjects[_playerObject_idx].totalEmpireScore - _empireScore;
            
        all_playerObjects[_playerObject_idx].totalLand
            = all_playerObjects[_playerObject_idx].totalLand - _size;
            
       
        
        for(uint256 c=0;c < tokenIDlatlngLookup[_tokenId].length; c++) {
            latlngTokenID_grids[
                    tokenIDlatlngLookup[_tokenId][c].lat
                ][tokenIDlatlngLookup[_tokenId][c].lng] = 0;
        }
        delete tokenIDlatlngLookup[_tokenId];
        
        
        
        //Same for tokenIDplotdetailsIndexId        
        // clear from plotDetails array... (Holds the detail of the card)
        uint256 oldIndex = tokenIDplotdetailsIndexId[_tokenId];
        if(oldIndex != plotDetails.length-1) {
            plotDetails[oldIndex] = plotDetails[plotDetails.length-1];
        }
        plotDetails.length--;
        

        delete tokenIDplotdetailsIndexId[_tokenId];



        for(uint8 zoom=1; zoom < 5; zoom++) {
            plotBasic[] storage _plotBasicList = tokenIDlatlngLookup_zoomAll[zoom][_tokenId];
            for(uint256 _plotsC=0; c< _plotBasicList.length; _plotsC++) {
                delete latlngTokenID_zoomAll[zoom][
                    _plotBasicList[_plotsC].lat
                    ][
                        _plotBasicList[_plotsC].lng
                        ];
                        
                delete _plotBasicList[_plotsC];
            }
            
        }
    
    



    }    



    // PRIVATE METHODS
    function p_update_action(uint256 _type, address _address) public onlyOwner {
        if(_type == 0){
            owner = _address;    
        }
        if(_type == 1){
            tokenBankAddress = _address;    
        }
        if(_type == 2) {
            devBankAddress = _address;
        }
    }


    function p_update_priceUpdateAmount(uint256 _price_update_amount) public onlyOwner {
        price_update_amount = _price_update_amount;
    }
    function p_update_currentPlotEmpireScore(uint256 _current_plot_empire_score) public onlyOwner {
        current_plot_empire_score = _current_plot_empire_score;
    }
    function p_update_planetCryptoCoinAddress(address _planetCryptoCoinAddress) public onlyOwner {
        planetCryptoCoinAddress = _planetCryptoCoinAddress;
        if(address(planetCryptoCoinAddress) != address(0)){ 
            planetCryptoCoin_interface = PlanetCryptoCoin_I(planetCryptoCoinAddress);
        }
    }
    function p_update_planetCryptoUtilsAddress(address _planetCryptoUtilsAddress) public onlyOwner {
        planetCryptoUtilsAddress = _planetCryptoUtilsAddress;
        if(address(planetCryptoUtilsAddress) != address(0)){ 
            planetCryptoUtils_interface = PlanetCryptoUtils_I(planetCryptoUtilsAddress);
        }
    }
    function p_update_mNewPlotDevPercent(uint256 _newPercent) onlyOwner public {
        m_newPlot_devPercent = Percent.percent(_newPercent,100);
    }
    function p_update_mNewPlotTaxPercent(uint256 _newPercent) onlyOwner public {
        m_newPlot_taxPercent = Percent.percent(_newPercent,100);
    }
    function p_update_mResalePlotDevPercent(uint256 _newPercent) onlyOwner public {
        m_resalePlot_devPercent = Percent.percent(_newPercent,100);
    }
    function p_update_mResalePlotTaxPercent(uint256 _newPercent) onlyOwner public {
        m_resalePlot_taxPercent = Percent.percent(_newPercent,100);
    }
    function p_update_mResalePlotOwnerPercent(uint256 _newPercent) onlyOwner public {
        m_resalePlot_ownerPercent = Percent.percent(_newPercent,100);
    }
    function p_update_mRefPercent(uint256 _newPercent) onlyOwner public {
        m_refPercent = Percent.percent(_newPercent,100);
    }
    function p_update_mEmpireScoreMultiplier(uint256 _newPercent) onlyOwner public {
        m_empireScoreMultiplier = Percent.percent(_newPercent, 100);
    }
    function p_update_mResaleMultipler(uint256 _newPercent) onlyOwner public {
        m_resaleMultipler = Percent.percent(_newPercent, 100);
    }
    function p_update_tokensRewardsAvailable(uint256 _tokens_rewards_available) onlyOwner public {
        tokens_rewards_available = _tokens_rewards_available;
    }
    function p_update_tokensRewardsAllocated(uint256 _tokens_rewards_allocated) onlyOwner public {
        tokens_rewards_allocated = _tokens_rewards_allocated;
    }
    function p_withdrawDevHoldings() public {
        require(msg.sender == devBankAddress);
        uint256 _t = devHoldings;
        devHoldings = 0;
        if(!devBankAddress.send(devHoldings)){
            devHoldings = _t;
        }
    }


    function stringToBytes32(string memory source) internal returns (bytes32 result) {
        bytes memory tempEmptyStringTest = bytes(source);
        if (tempEmptyStringTest.length == 0) {
            return 0x0;
        }
    
        assembly {
            result := mload(add(source, 32))
        }
    }

    function m() public {
        
    }
    
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"min_plots_purchase_for_token_reward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokens_rewards_available","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"zoom","type":"uint8"},{"name":"lat_rows","type":"int256[]"},{"name":"lng_columns","type":"int256[]"}],"name":"queryPlotExists","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":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":"getAllPlayerObjectLen","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_plots_lat","type":"int256[]"},{"name":"_plots_lng","type":"int256[]"}],"name":"buyLandWithTokens","outputs":[],"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":"_newPercent","type":"uint256"}],"name":"p_update_mResalePlotDevPercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"price_update_amount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"all_playerObjects","outputs":[{"name":"playerAddress","type":"address"},{"name":"lastAccess","type":"uint256"},{"name":"totalEmpireScore","type":"uint256"},{"name":"totalLand","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":"_tokens_rewards_available","type":"uint256"}],"name":"p_update_tokensRewardsAvailable","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":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mNewPlotTaxPercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mRefPercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_price_update_amount","type":"uint256"}],"name":"p_update_priceUpdateAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_current_plot_empire_score","type":"uint256"}],"name":"p_update_currentPlotEmpireScore","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"current_plot_price","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":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mResalePlotOwnerPercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokens_rewards_allocated","outputs":[{"name":"","type":"uint256"}],"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":"_token_id","type":"uint256"},{"name":"_referrer","type":"address"}],"name":"buyCard","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"taxEarningsAvailable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"m","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":false,"inputs":[{"name":"_planetCryptoUtilsAddress","type":"address"}],"name":"p_update_planetCryptoUtilsAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"withdrawTaxEarning","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mEmpireScoreMultiplier","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"burnToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_planetCryptoCoinAddress","type":"address"}],"name":"p_update_planetCryptoCoinAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"zoom","type":"uint8"},{"name":"lat_rows","type":"int256[]"},{"name":"lng_columns","type":"int256[]"}],"name":"queryMap","outputs":[{"name":"_outStr","type":"string"}],"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":"total_empire_score","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":true,"inputs":[],"name":"total_land_sold","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":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"total_trades","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_type","type":"uint256"},{"name":"_address","type":"address"}],"name":"p_update_action","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":"_tokens_rewards_allocated","type":"uint256"}],"name":"p_update_tokensRewardsAllocated","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"current_plot_empire_score","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mResaleMultipler","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"isBasic","type":"bool"}],"name":"getToken","outputs":[{"name":"token_owner","type":"address"},{"name":"name","type":"bytes32"},{"name":"orig_value","type":"uint256"},{"name":"current_value","type":"uint256"},{"name":"empire_score","type":"uint256"},{"name":"plots_lat","type":"int256[]"},{"name":"plots_lng","type":"int256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"p_withdrawDevHoldings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"bytes32"},{"name":"_plots_lat","type":"int256[]"},{"name":"_plots_lng","type":"int256[]"},{"name":"_referrer","type":"address"}],"name":"buyLand","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"tax_distributed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"devHoldings","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tax_fund","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"debug_transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"plots_token_reward_divisor","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mNewPlotDevPercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newPercent","type":"uint256"}],"name":"p_update_mResalePlotTaxPercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"search_to","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"amnt","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"referralPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"searched_to","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"amnt","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"issueCoinTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"search_token_id","type":"uint256"},{"indexed":true,"name":"search_buyer","type":"address"},{"indexed":false,"name":"token_id","type":"uint256"},{"indexed":false,"name":"buyer","type":"address"},{"indexed":false,"name":"name","type":"bytes32"},{"indexed":false,"name":"center_lat","type":"int256"},{"indexed":false,"name":"center_lng","type":"int256"},{"indexed":false,"name":"size","type":"uint256"},{"indexed":false,"name":"bought_at","type":"uint256"},{"indexed":false,"name":"empire_score","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"landPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amnt","type":"uint256"},{"indexed":false,"name":"total_players","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"taxDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"search_token_id","type":"uint256"},{"indexed":true,"name":"search_from","type":"address"},{"indexed":true,"name":"search_to","type":"address"},{"indexed":false,"name":"token_id","type":"uint256"},{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"name","type":"bytes32"},{"indexed":false,"name":"orig_value","type":"uint256"},{"indexed":false,"name":"new_value","type":"uint256"},{"indexed":false,"name":"empireScore","type":"uint256"},{"indexed":false,"name":"newEmpireScore","type":"uint256"},{"indexed":false,"name":"now","type":"uint256"}],"name":"cardBought","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"}]

600f8054600160a060020a031990811673ef5b27207bd9cd7b7708755cdf1a4523cb0b1f7d1790915560118054909116736cd067629939290c5abff20e1f6fc8bd750508c0179055604b6080819052606460a08190526013919091556014819055601960c081905260e082905260158190556016829055600a6101008190526101208390526017819055601883905561014081905261016083905290819055601a82905560506101808190526101a0839052601b55601c82905560056101c08190526101e0839052601d55601e8290556096610200819052610220839052601f55602082905561028060405260c8610240819052610260839052602155602282905560006023819055602782905560289190915566470de4df8200006029556501d1a94a2000602a55602b91909155602c819055602d819055602e819055602f8190556039553480156200015257600080fd5b50604080518082018252600c81527f506c616e657443727970746f00000000000000000000000000000000000000006020808301919091528251808401909352600383527f505443000000000000000000000000000000000000000000000000000000000090830152908181620001f27f01ffc9a7000000000000000000000000000000000000000000000000000000006401000000006200042a810204565b620002267f80ac58cd000000000000000000000000000000000000000000000000000000006401000000006200042a810204565b6200025a7f780e9d63000000000000000000000000000000000000000000000000000000006401000000006200042a810204565b81516200026f90600990602085019062000497565b5080516200028590600a90602084019062000497565b50620002ba7f5b5e139f000000000000000000000000000000000000000000000000000000006401000000006200042a810204565b5050600c8054600160a060020a0319908116331791829055600e80548216600160a060020a03938416908117909155600d805483169091179055600f5460108054831691841691909117905560115460128054831691841691909117905560408051608081018252600080825260208083018281529383018281526060840183815260318054600181018255908552945160049095027fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbc8101805496909916959097169490941790965592517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbd85015593517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbe840155517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbf90920191909155818052603290527ebcd6ff29ae71d399fb597d99792fa72d0863bd723b9ab11f79d0b8d8ac5bc855506200053c9050565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200045a57600080fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004da57805160ff19168380011785556200050a565b828001600101855582156200050a579182015b828111156200050a578251825591602001919060010190620004ed565b50620005189291506200051c565b5090565b6200053991905b8082111562000518576000815560010162000523565b90565b615f70806200054c6000396000f30060806040526004361061029a5763ffffffff60e060020a60003504166301de168a811461029f57806301ef74f1146102c657806301ffc9a7146102db57806303a7b41f1461032657806306fdde03146103bc578063081812fc14610446578063095ea7b31461047a5780630cb9ee4b146104a05780630d4ea316146104b557806318160ddd146105485780631cbda93d1461055d578063222d7c8a14610575578063232720651461058a57806323b872dd146105d257806328ab7375146105fc5780632f745c5914610614578063306a858914610638578063312df32114610650578063368aa9ca1461066857806337a74f7e146106805780633fadc3881461069857806342842e0e146106ad578063478c4238146106d75780634a22c7fb146106ef5780634f6ccce71461070457806350357beb1461071c578063567c31f7146107335780635a2ee019146107485780636352211e1461075d57806364cbfdd61461077557806370a08231146107965780637517b57e146107b7578063769988b3146107cc5780637b47ec1a146107e457806382568a24146107fc57806387dfc9091461081d57806395d89b41146108b35780639ee837f5146108c8578063a22cb465146108dd578063aeaf5a3714610903578063b88d4fde14610918578063be3f347114610987578063c112d5251461099c578063c87b56dd146109c0578063cf28b18e146109d8578063d3f78cb4146109f0578063d67c7f3514610a05578063db737c7814610a1d578063dbc933bc14610b10578063dc00adef14610b25578063e1036f8614610bb6578063e4fd6f8114610bcb578063e717dc3d14610be0578063e985e9c514610bf5578063ec6507d714610c1c578063f719db8e14610c46578063fa985a2f14610c5b578063fc4116bb14610c73575b600080fd5b3480156102ab57600080fd5b506102b4610c8b565b60408051918252519081900360200190f35b3480156102d257600080fd5b506102b4610c91565b3480156102e757600080fd5b506103127bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1960043516610c97565b604080519115158252519081900360200190f35b34801561033257600080fd5b5060408051602060046024803582810135848102808701860190975280865261031296843560ff1696369660449591949091019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610ccb9650505050505050565b3480156103c857600080fd5b506103d1610dec565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561040b5781810151838201526020016103f3565b50505050905090810190601f1680156104385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561045257600080fd5b5061045e600435610e83565b60408051600160a060020a039092168252519081900360200190f35b34801561048657600080fd5b5061049e600160a060020a0360043516602435610eb5565b005b3480156104ac57600080fd5b506102b4610f5e565b3480156104c157600080fd5b5060408051602060046024803582810135848102808701860190975280865261049e96843596369660449591949091019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610f649650505050505050565b34801561055457600080fd5b506102b46114da565b34801561056957600080fd5b5061049e6004356114e0565b34801561058157600080fd5b506102b4611519565b34801561059657600080fd5b506105a260043561151f565b60408051600160a060020a0390951685526020850193909352838301919091526060830152519081900360800190f35b3480156105de57600080fd5b5061049e600160a060020a0360043581169060243516604435611561565b34801561060857600080fd5b5061049e6004356115a6565b34801561062057600080fd5b506102b4600160a060020a03600435166024356115c2565b34801561064457600080fd5b5061049e600435611610565b34801561065c57600080fd5b5061049e600435611649565b34801561067457600080fd5b5061049e600435611682565b34801561068c57600080fd5b5061049e60043561169e565b3480156106a457600080fd5b506102b46116ba565b3480156106b957600080fd5b5061049e600160a060020a03600435811690602435166044356116c0565b3480156106e357600080fd5b5061049e6004356116dc565b3480156106fb57600080fd5b506102b4611715565b34801561071057600080fd5b506102b460043561171b565b61049e600435600160a060020a0360243516611750565b34801561073f57600080fd5b506102b4611e8f565b34801561075457600080fd5b5061049e611ea2565b34801561076957600080fd5b5061045e600435611ea4565b34801561078157600080fd5b5061049e600160a060020a0360043516611ec8565b3480156107a257600080fd5b506102b4600160a060020a0360043516611f2c565b3480156107c357600080fd5b5061049e611f5f565b3480156107d857600080fd5b5061049e600435611fd9565b3480156107f057600080fd5b5061049e600435612010565b34801561080857600080fd5b5061049e600160a060020a03600435166124b5565b34801561082957600080fd5b506040805160206004602480358281013584810280870186019097528086526103d196843560ff1696369660449591949091019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506125189650505050505050565b3480156108bf57600080fd5b506103d16134d2565b3480156108d457600080fd5b506102b4613533565b3480156108e957600080fd5b5061049e600160a060020a03600435166024351515613539565b34801561090f57600080fd5b506102b46135bd565b34801561092457600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261049e94600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506135c39650505050505050565b34801561099357600080fd5b506102b46135eb565b3480156109a857600080fd5b5061049e600435600160a060020a03602435166135f1565b3480156109cc57600080fd5b506103d1600435613679565b3480156109e457600080fd5b5061049e60043561372e565b3480156109fc57600080fd5b506102b461374a565b348015610a1157600080fd5b5061049e600435613750565b348015610a2957600080fd5b50610a3a6004356024351515613789565b6040518088600160a060020a0316600160a060020a0316815260200187600019166000191681526020018681526020018581526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b83811015610ab6578181015183820152602001610a9e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610af5578181015183820152602001610add565b50505050905001995050505050505050505060405180910390f35b348015610b1c57600080fd5b5061049e6138f1565b60408051602060046024803582810135848102808701860190975280865261049e96843596369660449591949091019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a99890198929750908201955093508392508501908490808284375094975050509235600160a060020a0316935061394792505050565b348015610bc257600080fd5b506102b461401f565b348015610bd757600080fd5b506102b4614025565b348015610bec57600080fd5b506102b461402b565b348015610c0157600080fd5b50610312600160a060020a0360043581169060243516614031565b348015610c2857600080fd5b5061049e600160a060020a036004358116906024351660443561405f565b348015610c5257600080fd5b506102b461406a565b348015610c6757600080fd5b5061049e600435614070565b348015610c7f57600080fd5b5061049e6004356140a9565b60275481565b60255481565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191660009081526020819052604090205460ff1690565b600080805b8451821015610dde575060005b8351811015610dd35760ff86161515610d59576000603560008785815181101515610d0457fe5b90602001906020020151815260200190815260200160002060008684815181101515610d2c57fe5b906020019060200201518152602001908152602001600020541115610d545760019250610de3565b610dcb565b60ff8616600090815260376020526040812086518290889086908110610d7b57fe5b90602001906020020151815260200190815260200160002060008684815181101515610da357fe5b906020019060200201518152602001908152602001600020541115610dcb5760019250610de3565b600101610cdd565b600190910190610cd0565b600092505b50509392505050565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e785780601f10610e4d57610100808354040283529160200191610e78565b820191906000526020600020905b815481529060010190602001808311610e5b57829003601f168201915b505050505090505b90565b6000610e8e826140e2565b1515610e9957600080fd5b50600090815260026020526040902054600160a060020a031690565b6000610ec082611ea4565b9050600160a060020a038381169082161415610edb57600080fd5b33600160a060020a0382161480610ef75750610ef78133614031565b1515610f0257600080fd5b6000828152600260205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60315490565b6012546040517f05117e0d000000000000000000000000000000000000000000000000000000008152336004820181815260606024840190815286516064850152865187958795600160a060020a03909116946305117e0d9490938893889360448101916084909101906020808801910280838360005b83811015610ff3578181015183820152602001610fdb565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561103257818101518382015260200161101a565b5050505090500195505050505050602060405180830381600087803b15801561105a57600080fd5b505af115801561106e573d6000803e3d6000fd5b505050506040513d602081101561108457600080fd5b50511515600114611104576040805160e560020a62461bcd028152602060048201526024808201527f4e6f7420656e6f75676820434f494e5320746f2062757920746865736520706c60448201527f6f74732100000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b601054600e548351604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152600160a060020a03938416602482015260448101929092525191909216916323b872dd9160648083019260209291908290030181600087803b15801561117e57600080fd5b505af1158015611192573d6000803e3d6000fd5b505050506040513d60208110156111a857600080fd5b50511515600114611203576040805160e560020a62461bcd02815260206004820152601560248201527f546f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b6012546040517f62026229000000000000000000000000000000000000000000000000000000008152336004820181815260606024840190815288516064850152885189958995600160a060020a039091169463620262299490938893889360448101916084909101906020808801910280838360005b8381101561129257818101518382015260200161127a565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156112d15781810151838201526020016112b9565b5050505090500195505050505050602060405180830381600087803b1580156112f957600080fd5b505af115801561130d573d6000803e3d6000fd5b505050506040513d602081101561132357600080fd5b5051151560011461137e576040805160e560020a62461bcd02815260206004820181905260248201527f536f6d65206f662074686973206c616e6420616c7265616479206f776e656421604482015290519081900360640190fd5b3360009081526032602052604090205480151561149f5760408051608081018252338082524260208084019182526000848601818152606086018281526031805460018101825581855297517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbc60049099029889018054600160a060020a031916600160a060020a0390921691909117905594517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbd88015590517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbe870155517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbf909501949094559054918352603290529190206000199190910190556114c5565b426031828154811015156114af57fe5b9060005260206000209060040201600101819055505b6114d08888886140ff565b5050505050505050565b60075490565b600c54600160a060020a031633146114f757600080fd5b6040805180820190915281815260646020909101819052601791909155601855565b602a5481565b603180548290811061152d57fe5b60009182526020909120600490910201805460018201546002830154600390930154600160a060020a039092169350919084565b61156b3382614427565b151561157657600080fd5b600160a060020a038216151561158b57600080fd5b611596838383614486565b6115a1838383614721565b505050565b600c54600160a060020a031633146115bd57600080fd5b602555565b60006115cd83611f2c565b82106115d857600080fd5b600160a060020a03831660009081526005602052604090208054839081106115fc57fe5b906000526020600020015490505b92915050565b600c54600160a060020a0316331461162757600080fd5b6040805180820190915281815260646020909101819052601591909155601655565b600c54600160a060020a0316331461166057600080fd5b6040805180820190915281815260646020909101819052601d91909155601e55565b600c54600160a060020a0316331461169957600080fd5b602a55565b600c54600160a060020a031633146116b557600080fd5b602b55565b60295481565b6115a183838360206040519081016040528060008152506135c3565b600c54600160a060020a031633146116f357600080fd5b6040805180820190915281815260646020909101819052601b91909155601c55565b60265481565b60006117256114da565b821061173057600080fd5b600780548390811061173e57fe5b90600052602060002001549050919050565b600080600061175d615d26565b601254604080517e54438d0000000000000000000000000000000000000000000000000000000081523360048201523460248201526044810189905290516000928392839283928c92600160a060020a03909116916254438d9160648082019260209290919082900301818887803b1580156117d857600080fd5b505af11580156117ec573d6000803e3d6000fd5b505050506040513d602081101561180257600080fd5b5051151560011461185d576040805160e560020a62461bcd02815260206004820181905260248201527f4e6f7420656e6f7567682045544820746f206275792074686973206361726421604482015290519081900360640190fd5b3360009081526032602052604090205480151561197e5760408051608081018252338082524260208084019182526000848601818152606086018281526031805460018101825581855297517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbc60049099029889018054600160a060020a031916600160a060020a0390921691909117905594517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbd88015590517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbe870155517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbf909501949094559054918352603290529190206000199190910190556119a4565b4260318281548110151561198e57fe5b9060005260206000209060040201600101819055505b34995060009850600160a060020a038b1633148015906119cc5750600160a060020a038b1615155b15611a6b576119e2601d3463ffffffff6147af16565b604051909950600160a060020a038c16908a156108fc02908b906000818181858888f1935050505015611a6b5760408051600160a060020a038d16808252602082018c9052428284015291517f500a1821a82e1e9951feb0c4eb0043d6f9d97be1a522ffa083f6a91b7b5c013d9181900360600190a2611a688a8a63ffffffff6147da16565b99505b611a8e611a7f60198c63ffffffff6147af16565b602c549063ffffffff6147f116565b602c55600d54600160a060020a03166108fc611ab160178d63ffffffff6147af16565b6040518115909202916000818181858888f193505050501515611af557611af1611ae260178c63ffffffff6147af16565b6023549063ffffffff6147f116565b6023555b611afe8c611ea4565b9750600160a060020a0388166108fc611b1e601b8d63ffffffff6147af16565b6040518115909202916000818181858888f193505050501515611b8e57611b74611b4f601b8c63ffffffff6147af16565b600160a060020a038a166000908152602460205260409020549063ffffffff6147f116565b600160a060020a0389166000908152602460205260409020555b611b9988338e61480a565b60008c815260346020526040902054603380549091908110611bb757fe5b60009182526020918290206040805160c0810182526006909302909101805483526001810154838501526002810154838301526003810154606084015260048101805483518187028101870190945280845293949193608086019392830182828015611c4257602002820191906000526020600020905b815481526020019060010190808311611c2e575b5050505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015611c9a57602002820191906000526020600020905b815481526020019060010190808311611c86575b5050509190925250505060608101519097509550611cbf601f8763ffffffff6147af16565b604080890151336000908152603260205291909120546031805493985091965094508787039185908110611cef57fe5b90600052602060002090600402016002015401603184815481101515611d1157fe5b906000526020600020906004020160020181905550846033603460008f815260200190815260200160002054815481101515611d4957fe5b90600052602060002090600602016003018190555085850360305401603081905550611db26033603460008f815260200190815260200160002054815481101515611d9057fe5b90600052602060002090600602016002015460216147af90919063ffffffff16565b60008d815260346020526040902054603380549091908110611dd057fe5b6000918252602090912060026006909202010155602f80546001019055611e06611e0160198c63ffffffff6147af16565b614815565b8651604080518e8152600160a060020a038b1660208201819052338284018190526060830194909452608082018890523460a083015260c082018a905260e082018990524261010083015291518f917fca6cef801d696b99880261abca3984a0cf932a69993676ef85130e9ce94e94da91908190036101200190a4505050505050505050505050565b3360009081526024602052604090205490565b565b600081815260016020526040812054600160a060020a031680151561160a57600080fd5b600c54600160a060020a03163314611edf57600080fd5b60118054600160a060020a031916600160a060020a0383811691909117918290551615611f295760115460128054600160a060020a031916600160a060020a039092169190911790555b50565b6000600160a060020a0382161515611f4357600080fd5b50600160a060020a031660009081526003602052604090205490565b3360009081526024602052604081208054919055602c54611f86908263ffffffff6147da16565b602c55604051339082156108fc029083906000818181858888f193505050501515611f2957336000908152602460205260409020805482019055602c54611fd3908263ffffffff6147f116565b602c5550565b600c54600160a060020a03163314611ff057600080fd5b6040805180820190915281815260646020918201819052601f9290925555565b600080600061201d615d26565b600c5460009081908190819081908190600160a060020a0316331461204157600080fd5b61204a8b611ea4565b99506120568a8c614949565b60008b81526034602052604090205460338054909190811061207457fe5b60009182526020918290206040805160c08101825260069093029091018054835260018101548385015260028101548383015260038101546060840152600481018054835181870281018701909452808452939491936080860193928301828280156120ff57602002820191906000526020600020905b8154815260200190600101908083116120eb575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561215757602002820191906000526020600020905b815481526020019060010190808311612143575b5050505050815250509650866060015198508660800151519750603260008b600160a060020a0316600160a060020a03168152602001908152602001600020549550886031878154811015156121a957fe5b906000526020600020906004020160020154036031878154811015156121cb57fe5b906000526020600020906004020160020181905550876031878154811015156121f057fe5b9060005260206000209060040201600301540360318781548110151561221257fe5b906000526020600020906004020160030181905550600094505b60008b8152603660205260409020548510156122d45760008b8152603660205260408120805460359183918990811061226157fe5b90600052602060002090600202016000015481526020019081526020016000206000603660008f8152602001908152602001600020888154811015156122a357fe5b906000526020600020906002020160010154815260200190815260200160002081905550848060010195505061222c565b60008b81526036602052604081206122eb91615d60565b60008b8152603460205260409020546033549094506000190184146123995760338054600019810190811061231c57fe5b906000526020600020906006020160338581548110151561233957fe5b600091825260209091208254600690920201908155600180830154908201556002808301549082015560038083015490820155600480830180546123809284019190615d81565b50600582810180546123959284019190615d81565b5050505b60338054906123ac906000198301615dd1565b5060008b815260346020526040812055600192505b60058360ff1610156124a857505060ff811660009081526038602090815260408083208c84529091528120905b815485101561249d5760ff83166000908152603760205260408120835490919084908490811061241a57fe5b90600052602060002090600202016000015481526020019081526020016000206000838381548110151561244a57fe5b906000526020600020906002020160010154815260200190815260200160002060009055818181548110151561247c57fe5b600091825260208220600290910201818155600190810191909155016123ee565b6001909201916123c1565b5050505050505050505050565b600c54600160a060020a031633146124cc57600080fd5b600f8054600160a060020a031916600160a060020a0383811691909117918290551615611f2957600f5460108054600160a060020a031916600160a060020a0390921691909117905550565b60606000805b8451821015610de3575060005b83518110156134c75760ff86161515612cf257600060356000878581518110151561255257fe5b9060200190602002015181526020019081526020016000206000868481518110151561257a57fe5b906020019060200201518152602001908152602001600020541115612ced576012548551600160a060020a03909116906395978868908590839063997bc6c9908a90889081106125c657fe5b906020019060200201516040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b15801561260957600080fd5b505af115801561261d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561264657600080fd5b81019080805164010000000081111561265e57600080fd5b8201602081018481111561267157600080fd5b815164010000000081118282018710171561268b57600080fd5b50506012548b51919450600160a060020a0316925063997bc6c991508a90889081106126b357fe5b906020019060200201516040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b1580156126f657600080fd5b505af115801561270a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561273357600080fd5b81019080805164010000000081111561274b57600080fd5b8201602081018481111561275e57600080fd5b815164010000000081118282018710171561277857600080fd5b50509291905050506040518463ffffffff1660e060020a028152600401808060200180602001806020018060200180602001868103865289818151815260200191508051906020019080838360005b838110156127df5781810151838201526020016127c7565b50505050905090810190601f16801561280c5780820380516001836020036101000a031916815260200191505b50868103855260018152602001807f5b00000000000000000000000000000000000000000000000000000000000000815250602001868103845288818151815260200191508051906020019080838360005b8381101561287657818101518382015260200161285e565b50505050905090810190601f1680156128a35780820380516001836020036101000a031916815260200191505b508681038352600181526020018060f960020a601d02815250602001868103825287818151815260200191508051906020019080838360005b838110156128f45781810151838201526020016128dc565b50505050905090810190601f1680156129215780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15801561294657600080fd5b505af115801561295a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561298357600080fd5b81019080805164010000000081111561299b57600080fd5b820160208101848111156129ae57600080fd5b81516401000000008111828201871017156129c857600080fd5b50506012548951919750600160a060020a031693506345e965cd9250869150839063f76f950e906035906000908c908a908110612a0157fe5b90602001906020020151815260200190815260200160002060008a88815181101515612a2957fe5b906020019060200201518152602001908152602001600020546040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b158015612a7b57600080fd5b505af1158015612a8f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612ab857600080fd5b810190808051640100000000811115612ad057600080fd5b82016020810184811115612ae357600080fd5b8151640100000000811182820187101715612afd57600080fd5b50509291905050506040518363ffffffff1660e060020a0281526004018080602001806020018060200180602001858103855287818151815260200191508051906020019080838360005b83811015612b60578181015183820152602001612b48565b50505050905090810190601f168015612b8d5780820380516001836020036101000a031916815260200191505b508581038452600181526020018060f960020a601d02815250602001858103835286818151815260200191508051906020019080838360005b83811015612bde578181015183820152602001612bc6565b50505050905090810190601f168015612c0b5780820380516001836020036101000a031916815260200191505b50858103825260018152602001807f5d000000000000000000000000000000000000000000000000000000000000008152506020019650505050505050600060405180830381600087803b158015612c6257600080fd5b505af1158015612c76573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612c9f57600080fd5b810190808051640100000000811115612cb757600080fd5b82016020810184811115612cca57600080fd5b8151640100000000811182820187101715612ce457600080fd5b50909650505050505b6134bf565b60ff8616600090815260376020526040812086518290889086908110612d1457fe5b90602001906020020151815260200190815260200160002060008684815181101515612d3c57fe5b9060200190602002015181526020019081526020016000205411156134bf576012548551600160a060020a03909116906395978868908590839063997bc6c9908a9088908110612d8857fe5b906020019060200201516040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b158015612dcb57600080fd5b505af1158015612ddf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612e0857600080fd5b810190808051640100000000811115612e2057600080fd5b82016020810184811115612e3357600080fd5b8151640100000000811182820187101715612e4d57600080fd5b50506012548b51919450600160a060020a0316925063997bc6c991508a9088908110612e7557fe5b906020019060200201516040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b158015612eb857600080fd5b505af1158015612ecc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015612ef557600080fd5b810190808051640100000000811115612f0d57600080fd5b82016020810184811115612f2057600080fd5b8151640100000000811182820187101715612f3a57600080fd5b50509291905050506040518463ffffffff1660e060020a028152600401808060200180602001806020018060200180602001868103865289818151815260200191508051906020019080838360005b83811015612fa1578181015183820152602001612f89565b50505050905090810190601f168015612fce5780820380516001836020036101000a031916815260200191505b50868103855260018152602001807f5b00000000000000000000000000000000000000000000000000000000000000815250602001868103845288818151815260200191508051906020019080838360005b83811015613038578181015183820152602001613020565b50505050905090810190601f1680156130655780820380516001836020036101000a031916815260200191505b508681038352600181526020018060f960020a601d02815250602001868103825287818151815260200191508051906020019080838360005b838110156130b657818101518382015260200161309e565b50505050905090810190601f1680156130e35780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15801561310857600080fd5b505af115801561311c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561314557600080fd5b81019080805164010000000081111561315d57600080fd5b8201602081018481111561317057600080fd5b815164010000000081118282018710171561318a57600080fd5b505060125460ff8b1660009081526037602052604081208b51939950600160a060020a0390921695506345e965cd9450889350859263f76f950e9291908c908a9081106131d357fe5b90602001906020020151815260200190815260200160002060008a888151811015156131fb57fe5b906020019060200201518152602001908152602001600020546040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b15801561324d57600080fd5b505af1158015613261573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561328a57600080fd5b8101908080516401000000008111156132a257600080fd5b820160208101848111156132b557600080fd5b81516401000000008111828201871017156132cf57600080fd5b50509291905050506040518363ffffffff1660e060020a0281526004018080602001806020018060200180602001858103855287818151815260200191508051906020019080838360005b8381101561333257818101518382015260200161331a565b50505050905090810190601f16801561335f5780820380516001836020036101000a031916815260200191505b508581038452600181526020018060f960020a601d02815250602001858103835286818151815260200191508051906020019080838360005b838110156133b0578181015183820152602001613398565b50505050905090810190601f1680156133dd5780820380516001836020036101000a031916815260200191505b50858103825260018152602001807f5d000000000000000000000000000000000000000000000000000000000000008152506020019650505050505050600060405180830381600087803b15801561343457600080fd5b505af1158015613448573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561347157600080fd5b81019080805164010000000081111561348957600080fd5b8201602081018481111561349c57600080fd5b81516401000000008111828201871017156134b657600080fd5b50909650505050505b60010161252b565b60019091019061251e565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e785780601f10610e4d57610100808354040283529160200191610e78565b60305481565b600160a060020a03821633141561354f57600080fd5b336000818152600460209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b602e5481565b6135ce848484611561565b6135da84848484614991565b15156135e557600080fd5b50505050565b602f5481565b600c54600160a060020a0316331461360857600080fd5b81151561362b57600c8054600160a060020a031916600160a060020a0383161790555b816001141561365057600e8054600160a060020a031916600160a060020a0383161790555b816002141561367557600d8054600160a060020a031916600160a060020a0383161790555b5050565b6060613684826140e2565b151561368f57600080fd5b6000828152600b602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156137225780601f106136f757610100808354040283529160200191613722565b820191906000526020600020905b81548152906001019060200180831161370557829003601f168201915b50505050509050919050565b600c54600160a060020a0316331461374557600080fd5b602655565b602b5481565b600c54600160a060020a0316331461376757600080fd5b6040805180820190915281815260646020909101819052602191909155602255565b600080600080600060608061379c615d26565b6137a58a611ea4565b60008b81526034602052604090205460338054929a509181106137c457fe5b60009182526020918290206040805160c081018252600690930290910180548352600181015483850152600281015483830152600381015460608401526004810180548351818702810187019094528084529394919360808601939283018282801561384f57602002820191906000526020600020905b81548152602001906001019080831161383b575b50505050508152602001600582018054806020026020016040519081016040528092919081815260200182805480156138a757602002820191906000526020600020905b815481526020019060010190808311613893575b5050505050815250509050806000015196508060600151935080602001519550806040015194508815156138e457806080015192508060a0015191505b5092959891949750929550565b600d54600090600160a060020a0316331461390b57600080fd5b5060238054600091829055600d546040519192600160a060020a03909116916108fc919081818181818888f193505050501515611f2957602355565b60008060008585601260009054906101000a9004600160a060020a0316600160a060020a031663862c5e16333485856040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a031681526020018481526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156139ea5781810151838201526020016139d2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015613a29578181015183820152602001613a11565b505050509050019650505050505050602060405180830381600087803b158015613a5257600080fd5b505af1158015613a66573d6000803e3d6000fd5b505050506040513d6020811015613a7c57600080fd5b50511515600114613ad7576040805160e560020a62461bcd02815260206004820152600f60248201527f4e6f7420656e6f75676820455448210000000000000000000000000000000000604482015290519081900360640190fd5b6012546040517f6202622900000000000000000000000000000000000000000000000000000000815233600482018181526060602484019081528c5160648501528c518d958d95600160a060020a039091169463620262299490938893889360448101916084909101906020808801910280838360005b83811015613b66578181015183820152602001613b4e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015613ba5578181015183820152602001613b8d565b5050505090500195505050505050602060405180830381600087803b158015613bcd57600080fd5b505af1158015613be1573d6000803e3d6000fd5b505050506040513d6020811015613bf757600080fd5b50511515600114613c52576040805160e560020a62461bcd02815260206004820181905260248201527f536f6d65206f662074686973206c616e6420616c7265616479206f776e656421604482015290519081900360640190fd5b33600090815260326020526040902054801515613d735760408051608081018252338082524260208084019182526000848601818152606086018281526031805460018101825581855297517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbc60049099029889018054600160a060020a031916600160a060020a0390921691909117905594517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbd88015590517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbe870155517fc54045fa7c6ec765e825df7f9e9bf9dec12c5cef146f93a5eee56772ee647fbf90950194909455905491835260329052919020600019919091019055613d99565b42603182815481101515613d8357fe5b9060005260206000209060040201600101819055505b34975060009650600160a060020a0389163314801590613dc15750600160a060020a03891615155b15613e6057613dd7601d3463ffffffff6147af16565b604051909750600160a060020a038a169088156108fc029089906000818181858888f1935050505015613e605760408051600160a060020a038b16808252602082018a9052428284015291517f500a1821a82e1e9951feb0c4eb0043d6f9d97be1a522ffa083f6a91b7b5c013d9181900360600190a2613e5d888863ffffffff6147da16565b97505b613e74611a7f60158a63ffffffff6147af16565b602c55600d54600160a060020a03166108fc613e9760138b63ffffffff6147af16565b6040518115909202916000818181858888f193505050501515613ecc57613ec8611ae260138a63ffffffff6147af16565b6023555b613ed78c8c8c6140ff565b613eeb611e0160158a63ffffffff6147af16565b6027548b5110158015613f0057506000602554115b15614011576028548b51811515613f1357fe5b049550602554861115613f265760255495505b601054604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018990529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015613f9357600080fd5b505af1158015613fa7573d6000803e3d6000fd5b505050506040513d6020811015613fbd57600080fd5b5050604080513380825260208201899052428284015291517f4b4baca05c77f3008ba9b998920e58005aeb17a94101186b0a80f564075c043e9181900360600190a260268054870190556025805487900390555b505050505050505050505050565b602d5481565b60235481565b602c5481565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6115a1838383614b13565b60285481565b600c54600160a060020a0316331461408757600080fd5b6040805180820190915281815260646020909101819052601391909155601455565b600c54600160a060020a031633146140c057600080fd5b6040805180820190915281815260646020909101819052601991909155601a55565b600090815260016020526040902054600160a060020a0316151590565b600080600061411d60016141116114da565b9063ffffffff6147f116565b92506141293384614bca565b8351602b546040805160c081018252898152885160295490810260208084019182528b519092029383019384529390940260608201818152608083018b815260a084018b90526033805460018101808355600092909252855160069091027f82a75bdeeae8604d839476ae9efd8b0e15aa447e21bfd7f41283bb54e22c9a82810191825597517f82a75bdeeae8604d839476ae9efd8b0e15aa447e21bfd7f41283bb54e22c9a8389015595517f82a75bdeeae8604d839476ae9efd8b0e15aa447e21bfd7f41283bb54e22c9a8488015591517f82a75bdeeae8604d839476ae9efd8b0e15aa447e21bfd7f41283bb54e22c9a858701555180519298509095929461425a937f82a75bdeeae8604d839476ae9efd8b0e15aa447e21bfd7f41283bb54e22c9a8690910192910190615dfd565b5060a08201518051614276916005840191602090910190615dfd565b5050603354600086815260346020526040902060001990910190555061429f9050838686614c19565b503360009081526032602052604090205460318054839190839081106142c157fe5b906000526020600020906004020160020154016031828154811015156142e357fe5b600091825260209091206002600490920201015560308054830190558451603180548390811061430f57fe5b9060005260206000209060040201600301540160318281548110151561433157fe5b90600052602060002090600402016003018190555033600160a060020a0316837f807689f8da61b73f683c57d12d78610d2e69edfaa2feac878373d92ba25e273085338a8a600081518110151561438457fe5b906020019060200201518a600081518110151561439d57fe5b60209081029091018101518d5160295460408051988952600160a060020a0390971693880193909352868601949094526060860192909252608085019190915260a084019190915260c083015260e082018790524261010083015251908190036101200190a38451602a5402602954016029819055508451602e5401602e81905550505050505050565b60008061443383611ea4565b905080600160a060020a031684600160a060020a0316148061446e575083600160a060020a031661446384610e83565b600160a060020a0316145b8061447e575061447e8185614031565b949350505050565b600080614491615d26565b6000848152603460205260408120546033805490919081106144af57fe5b60009182526020918290206040805160c081018252600690930290910180548352600181015483850152600281015483830152600381015460608401526004810180548351818702810187019094528084529394919360808601939283018282801561453a57602002820191906000526020600020905b815481526020019060010190808311614526575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561459257602002820191906000526020600020905b81548152602001906001019080831161457e575b50505050508152505091508160600151935081608001515192506032600088600160a060020a0316600160a060020a03168152602001908152602001600020549050836031828154811015156145e457fe5b9060005260206000209060040201600201540360318281548110151561460657fe5b9060005260206000209060040201600201819055508260318281548110151561462b57fe5b9060005260206000209060040201600301540360318281548110151561464d57fe5b9060005260206000209060040201600301819055506032600087600160a060020a0316600160a060020a031681526020019081526020016000205490508360318281548110151561469a57fe5b906000526020600020906004020160020154016031828154811015156146bc57fe5b906000526020600020906004020160020181905550826031828154811015156146e157fe5b9060005260206000209060040201600301540160318281548110151561470357fe5b90600052602060002090600402016003018190555050505050505050565b61472b3382614427565b151561473657600080fd5b600160a060020a038216151561474b57600080fd5b6147558382614d75565b61475f8382614dd7565b6147698282614ede565b8082600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008115156147c05750600061160a565b6001830154835483028115156147d257fe5b049392505050565b600080838311156147ea57600080fd5b5050900390565b60008282018381101561480357600080fd5b9392505050565b61405f838383614486565b60008060008060008060016148286114da565b111561493757600095506000945060395487019350600192505b6031548310156148ee576298968060305460318581548110151561486257fe5b906000526020600020906004020160020154629896800281151561488257fe5b04629896800281151561489157fe5b04915050629896808304810260008111156148e3576148d86031848154811015156148b857fe5b6000918252602090912060049091020154600160a060020a031682614f27565b948501946001909401935b600190920191614842565b60006039556040805187815260208101879052428183015290517f5fe10e72bed621bd9aa98489cd68e8ee3f0446c3472cea71de9c6c105c089f8f9181900360600190a1614940565b60398054880190555b50505050505050565b6149538282614f83565b6000818152600b60205260409020546002600019610100600184161502019091160415613675576000818152600b6020526040812061367591615e38565b6000806149a685600160a060020a031661503f565b15156149b55760019150614b0a565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b83811015614a48578181015183820152602001614a30565b50505050905090810190601f168015614a755780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b158015614a9757600080fd5b505af1158015614aab573d6000803e3d6000fd5b505050506040513d6020811015614ac157600080fd5b50517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b600160a060020a0382161515614b2857600080fd5b600081815260026020526040902054600160a060020a031615614b625760008181526002602052604090208054600160a060020a03191690555b600160a060020a03831660009081526003602052604090205460011015614ba457600160a060020a038316600090815260036020526040902080546000190190555b60008181526001602052604090208054600160a060020a03191690556147698282614ede565b614bd48282615047565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688015550565b600080805b8451831015614d035785603560008786815181101515614c3a57fe5b90602001906020020151815260200190815260200160002060008686815181101515614c6257fe5b906020019060200201518152602001908152602001600020819055506036600087815260200190815260200160002060408051908101604052808786815181101515614caa57fe5b9060200190602002015181526020018686815181101515614cc757fe5b60209081029091018101519091528254600181810185556000948552938290208351600290920201908155910151908201559290920191614c1e565b846000815181101515614d1257fe5b906020019060200201519150836000815181101515614d2d57fe5b906020019060200201519050614d4660018383896150a2565b614d5360028383896150a2565b614d6060038383896150a2565b614d6d60048383896150a2565b505050505050565b81600160a060020a0316614d8882611ea4565b600160a060020a031614614d9b57600080fd5b600081815260026020526040902054600160a060020a0316156136755760009081526002602052604090208054600160a060020a031916905550565b6000806000614de68585615a17565b600084815260066020908152604080832054600160a060020a0389168452600590925290912054909350614e2190600163ffffffff6147da16565b600160a060020a038616600090815260056020526040902080549193509083908110614e4957fe5b90600052602060002001549050806005600087600160a060020a0316600160a060020a0316815260200190815260200160002084815481101515614e8957fe5b6000918252602080832090910192909255600160a060020a0387168152600590915260409020805490614ec0906000198301615e7c565b50600093845260066020526040808520859055908452909220555050565b6000614eea8383615aa0565b50600160a060020a039091166000908152600560209081526040808320805460018101825590845282842081018590559383526006909152902055565b600160a060020a038216600090815260246020526040902054614f50908263ffffffff6147f116565b600160a060020a038316600090815260246020526040902055602d54614f7c908263ffffffff6147f116565b602d555050565b6000806000614f928585615b23565b600084815260086020526040902054600754909350614fb890600163ffffffff6147da16565b9150600782815481101515614fc957fe5b9060005260206000200154905080600784815481101515614fe657fe5b6000918252602082200191909155600780548490811061500257fe5b6000918252602090912001556007805490615021906000198301615e7c565b50600093845260086020526040808520859055908452909220555050565b6000903b1190565b600160a060020a038216151561505c57600080fd5b6150668282614ede565b6040518190600160a060020a038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600060608060006150b38888615b73565b96506150bf8887615b73565b9550600593508760ff16600114156150d657600593505b8760ff16600214156150e757600493505b8760ff16600314156150f857600393505b8760ff166004141561510957600293505b506000808712156151205760019050866000190296505b601254604080517f997bc6c9000000000000000000000000000000000000000000000000000000008152600481018a90529051600160a060020a039092169163997bc6c99160248082019260009290919082900301818387803b15801561518657600080fd5b505af115801561519a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156151c357600080fd5b8101908080516401000000008111156151db57600080fd5b820160208101848111156151ee57600080fd5b815164010000000081118282018710171561520857600080fd5b50506012546040517f0326c06b000000000000000000000000000000000000000000000000000000008152602060048201818152845160248401528451949a50600160a060020a039093169650631dcd9b5595508994506000938b938893630326c06b9388938392604401918501908083838c5b8381101561529457818101518382015260200161527c565b50505050905090810190601f1680156152c15780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b1580156152e057600080fd5b505af11580156152f4573d6000803e3d6000fd5b505050506040513d602081101561530a57600080fd5b505160405160e060020a63ffffffff8716028152602481018490529190036044820181905260606004830190815284516064840152845191929091829160840190602087019080838360005b8381101561536e578181015183820152602001615356565b50505050905090810190601f16801561539b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156153bc57600080fd5b505af11580156153d0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156153f957600080fd5b81019080805164010000000081111561541157600080fd5b8201602081018481111561542457600080fd5b815164010000000081118282018710171561543e57600080fd5b5050601254604080517fbf4d89b500000000000000000000000000000000000000000000000000000000815260006024820181905260048201928352845160448301528451949a50600160a060020a03909316965063bf4d89b595508994509192909182916064909101906020860190808383885b838110156154cb5781810151838201526020016154b3565b50505050905090810190601f1680156154f85780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561551857600080fd5b505af115801561552c573d6000803e3d6000fd5b505050506040513d602081101561554257600080fd5b50519650801561555457866000190296505b600086121561556d576001905085600019029550615571565b5060005b601254604080517f997bc6c9000000000000000000000000000000000000000000000000000000008152600481018990529051600160a060020a039092169163997bc6c99160248082019260009290919082900301818387803b1580156155d757600080fd5b505af11580156155eb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561561457600080fd5b81019080805164010000000081111561562c57600080fd5b8201602081018481111561563f57600080fd5b815164010000000081118282018710171561565957600080fd5b50506012546040517f0326c06b000000000000000000000000000000000000000000000000000000008152602060048201818152845160248401528451949950600160a060020a039093169650631dcd9b5595508894506000938b938893630326c06b9388938392604401918501908083838c5b838110156156e55781810151838201526020016156cd565b50505050905090810190601f1680156157125780820380516001836020036101000a031916815260200191505b5092505050602060405180830381600087803b15801561573157600080fd5b505af1158015615745573d6000803e3d6000fd5b505050506040513d602081101561575b57600080fd5b505160405160e060020a63ffffffff8716028152602481018490529190036044820181905260606004830190815284516064840152845191929091829160840190602087019080838360005b838110156157bf5781810151838201526020016157a7565b50505050905090810190601f1680156157ec5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561580d57600080fd5b505af1158015615821573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561584a57600080fd5b81019080805164010000000081111561586257600080fd5b8201602081018481111561587557600080fd5b815164010000000081118282018710171561588f57600080fd5b5050601254604080517fbf4d89b500000000000000000000000000000000000000000000000000000000815260006024820181905260048201928352845160448301528451949950600160a060020a03909316965063bf4d89b595508894509192909182916064909101906020860190808383885b8381101561591c578181015183820152602001615904565b50505050905090810190601f1680156159495780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561596957600080fd5b505af115801561597d573d6000803e3d6000fd5b505050506040513d602081101561599357600080fd5b5051955080156159a557856000190295505b50505060ff9094166000818152603760209081526040808320878452825280832086845282528083208590559282526038815282822093825292835281812082518084019093529482528183019384528454600181810187559582529290209051600290920201908155905191015550565b81600160a060020a0316615a2a82611ea4565b600160a060020a031614615a3d57600080fd5b600160a060020a038216600090815260036020526040902054615a6790600163ffffffff6147da16565b600160a060020a039092166000908152600360209081526040808320949094559181526001909152208054600160a060020a0319169055565b600081815260016020526040902054600160a060020a031615615ac257600080fd5b60008181526001602081815260408084208054600160a060020a031916600160a060020a0388169081179091558452600390915290912054615b03916147f1565b600160a060020a0390921660009081526003602052604090209190915550565b615b2d8282614d75565b615b378282614dd7565b6040518190600090600160a060020a038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000620186a0600160ff85161415615b8b5750620186a05b8360ff1660021415615b9c57506127105b8360ff1660031415615bad57506103e85b8360ff1660041415615bbd575060645b8360ff1660051415615bcd5750600a5b6000831315615c7757601254604080517fda1eb54200000000000000000000000000000000000000000000000000000000815260048101869052602481018490529051600160a060020a039092169163da1eb542916044808201926020929091908290030181600087803b158015615c4457600080fd5b505af1158015615c58573d6000803e3d6000fd5b505050506040513d6020811015615c6e57600080fd5b50519250615d1e565b601254604080517fda1eb5420000000000000000000000000000000000000000000000000000000081526000958603600482018190526024820185905291519195600160a060020a039093169263da1eb542926044808401936020939083900390910190829087803b158015615cec57600080fd5b505af1158015615d00573d6000803e3d6000fd5b505050506040513d6020811015615d1657600080fd5b505160000392505b509092915050565b60c0604051908101604052806000801916815260200160008152602001600081526020016000815260200160608152602001606081525090565b5080546000825560020290600052602060002090810190611f299190615ea0565b828054828255906000526020600020908101928215615dc15760005260206000209182015b82811115615dc1578254825591600101919060010190615da6565b50615dcd929150615ec0565b5090565b8154818355818111156115a1576006028160060283600052602060002091820191016115a19190615eda565b828054828255906000526020600020908101928215615dc1579160200282015b82811115615dc1578251825591602001919060010190615e1d565b50805460018160011615610100020316600290046000825580601f10615e5e5750611f29565b601f016020900490600052602060002090810190611f299190615ec0565b8154818355818111156115a1576000838152602090206115a1918101908301615ec0565b610e8091905b80821115615dcd5760008082556001820155600201615ea6565b610e8091905b80821115615dcd5760008155600101615ec6565b610e8091905b80821115615dcd576000808255600182018190556002820181905560038201819055615f0f6004830182615f26565b615f1d600583016000615f26565b50600601615ee0565b5080546000825590600052602060002090810190611f299190615ec05600a165627a7a72305820a45f3a92f2609a78e4f856dd4eb0f0b606504b71d44318b170d5efc9047957950029

Swarm Source

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

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