ETH Price: $2,235.50 (-0.81%)

Token

Codex Record (CR)
 

Overview

Max Total Supply

0 CR

Holders

0

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CodexRecord

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-07-19
*/

pragma solidity 0.4.24;

// File: contracts/ERC20/ERC20Basic.sol

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

// File: contracts/ERC20/ERC20.sol

/**
 * @title ERC20 interface
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: contracts/ERC721/ERC721Basic.sol

/**
 * @title ERC721 Non-Fungible Token Standard basic interface
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Basic {
  // 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 constant INTERFACE_ERC721 = 0x80ac58cd;

  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 indexed _approved);

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

  // Note: This is not in the official ERC-721 standard so it's not included in the interface hash
  function exists(uint256 _tokenId) public view returns (bool _exists);

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

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

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

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

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

// File: contracts/ERC721/ERC721.sol

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721Enumerable is ERC721Basic {
  // bytes4(keccak256('totalSupply()')) ^
  // bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) ^
  // bytes4(keccak256('tokenByIndex(uint256)'));
  bytes4 constant INTERFACE_ERC721_ENUMERABLE = 0x780e9d63;

  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 {
  // bytes4(keccak256('name()')) ^
  // bytes4(keccak256('symbol()')) ^
  // bytes4(keccak256('tokenURI(uint256)'));
  bytes4 constant INTERFACE_ERC721_METADATA = 0x5b5e139f;

  function name() public view returns (string _name);
  function symbol() public 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
 */
/* solium-disable-next-line no-empty-blocks */
contract ERC721 is ERC721Basic, ERC721Enumerable, ERC721Metadata {
}

// File: contracts/ERC165/ERC165.sol

/**
 * @dev A standard for detecting smart contract interfaces.
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
contract ERC165 {

  // bytes4(keccak256('supportsInterface(bytes4)'));
  bytes4 constant INTERFACE_ERC165 = 0x01ffc9a7;

  /**
   * @dev Checks if the smart contract includes a specific interface.
   * @param _interfaceID The interface identifier, as specified in ERC-165.
   */
  function supportsInterface(bytes4 _interfaceID) public pure returns (bool) {
    return _interfaceID == INTERFACE_ERC165;
  }
}

// File: contracts/library/AddressUtils.sol

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

  /**
   * @notice Returns whether there is code in the target address
   * @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 address to check
   * @return whether there is code in the target address
   */
  function isContract(address addr) internal view returns (bool) {
    uint256 size;

    // solium-disable-next-line security/no-inline-assembly
    assembly { size := extcodesize(addr) }

    return size > 0;
  }
}

// File: contracts/library/SafeMath.sol

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

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
    // 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;
  }
}

// File: contracts/ERC721/ERC721Receiver.sol

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 *  from ERC721 asset contracts.
 */
contract ERC721Receiver {
  /**
   * @dev Magic value to be returned upon successful reception of an NFT
   *  Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`,
   *  which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
   */
  bytes4 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. Returns other than the magic value MUST result in the
   *  transaction being reverted.
   *  Note: the contract address is always the message sender.
   * @param _from The sending address
   * @param _tokenId The NFT identifier which is being transfered
   * @param _data Additional data with no specified format
   * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
   */
  function onERC721Received(
    address _operator,
    address _from,
    uint256 _tokenId,
    bytes _data)
    public
    returns(bytes4);
}

// File: contracts/ERC721/ERC721BasicToken.sol

/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721BasicToken is ERC721Basic, ERC165 {
  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 constant ERC721_RECEIVED = 0x150b7a02;

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

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

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

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

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

  /**
   * @dev Checks if the smart contract includes a specific interface.
   * @param _interfaceID The interface identifier, as specified in ERC-165.
   */
  function supportsInterface(bytes4 _interfaceID) public pure returns (bool) {
    return super.supportsInterface(_interfaceID) || _interfaceID == INTERFACE_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 Returns whether the specified token exists
   * @param _tokenId uint256 ID of the token to query the existance 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
   * @dev The zero address indicates there is no approved address.
   * @dev There can only be one approved address per token at a given time.
   * @dev 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));

    if (getApproved(_tokenId) != address(0) || _to != address(0)) {
      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 a 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
   * @dev 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
   * @dev Usage of this method is discouraged, use `safeTransferFrom` whenever possible
   * @dev Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
   */
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
  {
    internalTransferFrom(
      _from,
      _to,
      _tokenId);
  }

  /**
   * @dev Safely transfers the ownership of a given token ID to another address
   * @dev 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.
   * @dev Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _tokenId uint256 ID of the token to be transferred
   */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
  {
    internalSafeTransferFrom(
      _from,
      _to,
      _tokenId,
      "");
  }

  /**
   * @dev Safely transfers the ownership of a given token ID to another address
   * @dev 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.
   * @dev Requires the msg sender to be the owner, approved, or operator
   * @param _from current owner of the token
   * @param _to address to receive the ownership of the given token ID
   * @param _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
  {
    internalSafeTransferFrom(
      _from,
      _to,
      _tokenId,
      _data);
  }

  function internalTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    internal
  {
    address owner = ownerOf(_tokenId);
    require(_from == owner);
    require(_to != address(0));

    address sender = msg.sender;

    require(
      sender == owner || isApprovedForAll(owner, sender) || getApproved(_tokenId) == sender,
      "Not authorized to transfer"
    );

    // Resetting the approved address if it's set
    if (tokenApprovals[_tokenId] != address(0)) {
      tokenApprovals[_tokenId] = address(0);
    }

    tokenOwner[_tokenId] = _to;
    ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
    ownedTokensCount[_to] = ownedTokensCount[_to].add(1);

    emit Transfer(_from, _to, _tokenId);
  }

  function internalSafeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    internal
  {
    internalTransferFrom(_from, _to, _tokenId);

    require(
      checkAndCallSafeTransfer(
        _from,
        _to,
        _tokenId,
        _data)
    );
  }

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

    bytes4 retval = ERC721Receiver(_to)
      .onERC721Received(
        msg.sender,
        _from,
        _tokenId,
        _data
      );

    return (retval == ERC721_RECEIVED);
  }
}

// File: contracts/ERC721/ERC721Token.sol

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

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

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

  /**
    * @dev Checks if the smart contract includes a specific interface.
    * @param _interfaceID The interface identifier, as specified in ERC-165.
    */
  function supportsInterface(bytes4 _interfaceID) public pure returns (bool) {
    return super.supportsInterface(_interfaceID) || _interfaceID == INTERFACE_ERC721_ENUMERABLE || _interfaceID == INTERFACE_ERC721_METADATA;
  }

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

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

  /**
   * @dev Returns an URI for a given token ID
   * @dev 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
   * @dev 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];
  }

  function internalTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    internal
  {
    super.internalTransferFrom(_from, _to, _tokenId);

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

    ownedTokens[_from][removeTokenIndex] = lastToken;
    ownedTokens[_from].length--;
    ownedTokensIndex[lastToken] = removeTokenIndex;

    ownedTokens[_to].push(_tokenId);
    ownedTokensIndex[_tokenId] = ownedTokens[_to].length - 1;
  }

  /**
   * @dev Internal function to set the token URI for a given token
   * @dev 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;
  }
}

// File: contracts/CodexRecordMetadata.sol

/**
 * @title CodexRecordMetadata
 * @dev Storage, mutators, and modifiers for CodexRecord metadata.
 */
contract CodexRecordMetadata is ERC721Token {
  struct CodexRecordData {
    bytes32 nameHash;
    bytes32 descriptionHash;
    bytes32[] fileHashes;
  }

  event Modified(
    address indexed _from,
    uint256 _tokenId,
    bytes32 _newNameHash,
    bytes32 _newDescriptionHash,
    bytes32[] _newFileHashes,
    bytes _data
  );

  // Mapping from token ID to token data
  mapping(uint256 => CodexRecordData) internal tokenData;

  // Global tokenURIPrefix prefix. The token ID will be appended to the uri when accessed
  //  via the tokenURI method
  string public tokenURIPrefix;

  /**
   * @dev Updates token metadata hashes to whatever is passed in
   * @param _tokenId uint256 The token ID
   * @param _newNameHash bytes32 The new sha3 hash of the name
   * @param _newDescriptionHash bytes32 The new sha3 hash of the description
   * @param _newFileHashes bytes32[] The new sha3 hashes of the files associated with the token
   * @param _data (optional) bytes Additional data that will be emitted with the Modified event
   */
  function modifyMetadataHashes(
    uint256 _tokenId,
    bytes32 _newNameHash,
    bytes32 _newDescriptionHash,
    bytes32[] _newFileHashes,
    bytes _data
  )
    public
    onlyOwnerOf(_tokenId)
  {
    // nameHash is only overridden if it's not a blank string, since name is a
    //  required value. Emptiness is determined if the first element is the null-byte
    if (!bytes32IsEmpty(_newNameHash)) {
      tokenData[_tokenId].nameHash = _newNameHash;
    }

    // descriptionHash can always be overridden since it's an optional value
    //  (e.g. you can "remove" a description by setting it to a blank string)
    tokenData[_tokenId].descriptionHash = _newDescriptionHash;

    // fileHashes is only overridden if it has one or more value, since at
    //  least one file (i.e. mainImage) is required
    bool containsNullHash = false;
    for (uint i = 0; i < _newFileHashes.length; i++) {
      if (bytes32IsEmpty(_newFileHashes[i])) {
        containsNullHash = true;
        break;
      }
    }
    if (_newFileHashes.length > 0 && !containsNullHash) {
      tokenData[_tokenId].fileHashes = _newFileHashes;
    }

    emit Modified(
      msg.sender,
      _tokenId,
      tokenData[_tokenId].nameHash,
      tokenData[_tokenId].descriptionHash,
      tokenData[_tokenId].fileHashes,
      _data
    );
  }

  /**
   * @dev Gets the token given a token ID.
   * @param _tokenId token ID
   * @return CodexRecordData token data for the given token ID
   */
  function getTokenById(
    uint256 _tokenId
  )
    public
    view
    returns (bytes32 nameHash, bytes32 descriptionHash, bytes32[] fileHashes)
  {
    return (
      tokenData[_tokenId].nameHash,
      tokenData[_tokenId].descriptionHash,
      tokenData[_tokenId].fileHashes
    );
  }

  /**
   * @dev Returns an URI for a given token ID
   * @dev Throws if the token ID does not exist.
   *
   * @dev To save on gas, we will host a standard metadata endpoint for each token.
   *  For Collector privacy, specific token metadata is stored off chain, which means
   *  the metadata returned by this endpoint cannot include specific details about
   *  the physical asset the token represents unless the Collector has made it public.
   *
   * @dev This metadata will be a JSON blob that includes:
   *  name - Codex Record
   *  description - Information about the Provider that is hosting the off-chain metadata
   *  imageUri - A generic Codex Record image
   *
   * @param _tokenId uint256 ID of the token to query
   */
  function tokenURI(
    uint256 _tokenId
  )
    public
    view
    returns (string)
  {
    bytes memory prefix = bytes(tokenURIPrefix);
    if (prefix.length == 0) {
      return "";
    }

    // Rather than store a string representation of _tokenId, we just convert it on the fly
    // since this is just a 'view' function (i.e., there's no gas cost if called off chain)
    bytes memory tokenId = uint2bytes(_tokenId);
    bytes memory output = new bytes(prefix.length + tokenId.length);

    // Index counters
    uint256 i;
    uint256 outputIndex = 0;

    // Copy over the prefix into the new bytes array
    for (i = 0; i < prefix.length; i++) {
      output[outputIndex++] = prefix[i];
    }

    // Copy over the tokenId into the new bytes array
    for (i = 0; i < tokenId.length; i++) {
      output[outputIndex++] = tokenId[i];
    }

    return string(output);
  }

  /**
   * @dev Based on MIT licensed code @ https://github.com/oraclize/ethereum-api
   * @dev Converts an incoming uint256 to a dynamic byte array
   */
  function uint2bytes(uint256 i) internal pure returns (bytes) {
    if (i == 0) {
      return "0";
    }

    uint256 j = i;
    uint256 length;
    while (j != 0) {
      length++;
      j /= 10;
    }

    bytes memory bstr = new bytes(length);
    uint256 k = length - 1;
    j = i;
    while (j != 0) {
      bstr[k--] = byte(48 + j % 10);
      j /= 10;
    }

    return bstr;
  }

  /**
   * @dev Returns whether or not a bytes32 array is empty (all null-bytes)
   * @param _data bytes32 The array to check
   * @return bool Whether or not the array is empty
   */
  function bytes32IsEmpty(bytes32 _data) internal pure returns (bool) {
    for (uint256 i = 0; i < 32; i++) {
      if (_data[i] != 0x0) {
        return false;
      }
    }

    return true;
  }
}

// File: contracts/ERC900/ERC900.sol

/**
 * @title ERC900 Simple Staking Interface
 * @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-900.md
 */
contract ERC900 {
  event Staked(address indexed user, uint256 amount, uint256 total, bytes data);
  event Unstaked(address indexed user, uint256 amount, uint256 total, bytes data);

  function stake(uint256 amount, bytes data) public;
  function stakeFor(address user, uint256 amount, bytes data) public;
  function unstake(uint256 amount, bytes data) public;
  function totalStakedFor(address addr) public view returns (uint256);
  function totalStaked() public view returns (uint256);
  function token() public view returns (address);
  function supportsHistory() public pure returns (bool);

  // NOTE: Not implementing the optional functions
  // function lastStakedFor(address addr) public view returns (uint256);
  // function totalStakedForAt(address addr, uint256 blockNumber) public view returns (uint256);
  // function totalStakedAt(uint256 blockNumber) public view returns (uint256);
}

// File: contracts/CodexStakeContractInterface.sol

contract CodexStakeContractInterface is ERC900 {

  function stakeForDuration(
    address user,
    uint256 amount,
    uint256 lockInDuration,
    bytes data)
    public;

  function spendCredits(
    address user,
    uint256 amount)
    public;

  function creditBalanceOf(
    address user)
    public
    view
    returns (uint256);
}

// File: contracts/library/DelayedOwnable.sol

/**
 * @title DelayedOwnable
 * @dev The DelayedOwnable contract has an owner address, and provides basic authorization control
 *  functions, this simplifies the implementation of "user permissions".
 * @dev This is different than the original Ownable contract because intializeOwnable
 *  must be specifically called after creation to create an owner.
 */
contract DelayedOwnable {
  address public owner;
  bool public isInitialized = false;

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

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

  function initializeOwnable(address _owner) external {
    require(
      !isInitialized,
      "The owner has already been set");

    isInitialized = true;
    owner = _owner;
  }

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

    emit OwnershipTransferred(owner, _newOwner);

    owner = _newOwner;
  }
}

// File: contracts/library/DelayedPausable.sol

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract DelayedPausable is DelayedOwnable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

// File: contracts/CodexRecordFees.sol

/**
 * @title CodexRecordFees
 * @dev Storage, mutators, and modifiers for fees when using the token.
 *  This also includes the DelayedPausable contract for the onlyOwner modifier.
 */
contract CodexRecordFees is CodexRecordMetadata, DelayedPausable {

  // Implementation of the ERC20 Codex Protocol Token, used for fees in the contract
  ERC20 public codexCoin;

  // Implementation of the ERC900 Codex Protocol Stake Container,
  //  used to calculate discounts on fees
  CodexStakeContractInterface public codexStakeContract;

  // Address where all contract fees are sent, i.e., the Community Fund
  address public feeRecipient;

  // Fee to create new tokens. 10^18 = 1 token
  uint256 public creationFee = 0;

  // Fee to transfer tokens. 10^18 = 1 token
  uint256 public transferFee = 0;

  // Fee to modify tokens. 10^18 = 1 token
  uint256 public modificationFee = 0;

  modifier canPayFees(uint256 _baseFee) {
    if (feeRecipient != address(0) && _baseFee > 0) {
      bool feePaid = false;

      if (codexStakeContract != address(0)) {
        uint256 discountCredits = codexStakeContract.creditBalanceOf(msg.sender);

        // Regardless of what the baseFee is, all transactions can be paid by using exactly one credit
        if (discountCredits > 0) {
          codexStakeContract.spendCredits(msg.sender, 1);
          feePaid = true;
        }
      }

      if (!feePaid) {
        require(
          codexCoin.transferFrom(msg.sender, feeRecipient, _baseFee),
          "Insufficient funds");
      }
    }

    _;
  }

  /**
   * @dev Sets the address of the ERC20 token used for fees in the contract.
   *  Fees are in the smallest denomination, e.g., 10^18 is 1 token.
   * @param _codexCoin ERC20 The address of the ERC20 Codex Protocol Token
   * @param _feeRecipient address The address where the fees are sent
   * @param _creationFee uint256 The new creation fee.
   * @param _transferFee uint256 The new transfer fee.
   * @param _modificationFee uint256 The new modification fee.
   */
  function setFees(
    ERC20 _codexCoin,
    address _feeRecipient,
    uint256 _creationFee,
    uint256 _transferFee,
    uint256 _modificationFee
  )
    external
    onlyOwner
  {
    codexCoin = _codexCoin;
    feeRecipient = _feeRecipient;
    creationFee = _creationFee;
    transferFee = _transferFee;
    modificationFee = _modificationFee;
  }

  function setStakeContract(CodexStakeContractInterface _codexStakeContract) external onlyOwner {
    codexStakeContract = _codexStakeContract;
  }
}

// File: contracts/CodexRecordCore.sol

/**
 * @title CodexRecordCore
 * @dev Core functionality of the token, namely minting.
 */
contract CodexRecordCore is CodexRecordFees {

  /**
   * @dev This event is emitted when a new token is minted and allows providers
   *  to discern which Minted events came from transactions they submitted vs
   *  transactions submitted by other platforms, as well as providing information
   *  about what metadata record the newly minted token should be associated with.
   */
  event Minted(uint256 _tokenId, bytes _data);

  /**
   * @dev Sets the global tokenURIPrefix for use when returning token metadata.
   *  Only callable by the owner.
   * @param _tokenURIPrefix string The new tokenURIPrefix
   */
  function setTokenURIPrefix(string _tokenURIPrefix) external onlyOwner {
    tokenURIPrefix = _tokenURIPrefix;
  }

  /**
   * @dev Creates a new token
   * @param _to address The address the token will get transferred to after minting
   * @param _nameHash bytes32 The sha3 hash of the name
   * @param _descriptionHash bytes32 The sha3 hash of the description
   * @param _data (optional) bytes Additional data that will be emitted with the Minted event
   */
  function mint(
    address _to,
    bytes32 _nameHash,
    bytes32 _descriptionHash,
    bytes32[] _fileHashes,
    bytes _data
  )
    public
  {
    // All new tokens will be the last entry in the array
    uint256 newTokenId = allTokens.length;
    internalMint(_to, newTokenId);

    // Add metadata to the newly created token
    tokenData[newTokenId] = CodexRecordData({
      nameHash: _nameHash,
      descriptionHash: _descriptionHash,
      fileHashes: _fileHashes
    });

    emit Minted(newTokenId, _data);
  }

  function internalMint(address _to, uint256 _tokenId) internal {
    require(_to != address(0));

    tokenOwner[_tokenId] = _to;
    ownedTokensCount[_to] = ownedTokensCount[_to].add(1);

    ownedTokensIndex[_tokenId] = ownedTokens[_to].length;
    ownedTokens[_to].push(_tokenId);

    allTokens.push(_tokenId);

    emit Transfer(address(0), _to, _tokenId);
  }
}

// File: contracts/CodexRecordAccess.sol

/**
 * @title CodexRecordAccess
 * @dev Override contract functions
 */
contract CodexRecordAccess is CodexRecordCore {

  /**
   * @dev Make mint() pausable
   */
  function mint(
    address _to,
    bytes32 _nameHash,
    bytes32 _descriptionHash,
    bytes32[] _fileHashes,
    bytes _data
  )
    public
    whenNotPaused
    canPayFees(creationFee)
  {
    return super.mint(
      _to,
      _nameHash,
      _descriptionHash,
      _fileHashes,
      _data);
  }

  /**
   * @dev Make trasferFrom() pausable
   */
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
    whenNotPaused
    canPayFees(transferFee)
  {
    return super.transferFrom(
      _from,
      _to,
      _tokenId);
  }

  /**
   * @dev Make safeTrasferFrom() pausable
   */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  )
    public
    whenNotPaused
    canPayFees(transferFee)
  {
    return super.safeTransferFrom(
      _from,
      _to,
      _tokenId);
  }

  /**
   * @dev Make safeTrasferFrom() pausable
   */
  function safeTransferFrom(
    address _from,
    address _to,
    uint256 _tokenId,
    bytes _data
  )
    public
    whenNotPaused
    canPayFees(transferFee)
  {
    return super.safeTransferFrom(
      _from,
      _to,
      _tokenId,
      _data
    );
  }

  /**
   * @dev Make modifyMetadataHashes() pausable
   */
  function modifyMetadataHashes(
    uint256 _tokenId,
    bytes32 _newNameHash,
    bytes32 _newDescriptionHash,
    bytes32[] _newFileHashes,
    bytes _data
  )
    public
    whenNotPaused
    canPayFees(modificationFee)
  {
    return super.modifyMetadataHashes(
      _tokenId,
      _newNameHash,
      _newDescriptionHash,
      _newFileHashes,
      _data);
  }
}

// File: contracts/CodexRecord.sol

/**
 * @title CodexRecord, an ERC721 token for arts & collectables
 * @dev Developers should never interact with this smart contract directly!
 *  All transactions/calls should be made through CodexRecordProxy. Storage will be maintained
 *  in that smart contract so that the governing body has the ability
 *  to upgrade the contract in the future in the event of an emergency or new functionality.
 */
contract CodexRecord is CodexRecordAccess {
  /**
   * @dev Constructor function
   */
  constructor() public ERC721Token("Codex Record", "CR") { }

  /**
   * @dev Reclaim all ERC20Basic compatible tokens
   * @param token ERC20Basic The address of the token contract
   */
  function reclaimToken(ERC20Basic token) external onlyOwner {
    uint256 balance = token.balanceOf(this);
    token.transfer(owner, balance);
  }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","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":"modificationFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"reclaimToken","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":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","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":"_tokenId","type":"uint256"},{"name":"_newNameHash","type":"bytes32"},{"name":"_newDescriptionHash","type":"bytes32"},{"name":"_newFileHashes","type":"bytes32[]"},{"name":"_data","type":"bytes"}],"name":"modifyMetadataHashes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeRecipient","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_codexStakeContract","type":"address"}],"name":"setStakeContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getTokenById","outputs":[{"name":"nameHash","type":"bytes32"},{"name":"descriptionHash","type":"bytes32"},{"name":"fileHashes","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_codexCoin","type":"address"},{"name":"_feeRecipient","type":"address"},{"name":"_creationFee","type":"uint256"},{"name":"_transferFee","type":"uint256"},{"name":"_modificationFee","type":"uint256"}],"name":"setFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"codexCoin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"codexStakeContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenURIPrefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"transferFee","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":"tokenURIPrefix","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","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":"_owner","type":"address"}],"name":"initializeOwnable","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"creationFee","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":"_to","type":"address"},{"name":"_nameHash","type":"bytes32"},{"name":"_descriptionHash","type":"bytes32"},{"name":"_fileHashes","type":"bytes32[]"},{"name":"_data","type":"bytes"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_tokenId","type":"uint256"},{"indexed":false,"name":"_data","type":"bytes"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_tokenId","type":"uint256"},{"indexed":false,"name":"_newNameHash","type":"bytes32"},{"indexed":false,"name":"_newDescriptionHash","type":"bytes32"},{"indexed":false,"name":"_newFileHashes","type":"bytes32[]"},{"indexed":false,"name":"_data","type":"bytes"}],"name":"Modified","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":true,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"}]

6080604052600c805460a060020a61ffff02191690556000601081905560118190556012553480156200003157600080fd5b50604080518082018252600c81527f436f646578205265636f7264000000000000000000000000000000000000000060208083019182528351808501909452600284527f4352000000000000000000000000000000000000000000000000000000000000908401528151919291620000ac91600491620000cb565b508051620000c2906005906020840190620000cb565b50505062000170565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200010e57805160ff19168380011785556200013e565b828001600101855582156200013e579182015b828111156200013e57825182559160200191906001019062000121565b506200014c92915062000150565b5090565b6200016d91905b808211156200014c576000815560010162000157565b90565b612b4080620001806000396000f3006080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146101dc57806306fdde0314610212578063081812fc1461029c578063095ea7b3146102d057806312c3f754146102f657806317ffc3201461031d57806318160ddd1461033e57806323b872dd146103535780632f745c591461037d57806334c05ca8146103a1578063392e53cd146104435780633f4ba83a1461045857806342842e0e1461046d57806346904840146104975780634f558e79146104ac5780634f6ccce7146104c4578063509484d5146104dc5780635c975abb146104fd5780636352211e1461051257806370a082311461052a5780637bdc60d91461054b5780637bf9a7c4146105c65780638456cb59146105f65780638da5cb5b1461060b5780638ed3fa7c1461062057806390e7a0741461063557806395d89b411461064a57806399e0dd7c1461065f578063a22cb4651461067f578063acb2ad6f146106a5578063b88d4fde146106ba578063c0ac998314610729578063c87b56dd1461073e578063c9a6964a14610756578063dce0b4e414610777578063e985e9c51461078c578063ee5301d5146107b3578063f2fde38b1461085e575b600080fd5b3480156101e857600080fd5b506101fe600160e060020a03196004351661087f565b604080519115158252519081900360200190f35b34801561021e57600080fd5b506102276108f8565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610261578181015183820152602001610249565b50505050905090810190601f16801561028e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a857600080fd5b506102b460043561098f565b60408051600160a060020a039092168252519081900360200190f35b3480156102dc57600080fd5b506102f4600160a060020a03600435166024356109aa565b005b34801561030257600080fd5b5061030b610a82565b60408051918252519081900360200190f35b34801561032957600080fd5b506102f4600160a060020a0360043516610a88565b34801561034a57600080fd5b5061030b610bd1565b34801561035f57600080fd5b506102f4600160a060020a0360043581169060243516604435610bd7565b34801561038957600080fd5b5061030b600160a060020a0360043516602435610e10565b3480156103ad57600080fd5b5060408051606435600481810135602081810285810182019096528185526102f495833595602480359660443596369690956084959290930192909182918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610e5d9650505050505050565b34801561044f57600080fd5b506101fe61109a565b34801561046457600080fd5b506102f46110bb565b34801561047957600080fd5b506102f4600160a060020a0360043581169060243516604435611134565b3480156104a357600080fd5b506102b4611365565b3480156104b857600080fd5b506101fe600435611374565b3480156104d057600080fd5b5061030b600435611397565b3480156104e857600080fd5b506102f4600160a060020a03600435166113cc565b34801561050957600080fd5b506101fe611405565b34801561051e57600080fd5b506102b4600435611415565b34801561053657600080fd5b5061030b600160a060020a0360043516611439565b34801561055757600080fd5b5061056360043561146c565b604080518481526020808201859052606092820183815284519383019390935283519192916080840191858101910280838360005b838110156105b0578181015183820152602001610598565b5050505090500194505050505060405180910390f35b3480156105d257600080fd5b506102f4600160a060020a03600435811690602435166044356064356084356114e9565b34801561060257600080fd5b506102f461153e565b34801561061757600080fd5b506102b46115bc565b34801561062c57600080fd5b506102b46115cb565b34801561064157600080fd5b506102b46115da565b34801561065657600080fd5b506102276115e9565b34801561066b57600080fd5b506102f4600480356024810191013561164a565b34801561068b57600080fd5b506102f4600160a060020a0360043516602435151561166d565b3480156106b157600080fd5b5061030b6116e3565b3480156106c657600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102f494600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506116e99650505050505050565b34801561073557600080fd5b50610227611924565b34801561074a57600080fd5b506102276004356119b2565b34801561076257600080fd5b506102f4600160a060020a0360043516611b96565b34801561078357600080fd5b5061030b611c5c565b34801561079857600080fd5b506101fe600160a060020a0360043581169060243516611c62565b3480156107bf57600080fd5b5060408051606435600481810135602081810285810182019096528185526102f495600160a060020a0384351695602480359660443596369690956084959290930192909182918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750611c909650505050505050565b34801561086a57600080fd5b506102f4600160a060020a0360043516611ec3565b600061088a82611f4b565b806108be5750600160e060020a031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b806108f25750600160e060020a031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b92915050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109845780601f1061095957610100808354040283529160200191610984565b820191906000526020600020905b81548152906001019060200180831161096757829003601f168201915b505050505090505b90565b600090815260016020526040902054600160a060020a031690565b60006109b582611415565b9050600160a060020a0383811690821614156109d057600080fd5b33600160a060020a03821614806109ec57506109ec8133611c62565b15156109f757600080fd5b6000610a028361098f565b600160a060020a0316141580610a205750600160a060020a03831615155b15610a7d576000828152600160205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a45b505050565b60125481565b600c54600090600160a060020a03163314610aa257600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b5051600c54604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b50505050565b60085490565b600c5460a860020a900460ff1615610bee57600080fd5b601154600f546000908190600160a060020a031615801590610c105750600083115b15610dfd57600e5460009250600160a060020a031615610d2457600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b158015610c7a57600080fd5b505af1158015610c8e573d6000803e3d6000fd5b505050506040513d6020811015610ca457600080fd5b505190506000811115610d2457600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b50505050600191505b811515610dfd57600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506040513d6020811015610db757600080fd5b50511515610dfd576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b610e08868686611f8c565b505050505050565b6000610e1b83611439565b8210610e2657600080fd5b600160a060020a0383166000908152600660205260409020805483908110610e4a57fe5b9060005260206000200154905092915050565b600c5460a860020a900460ff1615610e7457600080fd5b601254600f546000908190600160a060020a031615801590610e965750600083115b1561108357600e5460009250600160a060020a031615610faa57600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b158015610f0057600080fd5b505af1158015610f14573d6000803e3d6000fd5b505050506040513d6020811015610f2a57600080fd5b505190506000811115610faa57600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b158015610f8d57600080fd5b505af1158015610fa1573d6000803e3d6000fd5b50505050600191505b81151561108357600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561101357600080fd5b505af1158015611027573d6000803e3d6000fd5b505050506040513d602081101561103d57600080fd5b50511515611083576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b6110908888888888611f97565b5050505050505050565b600c5474010000000000000000000000000000000000000000900460ff1681565b600c54600160a060020a031633146110d257600080fd5b600c5460a860020a900460ff1615156110ea57600080fd5b600c805475ff000000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600c5460a860020a900460ff161561114b57600080fd5b601154600f546000908190600160a060020a03161580159061116d5750600083115b1561135a57600e5460009250600160a060020a03161561128157600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b1580156111d757600080fd5b505af11580156111eb573d6000803e3d6000fd5b505050506040513d602081101561120157600080fd5b50519050600081111561128157600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b15801561126457600080fd5b505af1158015611278573d6000803e3d6000fd5b50505050600191505b81151561135a57600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156112ea57600080fd5b505af11580156112fe573d6000803e3d6000fd5b505050506040513d602081101561131457600080fd5b5051151561135a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b610e08868686612190565b600f54600160a060020a031681565b600081815260208190526040902054600160a060020a0316801515905b50919050565b60006113a1610bd1565b82106113ac57600080fd5b60088054839081106113ba57fe5b90600052602060002001549050919050565b600c54600160a060020a031633146113e357600080fd5b600e8054600160a060020a031916600160a060020a0392909216919091179055565b600c5460a860020a900460ff1681565b600081815260208190526040812054600160a060020a03168015156108f257600080fd5b6000600160a060020a038216151561145057600080fd5b50600160a060020a031660009081526002602052604090205490565b6000818152600a60209081526040808320805460018201546002909201805484518187028101870190955280855286956060959394939183918301828280156114d557602002820191906000526020600020905b815481526001909101906020018083116114c0575b505050505090509250925092509193909250565b600c54600160a060020a0316331461150057600080fd5b600d8054600160a060020a03968716600160a060020a031991821617909155600f805495909616941693909317909355601055601191909155601255565b600c54600160a060020a0316331461155557600080fd5b600c5460a860020a900460ff161561156c57600080fd5b600c805475ff000000000000000000000000000000000000000000191660a860020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600c54600160a060020a031681565b600d54600160a060020a031681565b600e54600160a060020a031681565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109845780601f1061095957610100808354040283529160200191610984565b600c54600160a060020a0316331461166157600080fd5b610a7d600b83836129ff565b600160a060020a03821633141561168357600080fd5b336000818152600360209081526040808320600160a060020a0387168085529252808320805460ff19168615159081179091559051909391927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191a45050565b60115481565b600c5460a860020a900460ff161561170057600080fd5b601154600f546000908190600160a060020a0316158015906117225750600083115b1561190f57600e5460009250600160a060020a03161561183657600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b15801561178c57600080fd5b505af11580156117a0573d6000803e3d6000fd5b505050506040513d60208110156117b657600080fd5b50519050600081111561183657600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b15801561181957600080fd5b505af115801561182d573d6000803e3d6000fd5b50505050600191505b81151561190f57600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561189f57600080fd5b505af11580156118b3573d6000803e3d6000fd5b505050506040513d60208110156118c957600080fd5b5051151561190f576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b61191b878787876121ac565b50505050505050565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156119aa5780601f1061197f576101008083540402835291602001916119aa565b820191906000526020600020905b81548152906001019060200180831161198d57829003601f168201915b505050505081565b606080606080600080600b8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a515780601f10611a2657610100808354040283529160200191611a51565b820191906000526020600020905b815481529060010190602001808311611a3457829003601f168201915b50505050509450845160001415611a78576040805160208101909152600081529550611b8c565b611a81876121b8565b935083518551016040519080825280601f01601f191660200182016040528015611ab5578160200160208202803883390190505b50925060009050600091505b8451821015611b22578482815181101515611ad857fe5b90602001015160f860020a900460f860020a028382806001019350815181101515611aff57fe5b906020010190600160f860020a031916908160001a905350600190910190611ac1565b600091505b8351821015611b88578382815181101515611b3e57fe5b90602001015160f860020a900460f860020a028382806001019350815181101515611b6557fe5b906020010190600160f860020a031916908160001a905350600190910190611b27565b8295505b5050505050919050565b600c5474010000000000000000000000000000000000000000900460ff1615611c09576040805160e560020a62461bcd02815260206004820152601e60248201527f546865206f776e65722068617320616c7265616479206265656e207365740000604482015290519081900360640190fd5b600c80547401000000000000000000000000000000000000000074ff00000000000000000000000000000000000000001990911617600160a060020a031916600160a060020a0392909216919091179055565b60105481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205460ff1690565b600c5460a860020a900460ff1615611ca757600080fd5b601054600f546000908190600160a060020a031615801590611cc95750600083115b15611eb657600e5460009250600160a060020a031615611ddd57600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b158015611d3357600080fd5b505af1158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b505190506000811115611ddd57600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b50505050600191505b811515611eb657600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b158015611e4657600080fd5b505af1158015611e5a573d6000803e3d6000fd5b505050506040513d6020811015611e7057600080fd5b50511515611eb6576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b61109088888888886122ae565b600c54600160a060020a03163314611eda57600080fd5b600160a060020a0381161515611eef57600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c8054600160a060020a031916600160a060020a0392909216919091179055565b6000611f56826123b2565b806108f2575050600160e060020a0319167f80ac58cd000000000000000000000000000000000000000000000000000000001490565b610a7d8383836123e4565b6000808633611fa582611415565b600160a060020a031614611fb857600080fd5b611fc187612521565b1515611fd9576000888152600a602052604090208790555b6000888152600a6020526040812060010187905592508291505b84518210156120355761201c858381518110151561200d57fe5b90602001906020020151612521565b1561202a5760019250612035565b600190910190611ff3565b60008551118015612044575082155b15612070576000888152600a60209081526040909120865161206e92600290920191880190612a7d565b505b6000888152600a60209081526040918290208054600182015484518d815293840182905293830184905260a0606084018181526002909301805491850182905233957fe80bbb079a4d5e1e2d718ba7e22f53233cf18b23aa2d6794dceda53b0768d1ee958f9591938c9290608083019060c08401908690801561211357602002820191906000526020600020905b815481526001909101906020018083116120fe575b5050838103825284518152845160209182019186019080838360005b8381101561214757818101518382015260200161212f565b50505050905090810190601f1680156121745780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a25050505050505050565b610a7d8383836020604051908101604052806000815250612574565b610bcb84848484612574565b606060008082818515156122015760408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015294506122a5565b8593505b831561221c57600190920191600a84049350612205565b826040519080825280601f01601f19166020018201604052801561224a578160200160208202803883390190505b5086945091505060001982015b83156122a157815160001982019160f860020a6030600a8806010291849190811061227e57fe5b906020010190600160f860020a031916908160001a905350600a84049350612257565b8194505b50505050919050565b6008546122bb8682612596565b6040805160608101825286815260208082018781528284018781526000868152600a8452949094208351815590516001820155925180519293926123059260028501920190612a7d565b509050507f9573133e4bf0477d257d5e746e10de577953ee706da897be78cf668a64c16a1681836040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561236f578181015183820152602001612357565b50505050905090810190601f16801561239c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1505050505050565b600160e060020a031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b60008060006123f4868686612693565b600084815260076020908152604080832054600160a060020a038a16845260069092529091205490935061242f90600163ffffffff61286b16565b600160a060020a03871660009081526006602052604090208054919350908390811061245757fe5b90600052602060002001549050806006600088600160a060020a0316600160a060020a031681526020019081526020016000208481548110151561249757fe5b6000918252602080832090910192909255600160a060020a03881681526006909152604090208054906124ce906000198301612aba565b50600090815260076020818152604080842095909555600160a060020a03909616825260068652838220805460018101825581845287842001869055549482529094525090912060001991909101905550565b6000805b602081101561256b5782816020811061253a57fe5b1a60f860020a02600160f860020a031916600060f860020a021415156125635760009150611391565b600101612525565b50600192915050565b61257f8484846123e4565b61258b8484848461287d565b1515610bcb57600080fd5b600160a060020a03821615156125ab57600080fd5b6000818152602081815260408083208054600160a060020a031916600160a060020a038716908117909155835260029091529020546125eb9060016129ea565b600160a060020a0383166000818152600260209081526040808320949094556006808252848320805487855260078452868520819055918352600180830182559084529183200185905560088054918201815582527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30184905591518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008061269f83611415565b9150600160a060020a03858116908316146126b957600080fd5b600160a060020a03841615156126ce57600080fd5b5033600160a060020a0382168114806126ec57506126ec8282611c62565b80612710575080600160a060020a03166127058461098f565b600160a060020a0316145b1515612766576040805160e560020a62461bcd02815260206004820152601a60248201527f4e6f7420617574686f72697a656420746f207472616e73666572000000000000604482015290519081900360640190fd5b600083815260016020526040902054600160a060020a0316156127a05760008381526001602052604090208054600160a060020a03191690555b6000838152602081815260408083208054600160a060020a031916600160a060020a03898116919091179091558816835260029091529020546127e490600161286b565b600160a060020a03808716600090815260026020526040808220939093559086168152205461281a90600163ffffffff6129ea16565b600160a060020a03808616600081815260026020526040808220949094559251869391928916917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a45050505050565b60008282111561287757fe5b50900390565b60008061289285600160a060020a03166129f7565b15156128a157600191506129e1565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561293457818101518382015260200161291c565b50505050905090810190601f1680156129615780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561298357600080fd5b505af1158015612997573d6000803e3d6000fd5b505050506040513d60208110156129ad57600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b818101828110156108f257fe5b6000903b1190565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a405782800160ff19823516178555612a6d565b82800160010185558215612a6d579182015b82811115612a6d578235825591602001919060010190612a52565b50612a79929150612ada565b5090565b828054828255906000526020600020908101928215612a6d579160200282015b82811115612a6d5782518255602090920191600190910190612a9d565b815481835581811115610a7d57600083815260209020610a7d9181019083015b61098c91905b80821115612a795760008155600101612ae05600496e73756666696369656e742066756e64730000000000000000000000000000a165627a7a7230582001b0d4b71d848d2e6846ce38fbb355182d2a3a506d2d365f293d82044bea8be30029

Deployed Bytecode

0x6080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146101dc57806306fdde0314610212578063081812fc1461029c578063095ea7b3146102d057806312c3f754146102f657806317ffc3201461031d57806318160ddd1461033e57806323b872dd146103535780632f745c591461037d57806334c05ca8146103a1578063392e53cd146104435780633f4ba83a1461045857806342842e0e1461046d57806346904840146104975780634f558e79146104ac5780634f6ccce7146104c4578063509484d5146104dc5780635c975abb146104fd5780636352211e1461051257806370a082311461052a5780637bdc60d91461054b5780637bf9a7c4146105c65780638456cb59146105f65780638da5cb5b1461060b5780638ed3fa7c1461062057806390e7a0741461063557806395d89b411461064a57806399e0dd7c1461065f578063a22cb4651461067f578063acb2ad6f146106a5578063b88d4fde146106ba578063c0ac998314610729578063c87b56dd1461073e578063c9a6964a14610756578063dce0b4e414610777578063e985e9c51461078c578063ee5301d5146107b3578063f2fde38b1461085e575b600080fd5b3480156101e857600080fd5b506101fe600160e060020a03196004351661087f565b604080519115158252519081900360200190f35b34801561021e57600080fd5b506102276108f8565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610261578181015183820152602001610249565b50505050905090810190601f16801561028e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a857600080fd5b506102b460043561098f565b60408051600160a060020a039092168252519081900360200190f35b3480156102dc57600080fd5b506102f4600160a060020a03600435166024356109aa565b005b34801561030257600080fd5b5061030b610a82565b60408051918252519081900360200190f35b34801561032957600080fd5b506102f4600160a060020a0360043516610a88565b34801561034a57600080fd5b5061030b610bd1565b34801561035f57600080fd5b506102f4600160a060020a0360043581169060243516604435610bd7565b34801561038957600080fd5b5061030b600160a060020a0360043516602435610e10565b3480156103ad57600080fd5b5060408051606435600481810135602081810285810182019096528185526102f495833595602480359660443596369690956084959290930192909182918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750610e5d9650505050505050565b34801561044f57600080fd5b506101fe61109a565b34801561046457600080fd5b506102f46110bb565b34801561047957600080fd5b506102f4600160a060020a0360043581169060243516604435611134565b3480156104a357600080fd5b506102b4611365565b3480156104b857600080fd5b506101fe600435611374565b3480156104d057600080fd5b5061030b600435611397565b3480156104e857600080fd5b506102f4600160a060020a03600435166113cc565b34801561050957600080fd5b506101fe611405565b34801561051e57600080fd5b506102b4600435611415565b34801561053657600080fd5b5061030b600160a060020a0360043516611439565b34801561055757600080fd5b5061056360043561146c565b604080518481526020808201859052606092820183815284519383019390935283519192916080840191858101910280838360005b838110156105b0578181015183820152602001610598565b5050505090500194505050505060405180910390f35b3480156105d257600080fd5b506102f4600160a060020a03600435811690602435166044356064356084356114e9565b34801561060257600080fd5b506102f461153e565b34801561061757600080fd5b506102b46115bc565b34801561062c57600080fd5b506102b46115cb565b34801561064157600080fd5b506102b46115da565b34801561065657600080fd5b506102276115e9565b34801561066b57600080fd5b506102f4600480356024810191013561164a565b34801561068b57600080fd5b506102f4600160a060020a0360043516602435151561166d565b3480156106b157600080fd5b5061030b6116e3565b3480156106c657600080fd5b50604080516020601f6064356004818101359283018490048402850184019095528184526102f494600160a060020a0381358116956024803590921695604435953695608494019181908401838280828437509497506116e99650505050505050565b34801561073557600080fd5b50610227611924565b34801561074a57600080fd5b506102276004356119b2565b34801561076257600080fd5b506102f4600160a060020a0360043516611b96565b34801561078357600080fd5b5061030b611c5c565b34801561079857600080fd5b506101fe600160a060020a0360043581169060243516611c62565b3480156107bf57600080fd5b5060408051606435600481810135602081810285810182019096528185526102f495600160a060020a0384351695602480359660443596369690956084959290930192909182918501908490808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750611c909650505050505050565b34801561086a57600080fd5b506102f4600160a060020a0360043516611ec3565b600061088a82611f4b565b806108be5750600160e060020a031982167f780e9d6300000000000000000000000000000000000000000000000000000000145b806108f25750600160e060020a031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b92915050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109845780601f1061095957610100808354040283529160200191610984565b820191906000526020600020905b81548152906001019060200180831161096757829003601f168201915b505050505090505b90565b600090815260016020526040902054600160a060020a031690565b60006109b582611415565b9050600160a060020a0383811690821614156109d057600080fd5b33600160a060020a03821614806109ec57506109ec8133611c62565b15156109f757600080fd5b6000610a028361098f565b600160a060020a0316141580610a205750600160a060020a03831615155b15610a7d576000828152600160205260408082208054600160a060020a031916600160a060020a0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a45b505050565b60125481565b600c54600090600160a060020a03163314610aa257600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b158015610b0357600080fd5b505af1158015610b17573d6000803e3d6000fd5b505050506040513d6020811015610b2d57600080fd5b5051600c54604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b50505050565b60085490565b600c5460a860020a900460ff1615610bee57600080fd5b601154600f546000908190600160a060020a031615801590610c105750600083115b15610dfd57600e5460009250600160a060020a031615610d2457600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b158015610c7a57600080fd5b505af1158015610c8e573d6000803e3d6000fd5b505050506040513d6020811015610ca457600080fd5b505190506000811115610d2457600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b50505050600191505b811515610dfd57600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b158015610d8d57600080fd5b505af1158015610da1573d6000803e3d6000fd5b505050506040513d6020811015610db757600080fd5b50511515610dfd576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b610e08868686611f8c565b505050505050565b6000610e1b83611439565b8210610e2657600080fd5b600160a060020a0383166000908152600660205260409020805483908110610e4a57fe5b9060005260206000200154905092915050565b600c5460a860020a900460ff1615610e7457600080fd5b601254600f546000908190600160a060020a031615801590610e965750600083115b1561108357600e5460009250600160a060020a031615610faa57600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b158015610f0057600080fd5b505af1158015610f14573d6000803e3d6000fd5b505050506040513d6020811015610f2a57600080fd5b505190506000811115610faa57600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b158015610f8d57600080fd5b505af1158015610fa1573d6000803e3d6000fd5b50505050600191505b81151561108357600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561101357600080fd5b505af1158015611027573d6000803e3d6000fd5b505050506040513d602081101561103d57600080fd5b50511515611083576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b6110908888888888611f97565b5050505050505050565b600c5474010000000000000000000000000000000000000000900460ff1681565b600c54600160a060020a031633146110d257600080fd5b600c5460a860020a900460ff1615156110ea57600080fd5b600c805475ff000000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600c5460a860020a900460ff161561114b57600080fd5b601154600f546000908190600160a060020a03161580159061116d5750600083115b1561135a57600e5460009250600160a060020a03161561128157600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b1580156111d757600080fd5b505af11580156111eb573d6000803e3d6000fd5b505050506040513d602081101561120157600080fd5b50519050600081111561128157600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b15801561126457600080fd5b505af1158015611278573d6000803e3d6000fd5b50505050600191505b81151561135a57600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156112ea57600080fd5b505af11580156112fe573d6000803e3d6000fd5b505050506040513d602081101561131457600080fd5b5051151561135a576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b610e08868686612190565b600f54600160a060020a031681565b600081815260208190526040902054600160a060020a0316801515905b50919050565b60006113a1610bd1565b82106113ac57600080fd5b60088054839081106113ba57fe5b90600052602060002001549050919050565b600c54600160a060020a031633146113e357600080fd5b600e8054600160a060020a031916600160a060020a0392909216919091179055565b600c5460a860020a900460ff1681565b600081815260208190526040812054600160a060020a03168015156108f257600080fd5b6000600160a060020a038216151561145057600080fd5b50600160a060020a031660009081526002602052604090205490565b6000818152600a60209081526040808320805460018201546002909201805484518187028101870190955280855286956060959394939183918301828280156114d557602002820191906000526020600020905b815481526001909101906020018083116114c0575b505050505090509250925092509193909250565b600c54600160a060020a0316331461150057600080fd5b600d8054600160a060020a03968716600160a060020a031991821617909155600f805495909616941693909317909355601055601191909155601255565b600c54600160a060020a0316331461155557600080fd5b600c5460a860020a900460ff161561156c57600080fd5b600c805475ff000000000000000000000000000000000000000000191660a860020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600c54600160a060020a031681565b600d54600160a060020a031681565b600e54600160a060020a031681565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156109845780601f1061095957610100808354040283529160200191610984565b600c54600160a060020a0316331461166157600080fd5b610a7d600b83836129ff565b600160a060020a03821633141561168357600080fd5b336000818152600360209081526040808320600160a060020a0387168085529252808320805460ff19168615159081179091559051909391927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191a45050565b60115481565b600c5460a860020a900460ff161561170057600080fd5b601154600f546000908190600160a060020a0316158015906117225750600083115b1561190f57600e5460009250600160a060020a03161561183657600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b15801561178c57600080fd5b505af11580156117a0573d6000803e3d6000fd5b505050506040513d60208110156117b657600080fd5b50519050600081111561183657600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b15801561181957600080fd5b505af115801561182d573d6000803e3d6000fd5b50505050600191505b81151561190f57600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b15801561189f57600080fd5b505af11580156118b3573d6000803e3d6000fd5b505050506040513d60208110156118c957600080fd5b5051151561190f576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b61191b878787876121ac565b50505050505050565b600b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156119aa5780601f1061197f576101008083540402835291602001916119aa565b820191906000526020600020905b81548152906001019060200180831161198d57829003601f168201915b505050505081565b606080606080600080600b8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611a515780601f10611a2657610100808354040283529160200191611a51565b820191906000526020600020905b815481529060010190602001808311611a3457829003601f168201915b50505050509450845160001415611a78576040805160208101909152600081529550611b8c565b611a81876121b8565b935083518551016040519080825280601f01601f191660200182016040528015611ab5578160200160208202803883390190505b50925060009050600091505b8451821015611b22578482815181101515611ad857fe5b90602001015160f860020a900460f860020a028382806001019350815181101515611aff57fe5b906020010190600160f860020a031916908160001a905350600190910190611ac1565b600091505b8351821015611b88578382815181101515611b3e57fe5b90602001015160f860020a900460f860020a028382806001019350815181101515611b6557fe5b906020010190600160f860020a031916908160001a905350600190910190611b27565b8295505b5050505050919050565b600c5474010000000000000000000000000000000000000000900460ff1615611c09576040805160e560020a62461bcd02815260206004820152601e60248201527f546865206f776e65722068617320616c7265616479206265656e207365740000604482015290519081900360640190fd5b600c80547401000000000000000000000000000000000000000074ff00000000000000000000000000000000000000001990911617600160a060020a031916600160a060020a0392909216919091179055565b60105481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205460ff1690565b600c5460a860020a900460ff1615611ca757600080fd5b601054600f546000908190600160a060020a031615801590611cc95750600083115b15611eb657600e5460009250600160a060020a031615611ddd57600e546040805160e060020a6332a922290281523360048201529051600160a060020a03909216916332a92229916024808201926020929091908290030181600087803b158015611d3357600080fd5b505af1158015611d47573d6000803e3d6000fd5b505050506040513d6020811015611d5d57600080fd5b505190506000811115611ddd57600e546040805160e260020a6309853529028152336004820152600160248201529051600160a060020a0390921691632614d4a49160448082019260009290919082900301818387803b158015611dc057600080fd5b505af1158015611dd4573d6000803e3d6000fd5b50505050600191505b811515611eb657600d54600f546040805160e060020a6323b872dd028152336004820152600160a060020a03928316602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b158015611e4657600080fd5b505af1158015611e5a573d6000803e3d6000fd5b505050506040513d6020811015611e7057600080fd5b50511515611eb6576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612af5833981519152604482015290519081900360640190fd5b61109088888888886122ae565b600c54600160a060020a03163314611eda57600080fd5b600160a060020a0381161515611eef57600080fd5b600c54604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600c8054600160a060020a031916600160a060020a0392909216919091179055565b6000611f56826123b2565b806108f2575050600160e060020a0319167f80ac58cd000000000000000000000000000000000000000000000000000000001490565b610a7d8383836123e4565b6000808633611fa582611415565b600160a060020a031614611fb857600080fd5b611fc187612521565b1515611fd9576000888152600a602052604090208790555b6000888152600a6020526040812060010187905592508291505b84518210156120355761201c858381518110151561200d57fe5b90602001906020020151612521565b1561202a5760019250612035565b600190910190611ff3565b60008551118015612044575082155b15612070576000888152600a60209081526040909120865161206e92600290920191880190612a7d565b505b6000888152600a60209081526040918290208054600182015484518d815293840182905293830184905260a0606084018181526002909301805491850182905233957fe80bbb079a4d5e1e2d718ba7e22f53233cf18b23aa2d6794dceda53b0768d1ee958f9591938c9290608083019060c08401908690801561211357602002820191906000526020600020905b815481526001909101906020018083116120fe575b5050838103825284518152845160209182019186019080838360005b8381101561214757818101518382015260200161212f565b50505050905090810190601f1680156121745780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a25050505050505050565b610a7d8383836020604051908101604052806000815250612574565b610bcb84848484612574565b606060008082818515156122015760408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015294506122a5565b8593505b831561221c57600190920191600a84049350612205565b826040519080825280601f01601f19166020018201604052801561224a578160200160208202803883390190505b5086945091505060001982015b83156122a157815160001982019160f860020a6030600a8806010291849190811061227e57fe5b906020010190600160f860020a031916908160001a905350600a84049350612257565b8194505b50505050919050565b6008546122bb8682612596565b6040805160608101825286815260208082018781528284018781526000868152600a8452949094208351815590516001820155925180519293926123059260028501920190612a7d565b509050507f9573133e4bf0477d257d5e746e10de577953ee706da897be78cf668a64c16a1681836040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561236f578181015183820152602001612357565b50505050905090810190601f16801561239c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1505050505050565b600160e060020a031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b60008060006123f4868686612693565b600084815260076020908152604080832054600160a060020a038a16845260069092529091205490935061242f90600163ffffffff61286b16565b600160a060020a03871660009081526006602052604090208054919350908390811061245757fe5b90600052602060002001549050806006600088600160a060020a0316600160a060020a031681526020019081526020016000208481548110151561249757fe5b6000918252602080832090910192909255600160a060020a03881681526006909152604090208054906124ce906000198301612aba565b50600090815260076020818152604080842095909555600160a060020a03909616825260068652838220805460018101825581845287842001869055549482529094525090912060001991909101905550565b6000805b602081101561256b5782816020811061253a57fe5b1a60f860020a02600160f860020a031916600060f860020a021415156125635760009150611391565b600101612525565b50600192915050565b61257f8484846123e4565b61258b8484848461287d565b1515610bcb57600080fd5b600160a060020a03821615156125ab57600080fd5b6000818152602081815260408083208054600160a060020a031916600160a060020a038716908117909155835260029091529020546125eb9060016129ea565b600160a060020a0383166000818152600260209081526040808320949094556006808252848320805487855260078452868520819055918352600180830182559084529183200185905560088054918201815582527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30184905591518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008061269f83611415565b9150600160a060020a03858116908316146126b957600080fd5b600160a060020a03841615156126ce57600080fd5b5033600160a060020a0382168114806126ec57506126ec8282611c62565b80612710575080600160a060020a03166127058461098f565b600160a060020a0316145b1515612766576040805160e560020a62461bcd02815260206004820152601a60248201527f4e6f7420617574686f72697a656420746f207472616e73666572000000000000604482015290519081900360640190fd5b600083815260016020526040902054600160a060020a0316156127a05760008381526001602052604090208054600160a060020a03191690555b6000838152602081815260408083208054600160a060020a031916600160a060020a03898116919091179091558816835260029091529020546127e490600161286b565b600160a060020a03808716600090815260026020526040808220939093559086168152205461281a90600163ffffffff6129ea16565b600160a060020a03808616600081815260026020526040808220949094559251869391928916917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a45050505050565b60008282111561287757fe5b50900390565b60008061289285600160a060020a03166129f7565b15156128a157600191506129e1565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081523360048201818152600160a060020a03898116602485015260448401889052608060648501908152875160848601528751918a169463150b7a0294938c938b938b93909160a490910190602085019080838360005b8381101561293457818101518382015260200161291c565b50505050905090810190601f1680156129615780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561298357600080fd5b505af1158015612997573d6000803e3d6000fd5b505050506040513d60208110156129ad57600080fd5b5051600160e060020a031981167f150b7a020000000000000000000000000000000000000000000000000000000014925090505b50949350505050565b818101828110156108f257fe5b6000903b1190565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612a405782800160ff19823516178555612a6d565b82800160010185558215612a6d579182015b82811115612a6d578235825591602001919060010190612a52565b50612a79929150612ada565b5090565b828054828255906000526020600020908101928215612a6d579160200282015b82811115612a6d5782518255602090920191600190910190612a9d565b815481835581811115610a7d57600083815260209020610a7d9181019083015b61098c91905b80821115612a795760008155600101612ae05600496e73756666696369656e742066756e64730000000000000000000000000000a165627a7a7230582001b0d4b71d848d2e6846ce38fbb355182d2a3a506d2d365f293d82044bea8be30029

Swarm Source

bzzr://01b0d4b71d848d2e6846ce38fbb355182d2a3a506d2d365f293d82044bea8be3
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.