ETH Price: $3,279.43 (-3.84%)
Gas: 15 Gwei

Token

Codex Record (CR)
 

Overview

Max Total Supply

493,005 CR

Holders

5,424

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
3 CR
0x8b104344f397afc33ee55c743a0fbd7d956201cd
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Codex is a decentralized registry for unique assets like art, fine wines, watches and more.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CodexRecordProxy

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

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

pragma solidity 0.4.24;

// 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/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/library/ProxyOwnable.sol

/**
 * @title ProxyOwnable
 * @dev Essentially the Ownable contract, renamed for the purposes of separating it from the
 *  DelayedOwnable contract (the owner of the token contract).
 */
contract ProxyOwnable {
  address public proxyOwner;

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

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

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

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

    emit ProxyOwnershipTransferred(proxyOwner, _newOwner);

    proxyOwner = _newOwner;
  }
}

// File: contracts/CodexRecordProxy.sol

/**
 * @title CodexRecordProxy, a proxy contract for token storage
 * @dev This allows the token owner to optionally upgrade the token in the future
 *  if there are changes needed in the business logic. See the upgradeTo function
 *  for caveats.
 * Based on MIT licensed code from
 *  https://github.com/zeppelinos/labs/tree/master/upgradeability_using_inherited_storage
 */
contract CodexRecordProxy is ProxyOwnable {
  event Upgraded(string version, address indexed implementation);

  string public version;
  address public implementation;

  constructor(address _implementation) public {
    upgradeTo("1", _implementation);
  }

  /**
   * @dev Fallback function. Any transaction sent to this contract that doesn't match the
   *  upgradeTo signature will fallback to this function, which in turn will use
   *  DELEGATECALL to delegate the transaction data to the implementation.
   */
  function () payable public {
    address _implementation = implementation;

    // solium-disable-next-line security/no-inline-assembly
    assembly {
      let ptr := mload(0x40)
      calldatacopy(ptr, 0, calldatasize)
      let result := delegatecall(gas, _implementation, ptr, calldatasize, 0, 0)
      let size := returndatasize
      returndatacopy(ptr, 0, size)

      switch result
      case 0 { revert(ptr, size) }
      default { return(ptr, size) }
    }
  }

  /**
   * @dev Since name is passed into the ERC721 token constructor, it's not stored in the CodexRecordProxy
   *  contract. Thus, we call into the contract directly to retrieve its value.
   * @return string The name of the token
   */
  function name() external view returns (string) {
    ERC721Metadata tokenMetadata = ERC721Metadata(implementation);

    return tokenMetadata.name();
  }

  /**
   * @dev Since symbol is passed into the ERC721 token constructor, it's not stored in the CodexRecordProxy
   *  contract. Thus, we call into the contract directly to retrieve its value.
   * @return string The symbol of token
   */
  function symbol() external view returns (string) {
    ERC721Metadata tokenMetadata = ERC721Metadata(implementation);

    return tokenMetadata.symbol();
  }

  /**
   * @dev Upgrades the CodexRecordProxy to point at a new implementation. Only callable by the owner.
   *  Only upgrade the token after extensive testing has been done. The storage is append only.
   *  The new token must inherit from the previous token so the shape of the storage is maintained.
   * @param _version The version of the token
   * @param _implementation The address at which the implementation is available
   */
  function upgradeTo(string _version, address _implementation) public onlyOwner {
    require(
      keccak256(abi.encodePacked(_version)) != keccak256(abi.encodePacked(version)),
      "The version cannot be the same");

    require(
      _implementation != implementation,
      "The implementation cannot be the same");

    require(
      _implementation != address(0),
      "The implementation cannot be the 0 address");

    version = _version;
    implementation = _implementation;

    emit Upgraded(version, implementation);
  }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_version","type":"string"},{"name":"_implementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"implementation","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":"_newOwner","type":"address"}],"name":"transferProxyOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_implementation","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"version","type":"string"},{"indexed":true,"name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"ProxyOwnershipTransferred","type":"event"}]

60806040523480156200001157600080fd5b5060405160208062000f63833981016040818152915160008054600160a060020a03191633179055828201909252600181527f310000000000000000000000000000000000000000000000000000000000000060208201526200007e908264010000000062000085810204565b506200055e565b600054600160a060020a031633146200009d57600080fd5b60016040516020018082805460018160011615610100020316600290048015620001015780601f10620000de57610100808354040283529182019162000101565b820191906000526020600020905b815481529060010190602001808311620000ec575b50509150506040516020818303038152906040526040518082805190602001908083835b60208310620001465780518252601f19909201916020918201910162000125565b51815160209384036101000a60001901801990921691161790526040519190930181900381208751909550879450908301928392508401908083835b60208310620001a35780518252601f19909201916020918201910162000182565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310620002085780518252601f199092019160209182019101620001e7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191614151515620002a957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5468652076657273696f6e2063616e6e6f74206265207468652073616d650000604482015290519081900360640190fd5b600254600160a060020a03828116911614156200033c57604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526025602482015260008051602062000f4383398151915260448201527f2073616d65000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0381161515620003c957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a602482015260008051602062000f4383398151915260448201527f2030206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b8151620003de906001906020850190620004b9565b5060028054600160a060020a031916600160a060020a038381169190911780835560408051602080825260018054610100818316150260001901169690960490820181905292909316937f8e05e0e35ff592971ca8b477d4285a33a61ded208d644042667b78693a472f5e939092909182919082019084908015620004a75780601f106200047b57610100808354040283529160200191620004a7565b820191906000526020600020905b8154815290600101906020018083116200048957829003601f168201915b50509250505060405180910390a25050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004fc57805160ff19168380011785556200052c565b828001600101855582156200052c579182015b828111156200052c5782518255916020019190600101906200050f565b506200053a9291506200053e565b5090565b6200055b91905b808211156200053a576000815560010162000545565b90565b6109d5806200056e6000396000f3006080604052600436106100825763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025313a281146100b657806306fdde03146100e757806354fd4d50146101715780635a8b1a9f146101865780635c60da1b146101ec57806395d89b4114610201578063f1739cae14610216575b600254604051600160a060020a039091169036600082376000803683855af43d806000843e8180156100b2578184f35b8184fd5b3480156100c257600080fd5b506100cb610237565b60408051600160a060020a039092168252519081900360200190f35b3480156100f357600080fd5b506100fc610246565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013657818101518382015260200161011e565b50505050905090810190601f1680156101635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017d57600080fd5b506100fc610337565b34801561019257600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101ea94369492936024939284019190819084018382808284375094975050509235600160a060020a031693506103c492505050565b005b3480156101f857600080fd5b506100cb610813565b34801561020d57600080fd5b506100fc610822565b34801561022257600080fd5b506101ea600160a060020a0360043516610884565b600054600160a060020a031681565b600254604080517f06fdde030000000000000000000000000000000000000000000000000000000081529051606092600160a060020a03169182916306fdde039160048082019260009290919082900301818387803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156102e557600080fd5b8101908080516401000000008111156102fd57600080fd5b8201602081018481111561031057600080fd5b815164010000000081118282018710171561032a57600080fd5b50909550505050505b5090565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b505050505081565b600054600160a060020a031633146103db57600080fd5b6001604051602001808280546001816001161561010002031660029004801561043b5780601f1061041957610100808354040283529182019161043b565b820191906000526020600020905b815481529060010190602001808311610427575b50509150506040516020818303038152906040526040518082805190602001908083835b6020831061047e5780518252601f19909201916020918201910161045f565b51815160209384036101000a60001901801990921691161790526040519190930181900381208751909550879450908301928392508401908083835b602083106104d95780518252601f1990920191602091820191016104ba565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061053c5780518252601f19909201916020918201910161051d565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916141515156105dc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5468652076657273696f6e2063616e6e6f74206265207468652073616d650000604482015290519081900360640190fd5b600254600160a060020a038281169116141561067f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f54686520696d706c656d656e746174696f6e2063616e6e6f742062652074686560448201527f2073616d65000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038116151561071c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54686520696d706c656d656e746174696f6e2063616e6e6f742062652074686560448201527f2030206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b815161072f906001906020850190610918565b506002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911780835560408051602080825260018054610100818316150260001901169690960490820181905292909316937f8e05e0e35ff592971ca8b477d4285a33a61ded208d644042667b78693a472f5e9390929091829190820190849080156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50509250505060405180910390a25050565b600254600160a060020a031681565b600254604080517f95d89b410000000000000000000000000000000000000000000000000000000081529051606092600160a060020a03169182916395d89b419160048082019260009290919082900301818387803b1580156102a857600080fd5b600054600160a060020a0316331461089b57600080fd5b600160a060020a03811615156108b057600080fd5b60008054604051600160a060020a03808516939216917f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd991a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061095957805160ff1916838001178555610986565b82800160010185558215610986579182015b8281111561098657825182559160200191906001019061096b565b50610333926109a69250905b808211156103335760008155600101610992565b905600a165627a7a7230582083a557ba1aa9f6ac77ad377a575a0a385b9d2174badc0156a5d6babaf85ad0a3002954686520696d706c656d656e746174696f6e2063616e6e6f74206265207468650000000000000000000000002c00a92a9c5c919a1a4b5a8ee6bc520f61dbe421

Deployed Bytecode

0x6080604052600436106100825763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025313a281146100b657806306fdde03146100e757806354fd4d50146101715780635a8b1a9f146101865780635c60da1b146101ec57806395d89b4114610201578063f1739cae14610216575b600254604051600160a060020a039091169036600082376000803683855af43d806000843e8180156100b2578184f35b8184fd5b3480156100c257600080fd5b506100cb610237565b60408051600160a060020a039092168252519081900360200190f35b3480156100f357600080fd5b506100fc610246565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013657818101518382015260200161011e565b50505050905090810190601f1680156101635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017d57600080fd5b506100fc610337565b34801561019257600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101ea94369492936024939284019190819084018382808284375094975050509235600160a060020a031693506103c492505050565b005b3480156101f857600080fd5b506100cb610813565b34801561020d57600080fd5b506100fc610822565b34801561022257600080fd5b506101ea600160a060020a0360043516610884565b600054600160a060020a031681565b600254604080517f06fdde030000000000000000000000000000000000000000000000000000000081529051606092600160a060020a03169182916306fdde039160048082019260009290919082900301818387803b1580156102a857600080fd5b505af11580156102bc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156102e557600080fd5b8101908080516401000000008111156102fd57600080fd5b8201602081018481111561031057600080fd5b815164010000000081118282018710171561032a57600080fd5b50909550505050505b5090565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103bc5780601f10610391576101008083540402835291602001916103bc565b820191906000526020600020905b81548152906001019060200180831161039f57829003601f168201915b505050505081565b600054600160a060020a031633146103db57600080fd5b6001604051602001808280546001816001161561010002031660029004801561043b5780601f1061041957610100808354040283529182019161043b565b820191906000526020600020905b815481529060010190602001808311610427575b50509150506040516020818303038152906040526040518082805190602001908083835b6020831061047e5780518252601f19909201916020918201910161045f565b51815160209384036101000a60001901801990921691161790526040519190930181900381208751909550879450908301928392508401908083835b602083106104d95780518252601f1990920191602091820191016104ba565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b6020831061053c5780518252601f19909201916020918201910161051d565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916141515156105dc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5468652076657273696f6e2063616e6e6f74206265207468652073616d650000604482015290519081900360640190fd5b600254600160a060020a038281169116141561067f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f54686520696d706c656d656e746174696f6e2063616e6e6f742062652074686560448201527f2073616d65000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038116151561071c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54686520696d706c656d656e746174696f6e2063616e6e6f742062652074686560448201527f2030206164647265737300000000000000000000000000000000000000000000606482015290519081900360840190fd5b815161072f906001906020850190610918565b506002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038381169190911780835560408051602080825260018054610100818316150260001901169690960490820181905292909316937f8e05e0e35ff592971ca8b477d4285a33a61ded208d644042667b78693a472f5e9390929091829190820190849080156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50509250505060405180910390a25050565b600254600160a060020a031681565b600254604080517f95d89b410000000000000000000000000000000000000000000000000000000081529051606092600160a060020a03169182916395d89b419160048082019260009290919082900301818387803b1580156102a857600080fd5b600054600160a060020a0316331461089b57600080fd5b600160a060020a03811615156108b057600080fd5b60008054604051600160a060020a03808516939216917f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd991a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061095957805160ff1916838001178555610986565b82800160010185558215610986579182015b8281111561098657825182559160200191906001019061096b565b50610333926109a69250905b808211156103335760008155600101610992565b905600a165627a7a7230582083a557ba1aa9f6ac77ad377a575a0a385b9d2174badc0156a5d6babaf85ad0a30029

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

0000000000000000000000002c00a92a9c5c919a1a4b5a8ee6bc520f61dbe421

-----Decoded View---------------
Arg [0] : _implementation (address): 0x2c00a92a9c5C919a1a4b5A8Ee6Bc520f61dBE421

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002c00a92a9c5c919a1a4b5a8ee6bc520f61dbe421


Swarm Source

bzzr://83a557ba1aa9f6ac77ad377a575a0a385b9d2174badc0156a5d6babaf85ad0a3
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.