Contract 0x9bdd0f9ed2ed1765e5ef28f0a179f125e631e18b

Contract Overview

Balance:
0 Ether

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value

Contract Source Code Verified (Exact Match)

Contract Name:
Destabilizer

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
No

Runs (Optimizer):
200

Contract Source Code

pragma solidity ^0.4.24;



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

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


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

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

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

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

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

  event Transfer(
    address indexed _from,
    address indexed _to,
    uint256 indexed _tokenId
  );
  event Approval(
    address indexed _owner,
    address indexed _approved,
    uint256 indexed _tokenId
  );
  event ApprovalForAll(
    address indexed _owner,
    address indexed _operator,
    bool _approved
  );

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

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

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

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

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



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


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


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() public {
    owner = msg.sender;
  }

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

  /**
   * @dev Allows the current owner to relinquish control of the contract.
   * @notice Renouncing to ownership will leave the contract without an owner.
   * It will not be possible to call the functions with the `onlyOwner`
   * modifier anymore.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    owner = address(0);
  }

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}











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

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


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


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







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

  /**
   * @notice Handle the receipt of an NFT
   * @dev The ERC721 smart contract calls this function on the recipient
   * after a `safetransfer`. This function MAY throw to revert and reject the
   * transfer. Return of other than the magic value MUST result in the
   * transaction being reverted.
   * Note: the contract address is always the message sender.
   * @param _operator The address which called `safeTransferFrom` function
   * @param _from The address which previously owned the token
   * @param _tokenId The NFT identifier which is being 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 throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    c = _a * _b;
    assert(c / _a == _b);
    return c;
  }

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

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

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




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

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

}










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

  bytes4 public 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) internal supportedInterfaces;

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

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

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



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

  using SafeMath for uint256;
  using AddressUtils for address;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    emit Transfer(_from, _to, _tokenId);
  }

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

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

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

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

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

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

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

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




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

  // Token name
  string internal name_;

  // Token symbol
  string internal symbol_;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}




contract RoxBase is ERC721Token, Ownable {
    event SeedChange(uint256 tokenId, string seed);
    event remixCountChange(uint256 tokenId, uint256 amount);
    event ParentsSets(uint256 tokenId, uint256 parent1, uint256 parent2);

    address minter;

    // Storage of the commission address.
    address public commissionAddress;

    // Template for MetaData
    struct metaData {
        string seed;
        uint parent1;
        uint parent2;
        uint remixCount;
    }

    modifier onlyApprovedContractAddresses () {
        // Used to require that the sender is an approved address.
        require(ApprovedContractAddress[msg.sender] == true);
        _;
    }

    modifier onlyMinter () {
        require(minter == msg.sender);
        _;
    }

    // Storage for Approve contract address
    mapping (address => bool) ApprovedContractAddress;
    // Storage for token metaDatas
    mapping (uint256 => metaData) tokenToMetaData;
    // Next available id (was count but that breaks if you burn a token).
    uint nextId = 0;
    // HostName for view of token(e.g. https://cryptorox.co/api/v1/)
    string URIToken;

    /**
    * @dev Overrides the default burn function to delete the token's meta data as well.
    */
    function _burn (uint256 _tokenId) internal {
        delete tokenToMetaData[_tokenId];
        super._burn(ownerOf(_tokenId), _tokenId);
    }

    // Mints / Creates a new token with a given seed
    /**
    * @dev Internal Mints a token.
    * @return New token's Id
    */
    function _mint(address _to, string _seed) internal returns (uint256){
        uint256 newTokenId = nextId;
        super._mint(_to, newTokenId);
        _setTokenSeed(newTokenId, _seed);
        nextId = nextId + 1;
        return newTokenId;
    }

    /**
    * @dev Internal Sets token id to a seed.
    */
    function _setTokenSeed(uint256 _tokenId, string _seed) private  {
        tokenToMetaData[_tokenId].seed = _seed;
        emit SeedChange(uint(_tokenId), string(_seed));
    }
}


/**
 * @title RoxOnlyMinterMethods
 * @dev Only Methods that can be called by the minter of the contract.
 */
contract RoxOnlyMinterMethods is RoxBase {
    /**
    * @dev Mints a new token with a seed.
    */
    function mintTo(address _to, string seed) external onlyMinter returns (uint) {
        return _mint(_to, seed);
    }
}


/**
 * @title RoxOnlyOwnerMethods
 * @dev Only Methods that can be called by the owner of the contract.
 */
contract RoxOnlyOwnerMethods is RoxBase {
    /**
    * @dev Sets the Approved value for contract address.
    */
    function setApprovedContractAddress (address _contractAddress, bool _value) public onlyOwner {
        ApprovedContractAddress[_contractAddress] = _value;
    }

    function kill() public onlyOwner {
        selfdestruct(msg.sender);
    }

    /**
    * @dev Sets base uriToken.
    */
    function setURIToken(string _uriToken) public onlyOwner {
        URIToken = _uriToken;
    }

    /**
    * @dev Sets the new commission address.
    */
    function setCommissionAddress (address _commissionAddress) public onlyOwner {
        commissionAddress = _commissionAddress;
    }
    /**
    * @dev Sets the minter's Address
    */
    function setMinterAddress (address _minterAddress) public onlyOwner{
        minter = _minterAddress;
    }

    /**
    * @dev Burns a token.
    */
    function adminBurnToken(uint256 _tokenId) public onlyOwner {
        _burn(_tokenId);
    }
}

/**
 * @title RoxAuthorisedContractMethods
 * @dev All methods that can be ran by authorised contract addresses.
 */
contract RoxAuthorisedContractMethods is RoxBase {
    // All these methods are ran via external authorised contracts.

    /**
    * @dev Burns a token.
    */
    function burnToken(uint256 _tokenId) public onlyApprovedContractAddresses {
        _burn(_tokenId);
    }

    /**
    * @dev Mints a new token.
    */
    function mintToPublic(address _to, string _seed) external onlyApprovedContractAddresses returns (uint) {
        return _mint(_to, _seed);
    }


    /**
    * @dev Sets the parents of a token.
    */
    function setParents(uint _tokenId, uint _parent1, uint _parent2) public onlyApprovedContractAddresses {
        tokenToMetaData[_tokenId].parent1 = _parent1;
        tokenToMetaData[_tokenId].parent2 = _parent2;
        emit ParentsSets(_tokenId, _parent1, _parent2);

    }

    /**
    * @dev Sets owner of token to given value.
    */
    function setTokenOwner(address _to, uint _tokenId) public onlyApprovedContractAddresses{
        tokenOwner[_tokenId] = _to;
    }

    /**
    * @dev Sets the seed of a given token.
    */
    function setTokenSeed(uint256 _tokenId, string _seed) public onlyApprovedContractAddresses {
        tokenToMetaData[_tokenId].seed = _seed;
        emit SeedChange(uint(_tokenId), string(_seed));
    }

    /**
    * @dev Sets the remixCount of a token
    */
    function setRemixCount(uint256 _tokenId, uint _remixCount) public onlyApprovedContractAddresses {
        tokenToMetaData[_tokenId].remixCount =_remixCount;
        emit remixCountChange(_tokenId, _remixCount);
    }
}

/**
 * @title RoxPublicGetters
 * @dev All public getter rox methods.
 */
contract RoxPublicGetters is RoxBase {
    /**
    * @dev Returns tokens for an address.
    * @return uint[] of tokens owned by an address.
    */
    function getTokensForOwner (address _owner) public view returns (uint[]) {
        return ownedTokens[_owner];
    }

    /**
    * @dev Returns the data about a token.
    */
    function getDataForTokenId(uint256 _tokenId) public view returns
    (
        uint,
        string,
        uint,
        uint,
        address,
        address,
        uint
    )
    {
         metaData storage meta = tokenToMetaData[_tokenId];
        return (
            _tokenId,
            meta.seed,
            meta.parent1,
            meta.parent2,
            ownerOf(_tokenId),
            getApproved(_tokenId),
            meta.remixCount
        );
    }

        /**
    * @dev Returns a seed for a token id.
    * @return string the seed for the token id.
    */
    function getSeedForTokenId(uint256 _tokenId) public view returns (string) {
        return tokenToMetaData[_tokenId].seed;
    }

    /**
    * @dev Gets the remix count for a given token
    * @return The remix count for a given token
    */
    function getRemixCount(uint256 _tokenId) public view returns (uint) {
        return tokenToMetaData[_tokenId].remixCount;
    }

    /**
    * @dev Returns the parents for token id
    * @return TUPLE of the parent ids for a token.
    */
    function getParentsForTokenId(uint256 _tokenId) public view returns (uint parent1, uint parent2) {
        metaData storage meta = tokenToMetaData[_tokenId];
        return (
            meta.parent1,
            meta.parent2
        );
    }

    // Converts uint to a string
    function uint2str(uint i) internal pure returns (string){
        if (i == 0) return "0";
        uint j = i;
        uint length;
        while (j != 0){
            length++;
            j /= 10;
        }
        bytes memory bstr = new bytes(length);
        uint k = length - 1;
        while (i != 0){
            bstr[k--] = byte(48 + i % 10);
            i /= 10;
        }
        return string(bstr);
    }


    /**
    * @dev Returns the Token uri for a token
    * @return Token URI for a token ID.
    */
    function tokenURI(uint256 _tokenId) public view returns (string) {
        return string(abi.encodePacked(URIToken, uint2str(_tokenId)));
    }

}


/**
 * @title Rox
 * @dev Full rox Contract with all imports.
 */
contract Rox is RoxOnlyOwnerMethods, RoxPublicGetters, RoxAuthorisedContractMethods, RoxOnlyMinterMethods {
    // Creates an instance of the contract
    constructor (string _name, string _symbol, string _uriToken) public ERC721Token(_name, _symbol) {
        URIToken = _uriToken;
    }

}


contract Destabilizer is Ownable {
    // Rox contract
    Rox public roxContract;

    event Destabilized(
        address owner,
        uint tokenId,
        uint parent1,
        uint parent2
    );
    // Storage for useFee
    uint useFee;

    // Creates a contract instance
    constructor (address _roxContract, uint256 _useFee) public {
        setRoxContract(_roxContract);
        setUseFee(_useFee);
    }

    // Sets the rox contract
    function setRoxContract (address _roxContract) onlyOwner {
        roxContract = Rox(_roxContract);
    }

    // Sets the Use fee
    function setUseFee(uint256 _useFee) onlyOwner {
        useFee = _useFee;
    }

    // Converts uint to a string
    function uint2str(uint i) internal pure returns (string){
        if (i == 0) return "0";
        uint j = i;
        uint length;
        while (j != 0){
            length++;
            j /= 10;
        }
        bytes memory bstr = new bytes(length);
        uint k = length - 1;
        while (i != 0){
            bstr[k--] = byte(48 + i % 10);
            i /= 10;
        }
        return string(bstr);
    }

    // Converts string to uint
    function string2Uint(string s) internal pure returns (uint result) {
        bytes memory b = bytes(s);
        uint i;
        result = 0;
        for (i = 0; i < b.length; i++) {
            uint c = uint(b[i]);
            if (c >= 48 && c <= 57) {
                result = result * 10 + (c - 48);
            }
        }
    }

    // Creates a substring of a string
    function substring(string str, uint startIndex, uint endIndex) internal constant returns (string) {
        bytes memory strBytes = bytes(str);
        bytes memory result = new bytes(endIndex-startIndex);
        for(uint i = startIndex; i < endIndex; i++) {
            result[i-startIndex] = strBytes[i];
        }
        return string(result);
    }

    /**
    * @dev Creates a semi random number from a hash of certain values between 0 and max value..
    * @return uint256: Random number between 0 and max value.
    */
    function _random(uint256 _nonce, uint128 _maxValue) internal view returns (uint256) {
        uint256 randomHash = uint256(keccak256(block.difficulty, now , _nonce));
        return randomHash % _maxValue;
    }

    /**
    * @dev Mixes an index of two seeds together.
    * @return bytes of the mixed seed.
    */
    function _seed_mixing(bytes seed1, bytes seed2, uint index, uint8 _maxValueForDigit) internal returns (bytes) {

        // Used to vary the seed generation more.
        uint indexM1;

        if (index == 0) {
            indexM1 = 15;
        } else {
            indexM1 = index - 1;
        }

        // Creates a random number between 1 and 100
        uint256 chance = _random(uint(uint8(seed2[indexM1]) + 1 * uint8(seed1[indexM1]) + 1), 100);

        if (chance > 90) {
            // Genetic mutation
            seed1[index] = bytes(uint2str(_random(uint(uint8(seed2[indexM1]) + 1 * uint8(seed1[indexM1]) + 1), _maxValueForDigit)))[0];
        } else if (chance > 45) {
            // Uses the over seed's value
            seed1[index] = seed2[index];
        }

        return seed1;
    }

    /**
    * @dev Remixes the two seeds to generate a new one.
    */
    function remix(uint256 _tokenId1, uint256 _tokenId2) external payable returns (uint tokenId, string gene) {
        // Validation checks
        require(msg.sender == roxContract.ownerOf(_tokenId1));
        require(msg.sender == roxContract.ownerOf(_tokenId2));
        require(_tokenId1 != _tokenId2);
        require(msg.value >= useFee);

        bytes memory smelt_2_seed = bytes(roxContract.getSeedForTokenId(_tokenId2));
        bytes memory seed = bytes(roxContract.getSeedForTokenId(_tokenId1));

        // Type
        seed = _seed_mixing(seed, smelt_2_seed, 0, 9);
        // Cut
        seed = _seed_mixing(seed, smelt_2_seed, 1, 7);

        // Carat, colours
        for (uint i=3; i!=7; i++) {
            seed = _seed_mixing(seed, smelt_2_seed, i, 9);
        }

        // Clarity & inclusions
        for (uint8 j=7; j!=12; j++) {
            seed = _seed_mixing(seed, smelt_2_seed, j, 4);
        }
        // origin & spares
        for (uint8 g=12; g!=15; g++) {
            seed = _seed_mixing(seed, smelt_2_seed, g, 9);
        }

        // Appends the generation to end.
        string memory generationSeed = substring(string(seed), 15, seed.length);
        string memory seedWithoutGen = substring(string(seed), 0, 15);
        bytes memory generation  = bytes(uint2str(uint(uint(string2Uint(generationSeed)) + 1)));

        seed = abi.encodePacked(seedWithoutGen, generation);

        // Mints new token
        uint256 newTokenId = roxContract.mintToPublic(msg.sender, string(seed));
        updateParents(_tokenId1, _tokenId2, tokenId);
        roxContract.commissionAddress().transfer(msg.value);

        emit Destabilized(msg.sender, newTokenId, _tokenId1, _tokenId2);

    }


    /**
    * @dev Updates that parents of a given token after remixing.
    */
    function updateParents(uint _tokenId1, uint _tokenId2, uint _newTokenId) internal {
        // Updates parent Values
        roxContract.setRemixCount(_tokenId1, roxContract.getRemixCount(_tokenId1) + 1);
        roxContract.setRemixCount(_tokenId2, roxContract.getRemixCount(_tokenId2) + 1);

        roxContract.setTokenSeed(_tokenId1, updateCarat(roxContract.getSeedForTokenId(_tokenId1)));
        roxContract.setTokenSeed(_tokenId2, updateCarat(roxContract.getSeedForTokenId(_tokenId2)));

        roxContract.setParents(_newTokenId, _tokenId1, _tokenId2);
    }

    /**
    * @dev Updates the carat value of a seed or throws if carat size is too small
    * @return string: Updated seed so the carat size one smaller.
    */
    function updateCarat (string _seed) internal returns (string){
        // Gets parent's new carat and raise error if carat is to small.
        uint carat = string2Uint(substring(_seed, 2, 3));
        require(carat < 9);
        bytes memory bytesSeed = bytes(_seed);
        bytesSeed[2] = bytes1(bytes(uint2str(uint(carat + 1)))[0]);

        _seed = string(bytesSeed);
        return _seed;
    }


}

Contract ABI

[{"constant":true,"inputs":[],"name":"roxContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId1","type":"uint256"},{"name":"_tokenId2","type":"uint256"}],"name":"remix","outputs":[{"name":"tokenId","type":"uint256"},{"name":"gene","type":"string"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_roxContract","type":"address"}],"name":"setRoxContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_useFee","type":"uint256"}],"name":"setUseFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_roxContract","type":"address"},{"name":"_useFee","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"parent1","type":"uint256"},{"indexed":false,"name":"parent2","type":"uint256"}],"name":"Destabilized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Contract Creation Code

60806040523480156200001157600080fd5b50604051604080620021b58339810180604052810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200009982620000bb640100000000026401000000009004565b620000b3816200015b640100000000026401000000009004565b5050620001c1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156200011757600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515620001b757600080fd5b8060028190555050565b611fe480620001d16000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632cf76f2e146100885780633021c717146100df5780634c416add14610189578063715018a6146101cc57806389f1401b146101e35780638da5cb5b14610210578063f2fde38b14610267575b600080fd5b34801561009457600080fd5b5061009d6102aa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61010760048036038101908080359060200190929190803590602001909291905050506102d0565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561019557600080fd5b506101ca600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bfe565b005b3480156101d857600080fd5b506101e1610c9d565b005b3480156101ef57600080fd5b5061020e60048036038101908080359060200190929190505050610d9f565b005b34801561021c57600080fd5b50610225610e04565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027357600080fd5b506102a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e29565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006060806060600080600060608060606000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8e6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561037457600080fd5b505af1158015610388573d6000803e3d6000fd5b505050506040513d602081101561039e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156103e857600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e8d6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561047957600080fd5b505af115801561048d573d6000803e3d6000fd5b505050506040513d60208110156104a357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104ed57600080fd5b8b8d141515156104fc57600080fd5b600254341015151561050d57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b011b308d6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561059e57600080fd5b505af11580156105b2573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156105dc57600080fd5b8101908080516401000000008111156105f457600080fd5b8281019050602081018481111561060a57600080fd5b815185600182028301116401000000008211171561062757600080fd5b50509291905050509850600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b011b308e6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1580156106c257600080fd5b505af11580156106d6573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561070057600080fd5b81019080805164010000000081111561071857600080fd5b8281019050602081018481111561072e57600080fd5b815185600182028301116401000000008211171561074b57600080fd5b50509291905050509750610763888a60006009610e90565b9750610773888a60016007610e90565b9750600396505b6007871415156107a057610791888a896009610e90565b9750868060010197505061077a565b600795505b600c8660ff161415156107d1576107c2888a8860ff166004610e90565b975085806001019650506107a5565b600c94505b600f8560ff16141515610802576107f3888a8760ff166009610e90565b975084806001019550506107d6565b61080f88600f8a51611226565b935061081e886000600f611226565b9250610834600161082e86611327565b016113f9565b915082826040516020018083805190602001908083835b602083101515610870578051825260208201915060208101905060208303925061084b565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b6020831015156108c3578051825260208201915060208101905060208303925061089e565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166324250852338a6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156109d75780820151818401526020810190506109bc565b50505050905090810190601f168015610a045780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015610a2457600080fd5b505af1158015610a38573d6000803e3d6000fd5b505050506040513d6020811015610a4e57600080fd5b81019080805190602001909291905050509050610a6c8d8d8d611550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663931742d36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610af257600080fd5b505af1158015610b06573d6000803e3d6000fd5b505050506040513d6020811015610b1c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610b72573d6000803e3d6000fd5b507ff06a7e7738c6e90f45a7e502bd3b84c3333c526f1765c5c314082ef08c1275cd33828f8f604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200194505050505060405180910390a15050505050505050509250929050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c5957600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cf857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dfa57600080fd5b8060028190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e8457600080fd5b610e8d81611d88565b50565b60606000806000851415610ea757600f9150610eae565b6001850391505b610fba60018884815181101515610ec157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090046001028885815181101515610f4057fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004010160ff166064611e82565b9050605a811115611177576110db6110d660018985815181101515610fdb57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004600102898681518110151561105a57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f01000000000000000000000000000000000000000000000000000000000000009004010160ff168660ff16611e82565b6113f9565b60008151811015156110e957fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002878681518110151561114257fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611219565b602d81111561121857858581518110151561118e57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000287868151811015156111e757fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505b5b8692505050949350505050565b606080606060008692508585036040519080825280601f01601f1916602001820160405280156112655781602001602082028038833980820191505090505b5091508590505b8481101561131a57828181518110151561128257fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002828783038151811015156112dd57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061126c565b8193505050509392505050565b6000606060008084925060009350600091505b82518210156113f157828281518110151561135157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f010000000000000000000000000000000000000000000000000000000000000090049050603081101580156113d3575060398111155b156113e45760308103600a85020193505b818060010192505061133a565b505050919050565b60606000806060600080861415611447576040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509450611547565b8593505b600084141515611471578280600101935050600a8481151561146957fe5b04935061144b565b826040519080825280601f01601f1916602001820160405280156114a45781602001602082028038833980820191505090505b5091506001830390505b60008614151561154357600a868115156114c457fe5b066030017f0100000000000000000000000000000000000000000000000000000000000000028282806001900393508151811015156114ff57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8681151561153b57fe5b0495506114ae565b8194505b50505050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166365141c208460018060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d709ff1886040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561162157600080fd5b505af1158015611635573d6000803e3d6000fd5b505050506040513d602081101561164b57600080fd5b8101908080519060200190929190505050016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b1580156116b657600080fd5b505af11580156116ca573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166365141c208360018060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d709ff1876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561179f57600080fd5b505af11580156117b3573d6000803e3d6000fd5b505050506040513d60208110156117c957600080fd5b8101908080519060200190929190505050016040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050600060405180830381600087803b15801561183457600080fd5b505af1158015611848573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308314798846119b5600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b011b30886040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561191f57600080fd5b505af1158015611933573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101561195d57600080fd5b81019080805164010000000081111561197557600080fd5b8281019050602081018481111561198b57600080fd5b81518560018202830111640100000000821117156119a857600080fd5b5050929190505050611ed8565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611a26578082015181840152602081019050611a0b565b50505050905090810190601f168015611a535780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015611a7357600080fd5b505af1158015611a87573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630831479883611bf4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b011b30876040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b158015611b5e57600080fd5b505af1158015611b72573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015611b9c57600080fd5b810190808051640100000000811115611bb457600080fd5b82810190506020810184811115611bca57600080fd5b8151856001820283011164010000000082111715611be757600080fd5b5050929190505050611ed8565b6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611c65578082015181840152602081019050611c4a565b50505050905090810190601f168015611c925780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015611cb257600080fd5b505af1158015611cc6573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632a952b4b8285856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808481526020018381526020018281526020019350505050600060405180830381600087803b158015611d6b57600080fd5b505af1158015611d7f573d6000803e3d6000fd5b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611dc457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000804442856040518084815260200183815260200182815260200193505050506040518091039020600190049050826fffffffffffffffffffffffffffffffff1681811515611ece57fe5b0691505092915050565b606060006060611ef3611eee8560026003611226565b611327565b9150600982101515611f0457600080fd5b839050611f13600183016113f9565b6000815181101515611f2157fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002816002815181101515611f7b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080935083925050509190505600a165627a7a7230582006121114d8068239283d7328af09efcf504fc94579fd6066f389d4ea837b7cb9002900000000000000000000000096d15d6ecf290d852baa3f79b96ca66650bec420000000000000000000000000000000000000000000000000002aa1efb94e0000

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

00000000000000000000000096d15d6ecf290d852baa3f79b96ca66650bec420000000000000000000000000000000000000000000000000002aa1efb94e0000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000096d15d6ecf290d852baa3f79b96ca66650bec420
Arg [1] : 000000000000000000000000000000000000000000000000002aa1efb94e0000

Swarm Source

bzzr://06121114d8068239283d7328af09efcf504fc94579fd6066f389d4ea837b7cb9
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward