Contract Address Details

0xf5C52ba8e2A47740d9CCA9acb338ceADC7Afd164

Contract Name
NFTImplementation
Creator
0xfe74a7–1e6aa3 at 0x2c1f18–f61b46
Balance
0 CHZ ( )
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
29227832
Contract name:
NFTImplementation




Optimization enabled
false
Compiler version
v0.5.1+commit.c8a2cb62




EVM Version
default




Verified at
2023-08-22T12:04:28.630793Z

Contract source code

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

pragma solidity 0.5.1;


/**
 * @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/math/SafeMath.sol

pragma solidity 0.5.1;

/**
 * @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/drafts/Counters.sol

pragma solidity 0.5.1;


/**
 * @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/GSN/Context.sol

pragma solidity 0.5.1;


/*
 * @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.1;

/**
 * @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.1;



/**
 * @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.1;

/**
 * @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


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

pragma solidity 0.5.1;

/**
 * @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

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

pragma solidity 0.5.1;



/**
 * @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.1;









/**
 * @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.1;



/**
 * @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.1;






/**
 * @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.1;



/**
 * @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.1;






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.1;





/**
 * @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.1;

/**
 * @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.1;




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/token/ERC721/ERC721Mintable.sol

pragma solidity 0.5.1;




/**
 * @title ERC721Mintable
 * @dev ERC721 minting logic.
 */
contract ERC721Mintable is Initializable, ERC721, MinterRole {
    function initialize(address sender) public initializer {
        require(ERC721._hasBeenInitialized());
        MinterRole.initialize(sender);
    }

    /**
     * @dev Function to mint tokens.
     * @param to The address that will receive the minted token.
     * @param tokenId The token id to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function mint(address to, uint256 tokenId) public onlyMinter returns (bool) {
        _mint(to, tokenId);
        return true;
    }

    /**
     * @dev Function to safely mint tokens.
     * @param to The address that will receive the minted token.
     * @param tokenId The token id to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function safeMint(address to, uint256 tokenId) public onlyMinter returns (bool) {
        _safeMint(to, tokenId);
        return true;
    }

    /**
     * @dev Function to safely mint tokens.
     * @param to The address that will receive the minted token.
     * @param tokenId The token id to mint.
     * @param _data bytes data to send along with a safe transfer check.
     * @return A boolean that indicates if the operation was successful.
     */
    function safeMint(address to, uint256 tokenId, bytes memory _data) public onlyMinter returns (bool) {
        _safeMint(to, tokenId, _data);
        return true;
    }

    uint256[50] private ______gap;
}

// File: contracts/fantoken.sol

pragma solidity 0.5.1;


contract NFTImplementation is Initializable, ERC721Full, ERC721Mintable {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;
    address private owner;
    mapping(address => bool) public hasMinted;
    bool private initializedByProxy;

    modifier firstTimeMinter(address to) {
        require(!hasMinted[_msgSender()], "Caller has already minted");
        require(!hasMinted[to], "Already minted for address");
        _;
    }

    modifier onlyOwner {
        require(msg.sender == owner, "Not allowed to call this method");
        _;
    }

    constructor() public {
        initializedByProxy = true;
    }

    function initialize(string memory name, string memory symbol, address sender) public initializer {
        require(!initializedByProxy, "already initialized");
        ERC721.initialize();
        ERC721Metadata.initialize(name, symbol);
        ERC721Enumerable.initialize();
        ERC721Mintable.initialize(sender);
        owner = msg.sender;
    }

    function getOwner() public view returns (address) {
        return owner;
    }

    function mint(address to, uint256 tokenId) public onlyOwner returns (bool) {
        _mint(to, tokenId);
        return true;
    }

    /**
     * @dev Minting a single token to an address. Can be called by a minter only
     * @param to Address which will receive the token
     * @param tokenURI The metadata URI for the new minted token
     */
    function mintSingle(address to, string memory tokenURI)
        public
        onlyMinter
        returns (uint256)
    {
        _tokenIds.increment();

        uint256 newItemId = _tokenIds.current();
        _mint(to, newItemId);
        _setTokenURI(newItemId, tokenURI);
        hasMinted[_msgSender()] = true;
        hasMinted[to] = true;

        return newItemId;
    }

    /**
     * @dev Transfers multiple tokens to a list of addresses.
     * The msg.sender must own all the tokens to be transferred.
     * @param to Addresses which will receive the tokens, one per address
     * @param tokenIds List of token IDs to be transferred
     */
    function transferMultiple(address[] calldata to, uint256[] calldata tokenIds) external {
        bool isOwner = _isOwnerForAll(msg.sender, tokenIds);
        require(isOwner == true, "not owner of all these tokens");

        uint256 count = tokenIds.length;

        for (uint256 index = 0; index < count; index++) {
            safeTransferFrom(msg.sender, to[index], tokenIds[index]);
        }
    }

    /**
     * @dev Verifies if an address owns all the tokens in the list.
     * @param _owner Address which will be verified as owner of the tokens
     * @param _tokenIds List of tokens
     */
    function _isOwnerForAll(address _owner, uint256[] memory _tokenIds) private returns (bool) {
        uint256 count = _tokenIds.length;
        address _tokenOwner;

        for (uint256 index = 0; index < count; index++) {
            _tokenOwner = ownerOf(_tokenIds[index]);
            if(_tokenOwner != _owner) {
                return false;
            }
        }
        return true;
    }

    /**
     * @dev Minting a specific number of tokens to an address. Can be called by a minter only
     * @param to Address which will receive the token
     * @param tokenURI The metadata URI, without token ID, for the new minted tokens
     * @param total Number of tokens to be minted
     */
    function mintMultiple(address to, string calldata tokenURI, uint256 total) external onlyMinter returns (uint256[] memory) {
        uint256[] memory _minted = new uint256[](total);
        uint256 _tokenId;
        uint256 newItemId;

        for (uint256 i = 0; i < total; i++) {
            _minted[i] = _mintSingle(to, tokenURI);
        }
        return _minted;
    }

    /**
     * @dev Minting a tokens to a list of addresses. Can be called by a minter only
     * @param to List of addresses which will receive the tokens
     * @param tokenURI The metadata URI, without token ID, for the new minted tokens
     */
    function mintMultiple(address[] calldata to, string calldata tokenURI) external onlyMinter returns (uint256[] memory) {
        uint256 total = to.length;
        uint256[] memory _minted = new uint256[](total);
        uint256 _tokenId;
        uint256 newItemId;

        for (uint256 i = 0; i < total; i++) {
            _minted[i] = _mintSingle(to[i], tokenURI);
        }
        return _minted;
    }

    /**
     * @dev Minting one token to an address
     * @param _to Address which will receive the token
     * @param _tokenUri The metadata URI, without token ID, for the new minted token
     */
    function _mintSingle(address _to, string memory _tokenUri) private returns (uint256 _tid) {
         uint256 _tid;
         string memory concatUrl;

        _tokenIds.increment();
        _tid = _tokenIds.current();
        _mint(_to, _tid);
        concatUrl = concatStringDec(_tokenUri, _tid);
        _setTokenURI(_tid, concatUrl);
        return _tid;
    }

    /**
     * @dev Removes a minter from minters list.
     * Can be called only by the smart contract owner.
     * @param minter Address to be removed
     */
    function removeMinter(address minter) onlyOwner external {
        if(!isMinter(minter)) {
            return;
        }
        _removeMinter(minter);
    }

    /**
     * @dev Burns a token
     * Can be called only by the smart contract owner.
     * @param tokenId ID of the token to be burnt
     */
    function burn( uint256 tokenId) public onlyOwner {
        super._burn(tokenId);
    }

    /**
     * @dev Appends an integer to a string
     * @param s String to be processed
     * @param x Integer to be appended
     */
    function concatStringDec(string memory s, uint256 x) private pure returns (string memory) {
        return string(abi.encodePacked(s, itod(x)));
    }

    function itod(uint256 x) private pure returns (string memory) {
        if (x > 0) {
            string memory str;
            while (x > 0) {
                str = string(abi.encodePacked(uint8(x % 10 + 48), str));
                x /= 10;
            }
            return str;
        }
        return "0";
    }

    function version() public pure returns (uint8) {
        return 3;
    }
}
        

Contract ABI

[{"type":"constructor","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addMinter","inputs":[{"type":"address","name":"account"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"balanceOf","inputs":[{"type":"address","name":"owner"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":""}],"name":"baseURI","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"tokenId"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":""}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":""}],"name":"getOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"hasMinted","inputs":[{"type":"address","name":""}],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name"},{"type":"string","name":"symbol"},{"type":"address","name":"sender"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name"},{"type":"string","name":"symbol"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"sender"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner"},{"type":"address","name":"operator"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"isMinter","inputs":[{"type":"address","name":"account"}],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"mint","inputs":[{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":""}],"name":"mintMultiple","inputs":[{"type":"address[]","name":"to"},{"type":"string","name":"tokenURI"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":""}],"name":"mintMultiple","inputs":[{"type":"address","name":"to"},{"type":"string","name":"tokenURI"},{"type":"uint256","name":"total"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":""}],"name":"mintSingle","inputs":[{"type":"address","name":"to"},{"type":"string","name":"tokenURI"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":""}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":""}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId"}],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeMinter","inputs":[{"type":"address","name":"minter"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceMinter","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"safeMint","inputs":[{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"},{"type":"bytes","name":"_data"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":""}],"name":"safeMint","inputs":[{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"},{"type":"bytes","name":"_data"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"to"},{"type":"bool","name":"approved"}],"constant":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":""}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":""}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"tokenByIndex","inputs":[{"type":"uint256","name":"index"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"tokenOfOwnerByIndex","inputs":[{"type":"address","name":"owner"},{"type":"uint256","name":"index"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":""}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId"}],"constant":true},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":""}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"tokenId"}],"constant":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferMultiple","inputs":[{"type":"address[]","name":"to"},{"type":"uint256[]","name":"tokenIds"}],"constant":false},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint8","name":""}],"name":"version","inputs":[],"constant":true},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"approved","indexed":true},{"type":"uint256","name":"tokenId","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"approved","indexed":false}],"anonymous":false},{"type":"event","name":"MinterAdded","inputs":[{"type":"address","name":"account","indexed":true}],"anonymous":false},{"type":"event","name":"MinterRemoved","inputs":[{"type":"address","name":"account","indexed":true}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"tokenId","indexed":true}],"anonymous":false}]
            

Deployed ByteCode

0x6080604052600436106101bc576000357c01000000000000000000000000000000000000000000000000000000009004806301ffc9a7146101c157806306fdde0314610233578063077f224a146102c3578063081812fc14610442578063095ea7b3146104bd5780630d9cc27514610518578063130899fb1461061457806318160ddd1461074457806323b872dd1461076f5780632f745c59146107ea5780633092afd51461085957806338e21cce146108aa5780633f1bc49d1461091357806340c10f1914610a1857806342842e0e14610a8b57806342966c6814610b065780634cd88b7614610b415780634f6ccce714610ca057806354fd4d5014610cef5780636352211e14610d205780636c0360eb14610d9b57806370a0823114610e2b5780638129fc1c14610e905780638832e6e314610ea7578063893d20e814610fb157806395d89b4114611008578063983b2d561461109857806398650275146110e9578063a05fccef14611100578063a1448194146111db578063a22cb4651461124e578063aa271e1a146112ab578063b88d4fde14611314578063c4d66de814611426578063c87b56dd14611477578063e985e9c51461152b575b600080fd5b3480156101cd57600080fd5b50610219600480360360208110156101e457600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506115b4565b604051808215151515815260200191505060405180910390f35b34801561023f57600080fd5b5061024861161c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028857808201518184015260208101905061026d565b50505050905090810190601f1680156102b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102cf57600080fd5b50610440600480360360608110156102e657600080fd5b810190808035906020019064010000000081111561030357600080fd5b82018360208201111561031557600080fd5b8035906020019184600183028401116401000000008311171561033757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561039a57600080fd5b8201836020820111156103ac57600080fd5b803590602001918460018302840111640100000000831117156103ce57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116be565b005b34801561044e57600080fd5b5061047b6004803603602081101561046557600080fd5b81019080803590602001909291905050506118f0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104c957600080fd5b50610516600480360360408110156104e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119d0565b005b34801561052457600080fd5b506105fe6004803603604081101561053b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561057857600080fd5b82018360208201111561058a57600080fd5b803590602001918460018302840111640100000000831117156105ac57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611c41565b6040518082815260200191505060405180910390f35b34801561062057600080fd5b506106ed6004803603604081101561063757600080fd5b810190808035906020019064010000000081111561065457600080fd5b82018360208201111561066657600080fd5b8035906020019184602083028401116401000000008311171561068857600080fd5b9091929391929390803590602001906401000000008111156106a957600080fd5b8201836020820111156106bb57600080fd5b803590602001918460018302840111640100000000831117156106dd57600080fd5b9091929391929390505050611dde565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610730578082015181840152602081019050610715565b505050509050019250505060405180910390f35b34801561075057600080fd5b50610759611f88565b6040518082815260200191505060405180910390f35b34801561077b57600080fd5b506107e86004803603606081101561079257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611f95565b005b3480156107f657600080fd5b506108436004803603604081101561080d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612050565b6040518082815260200191505060405180910390f35b34801561086557600080fd5b506108a86004803603602081101561087c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612156565b005b3480156108b657600080fd5b506108f9600480360360208110156108cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061223d565b604051808215151515815260200191505060405180910390f35b34801561091f57600080fd5b506109c16004803603606081101561093657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561097357600080fd5b82018360208201111561098557600080fd5b803590602001918460018302840111640100000000831117156109a757600080fd5b90919293919293908035906020019092919050505061225e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610a045780820151818401526020810190506109e9565b505050509050019250505060405180910390f35b348015610a2457600080fd5b50610a7160048036036040811015610a3b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123d5565b604051808215151515815260200191505060405180910390f35b348015610a9757600080fd5b50610b0460048036036060811015610aae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506124b1565b005b348015610b1257600080fd5b50610b3f60048036036020811015610b2957600080fd5b81019080803590602001909291905050506124d2565b005b348015610b4d57600080fd5b50610c9e60048036036040811015610b6457600080fd5b8101908080359060200190640100000000811115610b8157600080fd5b820183602082011115610b9357600080fd5b80359060200191846001830284011164010000000083111715610bb557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610c1857600080fd5b820183602082011115610c2a57600080fd5b80359060200191846001830284011164010000000083111715610c4c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506125a4565b005b348015610cac57600080fd5b50610cd960048036036020811015610cc357600080fd5b8101908080359060200190929190505050612757565b6040518082815260200191505060405180910390f35b348015610cfb57600080fd5b50610d0461281e565b604051808260ff1660ff16815260200191505060405180910390f35b348015610d2c57600080fd5b50610d5960048036036020811015610d4357600080fd5b8101908080359060200190929190505050612827565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610da757600080fd5b50610db0612934565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610df0578082015181840152602081019050610dd5565b50505050905090810190601f168015610e1d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610e3757600080fd5b50610e7a60048036036020811015610e4e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506129d6565b6040518082815260200191505060405180910390f35b348015610e9c57600080fd5b50610ea5612af0565b005b348015610eb357600080fd5b50610f9760048036036060811015610eca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610f1157600080fd5b820183602082011115610f2357600080fd5b80359060200191846001830284011164010000000083111715610f4557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612c73565b604051808215151515815260200191505060405180910390f35b348015610fbd57600080fd5b50610fc6612d35565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561101457600080fd5b5061101d612d60565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561105d578082015181840152602081019050611042565b50505050905090810190601f16801561108a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156110a457600080fd5b506110e7600480360360208110156110bb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e02565b005b3480156110f557600080fd5b506110fe612eb8565b005b34801561110c57600080fd5b506111d96004803603604081101561112357600080fd5b810190808035906020019064010000000081111561114057600080fd5b82018360208201111561115257600080fd5b8035906020019184602083028401116401000000008311171561117457600080fd5b90919293919293908035906020019064010000000081111561119557600080fd5b8201836020820111156111a757600080fd5b803590602001918460208302840111640100000000831117156111c957600080fd5b9091929391929390505050612eca565b005b3480156111e757600080fd5b50611234600480360360408110156111fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061300a565b604051808215151515815260200191505060405180910390f35b34801561125a57600080fd5b506112a96004803603604081101561127157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506130ca565b005b3480156112b757600080fd5b506112fa600480360360208110156112ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613284565b604051808215151515815260200191505060405180910390f35b34801561132057600080fd5b506114246004803603608081101561133757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561139e57600080fd5b8201836020820111156113b057600080fd5b803590602001918460018302840111640100000000831117156113d257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506132a2565b005b34801561143257600080fd5b506114756004803603602081101561144957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061335f565b005b34801561148357600080fd5b506114b06004803603602081101561149a57600080fd5b81019080803590602001909291905050506134c0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156114f05780820151818401526020810190506114d5565b50505050905090810190601f16801561151d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561153757600080fd5b5061159a6004803603604081101561154e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061370a565b604051808215151515815260200191505060405180910390f35b600060336000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b606060d28054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116b45780601f10611689576101008083540402835291602001916116b4565b820191906000526020600020905b81548152906001019060200180831161169757829003601f168201915b5050505050905090565b600060019054906101000a900460ff16806116dd57506116dc61379e565b5b806116f457506000809054906101000a900460ff16155b151561178e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156117de576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6101a160009054906101000a900460ff16151515611864576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f616c726561647920696e697469616c697a65640000000000000000000000000081525060200191505060405180910390fd5b61186c6137b5565b61187684846125a4565b61187e612af0565b6118878261335f565b3361019f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080156118ea5760008060016101000a81548160ff0219169083151502179055505b50505050565b60006118fb8261392d565b1515611995576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001807f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526020017f697374656e7420746f6b656e000000000000000000000000000000000000000081525060400191505060405180910390fd5b6067600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006119db82612827565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611aa7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6581526020017f720000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16611ac661399f565b73ffffffffffffffffffffffffffffffffffffffff161480611af55750611af481611aef61399f565b61370a565b5b1515611b8f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001807f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781526020017f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000081525060400191505060405180910390fd5b826067600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000611c53611c4e61399f565b613284565b1515611ced576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b611cf861019e6139a7565b6000611d0561019e6139bd565b9050611d1184826139cb565b611d1b81846139ec565b60016101a06000611d2a61399f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060016101a060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508091505092915050565b6060611df0611deb61399f565b613284565b1515611e8a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b6000858590509050606081604051908082528060200260200182016040528015611ec35781602001602082028038833980820191505090505b50905060008060008090505b84811015611f7857611f4f8a8a838181101515611ee857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1689898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613abb565b8482815181101515611f5d57fe5b90602001906020020181815250508080600101915050611ecf565b5082945050505050949350505050565b6000609e80549050905090565b611fa6611fa061399f565b82613b03565b1515612040576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f81526020017f776e6572206e6f7220617070726f76656400000000000000000000000000000081525060400191505060405180910390fd5b61204b838383613c3c565b505050565b600061205b836129d6565b821015156120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001807f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526020017f74206f6620626f756e647300000000000000000000000000000000000000000081525060400191505060405180910390fd5b609c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110151561214357fe5b9060005260206000200154905092915050565b61019f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561221c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e6f7420616c6c6f77656420746f2063616c6c2074686973206d6574686f640081525060200191505060405180910390fd5b61222581613284565b15156122305761223a565b61223981613c60565b5b50565b6101a06020528060005260406000206000915054906101000a900460ff1681565b606061227061226b61399f565b613284565b151561230a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b60608260405190808252806020026020018201604052801561233b5781602001602082028038833980820191505090505b50905060008060008090505b858110156123c65761239d8989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613abb565b84828151811015156123ab57fe5b90602001906020020181815250508080600101915050612347565b50829350505050949350505050565b600061019f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561249d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e6f7420616c6c6f77656420746f2063616c6c2074686973206d6574686f640081525060200191505060405180910390fd5b6124a783836139cb565b6001905092915050565b6124cd83838360206040519081016040528060008152506132a2565b505050565b61019f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4e6f7420616c6c6f77656420746f2063616c6c2074686973206d6574686f640081525060200191505060405180910390fd5b6125a181613cbb565b50565b600060019054906101000a900460ff16806125c357506125c261379e565b5b806125da57506000809054906101000a900460ff16155b1515612674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156126c4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6126cc613cd0565b15156126d757600080fd5b8260d290805190602001906126ed929190615945565b508160d39080519060200190612704929190615945565b50612731635b5e139f7c010000000000000000000000000000000000000000000000000000000002613d03565b80156127525760008060016101000a81548160ff0219169083151502179055505b505050565b6000612761611f88565b821015156127fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001807f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526020017f7574206f6620626f756e6473000000000000000000000000000000000000000081525060400191505060405180910390fd5b609e8281548110151561280c57fe5b90600052602060002001549050919050565b60006003905090565b6000806066600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561292b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001807f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526020017f656e7420746f6b656e000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80915050919050565b606060d58054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129cc5780601f106129a1576101008083540402835291602001916129cc565b820191906000526020600020905b8154815290600101906020018083116129af57829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515612aa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001807f4552433732313a2062616c616e636520717565727920666f7220746865207a6581526020017f726f20616464726573730000000000000000000000000000000000000000000081525060400191505060405180910390fd5b612ae9606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206139bd565b9050919050565b600060019054906101000a900460ff1680612b0f5750612b0e61379e565b5b80612b2657506000809054906101000a900460ff16155b1515612bc0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015612c10576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612c18613cd0565b1515612c2357600080fd5b612c4f63780e9d637c010000000000000000000000000000000000000000000000000000000002613d03565b8015612c705760008060016101000a81548160ff0219169083151502179055505b50565b6000612c85612c8061399f565b613284565b1515612d1f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b612d2a848484613e2a565b600190509392505050565b600061019f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060d38054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612df85780601f10612dcd57610100808354040283529160200191612df8565b820191906000526020600020905b815481529060010190602001808311612ddb57829003601f168201915b5050505050905090565b612e12612e0d61399f565b613284565b1515612eac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b612eb581613ee0565b50565b612ec8612ec361399f565b613c60565b565b6000612f1733848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050613f3b565b905060011515811515141515612f95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f6e6f74206f776e6572206f6620616c6c20746865736520746f6b656e7300000081525060200191505060405180910390fd5b600083839050905060008090505b8181101561300157612ff4338888848181101515612fbd57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168787858181101515612fe857fe5b905060200201356124b1565b8080600101915050612fa3565b50505050505050565b600061301c61301761399f565b613284565b15156130b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001807f4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766581526020017f20746865204d696e74657220726f6c650000000000000000000000000000000081525060400191505060405180910390fd5b6130c08383613fd0565b6001905092915050565b6130d261399f565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515613175576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4552433732313a20617070726f766520746f2063616c6c65720000000000000081525060200191505060405180910390fd5b806069600061318261399f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661322f61399f565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051808215151515815260200191505060405180910390a35050565b600061329b82610139613fef90919063ffffffff16565b9050919050565b6132b36132ad61399f565b83613b03565b151561334d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f81526020017f776e6572206e6f7220617070726f76656400000000000000000000000000000081525060400191505060405180910390fd5b61335984848484614112565b50505050565b600060019054906101000a900460ff168061337e575061337d61379e565b5b8061339557506000809054906101000a900460ff16155b151561342f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561347f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613487613cd0565b151561349257600080fd5b61349b826141c9565b80156134bc5760008060016101000a81548160ff0219169083151502179055505b5050565b60606134cb8261392d565b1515613565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001807f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526020017f6e6578697374656e7420746f6b656e000000000000000000000000000000000081525060400191505060405180910390fd5b606060d460008481526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561360e5780601f106135e35761010080835404028352916020019161360e565b820191906000526020600020905b8154815290600101906020018083116135f157829003601f168201915b50505050509050600081511415613638576020604051908101604052806000815250915050613705565b60d58160405160200180838054600181600116156101000203166002900480156136995780601f10613677576101008083540402835291820191613699565b820191906000526020600020905b815481529060010190602001808311613685575b505082805190602001908083835b6020831015156136cc57805182526020820191506020810190506020830392506136a7565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529150505b919050565b6000606960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000803090506000813b9050600081149250505090565b600060019054906101000a900460ff16806137d457506137d361379e565b5b806137eb57506000809054906101000a900460ff16155b1515613885576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156138d5576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6138dd614327565b6139096380ac58cd7c010000000000000000000000000000000000000000000000000000000002613d03565b801561392a5760008060016101000a81548160ff0219169083151502179055505b50565b6000806066600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415915050919050565b600033905090565b6001816000016000828254019250508190555050565b600081600001549050919050565b6139d58282614497565b6139df82826146b3565b6139e88161477a565b5050565b6139f58261392d565b1515613a8f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001807f4552433732314d657461646174613a2055524920736574206f66206e6f6e657881526020017f697374656e7420746f6b656e000000000000000000000000000000000000000081525060400191505060405180910390fd5b8060d460008481526020019081526020016000209080519060200190613ab6929190615945565b505050565b6000806060613acb61019e6139a7565b613ad661019e6139bd565b9150613ae285836139cb565b613aec84836147c6565b9050613af882826139ec565b819250505092915050565b6000613b0e8261392d565b1515613ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001807f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526020017f697374656e7420746f6b656e000000000000000000000000000000000000000081525060400191505060405180910390fd5b6000613bb383612827565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480613c2257508373ffffffffffffffffffffffffffffffffffffffff16613c0a846118f0565b73ffffffffffffffffffffffffffffffffffffffff16145b80613c335750613c32818561370a565b5b91505092915050565b613c4783838361489a565b613c518382614b7f565b613c5b82826146b3565b505050565b613c7581610139614d2390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669260405160405180910390a250565b613ccd613cc782612827565b82614e25565b50565b6000613cfe6380ac58cd7c0100000000000000000000000000000000000000000000000000000000026115b4565b905090565b63ffffffff7c010000000000000000000000000000000000000000000000000000000002817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614151515613dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b600160336000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b613e3483836139cb565b613e416000848484614e84565b1515613edb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581526020017f63656976657220696d706c656d656e746572000000000000000000000000000081525060400191505060405180910390fd5b505050565b613ef58161013961524190919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f660405160405180910390a250565b60008082519050600080600090505b82811015613fc257613f728582815181101515613f6357fe5b90602001906020020151612827565b91508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515613fb55760009350505050613fca565b8080600101915050613f4a565b506001925050505b92915050565b613feb82826020604051908101604052806000815250613e2a565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156140bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f526f6c65733a206163636f756e7420697320746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61411d848484613c3c565b61412984848484614e84565b15156141c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581526020017f63656976657220696d706c656d656e746572000000000000000000000000000081525060400191505060405180910390fd5b50505050565b600060019054906101000a900460ff16806141e857506141e761379e565b5b806141ff57506000809054906101000a900460ff16155b1515614299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156142e9576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6142f282613284565b15156143025761430182613ee0565b5b80156143235760008060016101000a81548160ff0219169083151502179055505b5050565b600060019054906101000a900460ff1680614346575061434561379e565b5b8061435d57506000809054906101000a900460ff16155b15156143f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807f436f6e747261637420696e7374616e63652068617320616c726561647920626581526020017f656e20696e697469616c697a656400000000000000000000000000000000000081525060400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614447576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6144736301ffc9a77c010000000000000000000000000000000000000000000000000000000002613d03565b80156144945760008060016101000a81548160ff0219169083151502179055505b50565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561453c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4552433732313a206d696e7420746f20746865207a65726f206164647265737381525060200191505060405180910390fd5b6145458161392d565b1515156145ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000081525060200191505060405180910390fd5b816066600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550614653606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206139a7565b808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b609c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050609d600083815260200190815260200160002081905550609c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190915055505050565b609e80549050609f600083815260200190815260200160002081905550609e81908060018154018082558091505090600182039060005260206000200160009091929091909150555050565b6060826147d28361531e565b6040516020018083805190602001908083835b60208310151561480a57805182526020820191506020810190506020830392506147e5565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310151561485d5780518252602082019150602081019050602083039250614838565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052905092915050565b8273ffffffffffffffffffffffffffffffffffffffff166148ba82612827565b73ffffffffffffffffffffffffffffffffffffffff1614151561496b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001807f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981526020017f73206e6f74206f776e000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515614a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f4552433732313a207472616e7366657220746f20746865207a65726f2061646481526020017f726573730000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b614a3f8161543e565b614a86606860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206154fe565b614acd606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206139a7565b816066600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000614bd76001609c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905061552190919063ffffffff16565b90506000609d60008481526020019081526020016000205490508181141515614cca576000609c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481101515614c4857fe5b9060005260206000200154905080609c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481101515614ca257fe5b906000526020600020018190555081609d600083815260200190815260200160002081905550505b609c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480919060019003614d1c91906159c5565b5050505050565b614d2d8282613fef565b1515614dc7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001807f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c81526020017f650000000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b614e2f828261556b565b600060d46000838152602001908152602001600020805460018160011615610100020316600290049050141515614e805760d460008281526020019081526020016000206000614e7f91906159f1565b5b5050565b6000614ea58473ffffffffffffffffffffffffffffffffffffffff166155a5565b1515614eb45760019050615239565b600060608573ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1663150b7a0290507c010000000000000000000000000000000000000000000000000000000002614f1461399f565b898888604051602401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614fc4578082015181840152602081019050614fa9565b50505050905090810190601f168015614ff15780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310151561508b5780518252602082019150602081019050602083039250615066565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146150ed576040519150601f19603f3d011682016040523d82523d6000602084013e6150f2565b606091505b50915091508115156151a5576000815111156151115780518082602001fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581526020017f63656976657220696d706c656d656e746572000000000000000000000000000081525060400191505060405180910390fd5b60008180602001905160208110156151bc57600080fd5b8101908080519060200190929190505050905063150b7a027c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161493505050505b949350505050565b61524b8282613fef565b1515156152c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b606060008211156154005760605b60008311156153f7576030600a8481151561534357fe5b060181604051602001808360ff1660ff167f010000000000000000000000000000000000000000000000000000000000000002815260010182805190602001908083835b6020831015156153ac5780518252602082019150602081019050602083039250615387565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529050600a838115156153ef57fe5b04925061532c565b80915050615439565b6040805190810160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090505b919050565b600073ffffffffffffffffffffffffffffffffffffffff166067600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156154fb5760006067600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6155166001826000015461552190919063ffffffff16565b816000018190555050565b600061556383836040805190810160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506155f1565b905092915050565b61557582826156b3565b61557f8282614b7f565b6000609d6000838152602001908152602001600020819055506155a181615887565b5050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4706001029050833f91508082141580156155e8575060006001028214155b92505050919050565b600083831115829015156156a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561566557808201518184015260208101905061564a565b50505050905090810190601f1680156156925780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff166156d382612827565b73ffffffffffffffffffffffffffffffffffffffff16141515615784576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f4552433732313a206275726e206f6620746f6b656e2074686174206973206e6f81526020017f74206f776e00000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b61578d8161543e565b6157d4606860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206154fe565b60006066600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b60006158a26001609e8054905061552190919063ffffffff16565b90506000609f60008481526020019081526020016000205490506000609e838154811015156158cd57fe5b9060005260206000200154905080609e838154811015156158ea57fe5b906000526020600020018190555081609f600083815260200190815260200160002081905550609e80548091906001900361592591906159c5565b506000609f60008681526020019081526020016000208190555050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061598657805160ff19168380011785556159b4565b828001600101855582156159b4579182015b828111156159b3578251825591602001919060010190615998565b5b5090506159c19190615a39565b5090565b8154818355818111156159ec578183600052602060002091820191016159eb9190615a39565b5b505050565b50805460018160011615610100020316600290046000825580601f10615a175750615a36565b601f016020900490600052602060002090810190615a359190615a39565b5b50565b615a5b91905b80821115615a57576000816000905550600101615a3f565b5090565b9056fea165627a7a72305820bf2dc9d4a22a4f8cd0f2c0a9303ed7620053652a6df4642f117eb94d029101740029