Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x18270bA6dA0380a2cbC705bc6C0AD6651282bD14
Balance 0 ETH
Nonce 1
Code Size 3296 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3296 bytes
0x6080604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf5780630f75e81f1461014f578063163aa63114610180578063339b6b39146101c95780634294857f1461021c57806354fd4d50146102655780635a9e03ca146102f5578063715018a6146103485780638da5cb5b1461035f578063b75c7dc6146103b6578063bf40b904146103ff578063f2fde38b14610444575b600080fd5b3480156100cb57600080fd5b506100d4610487565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101145780820151818401526020810190506100f9565b50505050905090810190601f1680156101415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015b57600080fd5b5061017e6004803603810190808035600019169060200190929190505050610525565b005b34801561018c57600080fd5b506101af600480360381019080803560001916906020019092919050505061067a565b604051808215151515815260200191505060405180910390f35b3480156101d557600080fd5b506102026004803603810190808035600019169060200190929190803590602001909291905050506106a2565b604051808215151515815260200191505060405180910390f35b34801561022857600080fd5b5061024b60048036038101908080356000191690602001909291905050506106f3565b604051808215151515815260200191505060405180910390f35b34801561027157600080fd5b5061027a61071b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ba57808201518184015260208101905061029f565b50505050905090810190601f1680156102e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561030157600080fd5b5061032e6004803603810190808035600019169060200190929190803590602001909291905050506107b9565b604051808215151515815260200191505060405180910390f35b34801561035457600080fd5b5061035d610809565b005b34801561036b57600080fd5b5061037461090b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103c257600080fd5b506103e56004803603810190808035600019169060200190929190505050610930565b604051808215151515815260200191505060405180910390f35b34801561040b57600080fd5b5061042e6004803603810190808035600019169060200190929190505050610a89565b6040518082815260200191505060405180910390f35b34801561045057600080fd5b50610485600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b53565b005b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561051d5780601f106104f25761010080835404028352916020019161051d565b820191906000526020600020905b81548152906001019060200180831161050057829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561058057600080fd5b8061058a8161067a565b151515610625576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001807f4572726f723a204f6e6c792068617368657320746861742068617665206e6f7481526020017f206265656e206973737565642063616e2062652069737375656400000000000081525060400191505060405180910390fd5b436003600084600019166000191681526020019081526020016000208190555081600019167f01a1249f2caa0445b8391e02413d26f0d409dabe5330cd1d04d3d0801fc42db360405160405180910390a25050565b6000806003600084600019166000191681526020019081526020016000205414159050919050565b60008160046000856000191660001916815260200190815260200160002054111580156106eb575060006004600085600019166000191681526020019081526020016000205414155b905092915050565b6000806004600084600019166000191681526020019081526020016000205414159050919050565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107b15780601f10610786576101008083540402835291602001916107b1565b820191906000526020600020905b81548152906001019060200180831161079457829003601f168201915b505050505081565b60008060036000856000191660001916815260200190815260200160002054141580156108015750816003600085600019166000191681526020019081526020016000205411155b905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561086457600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561098d57600080fd5b81610997816106f3565b151515610a32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001807f4572726f723a204861736820686173206265656e207265766f6b65642070726581526020017f76696f75736c790000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b436004600085600019166000191681526020019081526020016000208190555082600019167f7283b5ab9758f7fba773279e4fd50ea7b136bd1d8371dcae9c5ce529c55343d760405160405180910390a250919050565b600081610a958161067a565b1515610b2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f4572726f723a204f6e6c792069737375656420646f63756d656e74206861736881526020017f65732063616e206265207265766f6b656400000000000000000000000000000081525060400191505060405180910390fd5b60036000846000191660001916815260200190815260200160002054915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bae57600080fd5b610bb781610bba565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610bf657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820ff90cde13f69cd732a84d71f903138ffee1c09ccd80e878aacc60cc25d630f080029

Verified Source Code Partial Match

Compiler: v0.4.25+commit.59dbf8f1 EVM: byzantium Optimization: No
DocumentStore.sol 155 lines
pragma solidity ^0.4.24;


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


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


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

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

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

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

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


contract DocumentStore is Ownable {
  string public name;
  string public version = "2.2.0";

  /// A mapping of the document hash to the block number that was issued
  mapping(bytes32 => uint) documentIssued;
  /// A mapping of the hash of the claim being revoked to the revocation block number
  mapping(bytes32 => uint) documentRevoked;

  event DocumentIssued(bytes32 indexed document);
  event DocumentRevoked(
    bytes32 indexed document
  );

  constructor(
    string _name
  ) public
  {
    name = _name;
  }

  function issue(
    bytes32 document
  ) public onlyOwner onlyNotIssued(document)
  {
    documentIssued[document] = block.number;
    emit DocumentIssued(document);
  }

  function getIssuedBlock(
    bytes32 document
  ) public onlyIssued(document) view returns (uint)
  {
    return documentIssued[document];
  }

  function isIssued(
    bytes32 document
  ) public view returns (bool)
  {
    return (documentIssued[document] != 0);
  }

  function isIssuedBefore(
    bytes32 document,
    uint blockNumber
  ) public view returns (bool)
  {
    return documentIssued[document] != 0 && documentIssued[document] <= blockNumber;
  }

  function revoke(
    bytes32 document
  ) public onlyOwner onlyNotRevoked(document) returns (bool)
  {
    documentRevoked[document] = block.number;
    emit DocumentRevoked(document);
  }

  function isRevoked(
    bytes32 document
  ) public view returns (bool)
  {
    return documentRevoked[document] != 0;
  }

  function isRevokedBefore(
    bytes32 document,
    uint blockNumber
  ) public view returns (bool)
  {
    return documentRevoked[document] <= blockNumber && documentRevoked[document] != 0;
  }

  modifier onlyIssued(bytes32 document) {
    require(isIssued(document), "Error: Only issued document hashes can be revoked");
    _;
  }

  modifier onlyNotIssued(bytes32 document) {
    require(!isIssued(document), "Error: Only hashes that have not been issued can be issued");
    _;
  }

  modifier onlyNotRevoked(bytes32 claim) {
    require(!isRevoked(claim), "Error: Hash has been revoked previously");
    _;
  }
}

Read Contract

getIssuedBlock 0xbf40b904 → uint256
isIssued 0x163aa631 → bool
isIssuedBefore 0x5a9e03ca → bool
isRevoked 0x4294857f → bool
isRevokedBefore 0x339b6b39 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
version 0x54fd4d50 → string

Write Contract 4 functions

These functions modify contract state and require a wallet transaction to execute.

issue 0x0f75e81f
bytes32 document
renounceOwnership 0x715018a6
No parameters
revoke 0xb75c7dc6
bytes32 document
returns: bool
transferOwnership 0xf2fde38b
address _newOwner

Recent Transactions

No transactions found for this address