Contract 0x0e6541374e9D7DEe2C53C15a1a00fbe41C7b7198 2

 
 
Txn Hash
Method
Block
From
To
Value
0x178adae8f9e1c64833e5cf4562b8705bfce8f023e6f4f4bbb246e0217a5942b6Launch Store149487822022-06-12 6:44:2768 days 16 hrs agoENS Name brucethegoose.eth IN  Mintbase: Factory0 Ether0.1651360749
0xd98d10a0344a8c62cd8fa145630d2ec2ab0471a152848e7158cb3ef564934f65Launch Store133875652021-10-09 23:45:27313 days 23 hrs agoethEra for Defi: Deployer IN  Mintbase: Factory0 Ether0.16694675 48.88294857
0x0d7787fa12bdbd4884a23df5476db57af859d852290ef6c39352db83c96d8e88Launch Store133384992021-10-02 7:23:32321 days 16 hrs ago0x75a7220304a002729001362c46cf19e9b3ebd5a2 IN  Mintbase: Factory0 Ether0.1651296 49
0xb5aedfc47f8989c41c840e9b465698a552ac0ee9f0da19687270035be1402cecLaunch Store133166402021-09-28 21:27:10325 days 2 hrs agoSURVIVAL by KEVIN ABOSCH: Deployer IN  Mintbase: Factory0 Ether0.3235342 96
0xed465d0c298fd721a6216d0c3553e886e611f87b2e285c30719e11901622cd87Launch Store133162292021-09-28 19:48:11325 days 3 hrs agoSURVIVAL by KEVIN ABOSCH: Deployer IN  Mintbase: Factory0 Ether0.27296838 81
0x25e87cf67111ccc41265ef7605e8d866a0d95eecbf664d4c13667b0dd7a47c5bLaunch Store132811242021-09-23 9:13:55330 days 14 hrs ago0x45361875850fd0bb032e873ba16b473f8ef58ec7 IN  Mintbase: Factory0 Ether0.18872694 56
0x0913cda13f4c73eb0bb6ca2ccca424bf82669783a6abd6715d0bac7bb8da4760Launch Store132318612021-09-15 18:12:47338 days 5 hrs agoENS Name monkmatto.eth IN  Mintbase: Factory0 Ether0.3370196100
0x2f3e64a74e4be191e2397ce483ca874476bcc855f807f1ffcabdae078d30c142Launch Store130483422021-08-18 9:07:39366 days 14 hrs ago0xb623352e078e57349fe5a8de96109e2395cb20fe IN  Mintbase: Factory0 Ether0.1145813634
0x95b4491cf4b108a8487c93690f970d9dcd617d6c9fe0cb9fe1bcc4e7a683b38dLaunch Store129547082021-08-03 21:21:24381 days 2 hrs ago0xbb343eb5e323deae3fa4676725d01659a415a6a6 IN  Mintbase: Factory0 Ether0.1280642538
0xd9326b3e3e373208169556842dabf6ecf0a743f5eb616c2bf851682417b32e0aLaunch Store129465922021-08-02 14:58:56382 days 8 hrs agoENS Name k0xrad.eth IN  Mintbase: Factory0 Ether0.1718714251
0x2131c719ed78ce92b34a650bc7349524c7a6a61a3674d9d78ae6e99fbe378095Launch Store128096172021-07-12 1:52:08403 days 21 hrs agoENS Name neustreet.eth IN  Mintbase: Factory0 Ether0.0384181811.4
0xcbab8155ba371be1a71ecfcb24c05e8cb08c519db6f829b44a986137c73d47b8Launch Store128069172021-07-11 15:52:43404 days 7 hrs agoENS Name metamushrooms.eth IN  Mintbase: Factory0 Ether0.030331989
0x792b5dad9151d7a3760c71880746bee6a620d5135f6c9a956fef199ad67c7061Launch Store127929642021-07-09 11:44:07406 days 11 hrs agoethEra for Defi: Deployer IN  Mintbase: Factory0 Ether0.0674046420
0x18aa3767552c42c14ebec2bb7940dec379cbb889c8571c958ac197124456ef06Launch Store127575342021-07-03 23:20:11412 days 17 mins agoENS Name monkmatto.eth IN  Mintbase: Factory0 Ether0.01684995
0x99ee607f38fa017c41464c4b9d0c358e35961c3908ae95b1fcbd41840a369788Launch Store127452892021-07-02 1:34:50413 days 22 hrs ago0x0e2f7de9bdd42c894a9ad453a46fadab16c00a8a IN  Mintbase: Factory0 Ether0.022579836.7
0xc672e943f995b9c4e307295140500b59846e58e63279c2510fdf5bd462b9fbb8Launch Store126530072021-06-17 16:33:50428 days 7 hrs ago0xfccb96245ece8c0c0ba80992a5719cba1e2f504f IN  Mintbase: Factory0 Ether0.1314329639
0xce76cfa6cb698fd84b958822e6181f8e19aa574461333bd1098bbb212bbd6a9aLaunch Store126280212021-06-13 19:27:16432 days 4 hrs ago0x589bceb4529c049daa4d4a3c4f794725e64c8f97 IN  Mintbase: Factory0 Ether0.024938117.4
0x6cb9dfdaff0b6284972dc0bcee8529d7b042e27fbbf2267d3201ebf205db741cLaunch Store126262182021-06-13 12:47:10432 days 10 hrs agoENS Name morphy.eth IN  Mintbase: Factory0 Ether0.020219956
0xbe3ee030cef8c5af9468f13c3cde4b2ecb3bb91808e61c2e0c8f17652a69534bLaunch Store126090182021-06-10 20:41:57435 days 2 hrs agoENS Name musashi13.eth IN  Mintbase: Factory0 Ether0.0337012410
0x3c5e99a83f0c36882417ef925ca7b4dc6bc4c6cb3a8a15aeacf9cf10bcb9a06dLaunch Store125820672021-06-06 16:40:12439 days 6 hrs ago0x03fa4a3ebec3cd8357fc71942ca0a68178a21eb8 IN  Mintbase: Factory0 Ether0.0471812314
0x47190745ce0d1152ea1bb940c696eb296666a88dec47c05d04a6ada9f21fa693Launch Store125785222021-06-06 3:34:56439 days 20 hrs ago0x871d89028f15211154fcd7e2037e8f244ca3918f IN  Mintbase: Factory0 Ether0.0471795514
0x4d0d212c8d3c1624edce2dce2b98e34d41e0a938091f7107bf13b8e6e733d774Launch Store125773382021-06-05 23:16:28440 days 21 mins ago0x77ee47c6a4bdf3dfc717cf290e6c8976dd7906ed IN  Mintbase: Factory0 Ether0.0404404812
0xb10b87793f3d909230eaa088252d5156f0e4b58962e3aa3bfa6794143e14befaLaunch Store125753002021-06-05 15:41:17440 days 7 hrs agoENS Name morphy.eth IN  Mintbase: Factory0 Ether0.0471798814
0xc84a0284a2653a500812340e2c6c701b94d146cd6fd8ccc18e314147a82d5481Launch Store125739782021-06-05 10:35:22440 days 13 hrs agoENS Name bravelion.eth IN  Mintbase: Factory0 Ether0.0471803914
0xd21dd3c66e8bbf59739c603b20a811ed89c5c6240a14894b14358044b59ac10bLaunch Store125658492021-06-04 4:36:21441 days 19 hrs agoENS Name tienchat.eth IN  Mintbase: Factory0 Ether0.0609972818.1
[ Download CSV Export 

OVERVIEW

The Mintbase contract factory enabling users to deploy and owner their own NFT smart contract.

SubGraph to track all events here https://thegraph.com/explorer/subgraph/nategeier/mintbase

Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x178adae8f9e1c64833e5cf4562b8705bfce8f023e6f4f4bbb246e0217a5942b6149487822022-06-12 6:44:2768 days 16 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xd98d10a0344a8c62cd8fa145630d2ec2ab0471a152848e7158cb3ef564934f65133875652021-10-09 23:45:27313 days 23 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x0d7787fa12bdbd4884a23df5476db57af859d852290ef6c39352db83c96d8e88133384992021-10-02 7:23:32321 days 16 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xb5aedfc47f8989c41c840e9b465698a552ac0ee9f0da19687270035be1402cec133166402021-09-28 21:27:10325 days 2 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xed465d0c298fd721a6216d0c3553e886e611f87b2e285c30719e11901622cd87133162292021-09-28 19:48:11325 days 3 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x25e87cf67111ccc41265ef7605e8d866a0d95eecbf664d4c13667b0dd7a47c5b132811242021-09-23 9:13:55330 days 14 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x0913cda13f4c73eb0bb6ca2ccca424bf82669783a6abd6715d0bac7bb8da4760132318612021-09-15 18:12:47338 days 5 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x2f3e64a74e4be191e2397ce483ca874476bcc855f807f1ffcabdae078d30c142130483422021-08-18 9:07:39366 days 14 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x95b4491cf4b108a8487c93690f970d9dcd617d6c9fe0cb9fe1bcc4e7a683b38d129547082021-08-03 21:21:24381 days 2 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xd9326b3e3e373208169556842dabf6ecf0a743f5eb616c2bf851682417b32e0a129465922021-08-02 14:58:56382 days 8 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x2131c719ed78ce92b34a650bc7349524c7a6a61a3674d9d78ae6e99fbe378095128096172021-07-12 1:52:08403 days 21 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xcbab8155ba371be1a71ecfcb24c05e8cb08c519db6f829b44a986137c73d47b8128069172021-07-11 15:52:43404 days 7 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x792b5dad9151d7a3760c71880746bee6a620d5135f6c9a956fef199ad67c7061127929642021-07-09 11:44:07406 days 11 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x18aa3767552c42c14ebec2bb7940dec379cbb889c8571c958ac197124456ef06127575342021-07-03 23:20:11412 days 17 mins ago Mintbase: Factory  Contract Creation0 Ether
0x99ee607f38fa017c41464c4b9d0c358e35961c3908ae95b1fcbd41840a369788127452892021-07-02 1:34:50413 days 22 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xc672e943f995b9c4e307295140500b59846e58e63279c2510fdf5bd462b9fbb8126530072021-06-17 16:33:50428 days 7 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xce76cfa6cb698fd84b958822e6181f8e19aa574461333bd1098bbb212bbd6a9a126280212021-06-13 19:27:16432 days 4 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x6cb9dfdaff0b6284972dc0bcee8529d7b042e27fbbf2267d3201ebf205db741c126262182021-06-13 12:47:10432 days 10 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xbe3ee030cef8c5af9468f13c3cde4b2ecb3bb91808e61c2e0c8f17652a69534b126090182021-06-10 20:41:57435 days 2 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x3c5e99a83f0c36882417ef925ca7b4dc6bc4c6cb3a8a15aeacf9cf10bcb9a06d125820672021-06-06 16:40:12439 days 6 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x47190745ce0d1152ea1bb940c696eb296666a88dec47c05d04a6ada9f21fa693125785222021-06-06 3:34:56439 days 20 hrs ago Mintbase: Factory  Contract Creation0 Ether
0x4d0d212c8d3c1624edce2dce2b98e34d41e0a938091f7107bf13b8e6e733d774125773382021-06-05 23:16:28440 days 21 mins ago Mintbase: Factory  Contract Creation0 Ether
0xb10b87793f3d909230eaa088252d5156f0e4b58962e3aa3bfa6794143e14befa125753002021-06-05 15:41:17440 days 7 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xc84a0284a2653a500812340e2c6c701b94d146cd6fd8ccc18e314147a82d5481125739782021-06-05 10:35:22440 days 13 hrs ago Mintbase: Factory  Contract Creation0 Ether
0xd21dd3c66e8bbf59739c603b20a811ed89c5c6240a14894b14358044b59ac10b125658492021-06-04 4:36:21441 days 19 hrs ago Mintbase: Factory  Contract Creation0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ThingFactory

Compiler Version
v0.5.7+commit.6da8b019

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-11-14
*/

// File: openzeppelin-solidity/contracts/GSN/Context.sol

pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // 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-solidity/contracts/introspection/IERC165.sol

pragma solidity ^0.5.0;

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

// File: openzeppelin-solidity/contracts/token/ERC721/IERC721.sol

pragma solidity ^0.5.0;


/**
 * @dev Required interface of an ERC721 compliant contract.
 */
contract IERC721 is 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-solidity/contracts/token/ERC721/IERC721Receiver.sol

pragma solidity ^0.5.0;

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

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

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

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

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

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

        return c;
    }

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

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

// File: openzeppelin-solidity/contracts/utils/Address.sol

pragma solidity ^0.5.5;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing 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.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        // 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 != 0x0 && codehash != accountHash);
    }

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

pragma solidity ^0.5.0;


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

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

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

    function increment(Counter storage counter) internal {
        counter._value += 1;
    }

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

// File: openzeppelin-solidity/contracts/introspection/ERC165.sol

pragma solidity ^0.5.0;


/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
contract ERC165 is 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;

    constructor () internal {
        // 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) external 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;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC721/ERC721.sol

pragma solidity ^0.5.0;








/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721 is 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;

    constructor () public {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_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 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
     * @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 function 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;
        }

        bytes4 retval = IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data);
        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);
        }
    }
}

// File: openzeppelin-solidity/contracts/token/ERC721/IERC721Enumerable.sol

pragma solidity ^0.5.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Enumerable is 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-solidity/contracts/token/ERC721/ERC721Enumerable.sol

pragma solidity ^0.5.0;





/**
 * @title ERC-721 Non-Fungible Token with optional enumeration extension logic
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Enumerable is 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.
     */
    constructor () public {
        // register the supported interface to conform to ERC721Enumerable via ERC165
        _registerInterface(_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;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC721/IERC721Metadata.sol

pragma solidity ^0.5.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Metadata is 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-solidity/contracts/token/ERC721/ERC721Metadata.sol

pragma solidity ^0.5.0;





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

    // Token symbol
    string private _symbol;

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

    /*
     *     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
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;

        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_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 an URI for a given token ID.
     * Throws if the token ID does not exist. May return an empty string.
     * @param tokenId uint256 ID of the token to query
     */
    function tokenURI(uint256 tokenId) external view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        return _tokenURIs[tokenId];
    }

    /**
     * @dev Internal function to set the token URI for a given token.
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to set its URI
     * @param uri string URI to assign
     */
    function _setTokenURI(uint256 tokenId, string memory uri) internal {
        require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
        _tokenURIs[tokenId] = uri;
    }

    /**
     * @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];
        }
    }
}

// File: openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol

pragma solidity ^0.5.0;




/**
 * @title Full ERC721 Token
 * @dev This implementation includes all the required and some optional functionality of the ERC721 standard
 * Moreover, it includes approve all functionality using operator terminology.
 *
 * See https://eips.ethereum.org/EIPS/eip-721
 */
contract ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata {
    constructor (string memory name, string memory symbol) public ERC721Metadata(name, symbol) {
        // solhint-disable-previous-line no-empty-blocks
    }
}

// File: openzeppelin-solidity/contracts/access/Roles.sol

pragma solidity ^0.5.0;

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

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

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

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

// File: openzeppelin-solidity/contracts/access/roles/MinterRole.sol

pragma solidity ^0.5.0;



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

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

    Roles.Role private _minters;

    constructor () internal {
        _addMinter(_msgSender());
    }

    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);
    }
}

// File: openzeppelin-solidity/contracts/token/ERC721/ERC721MetadataMintable.sol

pragma solidity ^0.5.0;




/**
 * @title ERC721MetadataMintable
 * @dev ERC721 minting logic with metadata.
 */
contract ERC721MetadataMintable is ERC721, ERC721Metadata, MinterRole {
    /**
     * @dev Function to mint tokens.
     * @param to The address that will receive the minted tokens.
     * @param tokenId The token id to mint.
     * @param tokenURI The token URI of the minted token.
     * @return A boolean that indicates if the operation was successful.
     */
    function mintWithTokenURI(address to, uint256 tokenId, string memory tokenURI) public onlyMinter returns (bool) {
        _mint(to, tokenId);
        _setTokenURI(tokenId, tokenURI);
        return true;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC721/ERC721Burnable.sol

pragma solidity ^0.5.0;



/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns a specific ERC721 token.
     * @param tokenId uint256 id of the ERC721 token to be burned.
     */
    function burn(uint256 tokenId) public {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

// File: openzeppelin-solidity/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = _msgSender();
        emit OwnershipTransferred(address(0), _owner);
    }

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

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

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

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

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

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

// File: contracts/Strings.sol

pragma solidity ^0.5.7;

library Strings {
  // via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol
  function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) {
      bytes memory _ba = bytes(_a);
      bytes memory _bb = bytes(_b);
      bytes memory _bc = bytes(_c);
      bytes memory _bd = bytes(_d);
      bytes memory _be = bytes(_e);
      string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
      bytes memory babcde = bytes(abcde);
      uint k = 0;
      for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
      for (uint i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
      for (uint i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
      for (uint i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
      for (uint i = 0; i < _be.length; i++) babcde[k++] = _be[i];
      return string(babcde);
    }

    function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, _d, "");
    }

    function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, "", "");
    }

    function strConcat(string memory _a, string memory _b) internal pure returns (string memory) {
        return strConcat(_a, _b, "", "", "");
    }

    function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (_i != 0) {
            bstr[k--] = byte(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }
}

// File: contracts/Thing.sol

pragma solidity ^0.5.7;









contract Thing is ERC721Full, ERC721MetadataMintable, ERC721Burnable, Ownable {
  using SafeMath for uint256;
  using Strings for string;
  
  enum TokenState { Pending, ForSale, Sold, Transferred }

  struct Price {
    uint256 tokenId;
    uint256 price;
    string metaId;
    TokenState state;
  }

  mapping(uint256 => Price) public items;

  uint256 public id;
  string public baseUri;
  address payable public maker;
  address payable feeAddress;

  constructor(
    string memory name,
    string memory symbol,
    string memory uri,
    address payable fee,
    address payable creator
  ) ERC721Full(name, symbol) public {
    maker = creator;
    feeAddress = fee;
    baseUri = uri;
    id = 0;
    transferOwnership(creator);
    _addMinter(creator);

  }

  event ErrorOut(string error, uint256 tokenId);
  event BatchTransfered(string metaId, address[] recipients, uint256[] ids);
  event Minted(uint256 id, string metaId);
  event BatchBurned(string metaId, uint256[] ids);
  event BatchForSale(uint256[] ids, string metaId);
  event Bought(uint256 tokenId, string metaId, uint256 value);
  event Destroy();

  function tokenURI(uint256 _tokenId) public view returns (string memory) {
    return Strings.strConcat(
        baseUri,
        items[_tokenId].metaId
    );
  }

  function setTokenState(uint256[] memory ids, bool isEnabled) public onlyMinter {
    for (uint256 i = 0; i < ids.length; i++) {
      if(isEnabled == true){
        items[ids[i]].state = TokenState.ForSale;
      } else {
        items[ids[i]].state = TokenState.Pending;
      }
    }
     emit BatchForSale(ids, items[ids[0]].metaId);
  }

  function setTokenPrice(uint256[] memory ids, uint256 setPrice) public onlyMinter {
    for (uint256 i = 0; i < ids.length; i++) {
      items[ids[i]].price = setPrice;
    }
  }

  function mintbaseFee(uint256 amount) internal pure returns (uint256) {
    uint256 toOwner = SafeMath.mul(amount, 2);

    return SafeMath.div(toOwner, 100);
  }

  function buyThing(uint256 _tokenId) public payable returns (bool) {

    require(msg.value >= items[_tokenId].price, "Price issue");
    require(TokenState.ForSale == items[_tokenId].state, "No Sale");

    if(items[_tokenId].price >= 0) {
      uint256 fee = mintbaseFee(msg.value);
      uint256 withFee = SafeMath.sub(msg.value, fee);

      maker.transfer(withFee);
      feeAddress.transfer(fee);
    }

    _transferFrom(maker, msg.sender, _tokenId);
    items[_tokenId].state = TokenState.Sold;

    emit Bought(_tokenId, items[_tokenId].metaId, msg.value);
  }

  function destroyAndSend() public onlyOwner {
    emit Destroy();
    selfdestruct(maker);
  }

  function batchTransfer(address giver, address[] memory recipients, uint256[] memory values) public {

    for (uint256 i = 0; i < values.length; i++) {
      transferFrom(giver, recipients[i], values[i]);
     items[values[i]].state = TokenState.Transferred;
    }
    emit BatchTransfered(items[values[0]].metaId, recipients, values);
  }

  function batchMint(address to, uint256 amountToMint, string memory metaId, uint256 setPrice, bool isForSale) public onlyMinter {

    require(amountToMint <= 40, "Over 40");

    for (uint256 i = 0; i < amountToMint; i++) {
      id = id.add(1);
      items[id].price = setPrice;
      items[id].metaId = metaId;
      if(isForSale == true){
        items[id].state = TokenState.ForSale;
        
      } else {
        items[id].state = TokenState.Pending;
      }
      _mint(to, id);
      emit Minted(id, metaId);
    }
   
  }

  function batchBurn(uint256[] memory tokenIds) public onlyMinter {
    for (uint256 i = 0; i < tokenIds.length; i++) {
      _burn(tokenIds[i]);
    }
    emit BatchBurned(items[tokenIds[0]].metaId, tokenIds);
  }

  function tokensOfOwner(address owner) public view returns (uint256[] memory) {
    return _tokensOfOwner(owner);
  }
}

// File: contracts/ThingFactory.sol

pragma solidity ^0.5.7;


contract ThingFactory {
    address[] public addressList;
    address payable public mintbase;

    event StoreLaunch(
        address indexed store,
        string name,
        string symbol
    );

    constructor() public {
        mintbase = msg.sender;
    }
    

    function launchStore(
      string memory name,
      string memory symbol,
      string memory uri
    ) public returns (address item) {
        address newStore = address(new Thing(name, symbol, uri, mintbase, msg.sender));
        addressList.push(newStore);
        emit StoreLaunch(newStore, name, symbol);
        return newStore;
    }

    function getCount() public view returns (uint exchangeCount) {
        return addressList.length;
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}],"name":"launchStore","outputs":[{"name":"item","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"mintbase","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCount","outputs":[{"name":"exchangeCount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"addressList","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"store","type":"address"},{"indexed":false,"name":"name","type":"string"},{"indexed":false,"name":"symbol","type":"string"}],"name":"StoreLaunch","type":"event"}]

608060405234801561001057600080fd5b50600180546001600160a01b0319163317905561480d806100326000396000f3fe60806040523480156200001157600080fd5b5060043610620000525760003560e01c806387db40551462000057578063a0e0b1401462000233578063a87d942c146200023d578063b810fb431462000259575b600080fd5b62000217600480360360608110156200006f57600080fd5b8101906020810181356401000000008111156200008b57600080fd5b8201836020820111156200009e57600080fd5b80359060200191846001830284011164010000000083111715620000c157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156200011557600080fd5b8201836020820111156200012857600080fd5b803590602001918460018302840111640100000000831117156200014b57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156200019f57600080fd5b820183602082011115620001b257600080fd5b80359060200191846001830284011164010000000083111715620001d557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955062000279945050505050565b604080516001600160a01b039092168252519081900360200190f35b6200021762000580565b620002476200058f565b60408051918252519081900360200190f35b62000217600480360360208110156200027157600080fd5b503562000595565b600080848484600160009054906101000a90046001600160a01b031633604051620002a490620005bd565b6001600160a01b0380841660608301528216608082015260a080825286519082015285518190602080830191604084019160c0850191908b019080838360005b83811015620002fe578181015183820152602001620002e4565b50505050905090810190601f1680156200032c5780820380516001836020036101000a031916815260200191505b5084810383528851815288516020918201918a019080838360005b838110156200036157818101518382015260200162000347565b50505050905090810190601f1680156200038f5780820380516001836020036101000a031916815260200191505b50848103825287518152875160209182019189019080838360005b83811015620003c4578181015183820152602001620003aa565b50505050905090810190601f168015620003f25780820380516001836020036101000a031916815260200191505b5098505050505050505050604051809103906000f0801580156200041a573d6000803e3d6000fd5b50600080546001810182558180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630180546001600160a01b0319166001600160a01b03841690811790915560408051818152895191810191909152885193945090927f0ad944db4a8d4a4eac124e381a6c461e1019e3f3e9b4a6b861b6552ca9947d9b928992899290918291602080840192606085019291880191908190849084905b83811015620004d8578181015183820152602001620004be565b50505050905090810190601f168015620005065780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156200053b57818101518382015260200162000521565b50505050905090810190601f168015620005695780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a2949350505050565b6001546001600160a01b031681565b60005490565b60008181548110620005a357fe5b6000918252602090912001546001600160a01b0316905081565b61421680620005cc8339019056fe60806040523480156200001157600080fd5b506040516200421638038062004216833981018060405260a08110156200003757600080fd5b8101908080516401000000008111156200005057600080fd5b820160208101848111156200006457600080fd5b81516401000000008111828201871017156200007f57600080fd5b505092919060200180516401000000008111156200009c57600080fd5b82016020810184811115620000b057600080fd5b8151640100000000811182820187101715620000cb57600080fd5b50509291906020018051640100000000811115620000e857600080fd5b82016020810184811115620000fc57600080fd5b81516401000000008111828201871017156200011757600080fd5b505060208083015160409093015191945091925090859085908290829062000165907f01ffc9a70000000000000000000000000000000000000000000000000000000090620002c1811b901c565b6200017d6380ac58cd60e01b620002c160201b60201c565b6200019563780e9d6360e01b620002c160201b60201c565b8151620001aa90600990602085019062000679565b508051620001c090600a90602084019062000679565b50620001d9635b5e139f60e01b620002c160201b60201c565b50505050620001fd620001f16200039060201b60201c565b6200039560201b60201c565b6200020d6200039060201b60201c565b600d80546001600160a01b0319166001600160a01b039283161790819055604051911690600090600080516020620041d4833981519152908290a3601180546001600160a01b038084166001600160a01b031992831617909255601280549285169290911691909117905582516200028d90601090602086019062000679565b506000600f55620002a581620003e7602090811b901c565b620002b6816200039560201b60201c565b50505050506200071b565b7fffffffff0000000000000000000000000000000000000000000000000000000080821614156200035357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b7fffffffff00000000000000000000000000000000000000000000000000000000166000908152602081905260409020805460ff19166001179055565b335b90565b620003b081600c6200047760201b62002f1d1790919060201c565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b620003f76200051b60201b60201c565b6200046357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b62000474816200054a60201b60201c565b50565b620004898282620005f660201b60201c565b15620004f657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b600d546000906001600160a01b03166200053b62000390602090811b901c565b6001600160a01b031614905090565b6001600160a01b038116620005ab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180620041ae6026913960400191505060405180910390fd5b600d546040516001600160a01b03808416921690600080516020620041d483398151915290600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03821662000659576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180620041f46022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620006bc57805160ff1916838001178555620006ec565b82800160010185558215620006ec579182015b82811115620006ec578251825591602001919060010190620006cf565b50620006fa929150620006fe565b5090565b6200039291905b80821115620006fa576000815560010162000705565b613a83806200072b6000396000f3fe60806040526004361061021a5760003560e01c80638462151c11610123578063aa271e1a116100ab578063d4477b3c1161006f578063d4477b3c14610b9a578063dc8e92ea14610c4a578063e564da6914610cf8578063e985e9c514610da8578063f2fde38b14610de35761021a565b8063aa271e1a14610992578063af640d0f146109c5578063b88d4fde146109da578063bfb231d214610aab578063c87b56dd14610b705761021a565b8063983b2d56116100f2578063983b2d561461082d57806398588a2b14610860578063986502751461092d5780639abc832014610942578063a22cb465146109575761021a565b80638462151c1461076b5780638da5cb5b146107ee5780638f32d59b1461080357806395d89b41146108185761021a565b806342966c68116101a657806350bb4e7f1161017557806350bb4e7f146106165780636352211e146106dc57806370a0823114610706578063715018a614610739578063804824911461074e5761021a565b806342966c681461059857806345cefcec146105c25780634f6ccce7146105d757806350655d8c146106015761021a565b80631239ec8c116101ed5780631239ec8c1461037257806318160ddd146104b257806323b872dd146104d95780632f745c591461051c57806342842e0e146105555761021a565b806301ffc9a71461021f57806306fdde0314610267578063081812fc146102f1578063095ea7b314610337575b600080fd5b34801561022b57600080fd5b506102536004803603602081101561024257600080fd5b50356001600160e01b031916610e16565b604080519115158252519081900360200190f35b34801561027357600080fd5b5061027c610e35565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102b657818101518382015260200161029e565b50505050905090810190601f1680156102e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102fd57600080fd5b5061031b6004803603602081101561031457600080fd5b5035610ecc565b604080516001600160a01b039092168252519081900360200190f35b34801561034357600080fd5b506103706004803603604081101561035a57600080fd5b506001600160a01b038135169060200135610f31565b005b34801561037e57600080fd5b506103706004803603606081101561039557600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156103bf57600080fd5b8201836020820111156103d157600080fd5b803590602001918460208302840111600160201b831117156103f257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561044157600080fd5b82018360208201111561045357600080fd5b803590602001918460208302840111600160201b8311171561047457600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061105f945050505050565b3480156104be57600080fd5b506104c761125f565b60408051918252519081900360200190f35b3480156104e557600080fd5b50610370600480360360608110156104fc57600080fd5b506001600160a01b03813581169160208101359091169060400135611265565b34801561052857600080fd5b506104c76004803603604081101561053f57600080fd5b506001600160a01b0381351690602001356112c4565b34801561056157600080fd5b506103706004803603606081101561057857600080fd5b506001600160a01b03813581169160208101359091169060400135611347565b3480156105a457600080fd5b50610370600480360360208110156105bb57600080fd5b5035611362565b3480156105ce57600080fd5b506103706113b7565b3480156105e357600080fd5b506104c7600480360360208110156105fa57600080fd5b503561144a565b34801561060d57600080fd5b5061031b6114b3565b34801561062257600080fd5b506102536004803603606081101561063957600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561066857600080fd5b82018360208201111561067a57600080fd5b803590602001918460018302840111600160201b8311171561069b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114c2945050505050565b3480156106e857600080fd5b5061031b600480360360208110156106ff57600080fd5b5035611530565b34801561071257600080fd5b506104c76004803603602081101561072957600080fd5b50356001600160a01b0316611587565b34801561074557600080fd5b506103706115f2565b6102536004803603602081101561076457600080fd5b5035611698565b34801561077757600080fd5b5061079e6004803603602081101561078e57600080fd5b50356001600160a01b03166118ee565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156107da5781810151838201526020016107c2565b505050509050019250505060405180910390f35b3480156107fa57600080fd5b5061031b61194f565b34801561080f57600080fd5b5061025361195e565b34801561082457600080fd5b5061027c611984565b34801561083957600080fd5b506103706004803603602081101561085057600080fd5b50356001600160a01b03166119e5565b34801561086c57600080fd5b50610370600480360360a081101561088357600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156108b257600080fd5b8201836020820111156108c457600080fd5b803590602001918460018302840111600160201b831117156108e557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050823593505050602001351515611a37565b34801561093957600080fd5b50610370611c27565b34801561094e57600080fd5b5061027c611c39565b34801561096357600080fd5b506103706004803603604081101561097a57600080fd5b506001600160a01b0381351690602001351515611cc7565b34801561099e57600080fd5b50610253600480360360208110156109b557600080fd5b50356001600160a01b0316611dcf565b3480156109d157600080fd5b506104c7611de2565b3480156109e657600080fd5b50610370600480360360808110156109fd57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610a3757600080fd5b820183602082011115610a4957600080fd5b803590602001918460018302840111600160201b83111715610a6a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611de8945050505050565b348015610ab757600080fd5b50610ad560048036036020811015610ace57600080fd5b5035611e49565b6040518085815260200184815260200180602001836003811115610af557fe5b60ff168152602001828103825284818151815260200191508051906020019080838360005b83811015610b32578181015183820152602001610b1a565b50505050905090810190601f168015610b5f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610b7c57600080fd5b5061027c60048036036020811015610b9357600080fd5b5035611efb565b348015610ba657600080fd5b5061037060048036036040811015610bbd57600080fd5b810190602081018135600160201b811115610bd757600080fd5b820183602082011115610be957600080fd5b803590602001918460208302840111600160201b83111715610c0a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505050351515905061202f565b348015610c5657600080fd5b5061037060048036036020811015610c6d57600080fd5b810190602081018135600160201b811115610c8757600080fd5b820183602082011115610c9957600080fd5b803590602001918460208302840111600160201b83111715610cba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612253945050505050565b348015610d0457600080fd5b5061037060048036036040811015610d1b57600080fd5b810190602081018135600160201b811115610d3557600080fd5b820183602082011115610d4757600080fd5b803590602001918460208302840111600160201b83111715610d6857600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506123f4915050565b348015610db457600080fd5b5061025360048036036040811015610dcb57600080fd5b506001600160a01b0381358116916020013516612484565b348015610def57600080fd5b5061037060048036036020811015610e0657600080fd5b50356001600160a01b03166124b2565b6001600160e01b03191660009081526020819052604090205460ff1690565b60098054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610ec15780601f10610e9657610100808354040283529160200191610ec1565b820191906000526020600020905b815481529060010190602001808311610ea457829003601f168201915b505050505090505b90565b6000610ed782612517565b610f1557604051600160e51b62461bcd02815260040180806020018281038252602c8152602001806138e2602c913960400191505060405180910390fd5b506000908152600260205260409020546001600160a01b031690565b6000610f3c82611530565b9050806001600160a01b0316836001600160a01b03161415610f9257604051600160e51b62461bcd0281526004018080602001828103825260218152602001806139856021913960400191505060405180910390fd5b806001600160a01b0316610fa4612534565b6001600160a01b03161480610fc55750610fc581610fc0612534565b612484565b61100357604051600160e51b62461bcd0281526004018080602001828103825260388152602001806137e56038913960400191505060405180910390fd5b60008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60005b81518110156110ef5761109c8484838151811061107b57fe5b602002602001015184848151811061108f57fe5b6020026020010151611265565b6003600e60008484815181106110ae57fe5b6020026020010151815260200190815260200160002060030160006101000a81548160ff021916908360038111156110e257fe5b0217905550600101611062565b507fe0bdff057bc74b2545c13ac89393038d336f254b2245c876efa9669ddcc09b97600e60008360008151811061112257fe5b602002602001015181526020019081526020016000206002018383604051808060200180602001806020018481038452878181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156111ce5780601f106111a3576101008083540402835291602001916111ce565b820191906000526020600020905b8154815290600101906020018083116111b157829003601f168201915b50508481038352865181528651602091820191808901910280838360005b838110156112045781810151838201526020016111ec565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561124357818101518382015260200161122b565b50505050905001965050505050505060405180910390a1505050565b60075490565b611276611270612534565b82612538565b6112b457604051600160e51b62461bcd0281526004018080602001828103825260318152602001806139a66031913960400191505060405180910390fd5b6112bf8383836125df565b505050565b60006112cf83611587565b821061130f57604051600160e51b62461bcd02815260040180806020018281038252602b815260200180613712602b913960400191505060405180910390fd5b6001600160a01b038316600090815260056020526040902080548390811061133357fe5b906000526020600020015490505b92915050565b6112bf83838360405180602001604052806000815250611de8565b61136d611270612534565b6113ab57604051600160e51b62461bcd028152600401808060200182810382526030815260200180613a286030913960400191505060405180910390fd5b6113b4816125fe565b50565b6113bf61195e565b6114135760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6040517ff58fef8e187ef8dfd7bef096c1ef3e4f3c54f98d95b8ad5659349b07e61204df90600090a16011546001600160a01b0316ff5b600061145461125f565b821061149457604051600160e51b62461bcd02815260040180806020018281038252602c8152602001806139d7602c913960400191505060405180910390fd5b600782815481106114a157fe5b90600052602060002001549050919050565b6011546001600160a01b031681565b60006114d46114cf612534565b611dcf565b61151257604051600160e51b62461bcd0281526004018080602001828103825260308152602001806138706030913960400191505060405180910390fd5b61151c8484612610565b6115268383612631565b5060019392505050565b6000818152600160205260408120546001600160a01b03168061134157604051600160e51b62461bcd0281526004018080602001828103825260298152602001806138476029913960400191505060405180910390fd5b60006001600160a01b0382166115d157604051600160e51b62461bcd02815260040180806020018281038252602a81526020018061381d602a913960400191505060405180910390fd5b6001600160a01b038216600090815260036020526040902061134190612697565b6115fa61195e565b61164e5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b6000818152600e60205260408120600101543410156116f25760408051600160e51b62461bcd02815260206004820152600b6024820152600160a81b6a507269636520697373756502604482015290519081900360640190fd5b6000828152600e6020526040902060039081015460ff169081111561171357fe5b6001146117575760408051600160e51b62461bcd0281526020600482015260076024820152600160c81b664e6f2053616c6502604482015290519081900360640190fd5b6000828152600e60205261176a3461269b565b9050600061177834836126bd565b6011546040519192506001600160a01b03169082156108fc029083906000818181858888f193505050501580156117b3573d6000803e3d6000fd5b506012546040516001600160a01b039091169083156108fc029084906000818181858888f193505050501580156117ee573d6000803e3d6000fd5b505050601154611808906001600160a01b031633846125df565b6000828152600e602090815260409182902060038101805460ff19166002908117909155835186815234948101859052606093810184815292820180546001811615610100026000190116929092049381018490527f46e70e87b058d8f3cde334fc179a61ac8acadcc4fdc26735e4195106b3c88eb3948794929390926080830190859080156118d95780601f106118ae576101008083540402835291602001916118d9565b820191906000526020600020905b8154815290600101906020018083116118bc57829003601f168201915b505094505050505060405180910390a1919050565b60606118f9826126ff565b80548060200260200160405190810160405280929190818152602001828054801561194357602002820191906000526020600020905b81548152602001906001019080831161192f575b50505050509050919050565b600d546001600160a01b031690565b600d546000906001600160a01b0316611975612534565b6001600160a01b031614905090565b600a8054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610ec15780601f10610e9657610100808354040283529160200191610ec1565b6119f06114cf612534565b611a2e57604051600160e51b62461bcd0281526004018080602001828103825260308152602001806138706030913960400191505060405180910390fd5b6113b481612719565b611a426114cf612534565b611a8057604051600160e51b62461bcd0281526004018080602001828103825260308152602001806138706030913960400191505060405180910390fd5b6028841115611ac65760408051600160e51b62461bcd0281526020600482015260076024820152600160cc1b6604f7665722034302604482015290519081900360640190fd5b60005b84811015611c1f57600f54611ae590600163ffffffff61276116565b600f8181556000918252600e602090815260408084206001018790559154835291208551611b1b92600290920191870190613615565b5060018215151415611b4b57600f546000908152600e60205260409020600301805460ff19166001179055611b68565b600f546000908152600e60205260409020600301805460ff191690555b611b7486600f54612610565b7fadef11a3979b8ceb0573eb6ef0678134a09c23a0d94e5ea47cd18ac3a9fc0194600f54856040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611bdc578181015183820152602001611bc4565b50505050905090810190601f168015611c095780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1600101611ac9565b505050505050565b611c37611c32612534565b6127be565b565b6010805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015611cbf5780601f10611c9457610100808354040283529160200191611cbf565b820191906000526020600020905b815481529060010190602001808311611ca257829003601f168201915b505050505081565b611ccf612534565b6001600160a01b0316826001600160a01b03161415611d385760408051600160e51b62461bcd02815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8060046000611d45612534565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155611d89612534565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b6000611341600c8363ffffffff61280616565b600f5481565b611df9611df3612534565b83612538565b611e3757604051600160e51b62461bcd0281526004018080602001828103825260318152602001806139a66031913960400191505060405180910390fd5b611e4384848484612870565b50505050565b600e6020908152600091825260409182902080546001808301546002808501805488519481161561010002600019011691909104601f810187900487028401870190975286835292959094919291830182828015611ee85780601f10611ebd57610100808354040283529160200191611ee8565b820191906000526020600020905b815481529060010190602001808311611ecb57829003601f168201915b5050506003909301549192505060ff1684565b6010805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181526060936113419391929091830182828015611f8a5780601f10611f5f57610100808354040283529160200191611f8a565b820191906000526020600020905b815481529060010190602001808311611f6d57829003601f168201915b5050506000868152600e60209081526040918290206002908101805484516001821615610100026000190190911692909204601f810184900484028301840190945283825290945092508301828280156120255780601f10611ffa57610100808354040283529160200191612025565b820191906000526020600020905b81548152906001019060200180831161200857829003601f168201915b50505050506128c5565b61203a6114cf612534565b61207857604051600160e51b62461bcd0281526004018080602001828103825260308152602001806138706030913960400191505060405180910390fd5b60005b825181101561213357600182151514156120df576001600e60008584815181106120a157fe5b6020026020010151815260200190815260200160002060030160006101000a81548160ff021916908360038111156120d557fe5b021790555061212b565b6000600e60008584815181106120f157fe5b6020026020010151815260200190815260200160002060030160006101000a81548160ff0219169083600381111561212557fe5b02179055505b60010161207b565b507fefd56044628f374cec68c952a0580a76d23b4bd06d17bb887193f2176ba6c48b82600e60008560008151811061216757fe5b60200260200101518152602001908152602001600020600201604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156121c45781810151838201526020016121ac565b50505050919091018481038352855460026000196101006001841615020190911604808252602090910191508590801561223f5780601f106122145761010080835404028352916020019161223f565b820191906000526020600020905b81548152906001019060200180831161222257829003601f168201915b505094505050505060405180910390a15050565b61225e6114cf612534565b61229c57604051600160e51b62461bcd0281526004018080602001828103825260308152602001806138706030913960400191505060405180910390fd5b60005b81518110156122cc576122c48282815181106122b757fe5b60200260200101516125fe565b60010161229f565b507f68f2536b9ff968bd2acc006b7cf7be7ca83c2f4a462c355e925bb354e5ce43d5600e6000836000815181106122ff57fe5b60200260200101518152602001908152602001600020600201826040518080602001806020018381038352858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156123a65780601f1061237b576101008083540402835291602001916123a6565b820191906000526020600020905b81548152906001019060200180831161238957829003601f168201915b50508381038252845181528451602091820191808701910280838360005b838110156123dc5781810151838201526020016123c4565b5050505090500194505050505060405180910390a150565b6123ff6114cf612534565b61243d57604051600160e51b62461bcd0281526004018080602001828103825260308152602001806138706030913960400191505060405180910390fd5b60005b82518110156112bf5781600e600085848151811061245a57fe5b60200260200101518152602001908152602001600020600101819055508080600101915050612440565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6124ba61195e565b61250e5760408051600160e51b62461bcd02815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6113b481612901565b6000908152600160205260409020546001600160a01b0316151590565b3390565b600061254382612517565b61258157604051600160e51b62461bcd02815260040180806020018281038252602c8152602001806137b9602c913960400191505060405180910390fd5b600061258c83611530565b9050806001600160a01b0316846001600160a01b031614806125c75750836001600160a01b03166125bc84610ecc565b6001600160a01b0316145b806125d757506125d78185612484565b949350505050565b6125ea8383836129a5565b6125f48382612aef565b6112bf8282612be4565b6113b461260a82611530565b82612c22565b61261a8282612c6a565b6126248282612be4565b61262d81612da1565b5050565b61263a82612517565b61267857604051600160e51b62461bcd02815260040180806020018281038252602c81526020018061390e602c913960400191505060405180910390fd5b6000828152600b6020908152604090912082516112bf92840190613615565b5490565b6000806126a9836002612de5565b90506126b6816064612e41565b9392505050565b60006126b683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612e83565b6001600160a01b0316600090815260056020526040902090565b61272a600c8263ffffffff612f1d16565b6040516001600160a01b038216907f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f690600090a250565b6000828201838110156126b65760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6127cf600c8263ffffffff612fa116565b6040516001600160a01b038216907fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290600090a250565b60006001600160a01b03821661285057604051600160e51b62461bcd02815260040180806020018281038252602281526020018061393a6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b61287b8484846125df565b6128878484848461300b565b611e4357604051600160e51b62461bcd02815260040180806020018281038252603281526020018061373d6032913960400191505060405180910390fd5b60606126b68383604051806020016040528060008152506040518060200160405280600081525060405180602001604052806000815250613165565b6001600160a01b03811661294957604051600160e51b62461bcd02815260040180806020018281038252602681526020018061376f6026913960400191505060405180910390fd5b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b826001600160a01b03166129b882611530565b6001600160a01b031614612a0057604051600160e51b62461bcd02815260040180806020018281038252602981526020018061395c6029913960400191505060405180910390fd5b6001600160a01b038216612a4857604051600160e51b62461bcd0281526004018080602001828103825260248152602001806137956024913960400191505060405180910390fd5b612a5181613379565b6001600160a01b0383166000908152600360205260409020612a72906133b4565b6001600160a01b0382166000908152600360205260409020612a93906133cb565b60008181526001602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216600090815260056020526040812054612b1990600163ffffffff6126bd16565b600083815260066020526040902054909150808214612bb4576001600160a01b0384166000908152600560205260408120805484908110612b5657fe5b906000526020600020015490508060056000876001600160a01b03166001600160a01b031681526020019081526020016000208381548110612b9457fe5b600091825260208083209091019290925591825260069052604090208190555b6001600160a01b0384166000908152600560205260409020805490612bdd906000198301613693565b5050505050565b6001600160a01b0390911660009081526005602081815260408084208054868652600684529185208290559282526001810183559183529091200155565b612c2c82826133d4565b6000818152600b6020526040902054600260001961010060018416150201909116041561262d576000818152600b6020526040812061262d916136b7565b6001600160a01b038216612cc85760408051600160e51b62461bcd02815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b612cd181612517565b15612d265760408051600160e51b62461bcd02815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b600081815260016020908152604080832080546001600160a01b0319166001600160a01b038716908117909155835260039091529020612d65906133cb565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600780546000838152600860205260408120829055600182018355919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880155565b600082612df457506000611341565b82820282848281612e0157fe5b04146126b657604051600160e51b62461bcd0281526004018080602001828103825260218152602001806138c16021913960400191505060405180910390fd5b60006126b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613400565b60008184841115612f1557604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612eda578181015183820152602001612ec2565b50505050905090810190601f168015612f075780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b612f278282612806565b15612f7c5760408051600160e51b62461bcd02815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b612fab8282612806565b612fe957604051600160e51b62461bcd0281526004018080602001828103825260218152602001806138a06021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b600061301f846001600160a01b0316613468565b61302b575060016125d7565b6000846001600160a01b031663150b7a02613044612534565b8887876040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156130c95781810151838201526020016130b1565b50505050905090810190601f1680156130f65780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561311857600080fd5b505af115801561312c573d6000803e3d6000fd5b505050506040513d602081101561314257600080fd5b50516001600160e01b031916600160e11b630a85bd010214915050949350505050565b6060808690506060869050606086905060608690506060869050606081518351855187518951010101016040519080825280601f01601f1916602001820160405280156131b9576020820181803883390190505b509050806000805b8851811015613212578881815181106131d657fe5b602001015160f81c60f81b8383806001019450815181106131f357fe5b60200101906001600160f81b031916908160001a9053506001016131c1565b5060005b87518110156132675787818151811061322b57fe5b602001015160f81c60f81b83838060010194508151811061324857fe5b60200101906001600160f81b031916908160001a905350600101613216565b5060005b86518110156132bc5786818151811061328057fe5b602001015160f81c60f81b83838060010194508151811061329d57fe5b60200101906001600160f81b031916908160001a90535060010161326b565b5060005b8551811015613311578581815181106132d557fe5b602001015160f81c60f81b8383806001019450815181106132f257fe5b60200101906001600160f81b031916908160001a9053506001016132c0565b5060005b84518110156133665784818151811061332a57fe5b602001015160f81c60f81b83838060010194508151811061334757fe5b60200101906001600160f81b031916908160001a905350600101613315565b50909d9c50505050505050505050505050565b6000818152600260205260409020546001600160a01b0316156113b457600090815260026020526040902080546001600160a01b0319169055565b80546133c790600163ffffffff6126bd16565b9055565b80546001019055565b6133de828261349f565b6133e88282612aef565b60008181526006602052604081205561262d81613579565b6000818361345257604051600160e51b62461bcd028152602060048201818152835160248401528351909283926044909101919085019080838360008315612eda578181015183820152602001612ec2565b50600083858161345e57fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081158015906125d75750141592915050565b816001600160a01b03166134b282611530565b6001600160a01b0316146134fa57604051600160e51b62461bcd028152600401808060200182810382526025815260200180613a036025913960400191505060405180910390fd5b61350381613379565b6001600160a01b0382166000908152600360205260409020613524906133b4565b60008181526001602052604080822080546001600160a01b0319169055518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60075460009061359090600163ffffffff6126bd16565b600083815260086020526040812054600780549394509092849081106135b257fe5b9060005260206000200154905080600783815481106135cd57fe5b60009182526020808320909101929092558281526008909152604090208290556007805490613600906000198301613693565b50505060009182525060086020526040812055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061365657805160ff1916838001178555613683565b82800160010185558215613683579182015b82811115613683578251825591602001919060010190613668565b5061368f9291506136f7565b5090565b8154818355818111156112bf576000838152602090206112bf9181019083016136f7565b50805460018160011615610100020316600290046000825580601f106136dd57506113b4565b601f0160209004906000526020600020908101906113b491905b610ec991905b8082111561368f57600081556001016136fd56fe455243373231456e756d657261626c653a206f776e657220696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4d696e746572526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204d696e74657220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e526f6c65733a206163636f756e7420697320746865207a65726f20616464726573734552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564455243373231456e756d657261626c653a20676c6f62616c20696e646578206f7574206f6620626f756e64734552433732313a206275726e206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a165627a7a723058202ee6163ecddc6668fa84d89038d928a46b3711a12f70cf998582ac6b5d38f51700294f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573738be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373a165627a7a7230582085e3c2d300b67e992dc8a72cbe0b7a36bfcd8cafee081240cbaa01d01917d2e50029

Deployed ByteCode Sourcemap

58167:757:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;58167:757:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58457:351;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;58457:351:0;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;58457:351:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;58457:351:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;58457:351:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;58457:351:0;;;;;;;;-1:-1:-1;58457:351:0;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;58457:351:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;58457:351:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;58457:351:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;58457:351:0;;;;;;;;-1:-1:-1;58457:351:0;;-1:-1:-1;;21:11;5:28;;2:2;;;46:1;43;36:12;2:2;58457:351:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;58457:351:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;58457:351:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;58457:351:0;;-1:-1:-1;58457:351:0;;-1:-1:-1;;;;;58457:351:0:i;:::-;;;;-1:-1:-1;;;;;58457:351:0;;;;;;;;;;;;;;58231:31;;;:::i;58816:105::-;;;:::i;:::-;;;;;;;;;;;;;;;;58196:28;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;58196:28:0;;:::i;58457:351::-;58583:12;58608:16;58645:4;58651:6;58659:3;58664:8;;;;;;;;;-1:-1:-1;;;;;58664:8:0;58674:10;58635:50;;;;;:::i;:::-;-1:-1:-1;;;;;58635:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;58635:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;58635:50:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;58635:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;58635:50:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;58635:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;58697:11:0;27:10:-1;;39:1;23:18;;45:23;;58697:26:0;;;;;;;-1:-1:-1;;;;;;58697:26:0;-1:-1:-1;;;;;58697:26:0;;;;;;;;58739:35;;;;;;;;;;;;;;;;;58697:26;;-1:-1:-1;58697:26:0;;58739:35;;;;58767:6;;58739:35;;;;58697:26;58739:35;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;58739:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;58739:35:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;58739:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58792:8;58457:351;-1:-1:-1;;;;58457:351:0:o;58231:31::-;;;-1:-1:-1;;;;;58231:31:0;;:::o;58816:105::-;58857:18;58895;58816:105;:::o;58196:28::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;58196:28:0;;-1:-1:-1;58196:28:0;:::o;58167:757::-;;;;;;;;:::o

Swarm Source

bzzr://85e3c2d300b67e992dc8a72cbe0b7a36bfcd8cafee081240cbaa01d01917d2e5
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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