Latest 2 txns

TxHash Age From To Value [TxFee]
0x64f92c343c27526a8e00ca1d2ae9610d8608b9e1ffd36598a904871ee55d024540 days 19 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN   0x7c1218ef246a53b71b6937ae4ae5f29a833870960 Ether0.000046703
0x767cd06847210f9542bcd271c1e56dc88ba5e1ec401a34b7887d6f71b45c066440 days 19 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN    Contract Creation0 Ether0.000954447


[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 10 Internal Transactions

ParentTxHash Block Age From To Value
0x8f86eccd929b9cbe279fa4d5383865d51d930d84c958e8113b084d6dfd7a0322483089533 days 20 hrs ago0x7c1218ef246a53b71b6937ae4ae5f29a833870960x3764cbd193188c025c32a377e7171597322afe930 Ether
0x8f86eccd929b9cbe279fa4d5383865d51d930d84c958e8113b084d6dfd7a0322483089533 days 20 hrs ago0xf02b2e925a1006c313e1af344821c67382777fc80x7c1218ef246a53b71b6937ae4ae5f29a833870960 Ether
0x3e5e3d419e744b1418cfdffb88da899ad121d8d50983bc3592a906fc16d9862b480911037 days 8 hrs ago0x7c1218ef246a53b71b6937ae4ae5f29a833870960x4a274ddd8f4434179cf66e3a3c15f32133e1df520 Ether
0x3e5e3d419e744b1418cfdffb88da899ad121d8d50983bc3592a906fc16d9862b480911037 days 8 hrs ago0xf02b2e925a1006c313e1af344821c67382777fc80x7c1218ef246a53b71b6937ae4ae5f29a833870960 Ether
0x83ad51928f9c0448904a56b6fe5043da30e2bca49a5ff837eefbfe09fc91b77c480906337 days 8 hrs ago0x7c1218ef246a53b71b6937ae4ae5f29a833870960xd99a5bb5617cb1b07da9be5ea95a54652a9684320 Ether
0x83ad51928f9c0448904a56b6fe5043da30e2bca49a5ff837eefbfe09fc91b77c480906337 days 8 hrs ago0xf02b2e925a1006c313e1af344821c67382777fc80x7c1218ef246a53b71b6937ae4ae5f29a833870960 Ether
0xb7b5bfa6f07f2f6fefa1f94d415334389f9400b87356960b042d57d98c181f87480894937 days 9 hrs ago0x7c1218ef246a53b71b6937ae4ae5f29a833870960x3b28677be87d64e086f1a0581df1779bb250f6aa0 Ether
0xb7b5bfa6f07f2f6fefa1f94d415334389f9400b87356960b042d57d98c181f87480894937 days 9 hrs ago0xf02b2e925a1006c313e1af344821c67382777fc80x7c1218ef246a53b71b6937ae4ae5f29a833870960 Ether
0xe8f165e48b67ba463ba06957ef5e49672631763c4a3cad89e29dfbb3ee12f0e8480509037 days 19 hrs ago0x7c1218ef246a53b71b6937ae4ae5f29a833870960x5f306c303e35b7057c8039c0bfb5dee618814a2e0 Ether
0xe8f165e48b67ba463ba06957ef5e49672631763c4a3cad89e29dfbb3ee12f0e8480509037 days 19 hrs ago0xf02b2e925a1006c313e1af344821c67382777fc80x7c1218ef246a53b71b6937ae4ae5f29a833870960 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: XcertCreateProxy
Compiler Version: v0.5.1+commit.c8a2cb62
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.5.1;

/**
 * @dev Math operations with safety checks that throw on error. This contract is based on the 
 * source code at: 
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
 */
library SafeMath
{

  /**
   * @dev Error constants.
   */
  string constant OVERFLOW = "008001";
  string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
  string constant DIVISION_BY_ZERO = "008003";

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

    product = _factor1 * _factor2;
    require(product / _factor1 == _factor2, OVERFLOW);
  }

  /**
   * @dev Integer division of two numbers, truncating the quotient, reverts on division by zero.
   * @param _dividend Dividend number.
   * @param _divisor Divisor number.
   * @return The quotient.
   */
  function div(
    uint256 _dividend,
    uint256 _divisor
  )
    internal
    pure
    returns (uint256 quotient)
  {
    // Solidity automatically asserts when dividing by 0, using all gas.
    require(_divisor > 0, DIVISION_BY_ZERO);
    quotient = _dividend / _divisor;
    // assert(_dividend == _divisor * quotient + _dividend % _divisor); // There is no case in which this doesn't hold.
  }

  /**
   * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
   * @param _minuend Minuend number.
   * @param _subtrahend Subtrahend number.
   * @return Difference.
   */
  function sub(
    uint256 _minuend,
    uint256 _subtrahend
  )
    internal
    pure
    returns (uint256 difference)
  {
    require(_subtrahend <= _minuend, SUBTRAHEND_GREATER_THEN_MINUEND);
    difference = _minuend - _subtrahend;
  }

  /**
   * @dev Adds two numbers, reverts on overflow.
   * @param _addend1 Number.
   * @param _addend2 Number.
   * @return Sum.
   */
  function add(
    uint256 _addend1,
    uint256 _addend2
  )
    internal
    pure
    returns (uint256 sum)
  {
    sum = _addend1 + _addend2;
    require(sum >= _addend1, OVERFLOW);
  }

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

}

/**
 * @dev Contract for setting abilities.
 */
contract Abilitable
{

  using SafeMath for uint;

  /**
   * @dev Error constants.
   */
  string constant NOT_AUTHORIZED = "017001";
  string constant ONE_ZERO_ABILITY_HAS_TO_EXIST = "017002";

  /**
   * @dev Id 0 is a reserved ability. It is an ability to assign or revoke abilities. 
   * There can be minimum of 1 address with 0 id ability.
   * Other ability id are determined by implementing contract.
   */
  uint8 constant ABILITY_TO_MANAGE_ABILITIES = 0;

  /**
   * @dev Maps address to ability id.
   */
  mapping(address => mapping(uint8 => bool)) private addressToAbility;

  /**
   * @dev Count of zero ability addresses.
   */
  uint256 private zeroAbilityCount;

  /**
   * @dev Emits when an address is assigned an ability.
   * @param _target Address to which we are assigning ability.
   * @param _ability Id of ability.
   */
  event AssignAbility(
    address indexed _target,
    uint8 indexed _ability
  );

  /**
   * @dev Emits when an address gets an ability revoked.
   * @param _target Address of which we are revoking an ability.
   * @param _ability Id of ability.
   */
  event RevokeAbility(
    address indexed _target,
    uint8 indexed _ability
  );

  /**
   * @dev Guarantees that msg.sender has a certain ability.
   */
  modifier hasAbility(
    uint8 _ability
  ) 
  {
    require(addressToAbility[msg.sender][_ability], NOT_AUTHORIZED);
    _;
  }

  /**
   * @dev Contract constructor.
   * Sets zero ability to the sender account.
   */
  constructor()
    public
  {
    addressToAbility[msg.sender][0] = true;
    zeroAbilityCount = 1;
    emit AssignAbility(msg.sender, 0);
  }

  /**
   * @dev Assigns specific abilities to specified address.
   * @param _target Address to assign abilities to.
   * @param _abilities List of ability IDs.
   */
  function assignAbilities(
    address _target,
    uint8[] memory _abilities
  )
    public
    hasAbility(ABILITY_TO_MANAGE_ABILITIES)
  {
    for(uint8 i; i<_abilities.length; i++)
    {
      if(_abilities[i] == 0)
      {
        zeroAbilityCount = zeroAbilityCount.add(1);
      }

      addressToAbility[_target][_abilities[i]] = true;
      emit AssignAbility(_target, _abilities[i]);
    }
  }

  /**
   * @dev Assigns specific abilities to specified address.
   * @param _target Address of which we revoke abilites.
   * @param _abilities List of ability IDs.
   */
  function revokeAbilities(
    address _target,
    uint8[] memory _abilities
  )
    public
    hasAbility(ABILITY_TO_MANAGE_ABILITIES)
  {
    for(uint8 i; i<_abilities.length; i++)
    {
      if(_abilities[i] == 0 )
      {
        require(zeroAbilityCount > 1, ONE_ZERO_ABILITY_HAS_TO_EXIST);
        zeroAbilityCount--;
      }

      addressToAbility[_target][_abilities[i]] = false;
      emit RevokeAbility(_target, _abilities[i]);
    }
  }

  /**
   * @dev Check if an address has a specific ability.
   * @param _target Address for which we want to check if it has a specific ability.
   * @param _ability Id of ability.
   */
  function isAble(
    address _target,
    uint8 _ability
  )
    public
    view
    returns (bool)
  {
    return addressToAbility[_target][_ability];
  }
  
}

/**
 * @dev Xcert implementation.
 */
interface Xcert
{
 
  /**
   * @dev This emits when ability of beeing able to transfer Xcerts changes (paused/unpaused).
   */
  event IsPaused(bool isPaused);

  /**
   * @dev Emits when imprint of a token is changed.
   * @param _tokenId Id of the Xcert.
   * @param _imprint Cryptographic asset imprint.
   */
  event TokenImprintUpdate(
    uint256 indexed _tokenId,
    bytes32 _imprint
  );

  /**
   * @dev Creates a new Xcert.
   * @param _to The address that will own the created Xcert.
   * @param _id The Xcert to be created by the msg.sender.
   * @param _imprint Cryptographic asset imprint.
   */
  function create(
    address _to,
    uint256 _id,
    bytes32 _imprint
  )
    external;

  /**
   * @dev Change URI base.
   * @param _uriBase New uriBase.
   */
  function setUriBase(
    string calldata _uriBase
  )
    external;

  /**
   * @dev Revokes a specified Xcert. Reverts if not called from contract owner or authorized 
   * address.
   * @param _tokenId Id of the Xcert we want to destroy.
   */
  function revoke(
    uint256 _tokenId
  )
    external;

  /**
   * @dev Sets if Xcerts are paused or not.
   * @param _isPaused Pause status.
   */
  function setPause(
    bool _isPaused
  )
    external;

  /**
   * @dev Updates Xcert imprint.
   * @param _tokenId Id of the Xcert.
   * @param _imprint New imprint.
   */
  function updateTokenImprint(
    uint256 _tokenId,
    bytes32 _imprint
  )
    external;

  /**
   * @dev Destroys a specified Xcert. Reverts if not called from xcert owner or operator.
   * @param _tokenId Id of the Xcert we want to destroy.
   */
  function destroy(
    uint256 _tokenId
  )
    external;

  /**
   * @dev Returns a bytes4 of keccak256 of json schema representing 0xcert protocol convention.
   * @return Schema id.
   */
  function schemaId()
    external
    view
    returns (bytes32 _schemaId);

  /**
   * @dev Returns imprint for Xcert.
   * @param _tokenId Id of the Xcert.
   * @return Token imprint.
   */
  function tokenImprint(
    uint256 _tokenId
  )
    external
    view
    returns(bytes32 imprint);
    
}

/**
 * @title XcertCreateProxy - creates a token on behalf of contracts that have been approved via
 * decentralized governance.
 */
contract XcertCreateProxy is 
  Abilitable 
{

  /**
   * @dev List of abilities:
   * 1 - Ability to execute create. 
   */
  uint8 constant ABILITY_TO_EXECUTE = 1;

  /**
   * @dev Creates a new NFT.
   * @param _xcert Address of the Xcert contract on which the creation will be perfomed.
   * @param _to The address that will own the created NFT.
   * @param _id The NFT to be created by the msg.sender.
   * @param _imprint Cryptographic asset imprint.
   */
  function create(
    address _xcert,
    address _to,
    uint256 _id,
    bytes32 _imprint
  )
    external
    hasAbility(ABILITY_TO_EXECUTE)
  {
    Xcert(_xcert).create(_to, _id, _imprint);
  }
  
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_xcert","type":"address"},{"name":"_to","type":"address"},{"name":"_id","type":"uint256"},{"name":"_imprint","type":"bytes32"}],"name":"create","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_target","type":"address"},{"name":"_ability","type":"uint8"}],"name":"isAble","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_abilities","type":"uint8[]"}],"name":"assignAbilities","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_abilities","type":"uint8[]"}],"name":"revokeAbilities","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_target","type":"address"},{"indexed":true,"name":"_ability","type":"uint8"}],"name":"AssignAbility","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_target","type":"address"},{"indexed":true,"name":"_ability","type":"uint8"}],"name":"RevokeAbility","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405260016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008060ff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001808190555060003373ffffffffffffffffffffffffffffffffffffffff167f94c46ef65c420f1cb1fa21190fe5ebb68a93445a3f49dee0d80d3ed4d8dd20b360405160405180910390a3610cbb806100ca6000396000f3fe60806040526004361061005c576000357c01000000000000000000000000000000000000000000000000000000009004806346009b0e1461006157806365521111146100e657806378e57c1f1461015c5780639984185514610241575b600080fd5b34801561006d57600080fd5b506100e46004803603608081101561008457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610326565b005b3480156100f257600080fd5b506101426004803603604081101561010957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610534565b604051808215151515815260200191505060405180910390f35b34801561016857600080fd5b5061023f6004803603604081101561017f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156101bc57600080fd5b8201836020820111156101ce57600080fd5b803590602001918460208302840111640100000000831117156101f057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506105a1565b005b34801561024d57600080fd5b506103246004803603604081101561026457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460208302840111640100000000831117156102d557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610832565b005b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008260ff1660ff16815260200190815260200160002060009054906101000a900460ff166040805190810160405280600681526020017f3031373030310000000000000000000000000000000000000000000000000000815250901515610469576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561042e578082015181840152602081019050610413565b50505050905090810190601f16801561045b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b508473ffffffffffffffffffffffffffffffffffffffff1663b0e329e48585856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019350505050600060405180830381600087803b15801561051557600080fd5b505af1158015610529573d6000803e3d6000fd5b505050505050505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008360ff1660ff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008260ff1660ff16815260200190815260200160002060009054906101000a900460ff166040805190810160405280600681526020017f30313730303100000000000000000000000000000000000000000000000000008152509015156106e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106a957808201518184015260208101905061068e565b50505050905090810190601f1680156106d65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060005b82518160ff16101561082c576000838260ff1681518110151561070757fe5b9060200190602002015160ff1614156107365761072f60018054610b9f90919063ffffffff16565b6001819055505b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858460ff1681518110151561078957fe5b9060200190602002015160ff1660ff16815260200190815260200160002060006101000a81548160ff021916908315150217905550828160ff168151811015156107cf57fe5b9060200190602002015160ff168473ffffffffffffffffffffffffffffffffffffffff167f94c46ef65c420f1cb1fa21190fe5ebb68a93445a3f49dee0d80d3ed4d8dd20b360405160405180910390a380806001019150506106e8565b50505050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008260ff1660ff16815260200190815260200160002060009054906101000a900460ff166040805190810160405280600681526020017f3031373030310000000000000000000000000000000000000000000000000000815250901515610975576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561093a57808201518184015260208101905061091f565b50505050905090810190601f1680156109675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060005b82518160ff161015610b99576000838260ff1681518110151561099857fe5b9060200190602002015160ff161415610aa35760018054116040805190810160405280600681526020017f3031373030320000000000000000000000000000000000000000000000000000815250901515610a8e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a53578082015181840152602081019050610a38565b50505050905090810190601f168015610a805780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600160008154809291906001900391905055505b60008060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000858460ff16815181101515610af657fe5b9060200190602002015160ff1660ff16815260200190815260200160002060006101000a81548160ff021916908315150217905550828160ff16815181101515610b3c57fe5b9060200190602002015160ff168473ffffffffffffffffffffffffffffffffffffffff167fb585aca703600145227a529f4f875362b054524cd929c770d086f5d8d7f0f74a60405160405180910390a38080600101915050610979565b50505050565b60008183019050828110156040805190810160405280600681526020017f3030383030310000000000000000000000000000000000000000000000000000815250901515610c88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c4d578082015181840152602081019050610c32565b50505050905090810190601f168015610c7a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b509291505056fea165627a7a723058209541931d630c22cc970f44391e605a806753b96df74e841cf22fd8aaeaafb0bf0029

   Swarm Source:
bzzr://9541931d630c22cc970f44391e605a806753b96df74e841cf22fd8aaeaafb0bf

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward