ETH Price: $3,317.18 (-1.27%)

Contract

0x996b5Bf6908BEBB348417C8854b26f7cCfc1bbbA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040109470932020-09-27 21:42:561517 days ago1601242976IN
 Create: CryptoAvatars
0 ETH0.1215476244

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
209467712024-10-12 3:13:5941 days ago1728702839
0x996b5Bf6...cCfc1bbbA
0 ETH
209462562024-10-12 1:29:5941 days ago1728696599
0x996b5Bf6...cCfc1bbbA
0 ETH
206807222024-09-05 0:11:5978 days ago1725495119
0x996b5Bf6...cCfc1bbbA
0 ETH
206755942024-09-04 7:02:4779 days ago1725433367
0x996b5Bf6...cCfc1bbbA
0 ETH
206755812024-09-04 7:00:1179 days ago1725433211
0x996b5Bf6...cCfc1bbbA
0 ETH
206514742024-08-31 22:15:4783 days ago1725142547
0x996b5Bf6...cCfc1bbbA
0 ETH
199772432024-05-29 18:17:35177 days ago1717006655
0x996b5Bf6...cCfc1bbbA
0 ETH
199548592024-05-26 15:11:11180 days ago1716736271
0x996b5Bf6...cCfc1bbbA
0 ETH
195291332024-03-28 0:43:59239 days ago1711586639
0x996b5Bf6...cCfc1bbbA
0 ETH
195291332024-03-28 0:43:59239 days ago1711586639
0x996b5Bf6...cCfc1bbbA
0 ETH
194971752024-03-23 12:03:23244 days ago1711195403
0x996b5Bf6...cCfc1bbbA
0 ETH
193653662024-03-05 0:24:35262 days ago1709598275
0x996b5Bf6...cCfc1bbbA
0 ETH
193420032024-03-01 18:05:35266 days ago1709316335
0x996b5Bf6...cCfc1bbbA
0 ETH
192753892024-02-21 10:18:23275 days ago1708510703
0x996b5Bf6...cCfc1bbbA
0 ETH
192753892024-02-21 10:18:23275 days ago1708510703
0x996b5Bf6...cCfc1bbbA
0 ETH
192753892024-02-21 10:18:23275 days ago1708510703
0x996b5Bf6...cCfc1bbbA
0 ETH
192753762024-02-21 10:15:47275 days ago1708510547
0x996b5Bf6...cCfc1bbbA
0 ETH
191393912024-02-02 8:00:47294 days ago1706860847
0x996b5Bf6...cCfc1bbbA
0 ETH
190417842024-01-19 15:24:11308 days ago1705677851
0x996b5Bf6...cCfc1bbbA
0 ETH
189786312024-01-10 19:27:23317 days ago1704914843
0x996b5Bf6...cCfc1bbbA
0 ETH
188697492023-12-26 12:03:47332 days ago1703592227
0x996b5Bf6...cCfc1bbbA
0 ETH
187317482023-12-07 3:30:35351 days ago1701919835
0x996b5Bf6...cCfc1bbbA
0 ETH
186549382023-11-26 9:24:59362 days ago1700990699
0x996b5Bf6...cCfc1bbbA
0 ETH
185395732023-11-10 5:51:23378 days ago1699595483
0x996b5Bf6...cCfc1bbbA
0 ETH
185362892023-11-09 18:50:35379 days ago1699555835
0x996b5Bf6...cCfc1bbbA
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CryptoAvatars

Compiler Version
v0.5.5+commit.47a71e8f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-09-27
*/

// File: @openzeppelin/upgrades/contracts/Initializable.sol

pragma solidity >=0.4.24 <0.7.0;


/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol

pragma solidity ^0.5.0;


/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context is Initializable {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts-ethereum-package/contracts/introspection/IERC165.sol

pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/IERC721.sol

pragma solidity ^0.5.0;



/**
 * @dev Required interface of an ERC721 compliant contract.
 */
contract IERC721 is Initializable, IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of NFTs in `owner`'s account.
     */
    function balanceOf(address owner) public view returns (uint256 balance);

    /**
     * @dev Returns the owner of the NFT specified by `tokenId`.
     */
    function ownerOf(uint256 tokenId) public view returns (address owner);

    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     *
     *
     * Requirements:
     * - `from`, `to` cannot be zero.
     * - `tokenId` must be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this
     * NFT by either {approve} or {setApprovalForAll}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public;
    /**
     * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
     * another (`to`).
     *
     * Requirements:
     * - If the caller is not `from`, it must be approved to move this NFT by
     * either {approve} or {setApprovalForAll}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public;
    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 safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/IERC721Receiver.sol

pragma solidity ^0.5.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract IERC721Receiver {
    /**
     * @notice Handle the receipt of an NFT
     * @dev The ERC721 smart contract calls this function on the recipient
     * after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
     * otherwise the caller will revert the transaction. The selector to be
     * returned can be obtained as `this.onERC721Received.selector`. This
     * function MAY throw to revert and reject the transfer.
     * Note: the ERC721 contract address is always the message sender.
     * @param operator The address which called `safeTransferFrom` function
     * @param from The address which previously owned the token
     * @param tokenId The NFT identifier which is being transferred
     * @param data Additional data with no specified format
     * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)
    public returns (bytes4);
}

// File: @openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // 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-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts-ethereum-package/contracts/utils/Address.sol

pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following 
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

// File: @openzeppelin/contracts-ethereum-package/contracts/drafts/Counters.sol

pragma solidity ^0.5.0;


/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath}
 * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never
 * directly accessed.
 */
library Counters {
    using SafeMath for uint256;

    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        // The {SafeMath} overflow check can be skipped here, see the comment at the top
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

// File: @openzeppelin/contracts-ethereum-package/contracts/introspection/ERC165.sol

pragma solidity ^0.5.0;



/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
contract ERC165 is Initializable, IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    function initialize() public initializer {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }

    uint256[50] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721.sol

pragma solidity ^0.5.0;









/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721 is Initializable, Context, ERC165, IERC721 {
    using SafeMath for uint256;
    using Address for address;
    using Counters for Counters.Counter;

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

    // Mapping from token ID to owner
    mapping (uint256 => address) private _tokenOwner;

    // Mapping from token ID to approved address
    mapping (uint256 => address) private _tokenApprovals;

    // Mapping from owner to number of owned token
    mapping (address => Counters.Counter) private _ownedTokensCount;

    // Mapping from owner to operator approvals
    mapping (address => mapping (address => bool)) private _operatorApprovals;

    /*
     *     bytes4(keccak256('balanceOf(address)')) == 0x70a08231
     *     bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
     *     bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
     *     bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
     *     bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
     *
     *     => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
     *        0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
     */
    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;

    function initialize() public initializer {
        ERC165.initialize();

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

    function _hasBeenInitialized() internal view returns (bool) {
        return supportsInterface(_INTERFACE_ID_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), "ERC721: balance query for the zero address");

        return _ownedTokensCount[owner].current();
    }

    /**
     * @dev Gets the owner of the specified token ID.
     * @param tokenId uint256 ID of the token to query the owner of
     * @return 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), "ERC721: owner query for nonexistent token");

        return owner;
    }

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

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Gets the approved address for a token ID, or zero if no address set
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to query the approval of
     * @return address currently approved for the given token ID
     */
    function getApproved(uint256 tokenId) public view returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Sets or unsets the approval of a given operator
     * An operator is allowed to transfer all tokens of the sender on their behalf.
     * @param to operator address to set the approval
     * @param approved representing the status of the approval to be set
     */
    function setApprovalForAll(address to, bool approved) public {
        require(to != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][to] = approved;
        emit ApprovalForAll(_msgSender(), to, approved);
    }

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

    /**
     * @dev Transfers the ownership of a given token ID to another address.
     * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     * Requires the msg.sender to be the owner, approved, or operator.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function transferFrom(address from, address to, uint256 tokenId) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transferFrom(from, to, tokenId);
    }

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

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() 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 memory _data) public {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransferFrom(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the _msgSender() 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 memory _data) internal {
        _transferFrom(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

    /**
     * @dev Returns whether the given spender can transfer a given token ID.
     * @param spender address of the spender to query
     * @param tokenId uint256 ID of the token to be transferred
     * @return bool whether the msg.sender is approved for the given token ID,
     * is an operator of the owner, or is the owner of the token
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Internal function to safely mint a new token.
     * Reverts if the given token ID already exists.
     * 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.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Internal function to safely mint a new token.
     * Reverts if the given token ID already exists.
     * 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.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     * @param _data bytes data to send along with a safe transfer check
     */
    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Internal function to mint a new token.
     * Reverts if the given token ID already exists.
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _tokenOwner[tokenId] = to;
        _ownedTokensCount[to].increment();

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use {_burn} instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");

        _clearApproval(tokenId);

        _ownedTokensCount[owner].decrement();
        _tokenOwner[tokenId] = address(0);

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(uint256 tokenId) internal {
        _burn(ownerOf(tokenId), tokenId);
    }

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     * @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) internal {
        require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _clearApproval(tokenId);

        _ownedTokensCount[from].decrement();
        _ownedTokensCount[to].increment();

        _tokenOwner[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * This is an internal detail of the `ERC721` contract and its use is deprecated.
     * @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 bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        internal returns (bool)
    {
        if (!to.isContract()) {
            return true;
        }
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = to.call(abi.encodeWithSelector(
            IERC721Receiver(to).onERC721Received.selector,
            _msgSender(),
            from,
            tokenId,
            _data
        ));
        if (!success) {
            if (returndata.length > 0) {
                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert("ERC721: transfer to non ERC721Receiver implementer");
            }
        } else {
            bytes4 retval = abi.decode(returndata, (bytes4));
            return (retval == _ERC721_RECEIVED);
        }
    }

    /**
     * @dev Private function to clear current approval of a given token ID.
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _clearApproval(uint256 tokenId) private {
        if (_tokenApprovals[tokenId] != address(0)) {
            _tokenApprovals[tokenId] = address(0);
        }
    }

    uint256[50] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/IERC721Enumerable.sol

pragma solidity ^0.5.0;



/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Enumerable is Initializable, IERC721 {
    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);
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Enumerable.sol

pragma solidity ^0.5.0;






/**
 * @title ERC-721 Non-Fungible Token with optional enumeration extension logic
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Enumerable is Initializable, Context, ERC165, ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => uint256[]) private _ownedTokens;

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

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

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

    /*
     *     bytes4(keccak256('totalSupply()')) == 0x18160ddd
     *     bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
     *     bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
     *
     *     => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
     */
    bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;

    /**
     * @dev Constructor function.
     */
    function initialize() public initializer {
        require(ERC721._hasBeenInitialized());
        // register the supported interface to conform to ERC721Enumerable via ERC165
        _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

    function _hasBeenInitialized() internal view returns (bool) {
        return supportsInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
    }

    /**
     * @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), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

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

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

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to transferFrom, this imposes no restrictions on msg.sender.
     * @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) internal {
        super._transferFrom(from, to, tokenId);

        _removeTokenFromOwnerEnumeration(from, tokenId);

        _addTokenToOwnerEnumeration(to, tokenId);
    }

    /**
     * @dev Internal function to mint a new token.
     * Reverts if the given token ID already exists.
     * @param to address the beneficiary that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        super._mint(to, tokenId);

        _addTokenToOwnerEnumeration(to, tokenId);

        _addTokenToAllTokensEnumeration(tokenId);
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use {ERC721-_burn} instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        super._burn(owner, tokenId);

        _removeTokenFromOwnerEnumeration(owner, tokenId);
        // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
        _ownedTokensIndex[tokenId] = 0;

        _removeTokenFromAllTokensEnumeration(tokenId);
    }

    /**
     * @dev Gets the list of token IDs of the requested owner.
     * @param owner address owning the tokens
     * @return uint256[] List of token IDs owned by the requested address
     */
    function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {
        return _ownedTokens[owner];
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        _ownedTokensIndex[tokenId] = _ownedTokens[to].length;
        _ownedTokens[to].push(tokenId);
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        _ownedTokens[from].length--;

        // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occupied by
        // lastTokenId, or just over the end of the array if the token was the last one).
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length.sub(1);
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        _allTokens.length--;
        _allTokensIndex[tokenId] = 0;
    }

    uint256[50] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/IERC721Metadata.sol

pragma solidity ^0.5.0;



/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Metadata is Initializable, IERC721 {
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Metadata.sol

pragma solidity ^0.5.0;






contract ERC721Metadata is Initializable, Context, ERC165, ERC721, IERC721Metadata {
    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    // Base URI
    string private _baseURI;

    /*
     *     bytes4(keccak256('name()')) == 0x06fdde03
     *     bytes4(keccak256('symbol()')) == 0x95d89b41
     *     bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
     *
     *     => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
     */
    bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;

    /**
     * @dev Constructor function
     */
    function initialize(string memory name, string memory symbol) public initializer {
        require(ERC721._hasBeenInitialized());

        _name = name;
        _symbol = symbol;

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

    function _hasBeenInitialized() internal view returns (bool) {
        return supportsInterface(_INTERFACE_ID_ERC721_METADATA);
    }

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

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

    /**
     * @dev Returns the URI for a given token ID. May return an empty string.
     *
     * If the token's URI is non-empty and a base URI was set (via
     * {_setBaseURI}), it will be added to the token ID's URI as a prefix.
     *
     * Reverts if the token ID does not exist.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];

        // Even if there is a base URI, it is only appended to non-empty token-specific URIs
        if (bytes(_tokenURI).length == 0) {
            return "";
        } else {
            // abi.encodePacked is being used to concatenate strings
            return string(abi.encodePacked(_baseURI, _tokenURI));
        }
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     *
     * Reverts if the token ID does not exist.
     *
     * TIP: if all token IDs share a prefix (e.g. if your URIs look like
     * `http://api.myproject.com/token/<id>`), use {_setBaseURI} to store
     * it and save gas.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal {
        require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Internal function to set the base URI for all token IDs. It is
     * automatically added as a prefix to the value returned in {tokenURI}.
     *
     * _Available since v2.5.0._
     */
    function _setBaseURI(string memory baseURI) internal {
        _baseURI = baseURI;
    }

    /**
    * @dev Returns the base URI set via {_setBaseURI}. This will be
    * automatically added as a preffix in {tokenURI} to each token's URI, when
    * they are non-empty.
    *
    * _Available since v2.5.0._
    */
    function baseURI() external view returns (string memory) {
        return _baseURI;
    }

    /**
     * @dev Internal function to burn a specific token.
     * Reverts if the token does not exist.
     * Deprecated, use _burn(uint256) instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned by the msg.sender
     */
    function _burn(address owner, uint256 tokenId) internal {
        super._burn(owner, tokenId);

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

    uint256[49] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/token/ERC721/ERC721Full.sol

pragma solidity ^0.5.0;





/**
 * @title Full ERC721 Token
 * @dev This implementation includes all the required and some optional functionality of the ERC721 standard
 * Moreover, it includes approve all functionality using operator terminology.
 *
 * See https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Full is Initializable, ERC721, ERC721Enumerable, ERC721Metadata {
    uint256[50] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/access/Roles.sol

pragma solidity ^0.5.0;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

// File: @openzeppelin/contracts-ethereum-package/contracts/access/roles/MinterRole.sol

pragma solidity ^0.5.0;




contract MinterRole is Initializable, Context {
    using Roles for Roles.Role;

    event MinterAdded(address indexed account);
    event MinterRemoved(address indexed account);

    Roles.Role private _minters;

    function initialize(address sender) public initializer {
        if (!isMinter(sender)) {
            _addMinter(sender);
        }
    }

    modifier onlyMinter() {
        require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role");
        _;
    }

    function isMinter(address account) public view returns (bool) {
        return _minters.has(account);
    }

    function addMinter(address account) public onlyMinter {
        _addMinter(account);
    }

    function renounceMinter() public {
        _removeMinter(_msgSender());
    }

    function _addMinter(address account) internal {
        _minters.add(account);
        emit MinterAdded(account);
    }

    function _removeMinter(address account) internal {
        _minters.remove(account);
        emit MinterRemoved(account);
    }

    uint256[50] private ______gap;
}

// File: @openzeppelin/contracts-ethereum-package/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;



/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Initializable, Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function initialize(address sender) public initializer {
        _owner = sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * > Note: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    uint256[50] private ______gap;
}

// File: contracts/CryptoAvatars.sol

pragma solidity ^0.5.0;






contract CryptoAvatars is Ownable, ERC721Full, MinterRole {

    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    // Mapping from token ID to creator
    mapping (uint256 => address) private _tokenCreator;


    function initializeCryptoAvatars() public initializer {
        ERC721.initialize();
        Ownable.initialize(msg.sender);
        ERC721Enumerable.initialize();
        ERC721Metadata.initialize("CryptoAvatars", "AVNFT");
        MinterRole.initialize(msg.sender);
    }

    function mintCryptoAvatar(string memory tokenURI) public onlyMinter returns (uint256) {
        uint256 tokenId = _mintCryptoAvatar(msg.sender, tokenURI);
        return tokenId;
    }

    function _mintCryptoAvatar(address owner, string memory tokenURI) internal returns (uint256) {

        uint256 newItemId = _tokenIds.current();
        _tokenIds.increment();

        _safeMint(owner, newItemId);
        _setTokenURI(newItemId, tokenURI);
        _tokenCreator[newItemId] = owner;

        return newItemId;
    }

    //Add minter role to an address
    function addMinter(address account) public onlyOwner {
        _addMinter(account);
    }
    //Revoke the minter role from an address
    function revokeMinter(address account) public onlyOwner {
        require(isMinter(account), "Account is not a minter");
        _removeMinter(account);
    }

    function setBaseURI(string memory baseURI) public onlyOwner {
        _setBaseURI(baseURI);
    }
    //Return the tokens owned by an address
    function tokensOfOwner(address owner) public view returns (uint256[] memory) {
        return _tokensOfOwner(owner);
    }
    //Burn a token
    function burn(uint256 tokenId) public {
        require(ownerOf(tokenId) == msg.sender, "ERC721: burn of token that is not own");
        if (_tokenCreator[tokenId]!=address(0)) {
          delete _tokenCreator[tokenId];
        }
        _burn(tokenId);
    }
    //Return the creator of a token
    function creatorOf(uint256 tokenId) public view returns (address) {
        address creator = _tokenCreator[tokenId];
        require(creator != address(0), "ERC721: creator query for nonexistent token");

        return creator;
    }


}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"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":"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":false,"inputs":[],"name":"initializeCryptoAvatars","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":"from","type":"address"},{"name":"to","type":"address"},{"name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"symbol","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenId","type":"uint256"}],"name":"creatorOf","outputs":[{"name":"","type":"address"}],"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":"baseURI","outputs":[{"name":"","type":"string"}],"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":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"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":"account","type":"address"}],"name":"addMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceMinter","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":"account","type":"address"}],"name":"isMinter","outputs":[{"name":"","type":"bool"}],"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":false,"inputs":[{"name":"sender","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"tokenURI","type":"string"}],"name":"mintCryptoAvatar","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"revokeMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"MinterRemoved","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":false,"name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

6080604052613103806100136000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a578063a22cb465116100ad578063c87b56dd1161007c578063c87b56dd1461085d578063cb7ee1401461087a578063cfbd48851461091e578063e985e9c514610944578063f2fde38b1461097257610206565b8063a22cb4651461071f578063aa271e1a1461074d578063b88d4fde14610773578063c4d66de81461083757610206565b80638f32d59b116100e95780638f32d59b146106e157806395d89b41146106e9578063983b2d56146106f1578063986502751461071757610206565b8063715018a6146106535780638129fc1c1461065b5780638462151c146106635780638da5cb5b146106d957610206565b806342842e0e1161019d57806355f804b31161016c57806355f804b314610547578063589a1743146105eb5780636352211e146106085780636c0360eb1461062557806370a082311461062d57610206565b806342842e0e146103ae57806342966c68146103e45780634cd88b76146104015780634f6ccce71461052a57610206565b806313dd39b1116101d957806313dd39b11461032a57806318160ddd1461033257806323b872dd1461034c5780632f745c591461038257610206565b806301ffc9a71461020b57806306fdde0314610246578063081812fc146102c3578063095ea7b3146102fc575b600080fd5b6102326004803603602081101561022157600080fd5b50356001600160e01b031916610998565b604080519115158252519081900360200190f35b61024e6109bb565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610288578181015183820152602001610270565b50505050905090810190601f1680156102b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360208110156102d957600080fd5b5035610a53565b604080516001600160a01b039092168252519081900360200190f35b6103286004803603604081101561031257600080fd5b506001600160a01b038135169060200135610aba565b005b610328610be4565b61033a610d0c565b60408051918252519081900360200190f35b6103286004803603606081101561036257600080fd5b506001600160a01b03813581169160208101359091169060400135610d12565b61033a6004803603604081101561039857600080fd5b506001600160a01b038135169060200135610d73565b610328600480360360608110156103c457600080fd5b506001600160a01b03813581169160208101359091169060400135610df5565b610328600480360360208110156103fa57600080fd5b5035610e10565b6103286004803603604081101561041757600080fd5b810190602081018135600160201b81111561043157600080fd5b82018360208201111561044357600080fd5b803590602001918460018302840111600160201b8311171561046457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156104b657600080fd5b8201836020820111156104c857600080fd5b803590602001918460018302840111600160201b831117156104e957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ea7945050505050565b61033a6004803603602081101561054057600080fd5b5035610f9f565b6103286004803603602081101561055d57600080fd5b810190602081018135600160201b81111561057757600080fd5b82018360208201111561058957600080fd5b803590602001918460018302840111600160201b831117156105aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611009945050505050565b6102e06004803603602081101561060157600080fd5b503561105e565b6102e06004803603602081101561061e57600080fd5b50356110be565b61024e611117565b61033a6004803603602081101561064357600080fd5b50356001600160a01b0316611179565b6103286111e6565b61032861127c565b6106896004803603602081101561067957600080fd5b50356001600160a01b0316611334565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106c55781810151838201526020016106ad565b505050509050019250505060405180910390f35b6102e0611395565b6102326113a4565b61024e6113ca565b6103286004803603602081101561070757600080fd5b50356001600160a01b031661142c565b610328611481565b6103286004803603604081101561073557600080fd5b506001600160a01b0381351690602001351515611493565b6102326004803603602081101561076357600080fd5b50356001600160a01b0316611595565b6103286004803603608081101561078957600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156107c357600080fd5b8201836020820111156107d557600080fd5b803590602001918460018302840111600160201b831117156107f657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506115a9945050505050565b6103286004803603602081101561084d57600080fd5b50356001600160a01b031661160c565b61024e6004803603602081101561087357600080fd5b50356116cc565b61033a6004803603602081101561089057600080fd5b810190602081018135600160201b8111156108aa57600080fd5b8201836020820111156108bc57600080fd5b803590602001918460018302840111600160201b831117156108dd57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061189f945050505050565b6103286004803603602081101561093457600080fd5b50356001600160a01b0316611904565b6102326004803603604081101561095a57600080fd5b506001600160a01b03813581169160200135166119b8565b6103286004803603602081101561098857600080fd5b50356001600160a01b03166119e6565b6001600160e01b0319811660009081526066602052604090205460ff165b919050565b6101058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a485780601f10610a1d57610100808354040283529160200191610a48565b820191906000526020600020905b815481529060010190602001808311610a2b57829003601f168201915b505050505090505b90565b6000610a5e82611a3b565b1515610a9e57604051600160e51b62461bcd02815260040180806020018281038252602c815260200180612eea602c913960400191505060405180910390fd5b506000908152609a60205260409020546001600160a01b031690565b6000610ac5826110be565b90506001600160a01b038381169082161415610b1557604051600160e51b62461bcd02815260040180806020018281038252602181526020018061300a6021913960400191505060405180910390fd5b806001600160a01b0316610b27611a58565b6001600160a01b03161480610b485750610b4881610b43611a58565b6119b8565b1515610b8857604051600160e51b62461bcd028152600401808060200182810382526038815260200180612e0e6038913960400191505060405180910390fd5b6000828152609a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600054610100900460ff1680610bfd5750610bfd611a5c565b80610c0b575060005460ff16155b1515610c4b57604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015610c76576000805460ff1961ff0019909116610100171660011790555b610c7e611a62565b610c8733611b0f565b610c8f61127c565b610cee6040518060400160405280600d81526020017f43727970746f4176617461727300000000000000000000000000000000000000815250604051806040016040528060058152602001600160da1b64105593919502815250610ea7565b610cf73361160c565b8015610d09576000805461ff00191690555b50565b60d15490565b610d23610d1d611a58565b82611c05565b1515610d6357604051600160e51b62461bcd02815260040180806020018281038252603181526020018061302b6031913960400191505060405180910390fd5b610d6e838383611cae565b505050565b6000610d7e83611179565b8210610dbe57604051600160e51b62461bcd02815260040180806020018281038252602b815260200180612d3b602b913960400191505060405180910390fd5b6001600160a01b038316600090815260cf60205260409020805483908110610de257fe5b9060005260206000200154905092915050565b610d6e838383604051806020016040528060008152506115a9565b33610e1a826110be565b6001600160a01b031614610e6257604051600160e51b62461bcd0281526004018080602001828103825260258152602001806130886025913960400191505060405180910390fd5b60008181526101a060205260409020546001600160a01b031615610e9e5760008181526101a06020526040902080546001600160a01b03191690555b610d0981611ccd565b600054610100900460ff1680610ec05750610ec0611a5c565b80610ece575060005460ff16155b1515610f0e57604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015610f39576000805460ff1961ff0019909116610100171660011790555b610f41611cdf565b1515610f4c57600080fd5b8251610f6090610105906020860190612c3e565b508151610f7590610106906020850190612c3e565b50610f89600160e01b635b5e139f02611cf9565b8015610d6e576000805461ff0019169055505050565b6000610fa9610d0c565b8210610fe957604051600160e51b62461bcd02815260040180806020018281038252602c81526020018061305c602c913960400191505060405180910390fd5b60d1805483908110610ff757fe5b90600052602060002001549050919050565b6110116113a4565b15156110555760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b610d0981611d80565b60008181526101a060205260408120546001600160a01b03168015156110b857604051600160e51b62461bcd02815260040180806020018281038252602b8152602001806130ad602b913960400191505060405180910390fd5b92915050565b6000818152609960205260408120546001600160a01b03168015156110b857604051600160e51b62461bcd028152600401808060200182810382526029815260200180612e706029913960400191505060405180910390fd5b6101088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a485780601f10610a1d57610100808354040283529160200191610a48565b60006001600160a01b03821615156111c557604051600160e51b62461bcd02815260040180806020018281038252602a815260200180612e46602a913960400191505060405180910390fd5b6001600160a01b0382166000908152609b602052604090206110b890611d94565b6111ee6113a4565b15156112325760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b600054610100900460ff16806112955750611295611a5c565b806112a3575060005460ff16155b15156112e357604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff1615801561130e576000805460ff1961ff0019909116610100171660011790555b611316611cdf565b151561132157600080fd5b610cf7600160e01b63780e9d6302611cf9565b606061133f82611d98565b80548060200260200160405190810160405280929190818152602001828054801561138957602002820191906000526020600020905b815481526020019060010190808311611375575b50505050509050919050565b6033546001600160a01b031690565b6033546000906001600160a01b03166113bb611a58565b6001600160a01b031614905090565b6101068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a485780601f10610a1d57610100808354040283529160200191610a48565b6114346113a4565b15156114785760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b610d0981611db2565b61149161148c611a58565b611dfb565b565b61149b611a58565b6001600160a01b03838116911614156114fe5760408051600160e51b62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b80609c600061150b611a58565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561154f611a58565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b60006110b861016c8363ffffffff611e4416565b6115ba6115b4611a58565b83611c05565b15156115fa57604051600160e51b62461bcd02815260040180806020018281038252603181526020018061302b6031913960400191505060405180910390fd5b61160684848484611eb0565b50505050565b600054610100900460ff16806116255750611625611a5c565b80611633575060005460ff16155b151561167357604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff1615801561169e576000805460ff1961ff0019909116610100171660011790555b6116a782611595565b15156116b6576116b682611db2565b80156116c8576000805461ff00191690555b5050565b60606116d782611a3b565b151561171757604051600160e51b62461bcd02815260040180806020018281038252602f815260200180612fdb602f913960400191505060405180910390fd5b6000828152610107602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156117ad5780601f10611782576101008083540402835291602001916117ad565b820191906000526020600020905b81548152906001019060200180831161179057829003601f168201915b505050505090508051600014156117d45750506040805160208101909152600081526109b6565b6101088160405160200180838054600181600116156101000203166002900480156118365780601f10611814576101008083540402835291820191611836565b820191906000526020600020905b815481529060010190602001808311611822575b5050825160208401908083835b602083106118625780518252601f199092019160209182019101611843565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529150506109b6565b60006118b16118ac611a58565b611595565b15156118f157604051600160e51b62461bcd028152600401808060200182810382526030815260200180612e996030913960400191505060405180910390fd5b60006118fd3384611f07565b9392505050565b61190c6113a4565b15156119505760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b61195981611595565b15156119af5760408051600160e51b62461bcd02815260206004820152601760248201527f4163636f756e74206973206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b610d0981611dfb565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b6119ee6113a4565b1515611a325760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b610d0981611f68565b6000908152609960205260409020546001600160a01b0316151590565b3390565b303b1590565b600054610100900460ff1680611a7b5750611a7b611a5c565b80611a89575060005460ff16155b1515611ac957604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015611af4576000805460ff1961ff0019909116610100171660011790555b611afc61200e565b610cf7600160e01b6380ac58cd02611cf9565b600054610100900460ff1680611b285750611b28611a5c565b80611b36575060005460ff16155b1515611b7657604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015611ba1576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a380156116c8576000805461ff00191690555050565b6000611c1082611a3b565b1515611c5057604051600160e51b62461bcd02815260040180806020018281038252602c815260200180612de2602c913960400191505060405180910390fd5b6000611c5b836110be565b9050806001600160a01b0316846001600160a01b03161480611c965750836001600160a01b0316611c8b84610a53565b6001600160a01b0316145b80611ca65750611ca681856119b8565b949350505050565b611cb98383836120b3565b611cc383826121ff565b610d6e82826122f6565b610d09611cd9826110be565b82612334565b6000611cf4600160e01b6380ac58cd02610998565b905090565b6001600160e01b03198082161415611d5b5760408051600160e51b62461bcd02815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152606660205260409020805460ff19166001179055565b80516116c890610108906020840190612c3e565b5490565b6001600160a01b0316600090815260cf6020526040902090565b611dc461016c8263ffffffff61237e16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b611e0d61016c8263ffffffff61240216565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b0382161515611e9057604051600160e51b62461bcd028152600401808060200182810382526022815260200180612f626022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b611ebb848484611cae565b611ec78484848461246e565b151561160657604051600160e51b62461bcd028152600401808060200182810382526032815260200180612d666032913960400191505060405180910390fd5b600080611f1561019f611d94565b9050611f2261019f6126b6565b611f2c84826126bf565b611f3681846126d9565b60008181526101a06020526040902080546001600160a01b0386166001600160a01b0319909116179055905092915050565b6001600160a01b0381161515611fb257604051600160e51b62461bcd028152600401808060200182810382526026815260200180612d986026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806120275750612027611a5c565b80612035575060005460ff16155b151561207557604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff161580156120a0576000805460ff1961ff0019909116610100171660011790555b610cf7600160e01b6301ffc9a702611cf9565b826001600160a01b03166120c6826110be565b6001600160a01b03161461210e57604051600160e51b62461bcd028152600401808060200182810382526029815260200180612fb26029913960400191505060405180910390fd5b6001600160a01b038216151561215857604051600160e51b62461bcd028152600401808060200182810382526024815260200180612dbe6024913960400191505060405180910390fd5b61216181612742565b6001600160a01b0383166000908152609b602052604090206121829061277d565b6001600160a01b0382166000908152609b602052604090206121a3906126b6565b60008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216600090815260cf602052604081205461222990600163ffffffff61279416565b600083815260d060205260409020549091508082146122c6576001600160a01b038416600090815260cf6020526040812080548490811061226657fe5b906000526020600020015490508060cf6000876001600160a01b03166001600160a01b03168152602001908152602001600020838154811015156122a657fe5b600091825260208083209091019290925591825260d09052604090208190555b6001600160a01b038416600090815260cf602052604090208054906122ef906000198301612cbc565b5050505050565b6001600160a01b03909116600090815260cf60208181526040808420805486865260d084529185208290559282526001810183559183529091200155565b61233e82826127d6565b6000818152610107602052604090205460026000196101006001841615020190911604156116c8576000818152610107602052604081206116c891612ce0565b6123888282611e44565b156123dd5760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b61240c8282611e44565b151561244c57604051600160e51b62461bcd028152600401808060200182810382526021815260200180612ec96021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6000612482846001600160a01b0316612802565b151561249057506001611ca6565b600060606001600160a01b038616600160e11b630a85bd01026124b1611a58565b89888860405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561252a578181015183820152602001612512565b50505050905090810190601f1680156125575780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909a16999099178952518151919890975087965094509250829150849050835b602083106125bf5780518252601f1990920191602091820191016125a0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612621576040519150601f19603f3d011682016040523d82523d6000602084013e612626565b606091505b509150915081151561267c578051156126425780518082602001fd5b604051600160e51b62461bcd028152600401808060200182810382526032815260200180612d666032913960400191505060405180910390fd5b600081806020019051602081101561269357600080fd5b50516001600160e01b031916600160e11b630a85bd0102149350611ca692505050565b80546001019055565b6116c882826040518060200160405280600081525061283b565b6126e282611a3b565b151561272257604051600160e51b62461bcd02815260040180806020018281038252602c815260200180612f16602c913960400191505060405180910390fd5b6000828152610107602090815260409091208251610d6e92840190612c3e565b6000818152609a60205260409020546001600160a01b031615610d09576000908152609a6020526040902080546001600160a01b0319169055565b805461279090600163ffffffff61279416565b9055565b60006118fd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612892565b6127e0828261292c565b6127ea82826121ff565b600081815260d060205260408120556116c881612a06565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611ca6575050151592915050565b6128458383612aa4565b612852600084848461246e565b1515610d6e57604051600160e51b62461bcd028152600401808060200182810382526032815260200180612d666032913960400191505060405180910390fd5b6000818484111561292457604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128e95781810151838201526020016128d1565b50505050905090810190601f1680156129165780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b816001600160a01b031661293f826110be565b6001600160a01b03161461298757604051600160e51b62461bcd0281526004018080602001828103825260258152602001806130886025913960400191505060405180910390fd5b61299081612742565b6001600160a01b0382166000908152609b602052604090206129b19061277d565b60008181526099602052604080822080546001600160a01b0319169055518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60d154600090612a1d90600163ffffffff61279416565b600083815260d2602052604081205460d18054939450909284908110612a3f57fe5b906000526020600020015490508060d183815481101515612a5c57fe5b600091825260208083209091019290925582815260d29091526040902082905560d1805490612a8f906000198301612cbc565b50505060009182525060d26020526040812055565b612aae8282612ac1565b612ab882826122f6565b6116c881612bfa565b6001600160a01b0382161515612b215760408051600160e51b62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b2a81611a3b565b15612b7f5760408051600160e51b62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b600081815260996020908152604080832080546001600160a01b0319166001600160a01b0387169081179091558352609b9091529020612bbe906126b6565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60d18054600083815260d260205260408120829055600182018355919091527f695fb3134ad82c3b8022bc5464edd0bcc9424ef672b52245dcb6ab2374327ce30155565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c7f57805160ff1916838001178555612cac565b82800160010185558215612cac579182015b82811115612cac578251825591602001919060010190612c91565b50612cb8929150612d20565b5090565b815481835581811115610d6e57600083815260209020610d6e918101908301612d20565b50805460018160011615610100020316600290046000825580601f10612d065750610d09565b601f016020900490600052602060002090810190610d0991905b610a5091905b80821115612cb85760008155600101612d2656fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65644552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e64734552433732313a206275726e206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a2063726561746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656ea165627a7a72305820dbca73b71c2d2b946a37ae6a4c77d573ab952693f994b5462f7ec866e9566d5f0029

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a578063a22cb465116100ad578063c87b56dd1161007c578063c87b56dd1461085d578063cb7ee1401461087a578063cfbd48851461091e578063e985e9c514610944578063f2fde38b1461097257610206565b8063a22cb4651461071f578063aa271e1a1461074d578063b88d4fde14610773578063c4d66de81461083757610206565b80638f32d59b116100e95780638f32d59b146106e157806395d89b41146106e9578063983b2d56146106f1578063986502751461071757610206565b8063715018a6146106535780638129fc1c1461065b5780638462151c146106635780638da5cb5b146106d957610206565b806342842e0e1161019d57806355f804b31161016c57806355f804b314610547578063589a1743146105eb5780636352211e146106085780636c0360eb1461062557806370a082311461062d57610206565b806342842e0e146103ae57806342966c68146103e45780634cd88b76146104015780634f6ccce71461052a57610206565b806313dd39b1116101d957806313dd39b11461032a57806318160ddd1461033257806323b872dd1461034c5780632f745c591461038257610206565b806301ffc9a71461020b57806306fdde0314610246578063081812fc146102c3578063095ea7b3146102fc575b600080fd5b6102326004803603602081101561022157600080fd5b50356001600160e01b031916610998565b604080519115158252519081900360200190f35b61024e6109bb565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610288578181015183820152602001610270565b50505050905090810190601f1680156102b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e0600480360360208110156102d957600080fd5b5035610a53565b604080516001600160a01b039092168252519081900360200190f35b6103286004803603604081101561031257600080fd5b506001600160a01b038135169060200135610aba565b005b610328610be4565b61033a610d0c565b60408051918252519081900360200190f35b6103286004803603606081101561036257600080fd5b506001600160a01b03813581169160208101359091169060400135610d12565b61033a6004803603604081101561039857600080fd5b506001600160a01b038135169060200135610d73565b610328600480360360608110156103c457600080fd5b506001600160a01b03813581169160208101359091169060400135610df5565b610328600480360360208110156103fa57600080fd5b5035610e10565b6103286004803603604081101561041757600080fd5b810190602081018135600160201b81111561043157600080fd5b82018360208201111561044357600080fd5b803590602001918460018302840111600160201b8311171561046457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156104b657600080fd5b8201836020820111156104c857600080fd5b803590602001918460018302840111600160201b831117156104e957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ea7945050505050565b61033a6004803603602081101561054057600080fd5b5035610f9f565b6103286004803603602081101561055d57600080fd5b810190602081018135600160201b81111561057757600080fd5b82018360208201111561058957600080fd5b803590602001918460018302840111600160201b831117156105aa57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611009945050505050565b6102e06004803603602081101561060157600080fd5b503561105e565b6102e06004803603602081101561061e57600080fd5b50356110be565b61024e611117565b61033a6004803603602081101561064357600080fd5b50356001600160a01b0316611179565b6103286111e6565b61032861127c565b6106896004803603602081101561067957600080fd5b50356001600160a01b0316611334565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106c55781810151838201526020016106ad565b505050509050019250505060405180910390f35b6102e0611395565b6102326113a4565b61024e6113ca565b6103286004803603602081101561070757600080fd5b50356001600160a01b031661142c565b610328611481565b6103286004803603604081101561073557600080fd5b506001600160a01b0381351690602001351515611493565b6102326004803603602081101561076357600080fd5b50356001600160a01b0316611595565b6103286004803603608081101561078957600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156107c357600080fd5b8201836020820111156107d557600080fd5b803590602001918460018302840111600160201b831117156107f657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506115a9945050505050565b6103286004803603602081101561084d57600080fd5b50356001600160a01b031661160c565b61024e6004803603602081101561087357600080fd5b50356116cc565b61033a6004803603602081101561089057600080fd5b810190602081018135600160201b8111156108aa57600080fd5b8201836020820111156108bc57600080fd5b803590602001918460018302840111600160201b831117156108dd57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061189f945050505050565b6103286004803603602081101561093457600080fd5b50356001600160a01b0316611904565b6102326004803603604081101561095a57600080fd5b506001600160a01b03813581169160200135166119b8565b6103286004803603602081101561098857600080fd5b50356001600160a01b03166119e6565b6001600160e01b0319811660009081526066602052604090205460ff165b919050565b6101058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a485780601f10610a1d57610100808354040283529160200191610a48565b820191906000526020600020905b815481529060010190602001808311610a2b57829003601f168201915b505050505090505b90565b6000610a5e82611a3b565b1515610a9e57604051600160e51b62461bcd02815260040180806020018281038252602c815260200180612eea602c913960400191505060405180910390fd5b506000908152609a60205260409020546001600160a01b031690565b6000610ac5826110be565b90506001600160a01b038381169082161415610b1557604051600160e51b62461bcd02815260040180806020018281038252602181526020018061300a6021913960400191505060405180910390fd5b806001600160a01b0316610b27611a58565b6001600160a01b03161480610b485750610b4881610b43611a58565b6119b8565b1515610b8857604051600160e51b62461bcd028152600401808060200182810382526038815260200180612e0e6038913960400191505060405180910390fd5b6000828152609a602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600054610100900460ff1680610bfd5750610bfd611a5c565b80610c0b575060005460ff16155b1515610c4b57604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015610c76576000805460ff1961ff0019909116610100171660011790555b610c7e611a62565b610c8733611b0f565b610c8f61127c565b610cee6040518060400160405280600d81526020017f43727970746f4176617461727300000000000000000000000000000000000000815250604051806040016040528060058152602001600160da1b64105593919502815250610ea7565b610cf73361160c565b8015610d09576000805461ff00191690555b50565b60d15490565b610d23610d1d611a58565b82611c05565b1515610d6357604051600160e51b62461bcd02815260040180806020018281038252603181526020018061302b6031913960400191505060405180910390fd5b610d6e838383611cae565b505050565b6000610d7e83611179565b8210610dbe57604051600160e51b62461bcd02815260040180806020018281038252602b815260200180612d3b602b913960400191505060405180910390fd5b6001600160a01b038316600090815260cf60205260409020805483908110610de257fe5b9060005260206000200154905092915050565b610d6e838383604051806020016040528060008152506115a9565b33610e1a826110be565b6001600160a01b031614610e6257604051600160e51b62461bcd0281526004018080602001828103825260258152602001806130886025913960400191505060405180910390fd5b60008181526101a060205260409020546001600160a01b031615610e9e5760008181526101a06020526040902080546001600160a01b03191690555b610d0981611ccd565b600054610100900460ff1680610ec05750610ec0611a5c565b80610ece575060005460ff16155b1515610f0e57604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015610f39576000805460ff1961ff0019909116610100171660011790555b610f41611cdf565b1515610f4c57600080fd5b8251610f6090610105906020860190612c3e565b508151610f7590610106906020850190612c3e565b50610f89600160e01b635b5e139f02611cf9565b8015610d6e576000805461ff0019169055505050565b6000610fa9610d0c565b8210610fe957604051600160e51b62461bcd02815260040180806020018281038252602c81526020018061305c602c913960400191505060405180910390fd5b60d1805483908110610ff757fe5b90600052602060002001549050919050565b6110116113a4565b15156110555760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b610d0981611d80565b60008181526101a060205260408120546001600160a01b03168015156110b857604051600160e51b62461bcd02815260040180806020018281038252602b8152602001806130ad602b913960400191505060405180910390fd5b92915050565b6000818152609960205260408120546001600160a01b03168015156110b857604051600160e51b62461bcd028152600401808060200182810382526029815260200180612e706029913960400191505060405180910390fd5b6101088054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a485780601f10610a1d57610100808354040283529160200191610a48565b60006001600160a01b03821615156111c557604051600160e51b62461bcd02815260040180806020018281038252602a815260200180612e46602a913960400191505060405180910390fd5b6001600160a01b0382166000908152609b602052604090206110b890611d94565b6111ee6113a4565b15156112325760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b600054610100900460ff16806112955750611295611a5c565b806112a3575060005460ff16155b15156112e357604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff1615801561130e576000805460ff1961ff0019909116610100171660011790555b611316611cdf565b151561132157600080fd5b610cf7600160e01b63780e9d6302611cf9565b606061133f82611d98565b80548060200260200160405190810160405280929190818152602001828054801561138957602002820191906000526020600020905b815481526020019060010190808311611375575b50505050509050919050565b6033546001600160a01b031690565b6033546000906001600160a01b03166113bb611a58565b6001600160a01b031614905090565b6101068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a485780601f10610a1d57610100808354040283529160200191610a48565b6114346113a4565b15156114785760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b610d0981611db2565b61149161148c611a58565b611dfb565b565b61149b611a58565b6001600160a01b03838116911614156114fe5760408051600160e51b62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b80609c600061150b611a58565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561154f611a58565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b60006110b861016c8363ffffffff611e4416565b6115ba6115b4611a58565b83611c05565b15156115fa57604051600160e51b62461bcd02815260040180806020018281038252603181526020018061302b6031913960400191505060405180910390fd5b61160684848484611eb0565b50505050565b600054610100900460ff16806116255750611625611a5c565b80611633575060005460ff16155b151561167357604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff1615801561169e576000805460ff1961ff0019909116610100171660011790555b6116a782611595565b15156116b6576116b682611db2565b80156116c8576000805461ff00191690555b5050565b60606116d782611a3b565b151561171757604051600160e51b62461bcd02815260040180806020018281038252602f815260200180612fdb602f913960400191505060405180910390fd5b6000828152610107602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156117ad5780601f10611782576101008083540402835291602001916117ad565b820191906000526020600020905b81548152906001019060200180831161179057829003601f168201915b505050505090508051600014156117d45750506040805160208101909152600081526109b6565b6101088160405160200180838054600181600116156101000203166002900480156118365780601f10611814576101008083540402835291820191611836565b820191906000526020600020905b815481529060010190602001808311611822575b5050825160208401908083835b602083106118625780518252601f199092019160209182019101611843565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529150506109b6565b60006118b16118ac611a58565b611595565b15156118f157604051600160e51b62461bcd028152600401808060200182810382526030815260200180612e996030913960400191505060405180910390fd5b60006118fd3384611f07565b9392505050565b61190c6113a4565b15156119505760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b61195981611595565b15156119af5760408051600160e51b62461bcd02815260206004820152601760248201527f4163636f756e74206973206e6f742061206d696e746572000000000000000000604482015290519081900360640190fd5b610d0981611dfb565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b6119ee6113a4565b1515611a325760408051600160e51b62461bcd0281526020600482018190526024820152600080516020612f42833981519152604482015290519081900360640190fd5b610d0981611f68565b6000908152609960205260409020546001600160a01b0316151590565b3390565b303b1590565b600054610100900460ff1680611a7b5750611a7b611a5c565b80611a89575060005460ff16155b1515611ac957604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015611af4576000805460ff1961ff0019909116610100171660011790555b611afc61200e565b610cf7600160e01b6380ac58cd02611cf9565b600054610100900460ff1680611b285750611b28611a5c565b80611b36575060005460ff16155b1515611b7657604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff16158015611ba1576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a380156116c8576000805461ff00191690555050565b6000611c1082611a3b565b1515611c5057604051600160e51b62461bcd02815260040180806020018281038252602c815260200180612de2602c913960400191505060405180910390fd5b6000611c5b836110be565b9050806001600160a01b0316846001600160a01b03161480611c965750836001600160a01b0316611c8b84610a53565b6001600160a01b0316145b80611ca65750611ca681856119b8565b949350505050565b611cb98383836120b3565b611cc383826121ff565b610d6e82826122f6565b610d09611cd9826110be565b82612334565b6000611cf4600160e01b6380ac58cd02610998565b905090565b6001600160e01b03198082161415611d5b5760408051600160e51b62461bcd02815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152606660205260409020805460ff19166001179055565b80516116c890610108906020840190612c3e565b5490565b6001600160a01b0316600090815260cf6020526040902090565b611dc461016c8263ffffffff61237e16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b611e0d61016c8263ffffffff61240216565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b0382161515611e9057604051600160e51b62461bcd028152600401808060200182810382526022815260200180612f626022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b611ebb848484611cae565b611ec78484848461246e565b151561160657604051600160e51b62461bcd028152600401808060200182810382526032815260200180612d666032913960400191505060405180910390fd5b600080611f1561019f611d94565b9050611f2261019f6126b6565b611f2c84826126bf565b611f3681846126d9565b60008181526101a06020526040902080546001600160a01b0386166001600160a01b0319909116179055905092915050565b6001600160a01b0381161515611fb257604051600160e51b62461bcd028152600401808060200182810382526026815260200180612d986026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806120275750612027611a5c565b80612035575060005460ff16155b151561207557604051600160e51b62461bcd02815260040180806020018281038252602e815260200180612f84602e913960400191505060405180910390fd5b600054610100900460ff161580156120a0576000805460ff1961ff0019909116610100171660011790555b610cf7600160e01b6301ffc9a702611cf9565b826001600160a01b03166120c6826110be565b6001600160a01b03161461210e57604051600160e51b62461bcd028152600401808060200182810382526029815260200180612fb26029913960400191505060405180910390fd5b6001600160a01b038216151561215857604051600160e51b62461bcd028152600401808060200182810382526024815260200180612dbe6024913960400191505060405180910390fd5b61216181612742565b6001600160a01b0383166000908152609b602052604090206121829061277d565b6001600160a01b0382166000908152609b602052604090206121a3906126b6565b60008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216600090815260cf602052604081205461222990600163ffffffff61279416565b600083815260d060205260409020549091508082146122c6576001600160a01b038416600090815260cf6020526040812080548490811061226657fe5b906000526020600020015490508060cf6000876001600160a01b03166001600160a01b03168152602001908152602001600020838154811015156122a657fe5b600091825260208083209091019290925591825260d09052604090208190555b6001600160a01b038416600090815260cf602052604090208054906122ef906000198301612cbc565b5050505050565b6001600160a01b03909116600090815260cf60208181526040808420805486865260d084529185208290559282526001810183559183529091200155565b61233e82826127d6565b6000818152610107602052604090205460026000196101006001841615020190911604156116c8576000818152610107602052604081206116c891612ce0565b6123888282611e44565b156123dd5760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b61240c8282611e44565b151561244c57604051600160e51b62461bcd028152600401808060200182810382526021815260200180612ec96021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b6000612482846001600160a01b0316612802565b151561249057506001611ca6565b600060606001600160a01b038616600160e11b630a85bd01026124b1611a58565b89888860405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561252a578181015183820152602001612512565b50505050905090810190601f1680156125575780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909a16999099178952518151919890975087965094509250829150849050835b602083106125bf5780518252601f1990920191602091820191016125a0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612621576040519150601f19603f3d011682016040523d82523d6000602084013e612626565b606091505b509150915081151561267c578051156126425780518082602001fd5b604051600160e51b62461bcd028152600401808060200182810382526032815260200180612d666032913960400191505060405180910390fd5b600081806020019051602081101561269357600080fd5b50516001600160e01b031916600160e11b630a85bd0102149350611ca692505050565b80546001019055565b6116c882826040518060200160405280600081525061283b565b6126e282611a3b565b151561272257604051600160e51b62461bcd02815260040180806020018281038252602c815260200180612f16602c913960400191505060405180910390fd5b6000828152610107602090815260409091208251610d6e92840190612c3e565b6000818152609a60205260409020546001600160a01b031615610d09576000908152609a6020526040902080546001600160a01b0319169055565b805461279090600163ffffffff61279416565b9055565b60006118fd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612892565b6127e0828261292c565b6127ea82826121ff565b600081815260d060205260408120556116c881612a06565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611ca6575050151592915050565b6128458383612aa4565b612852600084848461246e565b1515610d6e57604051600160e51b62461bcd028152600401808060200182810382526032815260200180612d666032913960400191505060405180910390fd5b6000818484111561292457604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128e95781810151838201526020016128d1565b50505050905090810190601f1680156129165780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b816001600160a01b031661293f826110be565b6001600160a01b03161461298757604051600160e51b62461bcd0281526004018080602001828103825260258152602001806130886025913960400191505060405180910390fd5b61299081612742565b6001600160a01b0382166000908152609b602052604090206129b19061277d565b60008181526099602052604080822080546001600160a01b0319169055518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60d154600090612a1d90600163ffffffff61279416565b600083815260d2602052604081205460d18054939450909284908110612a3f57fe5b906000526020600020015490508060d183815481101515612a5c57fe5b600091825260208083209091019290925582815260d29091526040902082905560d1805490612a8f906000198301612cbc565b50505060009182525060d26020526040812055565b612aae8282612ac1565b612ab882826122f6565b6116c881612bfa565b6001600160a01b0382161515612b215760408051600160e51b62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612b2a81611a3b565b15612b7f5760408051600160e51b62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b600081815260996020908152604080832080546001600160a01b0319166001600160a01b0387169081179091558352609b9091529020612bbe906126b6565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60d18054600083815260d260205260408120829055600182018355919091527f695fb3134ad82c3b8022bc5464edd0bcc9424ef672b52245dcb6ab2374327ce30155565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612c7f57805160ff1916838001178555612cac565b82800160010185558215612cac579182015b82811115612cac578251825591602001919060010190612c91565b50612cb8929150612d20565b5090565b815481835581811115610d6e57600083815260209020610d6e918101908301612d20565b50805460018160011615610100020316600290046000825580601f10612d065750610d09565b601f016020900490600052602060002090810190610d0991905b610a5091905b80821115612cb85760008155600101612d2656fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65644552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e64734552433732313a206275726e206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a2063726561746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656ea165627a7a72305820dbca73b71c2d2b946a37ae6a4c77d573ab952693f994b5462f7ec866e9566d5f0029

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.