ETH Price: $3,905.65 (+0.39%)

Token

 

Overview

Max Total Supply

20

Holders

19

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
0xeeb7bf522f23d5b475064e8158fd798b2bf05bb5
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x7a1c3b0F...21e71d06e
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
CollectionFree

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : CollectionFree.sol
// SPDX-License-Identifier: MIT
// Latest stable version of solidity
pragma solidity ^0.8.7;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./struct/CollectionInfo.sol";
import "./Interfaces/IFarmV2.sol";

contract CollectionFree is ERC1155, AccessControl {
    event Sold(
        address indexed operator,
        address indexed to,
        uint256 indexed id,
        uint256 amount
    );
    event PaymentShared(address account, uint256 amount);
    event PaymentTreasure(address account, uint256 amount);
    event SoldWithStones(address buyer, uint256 amount);
    event NewStartTime(uint256 startTime);
    event NewEndTime(uint256 endTime);
    event NewUsdAmount(uint256 amount);
    event NewNFTLimit(uint256 NFTLimit);
    event NewMinumumAmount(uint256 minumuAmount);
    event NewStonePrice(uint256 newStonePrice);
    event SetAddresses(address token, address Ifarm);
    event Initialize(
        uint256 total,
        uint256 startTime,
        uint256 endTime,
        uint256 minumumAmount,
        uint256 NFTLimit
    );
    using EnumerableSet for EnumerableSet.UintSet;

    EnumerableSet.UintSet soldCards;

    mapping(address => uint256) public userNFTAmount;
    bytes32 public constant MINTER_ROLE = bytes32(keccak256("MINTER_ROLE"));

    IERC20 public token;
    IFarmV2 public Ifarm;

    uint256 public stonePrice;
    uint256 public percent;
    uint256 public available;
    uint256 public sold;
    uint256 public total;
    uint256 public startTime;
    uint256 public endTime;
    uint256 public amount;
    uint256 public NFTLimit;

    address public facAddress;
    address public ernTreasure;

    constructor(CollectionData memory collecData) ERC1155(collecData.uri) {
        available = collecData.total;
        total = collecData.total;
        startTime = collecData.startTime;
        endTime = collecData.endTime;
        facAddress = collecData.factoryAddress;
        amount = collecData.minumumAmount;
        NFTLimit = collecData.NFTLimit;
        stonePrice = collecData.stonePrice;

        _setupRole(DEFAULT_ADMIN_ROLE, collecData.admin);
        _setupRole(DEFAULT_ADMIN_ROLE, facAddress);

        addExternalAddresses(collecData.token, collecData.farm);

        emit Initialize(total, startTime, endTime, amount, NFTLimit);
    }

    modifier onlyFactory() {
        require(
            msg.sender == facAddress,
            "This function can only be called by factory contract"
        );
        _;
    }

    modifier checkBalance(address buyer) {
        bool isTrue;
        if (Ifarm.farmed(buyer) + token.balanceOf(buyer) >= amount) {
            isTrue = true;
        } else {
            isTrue = false;
        }

        require(isTrue == true, "You do not have enough funds in your account");
        _;
    }

    function addExternalAddresses(address _token, address _farm)
        public
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        token = IERC20(_token);
        Ifarm = IFarmV2(_farm);

        emit SetAddresses(_token, _farm);
    }

    function recoverToken(address _token)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        uint256 amount = IERC20(_token).balanceOf(address(this));
        IERC20(_token).transfer(msg.sender, amount);
    }

    function buy(address buyer, uint256 _id)
        external
        onlyFactory
        checkBalance(buyer)
    {
        require(!(soldCards.contains(_id)), "This card already sold");
        require(available > 0, "Sold Out");
        require(
            startTime <= block.timestamp && endTime > block.timestamp,
            "Sale did not start yet"
        );
        if (stonePrice > 0) {
            _withStones(buyer);
        } else {
            require(
                userNFTAmount[buyer] < NFTLimit,
                "you are exceeding the limit of NFT you can have"
            );
        }
        _mint(buyer, _id, 1, "");

        userNFTAmount[buyer] += 1;
        available -= 1;
        sold += 1;
        soldCards.add(_id);

        emit Sold(address(this), buyer, _id, stonePrice);
    }

    function mint(address to, uint256 _id)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        require(!(soldCards.contains(_id)), "This card already sold");
        require(available > 0, "Sold Out");

        _mint(to, _id, 1, "");

        available -= 1;
        sold += 1;
        soldCards.add(_id);
    }

    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amount_
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        require(available > ids.length, "Sold Out");

        for (uint256 i = 0; i < ids.length; i++) {
            require(!(soldCards.contains(ids[i])), "This card already sold");
        }

        _mintBatch(to, ids, amount_, "");

        available -= ids.length;
        sold += ids.length;

        for (uint256 i = 0; i < ids.length; i++) {
            soldCards.add(ids[i]);
        }
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC1155, AccessControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    function setNFTLimit(uint256 _NFTLimit)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        NFTLimit = _NFTLimit;

        emit NewNFTLimit(_NFTLimit);
    }

    function setMinumumAmount(uint256 _minumumAmount)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        amount = _minumumAmount;

        emit NewMinumumAmount(_minumumAmount);
    }

    function setStarTime(uint256 _starTime)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        startTime = _starTime;

        emit NewStartTime(startTime);
    }

    function setEndTime(uint256 _endTime)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        endTime = _endTime;

        emit NewEndTime(endTime);
    }

    function setStonePrice(uint256 _stonePrice)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        stonePrice = _stonePrice;

        emit NewStonePrice(stonePrice);
    }

    function _withStones(address buyer) private {
        uint256 stones = Ifarm.rewardedStones(buyer);
        require(stones >= stonePrice, "You do not have enough points !");
        require(Ifarm.payment(buyer, stonePrice), "Payment was unsuccessful");

        emit SoldWithStones(buyer, stonePrice);
    }
}

File 2 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 16 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 4 of 16 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

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

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][account] += amount;
        emit TransferSingle(operator, address(0), account, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `account`
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 accountBalance = _balances[id][account];
        require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferSingle(operator, account, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(account != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, account, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 accountBalance = _balances[id][account];
            require(accountBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][account] = accountBalance - amount;
            }
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver(to).onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver(to).onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 5 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 6 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

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

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 7 of 16 : CollectionInfo.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

struct CollectionData {
    string uri;
    uint256 total;
    uint256 startTime;
    uint256 endTime;
    uint256 minumumAmount;
    uint256 NFTLimit;
    uint256 stonePrice;
    address admin;
    address factoryAddress;
    address farm;
    address token;
}

File 8 of 16 : IFarmV2.sol
pragma solidity ^0.8.7;

interface IFarmV2 {
    function giveAway(address _address, uint256 stones) external;

    function sell(
        uint256 stones,
        address from,
        address to
    ) external;

    function rewardedStones(address staker) external view returns (uint256);

    function grantRole(bytes32 role, address account) external;

    function farmed(address sender) external view returns (uint256);

    function payment(address buyer, uint256 amount) external returns (bool);
}

File 9 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 10 of 16 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 16 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 12 of 16 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @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].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 14 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 15 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.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 16 of 16 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minumumAmount","type":"uint256"},{"internalType":"uint256","name":"NFTLimit","type":"uint256"},{"internalType":"uint256","name":"stonePrice","type":"uint256"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"factoryAddress","type":"address"},{"internalType":"address","name":"farm","type":"address"},{"internalType":"address","name":"token","type":"address"}],"internalType":"struct CollectionData","name":"collecData","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minumumAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"NFTLimit","type":"uint256"}],"name":"Initialize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"NewEndTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minumuAmount","type":"uint256"}],"name":"NewMinumumAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"NFTLimit","type":"uint256"}],"name":"NewNFTLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"NewStartTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newStonePrice","type":"uint256"}],"name":"NewStonePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewUsdAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentShared","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentTreasure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"Ifarm","type":"address"}],"name":"SetAddresses","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Sold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SoldWithStones","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Ifarm","outputs":[{"internalType":"contract IFarmV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFTLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_farm","type":"address"}],"name":"addExternalAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ernTreasure","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amount_","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"percent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minumumAmount","type":"uint256"}],"name":"setMinumumAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_NFTLimit","type":"uint256"}],"name":"setNFTLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_starTime","type":"uint256"}],"name":"setStarTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stonePrice","type":"uint256"}],"name":"setStonePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stonePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"total","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userNFTAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b50604051620034a4380380620034a4833981016040819052620000349162000646565b8051620000418162000146565b506020810151600b819055600d556040810151600e556060810151600f55610100810151601280546001600160a01b0319166001600160a01b03909216919091179055608081015160105560a081015160115560c081015160095560e0810151620000af906000906200015f565b601254620000c9906000906001600160a01b03166200015f565b620000e58161014001518261012001516200016b60201b60201c565b600d54600e54600f546010546011546040805195865260208601949094528484019290925260608401526080830152517f485315dc1f29f580769d5cbd5ad09f9f58438ccc423fc55786693af76dfd06079181900360a00190a15062000931565b80516200015b906002906020840190620004f2565b5050565b6200015b8282620001e8565b60006200017981336200028c565b600780546001600160a01b038581166001600160a01b03199283168117909355600880549186169190921681179091556040805192835260208301919091527f1cbc7a9637cabbc21164f4e6f293a9e760d1f651ad2b0f5614dec80dd807d0bd910160405180910390a1505050565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff166200015b5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002483390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff166200015b57620002d8816001600160a01b031660146200033260201b620013911760201c565b620002ee8360206200139162000332821b17811c565b604051602001620003019291906200074e565b60408051601f198184030181529082905262461bcd60e51b82526200032991600401620007c7565b60405180910390fd5b606060006200034383600262000843565b6200035090600262000828565b6001600160401b038111156200036a576200036a6200091b565b6040519080825280601f01601f19166020018201604052801562000395576020820181803683370190505b509050600360fc1b81600081518110620003b357620003b362000905565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620003e557620003e562000905565b60200101906001600160f81b031916908160001a90535060006200040b84600262000843565b6200041890600162000828565b90505b60018111156200049a576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000450576200045062000905565b1a60f81b82828151811062000469576200046962000905565b60200101906001600160f81b031916908160001a90535060049490941c93620004928162000898565b90506200041b565b508315620004eb5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000329565b9392505050565b8280546200050090620008b2565b90600052602060002090601f0160209004810192826200052457600085556200056f565b82601f106200053f57805160ff19168380011785556200056f565b828001600101855582156200056f579182015b828111156200056f57825182559160200191906001019062000552565b506200057d92915062000581565b5090565b5b808211156200057d576000815560010162000582565b80516001600160a01b0381168114620005b057600080fd5b919050565b600082601f830112620005c757600080fd5b81516001600160401b0380821115620005e457620005e46200091b565b604051601f8301601f19908116603f011681019082821181831017156200060f576200060f6200091b565b816040528381528660208588010111156200062957600080fd5b6200063c84602083016020890162000865565b9695505050505050565b6000602082840312156200065957600080fd5b81516001600160401b03808211156200067157600080fd5b9083019061016082860312156200068757600080fd5b62000691620007fc565b825182811115620006a157600080fd5b620006af87828601620005b5565b8252506020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c0820152620006fc60e0840162000598565b60e082015261010091506200071382840162000598565b8282015261012091506200072982840162000598565b8282015261014091506200073f82840162000598565b91810191909152949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516200078881601785016020880162000865565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620007bb81602884016020880162000865565b01602801949350505050565b6020815260008251806020840152620007e881604085016020870162000865565b601f01601f19169190910160400192915050565b60405161016081016001600160401b03811182821017156200082257620008226200091b565b60405290565b600082198211156200083e576200083e620008ef565b500190565b6000816000190483118215151615620008605762000860620008ef565b500290565b60005b838110156200088257818101518382015260200162000868565b8381111562000892576000848401525b50505050565b600081620008aa57620008aa620008ef565b506000190190565b600181811c90821680620008c757607f821691505b60208210811415620008e957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b612b6380620009416000396000f3fe608060405234801561001057600080fd5b506004361061023c5760003560e01c8063766c30b71161013b578063ccb98ffc116100b8578063d87e0e011161007c578063d87e0e01146104ea578063e985e9c5146104fd578063f242432a14610539578063fb307b471461054c578063fc0c546a1461055f57600080fd5b8063ccb98ffc14610477578063cce7ec131461048a578063d53913931461049d578063d547741f146104c4578063d81d0a15146104d757600080fd5b8063a22cb465116100ff578063a22cb46514610415578063aa8c217c14610428578063b2f92cba14610431578063b8b5db6b14610451578063ca405ce01461046457600080fd5b8063766c30b7146103d557806378e97925146103de57806391d14854146103e75780639be65a60146103fa578063a217fddf1461040d57600080fd5b8063303c6433116101c957806348a0d7541161018d57806348a0d754146103875780634e1273f414610390578063507e4eae146103b057806354830771146103b957806370ba1113146103cc57600080fd5b8063303c64331461031a5780633197cbb614610345578063331361831461034e57806336568abe1461036157806340c10f191461037457600080fd5b8063233311091161021057806323331109146102b3578063248a9ca3146102c85780632ddbd13a146102eb5780632eb2c2d6146102f45780632f2ff15d1461030757600080fd5b8062fdd58e1461024157806301ffc9a71461026757806302c7e7af1461028a5780630e89341c14610293575b600080fd5b61025461024f3660046123ba565b610572565b6040519081526020015b60405180910390f35b61027a61027536600461250e565b61060c565b604051901515815260200161025e565b610254600c5481565b6102a66102a13660046124d2565b610617565b60405161025e9190612721565b6102c66102c13660046124d2565b6106ab565b005b6102546102d63660046124d2565b60009081526003602052604090206001015490565b610254600d5481565b6102c6610302366004612200565b6106f4565b6102c66103153660046124eb565b61078b565b60135461032d906001600160a01b031681565b6040516001600160a01b03909116815260200161025e565b610254600f5481565b60085461032d906001600160a01b031681565b6102c661036f3660046124eb565b6107b6565b6102c66103823660046123ba565b610834565b610254600b5481565b6103a361039e3660046123e4565b6108ea565b60405161025e91906126e0565b61025460115481565b6102c66103c73660046124d2565b610a14565b610254600a5481565b61025460095481565b610254600e5481565b61027a6103f53660046124eb565b610a55565b6102c66104083660046121b2565b610a80565b610254600081565b6102c6610423366004612383565b610b89565b61025460105481565b61025461043f3660046121b2565b60066020526000908152604090205481565b6102c661045f3660046121cd565b610c60565b60125461032d906001600160a01b031681565b6102c66104853660046124d2565b610cdb565b6102c66104983660046123ba565b610d1c565b6102547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102c66104d23660046124eb565b611132565b6102c66104e536600461230f565b611158565b6102c66104f83660046124d2565b611288565b61027a61050b3660046121cd565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102c66105473660046122aa565b6112c9565b6102c661055a3660046124d2565b611350565b60075461032d906001600160a01b031681565b60006001600160a01b0383166105e35760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061060682611534565b6060600280546106269061299b565b80601f01602080910402602001604051908101604052809291908181526020018280546106529061299b565b801561069f5780601f106106745761010080835404028352916020019161069f565b820191906000526020600020905b81548152906001019060200180831161068257829003601f168201915b50505050509050919050565b60006106b78133611559565b60118290556040518281527f89d2eeecd98cd688cd6e8007421a8ad10425e20f674d77a76b7c1fde747c1560906020015b60405180910390a15050565b6001600160a01b0385163314806107105750610710853361050b565b6107775760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016105da565b61078485858585856115bd565b5050505050565b6000828152600360205260409020600101546107a78133611559565b6107b18383611759565b505050565b6001600160a01b03811633146108265760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105da565b61083082826117df565b5050565b60006108408133611559565b61084b600483611846565b156108685760405162461bcd60e51b81526004016105da906128b6565b6000600b541161088a5760405162461bcd60e51b81526004016105da9061277c565b6108a6838360016040518060200160405280600081525061185e565b6001600b60008282546108b99190612941565b925050819055506001600c60008282546108d3919061290a565b909155506108e4905060048361192e565b50505050565b6060815183511461094f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105da565b6000835167ffffffffffffffff81111561096b5761096b612a4a565b604051908082528060200260200182016040528015610994578160200160208202803683370190505b50905060005b8451811015610a0c576109df8582815181106109b8576109b8612a34565b60200260200101518583815181106109d2576109d2612a34565b6020026020010151610572565b8282815181106109f1576109f1612a34565b6020908102919091010152610a0581612a03565b905061099a565b509392505050565b6000610a208133611559565b600e8290556040518281527fb1c3fe1bc33e06477df816d42ac9d600e037c768df5fbd04b622391bdd9b451c906020016106e8565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a8c8133611559565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b158015610ace57600080fd5b505afa158015610ae2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b069190612548565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0384169063a9059cbb90604401602060405180830381600087803b158015610b5157600080fd5b505af1158015610b65573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e491906124b5565b336001600160a01b0383161415610bf45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016105da565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610c6c8133611559565b600780546001600160a01b038581166001600160a01b03199283168117909355600880549186169190921681179091556040805192835260208301919091527f1cbc7a9637cabbc21164f4e6f293a9e760d1f651ad2b0f5614dec80dd807d0bd910160405180910390a1505050565b6000610ce78133611559565b600f8290556040518281527f18c072bc98b0b73c93817369c5f408345da097127acc038ec75ad73c261c265a906020016106e8565b6012546001600160a01b03163314610d935760405162461bcd60e51b815260206004820152603460248201527f546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656460448201527308189e48199858dd1bdc9e4818dbdb9d1c9858dd60621b60648201526084016105da565b6010546007546040516370a0823160e01b81526001600160a01b038086166004830152859360009390929116906370a082319060240160206040518083038186803b158015610de157600080fd5b505afa158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e199190612548565b60085460405163210b7cb960e11b81526001600160a01b03868116600483015290911690634216f9729060240160206040518083038186803b158015610e5e57600080fd5b505afa158015610e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e969190612548565b610ea0919061290a565b10610ead57506001610eb1565b5060005b600181151514610f185760405162461bcd60e51b815260206004820152602c60248201527f596f7520646f206e6f74206861766520656e6f7567682066756e647320696e2060448201526b1e5bdd5c881858d8dbdd5b9d60a21b60648201526084016105da565b610f23600484611846565b15610f405760405162461bcd60e51b81526004016105da906128b6565b6000600b5411610f625760405162461bcd60e51b81526004016105da9061277c565b42600e5411158015610f75575042600f54115b610fba5760405162461bcd60e51b815260206004820152601660248201527514d85b1948191a59081b9bdd081cdd185c9d081e595d60521b60448201526064016105da565b60095415610fd057610fcb8461193a565b611051565b6011546001600160a01b038516600090815260066020526040902054106110515760405162461bcd60e51b815260206004820152602f60248201527f796f752061726520657863656564696e6720746865206c696d6974206f66204e60448201526e465420796f752063616e206861766560881b60648201526084016105da565b61106d848460016040518060200160405280600081525061185e565b6001600160a01b038416600090815260066020526040812080546001929061109690849061290a565b925050819055506001600b60008282546110b09190612941565b925050819055506001600c60008282546110ca919061290a565b909155506110db905060048461192e565b5082846001600160a01b0316306001600160a01b03167f16dd16959a056953a63cf14bf427881e762e54f03d86b864efea8238dd3b822f60095460405161112491815260200190565b60405180910390a450505050565b60008281526003602052604090206001015461114e8133611559565b6107b183836117df565b60006111648133611559565b8251600b54116111865760405162461bcd60e51b81526004016105da9061277c565b60005b83518110156111ee576111bf8482815181106111a7576111a7612a34565b6020026020010151600461184690919063ffffffff16565b156111dc5760405162461bcd60e51b81526004016105da906128b6565b806111e681612a03565b915050611189565b5061120a84848460405180602001604052806000815250611b24565b8251600b600082825461121d9190612941565b90915550508251600c805460009061123690849061290a565b90915550600090505b83518110156107845761127584828151811061125d5761125d612a34565b6020026020010151600461192e90919063ffffffff16565b508061128081612a03565b91505061123f565b60006112948133611559565b60108290556040518281527fe0b1633b4f74ff8ed4714833a3146701452817bc4a2b7f98308b10839da3d957906020016106e8565b6001600160a01b0385163314806112e557506112e5853361050b565b6113435760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016105da565b6107848585858585611c6f565b600061135c8133611559565b60098290556040518281527f81bbac8c875911ace5c71dcb319bd0db9ed937a721adac2fcf764b59eb0981f0906020016106e8565b606060006113a0836002612922565b6113ab90600261290a565b67ffffffffffffffff8111156113c3576113c3612a4a565b6040519080825280601f01601f1916602001820160405280156113ed576020820181803683370190505b509050600360fc1b8160008151811061140857611408612a34565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061143757611437612a34565b60200101906001600160f81b031916908160001a905350600061145b846002612922565b61146690600161290a565b90505b60018111156114de576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061149a5761149a612a34565b1a60f81b8282815181106114b0576114b0612a34565b60200101906001600160f81b031916908160001a90535060049490941c936114d781612984565b9050611469565b50831561152d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105da565b9392505050565b60006001600160e01b03198216637965db0b60e01b1480610606575061060682611d8c565b6115638282610a55565b6108305761157b816001600160a01b03166014611391565b611586836020611391565b6040516020016115979291906125c8565b60408051601f198184030181529082905262461bcd60e51b82526105da91600401612721565b81518351146115de5760405162461bcd60e51b81526004016105da9061282d565b6001600160a01b0384166116045760405162461bcd60e51b81526004016105da9061279e565b3360005b84518110156116eb57600085828151811061162557611625612a34565b60200260200101519050600085838151811061164357611643612a34565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156116935760405162461bcd60e51b81526004016105da906127e3565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906116d090849061290a565b92505081905550505050806116e490612a03565b9050611608565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161173b9291906126f3565b60405180910390a4611751818787878787611ddc565b505050505050565b6117638282610a55565b6108305760008281526003602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561179b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6117e98282610a55565b156108305760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000818152600183016020526040812054151561152d565b6001600160a01b0384166118845760405162461bcd60e51b81526004016105da90612875565b3361189e8160008761189588611f47565b61078488611f47565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906118ce90849061290a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461078481600087878787611f92565b600061152d838361205c565b6008546040516375c7e97360e01b81526001600160a01b03838116600483015260009216906375c7e9739060240160206040518083038186803b15801561198057600080fd5b505afa158015611994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b89190612548565b9050600954811015611a0c5760405162461bcd60e51b815260206004820152601f60248201527f596f7520646f206e6f74206861766520656e6f75676820706f696e747320210060448201526064016105da565b6008546009546040516367a09c2360e01b81526001600160a01b03858116600483015260248201929092529116906367a09c2390604401602060405180830381600087803b158015611a5d57600080fd5b505af1158015611a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9591906124b5565b611ae15760405162461bcd60e51b815260206004820152601860248201527f5061796d656e742077617320756e7375636365737366756c000000000000000060448201526064016105da565b600954604080516001600160a01b038516815260208101929092527ff2114d57b88c404287ba909c1d52f75395208c6b1a20716ae4b37c19435b29af91016106e8565b6001600160a01b038416611b4a5760405162461bcd60e51b81526004016105da90612875565b8151835114611b6b5760405162461bcd60e51b81526004016105da9061282d565b3360005b8451811015611c0757838181518110611b8a57611b8a612a34565b6020026020010151600080878481518110611ba757611ba7612a34565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611bef919061290a565b90915550819050611bff81612a03565b915050611b6f565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c589291906126f3565b60405180910390a461078481600087878787611ddc565b6001600160a01b038416611c955760405162461bcd60e51b81526004016105da9061279e565b33611ca581878761189588611f47565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015611ce65760405162461bcd60e51b81526004016105da906127e3565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611d2390849061290a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611d83828888888888611f92565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b1480611dbd57506001600160e01b031982166303a24d0760e21b145b8061060657506301ffc9a760e01b6001600160e01b0319831614610606565b6001600160a01b0384163b156117515760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611e20908990899088908890889060040161263d565b602060405180830381600087803b158015611e3a57600080fd5b505af1925050508015611e6a575060408051601f3d908101601f19168201909252611e679181019061252b565b60015b611f1757611e76612a60565b806308c379a01415611eb05750611e8b612a7c565b80611e965750611eb2565b8060405162461bcd60e51b81526004016105da9190612721565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105da565b6001600160e01b0319811663bc197c8160e01b14611d835760405162461bcd60e51b81526004016105da90612734565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611f8157611f81612a34565b602090810291909101015292915050565b6001600160a01b0384163b156117515760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611fd6908990899088908890889060040161269b565b602060405180830381600087803b158015611ff057600080fd5b505af1925050508015612020575060408051601f3d908101601f1916820190925261201d9181019061252b565b60015b61202c57611e76612a60565b6001600160e01b0319811663f23a6e6160e01b14611d835760405162461bcd60e51b81526004016105da90612734565b60008181526001830160205260408120546120a357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610606565b506000610606565b80356001600160a01b03811681146120c257600080fd5b919050565b600082601f8301126120d857600080fd5b813560206120e5826128e6565b6040516120f282826129d6565b8381528281019150858301600585901b8701840188101561211257600080fd5b60005b8581101561213157813584529284019290840190600101612115565b5090979650505050505050565b600082601f83011261214f57600080fd5b813567ffffffffffffffff81111561216957612169612a4a565b604051612180601f8301601f1916602001826129d6565b81815284602083860101111561219557600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156121c457600080fd5b61152d826120ab565b600080604083850312156121e057600080fd5b6121e9836120ab565b91506121f7602084016120ab565b90509250929050565b600080600080600060a0868803121561221857600080fd5b612221866120ab565b945061222f602087016120ab565b9350604086013567ffffffffffffffff8082111561224c57600080fd5b61225889838a016120c7565b9450606088013591508082111561226e57600080fd5b61227a89838a016120c7565b9350608088013591508082111561229057600080fd5b5061229d8882890161213e565b9150509295509295909350565b600080600080600060a086880312156122c257600080fd5b6122cb866120ab565b94506122d9602087016120ab565b93506040860135925060608601359150608086013567ffffffffffffffff81111561230357600080fd5b61229d8882890161213e565b60008060006060848603121561232457600080fd5b61232d846120ab565b9250602084013567ffffffffffffffff8082111561234a57600080fd5b612356878388016120c7565b9350604086013591508082111561236c57600080fd5b50612379868287016120c7565b9150509250925092565b6000806040838503121561239657600080fd5b61239f836120ab565b915060208301356123af81612b06565b809150509250929050565b600080604083850312156123cd57600080fd5b6123d6836120ab565b946020939093013593505050565b600080604083850312156123f757600080fd5b823567ffffffffffffffff8082111561240f57600080fd5b818501915085601f83011261242357600080fd5b81356020612430826128e6565b60405161243d82826129d6565b8381528281019150858301600585901b870184018b101561245d57600080fd5b600096505b8487101561248757612473816120ab565b835260019690960195918301918301612462565b509650508601359250508082111561249e57600080fd5b506124ab858286016120c7565b9150509250929050565b6000602082840312156124c757600080fd5b815161152d81612b06565b6000602082840312156124e457600080fd5b5035919050565b600080604083850312156124fe57600080fd5b823591506121f7602084016120ab565b60006020828403121561252057600080fd5b813561152d81612b17565b60006020828403121561253d57600080fd5b815161152d81612b17565b60006020828403121561255a57600080fd5b5051919050565b600081518084526020808501945080840160005b8381101561259157815187529582019590820190600101612575565b509495945050505050565b600081518084526125b4816020860160208601612958565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612600816017850160208801612958565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612631816028840160208801612958565b01602801949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061266990830186612561565b828103606084015261267b8186612561565b9050828103608084015261268f818561259c565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906126d59083018461259c565b979650505050505050565b60208152600061152d6020830184612561565b6040815260006127066040830185612561565b82810360208401526127188185612561565b95945050505050565b60208152600061152d602083018461259c565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526008908201526714dbdb190813dd5d60c21b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b602080825260169082015275151a1a5cc818d85c9908185b1c9958591e481cdbdb1960521b604082015260600190565b600067ffffffffffffffff82111561290057612900612a4a565b5060051b60200190565b6000821982111561291d5761291d612a1e565b500190565b600081600019048311821515161561293c5761293c612a1e565b500290565b60008282101561295357612953612a1e565b500390565b60005b8381101561297357818101518382015260200161295b565b838111156108e45750506000910152565b60008161299357612993612a1e565b506000190190565b600181811c908216806129af57607f821691505b602082108114156129d057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff811182821017156129fc576129fc612a4a565b6040525050565b6000600019821415612a1757612a17612a1e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115612a795760046000803e5060005160e01c5b90565b600060443d1015612a8a5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715612aba57505050505090565b8285019150815181811115612ad25750505050505090565b843d8701016020828501011115612aec5750505050505090565b612afb602082860101876129d6565b509095945050505050565b8015158114612b1457600080fd5b50565b6001600160e01b031981168114612b1457600080fdfea2646970667358221220ba2df73d85899c3ffa608cfe4f19d6256f870212516ffb103299f0e5c9666ca564736f6c63430008070033000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000006158820000000000000000000000000000000000000000000000000000000000615c76800000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b9d5c93ec9aba93180ddd00a628e8facc310303900000000000000000000000098e6d94fe4fb92c29ac2746870b5dca0d69b5e3c000000000000000000000000edfe9ac42a511e1c523e067db8345711419d4f14000000000000000000000000bbc2ae13b23d715c30720f079fcd9b4a74093505000000000000000000000000000000000000000000000000000000000000003f697066733a2f2f516d5434576f4472715a5075327852444142737058416158474343576b58636d3159636d666356666334784355522f7b69647d2e6a736f6e00

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061023c5760003560e01c8063766c30b71161013b578063ccb98ffc116100b8578063d87e0e011161007c578063d87e0e01146104ea578063e985e9c5146104fd578063f242432a14610539578063fb307b471461054c578063fc0c546a1461055f57600080fd5b8063ccb98ffc14610477578063cce7ec131461048a578063d53913931461049d578063d547741f146104c4578063d81d0a15146104d757600080fd5b8063a22cb465116100ff578063a22cb46514610415578063aa8c217c14610428578063b2f92cba14610431578063b8b5db6b14610451578063ca405ce01461046457600080fd5b8063766c30b7146103d557806378e97925146103de57806391d14854146103e75780639be65a60146103fa578063a217fddf1461040d57600080fd5b8063303c6433116101c957806348a0d7541161018d57806348a0d754146103875780634e1273f414610390578063507e4eae146103b057806354830771146103b957806370ba1113146103cc57600080fd5b8063303c64331461031a5780633197cbb614610345578063331361831461034e57806336568abe1461036157806340c10f191461037457600080fd5b8063233311091161021057806323331109146102b3578063248a9ca3146102c85780632ddbd13a146102eb5780632eb2c2d6146102f45780632f2ff15d1461030757600080fd5b8062fdd58e1461024157806301ffc9a71461026757806302c7e7af1461028a5780630e89341c14610293575b600080fd5b61025461024f3660046123ba565b610572565b6040519081526020015b60405180910390f35b61027a61027536600461250e565b61060c565b604051901515815260200161025e565b610254600c5481565b6102a66102a13660046124d2565b610617565b60405161025e9190612721565b6102c66102c13660046124d2565b6106ab565b005b6102546102d63660046124d2565b60009081526003602052604090206001015490565b610254600d5481565b6102c6610302366004612200565b6106f4565b6102c66103153660046124eb565b61078b565b60135461032d906001600160a01b031681565b6040516001600160a01b03909116815260200161025e565b610254600f5481565b60085461032d906001600160a01b031681565b6102c661036f3660046124eb565b6107b6565b6102c66103823660046123ba565b610834565b610254600b5481565b6103a361039e3660046123e4565b6108ea565b60405161025e91906126e0565b61025460115481565b6102c66103c73660046124d2565b610a14565b610254600a5481565b61025460095481565b610254600e5481565b61027a6103f53660046124eb565b610a55565b6102c66104083660046121b2565b610a80565b610254600081565b6102c6610423366004612383565b610b89565b61025460105481565b61025461043f3660046121b2565b60066020526000908152604090205481565b6102c661045f3660046121cd565b610c60565b60125461032d906001600160a01b031681565b6102c66104853660046124d2565b610cdb565b6102c66104983660046123ba565b610d1c565b6102547f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102c66104d23660046124eb565b611132565b6102c66104e536600461230f565b611158565b6102c66104f83660046124d2565b611288565b61027a61050b3660046121cd565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6102c66105473660046122aa565b6112c9565b6102c661055a3660046124d2565b611350565b60075461032d906001600160a01b031681565b60006001600160a01b0383166105e35760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061060682611534565b6060600280546106269061299b565b80601f01602080910402602001604051908101604052809291908181526020018280546106529061299b565b801561069f5780601f106106745761010080835404028352916020019161069f565b820191906000526020600020905b81548152906001019060200180831161068257829003601f168201915b50505050509050919050565b60006106b78133611559565b60118290556040518281527f89d2eeecd98cd688cd6e8007421a8ad10425e20f674d77a76b7c1fde747c1560906020015b60405180910390a15050565b6001600160a01b0385163314806107105750610710853361050b565b6107775760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016105da565b61078485858585856115bd565b5050505050565b6000828152600360205260409020600101546107a78133611559565b6107b18383611759565b505050565b6001600160a01b03811633146108265760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105da565b61083082826117df565b5050565b60006108408133611559565b61084b600483611846565b156108685760405162461bcd60e51b81526004016105da906128b6565b6000600b541161088a5760405162461bcd60e51b81526004016105da9061277c565b6108a6838360016040518060200160405280600081525061185e565b6001600b60008282546108b99190612941565b925050819055506001600c60008282546108d3919061290a565b909155506108e4905060048361192e565b50505050565b6060815183511461094f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105da565b6000835167ffffffffffffffff81111561096b5761096b612a4a565b604051908082528060200260200182016040528015610994578160200160208202803683370190505b50905060005b8451811015610a0c576109df8582815181106109b8576109b8612a34565b60200260200101518583815181106109d2576109d2612a34565b6020026020010151610572565b8282815181106109f1576109f1612a34565b6020908102919091010152610a0581612a03565b905061099a565b509392505050565b6000610a208133611559565b600e8290556040518281527fb1c3fe1bc33e06477df816d42ac9d600e037c768df5fbd04b622391bdd9b451c906020016106e8565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a8c8133611559565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b158015610ace57600080fd5b505afa158015610ae2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b069190612548565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0384169063a9059cbb90604401602060405180830381600087803b158015610b5157600080fd5b505af1158015610b65573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e491906124b5565b336001600160a01b0383161415610bf45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016105da565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610c6c8133611559565b600780546001600160a01b038581166001600160a01b03199283168117909355600880549186169190921681179091556040805192835260208301919091527f1cbc7a9637cabbc21164f4e6f293a9e760d1f651ad2b0f5614dec80dd807d0bd910160405180910390a1505050565b6000610ce78133611559565b600f8290556040518281527f18c072bc98b0b73c93817369c5f408345da097127acc038ec75ad73c261c265a906020016106e8565b6012546001600160a01b03163314610d935760405162461bcd60e51b815260206004820152603460248201527f546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656460448201527308189e48199858dd1bdc9e4818dbdb9d1c9858dd60621b60648201526084016105da565b6010546007546040516370a0823160e01b81526001600160a01b038086166004830152859360009390929116906370a082319060240160206040518083038186803b158015610de157600080fd5b505afa158015610df5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e199190612548565b60085460405163210b7cb960e11b81526001600160a01b03868116600483015290911690634216f9729060240160206040518083038186803b158015610e5e57600080fd5b505afa158015610e72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e969190612548565b610ea0919061290a565b10610ead57506001610eb1565b5060005b600181151514610f185760405162461bcd60e51b815260206004820152602c60248201527f596f7520646f206e6f74206861766520656e6f7567682066756e647320696e2060448201526b1e5bdd5c881858d8dbdd5b9d60a21b60648201526084016105da565b610f23600484611846565b15610f405760405162461bcd60e51b81526004016105da906128b6565b6000600b5411610f625760405162461bcd60e51b81526004016105da9061277c565b42600e5411158015610f75575042600f54115b610fba5760405162461bcd60e51b815260206004820152601660248201527514d85b1948191a59081b9bdd081cdd185c9d081e595d60521b60448201526064016105da565b60095415610fd057610fcb8461193a565b611051565b6011546001600160a01b038516600090815260066020526040902054106110515760405162461bcd60e51b815260206004820152602f60248201527f796f752061726520657863656564696e6720746865206c696d6974206f66204e60448201526e465420796f752063616e206861766560881b60648201526084016105da565b61106d848460016040518060200160405280600081525061185e565b6001600160a01b038416600090815260066020526040812080546001929061109690849061290a565b925050819055506001600b60008282546110b09190612941565b925050819055506001600c60008282546110ca919061290a565b909155506110db905060048461192e565b5082846001600160a01b0316306001600160a01b03167f16dd16959a056953a63cf14bf427881e762e54f03d86b864efea8238dd3b822f60095460405161112491815260200190565b60405180910390a450505050565b60008281526003602052604090206001015461114e8133611559565b6107b183836117df565b60006111648133611559565b8251600b54116111865760405162461bcd60e51b81526004016105da9061277c565b60005b83518110156111ee576111bf8482815181106111a7576111a7612a34565b6020026020010151600461184690919063ffffffff16565b156111dc5760405162461bcd60e51b81526004016105da906128b6565b806111e681612a03565b915050611189565b5061120a84848460405180602001604052806000815250611b24565b8251600b600082825461121d9190612941565b90915550508251600c805460009061123690849061290a565b90915550600090505b83518110156107845761127584828151811061125d5761125d612a34565b6020026020010151600461192e90919063ffffffff16565b508061128081612a03565b91505061123f565b60006112948133611559565b60108290556040518281527fe0b1633b4f74ff8ed4714833a3146701452817bc4a2b7f98308b10839da3d957906020016106e8565b6001600160a01b0385163314806112e557506112e5853361050b565b6113435760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016105da565b6107848585858585611c6f565b600061135c8133611559565b60098290556040518281527f81bbac8c875911ace5c71dcb319bd0db9ed937a721adac2fcf764b59eb0981f0906020016106e8565b606060006113a0836002612922565b6113ab90600261290a565b67ffffffffffffffff8111156113c3576113c3612a4a565b6040519080825280601f01601f1916602001820160405280156113ed576020820181803683370190505b509050600360fc1b8160008151811061140857611408612a34565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061143757611437612a34565b60200101906001600160f81b031916908160001a905350600061145b846002612922565b61146690600161290a565b90505b60018111156114de576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061149a5761149a612a34565b1a60f81b8282815181106114b0576114b0612a34565b60200101906001600160f81b031916908160001a90535060049490941c936114d781612984565b9050611469565b50831561152d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105da565b9392505050565b60006001600160e01b03198216637965db0b60e01b1480610606575061060682611d8c565b6115638282610a55565b6108305761157b816001600160a01b03166014611391565b611586836020611391565b6040516020016115979291906125c8565b60408051601f198184030181529082905262461bcd60e51b82526105da91600401612721565b81518351146115de5760405162461bcd60e51b81526004016105da9061282d565b6001600160a01b0384166116045760405162461bcd60e51b81526004016105da9061279e565b3360005b84518110156116eb57600085828151811061162557611625612a34565b60200260200101519050600085838151811061164357611643612a34565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156116935760405162461bcd60e51b81526004016105da906127e3565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906116d090849061290a565b92505081905550505050806116e490612a03565b9050611608565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161173b9291906126f3565b60405180910390a4611751818787878787611ddc565b505050505050565b6117638282610a55565b6108305760008281526003602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561179b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6117e98282610a55565b156108305760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000818152600183016020526040812054151561152d565b6001600160a01b0384166118845760405162461bcd60e51b81526004016105da90612875565b3361189e8160008761189588611f47565b61078488611f47565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906118ce90849061290a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461078481600087878787611f92565b600061152d838361205c565b6008546040516375c7e97360e01b81526001600160a01b03838116600483015260009216906375c7e9739060240160206040518083038186803b15801561198057600080fd5b505afa158015611994573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b89190612548565b9050600954811015611a0c5760405162461bcd60e51b815260206004820152601f60248201527f596f7520646f206e6f74206861766520656e6f75676820706f696e747320210060448201526064016105da565b6008546009546040516367a09c2360e01b81526001600160a01b03858116600483015260248201929092529116906367a09c2390604401602060405180830381600087803b158015611a5d57600080fd5b505af1158015611a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9591906124b5565b611ae15760405162461bcd60e51b815260206004820152601860248201527f5061796d656e742077617320756e7375636365737366756c000000000000000060448201526064016105da565b600954604080516001600160a01b038516815260208101929092527ff2114d57b88c404287ba909c1d52f75395208c6b1a20716ae4b37c19435b29af91016106e8565b6001600160a01b038416611b4a5760405162461bcd60e51b81526004016105da90612875565b8151835114611b6b5760405162461bcd60e51b81526004016105da9061282d565b3360005b8451811015611c0757838181518110611b8a57611b8a612a34565b6020026020010151600080878481518110611ba757611ba7612a34565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611bef919061290a565b90915550819050611bff81612a03565b915050611b6f565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c589291906126f3565b60405180910390a461078481600087878787611ddc565b6001600160a01b038416611c955760405162461bcd60e51b81526004016105da9061279e565b33611ca581878761189588611f47565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015611ce65760405162461bcd60e51b81526004016105da906127e3565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611d2390849061290a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611d83828888888888611f92565b50505050505050565b60006001600160e01b03198216636cdb3d1360e11b1480611dbd57506001600160e01b031982166303a24d0760e21b145b8061060657506301ffc9a760e01b6001600160e01b0319831614610606565b6001600160a01b0384163b156117515760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611e20908990899088908890889060040161263d565b602060405180830381600087803b158015611e3a57600080fd5b505af1925050508015611e6a575060408051601f3d908101601f19168201909252611e679181019061252b565b60015b611f1757611e76612a60565b806308c379a01415611eb05750611e8b612a7c565b80611e965750611eb2565b8060405162461bcd60e51b81526004016105da9190612721565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105da565b6001600160e01b0319811663bc197c8160e01b14611d835760405162461bcd60e51b81526004016105da90612734565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611f8157611f81612a34565b602090810291909101015292915050565b6001600160a01b0384163b156117515760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611fd6908990899088908890889060040161269b565b602060405180830381600087803b158015611ff057600080fd5b505af1925050508015612020575060408051601f3d908101601f1916820190925261201d9181019061252b565b60015b61202c57611e76612a60565b6001600160e01b0319811663f23a6e6160e01b14611d835760405162461bcd60e51b81526004016105da90612734565b60008181526001830160205260408120546120a357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610606565b506000610606565b80356001600160a01b03811681146120c257600080fd5b919050565b600082601f8301126120d857600080fd5b813560206120e5826128e6565b6040516120f282826129d6565b8381528281019150858301600585901b8701840188101561211257600080fd5b60005b8581101561213157813584529284019290840190600101612115565b5090979650505050505050565b600082601f83011261214f57600080fd5b813567ffffffffffffffff81111561216957612169612a4a565b604051612180601f8301601f1916602001826129d6565b81815284602083860101111561219557600080fd5b816020850160208301376000918101602001919091529392505050565b6000602082840312156121c457600080fd5b61152d826120ab565b600080604083850312156121e057600080fd5b6121e9836120ab565b91506121f7602084016120ab565b90509250929050565b600080600080600060a0868803121561221857600080fd5b612221866120ab565b945061222f602087016120ab565b9350604086013567ffffffffffffffff8082111561224c57600080fd5b61225889838a016120c7565b9450606088013591508082111561226e57600080fd5b61227a89838a016120c7565b9350608088013591508082111561229057600080fd5b5061229d8882890161213e565b9150509295509295909350565b600080600080600060a086880312156122c257600080fd5b6122cb866120ab565b94506122d9602087016120ab565b93506040860135925060608601359150608086013567ffffffffffffffff81111561230357600080fd5b61229d8882890161213e565b60008060006060848603121561232457600080fd5b61232d846120ab565b9250602084013567ffffffffffffffff8082111561234a57600080fd5b612356878388016120c7565b9350604086013591508082111561236c57600080fd5b50612379868287016120c7565b9150509250925092565b6000806040838503121561239657600080fd5b61239f836120ab565b915060208301356123af81612b06565b809150509250929050565b600080604083850312156123cd57600080fd5b6123d6836120ab565b946020939093013593505050565b600080604083850312156123f757600080fd5b823567ffffffffffffffff8082111561240f57600080fd5b818501915085601f83011261242357600080fd5b81356020612430826128e6565b60405161243d82826129d6565b8381528281019150858301600585901b870184018b101561245d57600080fd5b600096505b8487101561248757612473816120ab565b835260019690960195918301918301612462565b509650508601359250508082111561249e57600080fd5b506124ab858286016120c7565b9150509250929050565b6000602082840312156124c757600080fd5b815161152d81612b06565b6000602082840312156124e457600080fd5b5035919050565b600080604083850312156124fe57600080fd5b823591506121f7602084016120ab565b60006020828403121561252057600080fd5b813561152d81612b17565b60006020828403121561253d57600080fd5b815161152d81612b17565b60006020828403121561255a57600080fd5b5051919050565b600081518084526020808501945080840160005b8381101561259157815187529582019590820190600101612575565b509495945050505050565b600081518084526125b4816020860160208601612958565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612600816017850160208801612958565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612631816028840160208801612958565b01602801949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061266990830186612561565b828103606084015261267b8186612561565b9050828103608084015261268f818561259c565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906126d59083018461259c565b979650505050505050565b60208152600061152d6020830184612561565b6040815260006127066040830185612561565b82810360208401526127188185612561565b95945050505050565b60208152600061152d602083018461259c565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526008908201526714dbdb190813dd5d60c21b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b602080825260169082015275151a1a5cc818d85c9908185b1c9958591e481cdbdb1960521b604082015260600190565b600067ffffffffffffffff82111561290057612900612a4a565b5060051b60200190565b6000821982111561291d5761291d612a1e565b500190565b600081600019048311821515161561293c5761293c612a1e565b500290565b60008282101561295357612953612a1e565b500390565b60005b8381101561297357818101518382015260200161295b565b838111156108e45750506000910152565b60008161299357612993612a1e565b506000190190565b600181811c908216806129af57607f821691505b602082108114156129d057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff811182821017156129fc576129fc612a4a565b6040525050565b6000600019821415612a1757612a17612a1e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115612a795760046000803e5060005160e01c5b90565b600060443d1015612a8a5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715612aba57505050505090565b8285019150815181811115612ad25750505050505090565b843d8701016020828501011115612aec5750505050505090565b612afb602082860101876129d6565b509095945050505050565b8015158114612b1457600080fd5b50565b6001600160e01b031981168114612b1457600080fdfea2646970667358221220ba2df73d85899c3ffa608cfe4f19d6256f870212516ffb103299f0e5c9666ca564736f6c63430008070033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.