Token

Overview ERC1155

Total Supply:
0 N/A

Holders:
1 addresses

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Item

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion
File 1 of 13 : Item.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

contract Item is ERC1155, Ownable {
    // Solidity's arithmetic operations with added overflow checks
    using SafeMath for uint256;

    // item types (IDs)
    uint256[] public types;

    // amount of items minted by their IDs
    uint256[] public minted;

    // amount of items can be minted by their IDs
    uint256[] public totalSupply;

    // price in USD (item's ID => price (in wei))
    uint256[] public pricesUSD;

    // cost of mayne transmuting items
    uint256 public transmuteFee;

    // sum of received transmute fees, it counts from the last withdrawal
    uint256 public transmuteFeeSum;

    // pause for everything
    bool public pausedAll;

    // minting can be paused for each type (item's ID => paused or not)
    mapping(uint256 => bool) paused;

    // items minted by players (address => item's ID => amount)
    mapping(address => mapping(uint256 => uint256)) public mintedByPlayer;

    // items used within the game by players (address => item's ID => amount)
    mapping(address => mapping(uint256 => uint256)) public usedByPlayer;

    // Chainlink Data Feeds
    AggregatorV3Interface internal priceFeed;

    // minted item's information
    event PlayerMinted(
        address player,
        uint256 id,
        uint256 amount,
        bool isTransmuting
    );

    // fires transmuting
    event PlayerTransmuted(
        address player,
        uint256 id,
        uint256 amount,
        uint256 slot
    );

    //-------------------------------------------------------------------------
    // CONSTRUCTOR ////////////////////////////////////////////////////////////
    //-------------------------------------------------------------------------

    constructor()
        ERC1155("https://empireofsight.com/metadata/items/{id}.json")
    {
        priceFeed = AggregatorV3Interface(
            0x0A77230d17318075983913bC2145DB16C7366156
        );
        pausedAll = true;

        transmuteFee = 0;
        transmuteFeeSum = 0;

        // adding the first 5 item
        for (uint256 i = 0; i < 5; i++) {
            types.push(i);
            totalSupply.push(1000);
            minted.push(0);
            pricesUSD.push(999 * 10**16);
        }
    }

    //-------------------------------------------------------------------------
    // VIEW FUNCTIONS /////////////////////////////////////////////////////////
    //-------------------------------------------------------------------------

    // returns with the length of type array (contains all the IDs)
    function getLengthTypes() public view returns (uint256) {
        return types.length;
    }

    // returns the latest price
    function getLatestPrice() public view returns (int256) {
        (, int256 price, , , ) = priceFeed.latestRoundData();
        return price;
    }

    // converts the USD value into the blockchain's native currency
    function getItemsNativePrice(uint256 id, uint256 amount)
        public
        view
        returns (uint256)
    {
        require(id <= types.length, "this type of item doesn't exist");
        require(amount > 0, "amount must be at least 1");

        return
            pricesUSD[id].div(uint256(getLatestPrice())).mul(10**8).mul(amount);
    }

    //-------------------------------------------------------------------------
    // SET FUNCTIONS //////////////////////////////////////////////////////////
    //-------------------------------------------------------------------------

    // sets a new URI for all token types
    function setURI(string memory newuri) public onlyOwner {
        _setURI(newuri);
    }

    // pauses minting for a specific item
    function setPause(uint256 id, bool paused_) public onlyOwner {
        require(id <= getLengthTypes(), "this type of item doesn't exist");

        paused[id] = paused_;
    }

    // pauses minting for all items
    function setPausedAll() public onlyOwner {
        pausedAll = !pausedAll;
    }

    // sets the price of item by IDs
    // input price must be in wei
    function setPriceUSD(uint256 id, uint256 price) public onlyOwner {
        require(id <= getLengthTypes(), "this type of item doesn't exist");

        pricesUSD[id] = price;
    }

    // sets the fee of mayne transmuting
    // input fee must be in wei
    function setTransmuteFee(uint256 fee) public onlyOwner {
        transmuteFee = fee;
    }

    // sets the total supply of a specific item
    function setItemsTotalSupply(uint256 id, uint256 totalSupply_)
        external
        onlyOwner
    {
        require(id <= getLengthTypes(), "item doesn't exist");

        totalSupply[id] = totalSupply_;
    }

    //-------------------------------------------------------------------------
    // USER FUNCTIONS /////////////////////////////////////////////////////////
    //-------------------------------------------------------------------------

    // mints items by IDs
    function mint(uint256 id, uint256 amount) public payable {
        require(id <= getLengthTypes(), "this type of item doesn't exist");
        require(
            msg.value >= getItemsNativePrice(id, amount),
            "the sent value is not enough"
        );
        require(pausedAll == false, "minting is paused for all items");
        require(paused[id] == false, "minting is paused for the item");
        require(
            minted[id] + amount <= totalSupply[id],
            "amount exceeds the total supply"
        );
        require(msg.sender != address(0), "sender can't be null address");

        _mint(msg.sender, id, amount, "");
        minted[id] += amount;
        mintedByPlayer[msg.sender][id] += amount;

        emit PlayerMinted(msg.sender, id, amount, false);
    }

    // takes fee if any then fires the transmuting mechanism
    function mayneTransmute(
        uint256 id,
        uint256 amount,
        uint256 slot
    ) public payable {
        require(id <= getLengthTypes(), "this type of item doesn't exist");
        require(
            msg.value >= transmuteFee.mul(amount),
            "the sent value is not enough"
        );
        require(msg.sender != address(0), "sender can't be null address");

        transmuteFeeSum += transmuteFee.mul(amount);

        emit PlayerTransmuted(msg.sender, id, amount, slot);
    }

    //-------------------------------------------------------------------------
    // ADMIN FUNCTIONS ////////////////////////////////////////////////////////
    //-------------------------------------------------------------------------

    // input price must be in wei
    function addItem(uint256 totalSupply_, uint256 priceUSD)
        external
        onlyOwner
    {
        uint256 id = getLengthTypes();
        types.push(id);
        totalSupply.push(totalSupply_);
        pricesUSD.push(priceUSD);
        minted.push(0);
        paused[id] = false;
    }

    // mints items by IDs for specific players
    function mintAdmin(
        uint256 id,
        uint256 amount,
        address player,
        bool isTransmuting
    ) public onlyOwner {
        require(id < getLengthTypes(), "this type of item doesn't exist");
        require(
            minted[id] + amount <= totalSupply[id],
            "amount exceeds the total supply"
        );
        require(amount > 0, "amount must be at least 1");
        require(player != address(0), "player can't be null address");

        _mint(player, id, amount, "");
        minted[id] += amount;
        mintedByPlayer[player][id] += amount;

        emit PlayerMinted(player, id, amount, isTransmuting);
    }

    // withdraws all the balance of the contract to the dev & founder addresses
    function withdraw() external {
        require(address(this).balance > 0, "balance can't be zero");

        address founderOne = payable(
            0xfE38200d6206fcf177c8C2A25300FeeC3E3803F3
        );
        address founderTwo = payable(
            0x4ee757CfEBA27580BA587f8AE81f5BA63Bdd021d
        );
        address dev = payable(0x72a2547dcd6D114bA605Ad5C18756FD7aEAc467D);

        uint256 balanceOne = address(this).balance.mul(4).div(10);
        uint256 balanceTwo = address(this).balance.mul(4).div(10);
        uint256 balanceDev = address(this).balance.mul(2).div(10);

        payable(founderOne).transfer(balanceOne);
        payable(founderTwo).transfer(balanceTwo);
        payable(dev).transfer(balanceDev);

        transmuteFeeSum = 0;
    }
}

File 2 of 13 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

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 {
        _setApprovalForAll(_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();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, 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);

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

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

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

        _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 `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

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

        _doSafeTransferAcceptanceCheck(operator, address(0), to, 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);

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

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

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

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

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

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

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

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

        address operator = _msgSender();

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

        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: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

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

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

    /**
     * @dev Hook that is called after 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 _afterTokenTransfer(
        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.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.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 3 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

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 generally not needed starting with Solidity 0.8, since 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 subtraction 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 5 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 6 of 13 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 7 of 13 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

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 8 of 13 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

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.
     *
     * NOTE: 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.
     *
     * NOTE: 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 9 of 13 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

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 10 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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 11 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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 12 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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 13 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isTransmuting","type":"bool"}],"name":"PlayerMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"slot","type":"uint256"}],"name":"PlayerTransmuted","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":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"uint256","name":"priceUSD","type":"uint256"}],"name":"addItem","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getItemsNativePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLengthTypes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"slot","type":"uint256"}],"name":"mayneTransmute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"player","type":"address"},{"internalType":"bool","name":"isTransmuting","type":"bool"}],"name":"mintAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedByPlayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pausedAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pricesUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"id","type":"uint256"},{"internalType":"uint256","name":"totalSupply_","type":"uint256"}],"name":"setItemsTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bool","name":"paused_","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setPausedAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceUSD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setTransmuteFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transmuteFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transmuteFeeSum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"types","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"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedByPlayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051806060016040528060328152602001620035e260329139620000378162000178565b5062000043336200018a565b600e80546001600160a01b031916730a77230d17318075983913bc2145db16c7366156179055600a805460ff191660011790556000600881905560098190555b600581101562000171576004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01829055600680548083019091556103e87ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f909101556005805480830190915560007f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09091018190556007805492830181559052678aa39c121a2700007fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68890910155806200016881620001dc565b91505062000083565b5062000375565b6002620001868282620002a9565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060018201620001fd57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200022f57607f821691505b6020821081036200025057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002a457600081815260208120601f850160051c810160208610156200027f5750805b601f850160051c820191505b81811015620002a0578281556001016200028b565b5050505b505050565b81516001600160401b03811115620002c557620002c562000204565b620002dd81620002d684546200021a565b8462000256565b602080601f831160018114620003155760008415620002fc5750858301515b600019600386901b1c1916600185901b178555620002a0565b600085815260208120601f198616915b82811015620003465788860151825594840194600190910190840162000325565b5085821015620003655787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61325d80620003856000396000f3fe6080604052600436106102185760003560e01c80637dc0bf3f1161011d578063b5a09409116100b0578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b1461063f578063f31c5b081461065f578063ff4648ff1461067257600080fd5b8063e985e9c5146105d6578063f242432a1461061f57600080fd5b8063b5a0940914610561578063bd6f1a1414610581578063bd85b03914610596578063cefbfa36146105b657600080fd5b80639780034b116100ec5780639780034b146104cf5780639be6390e14610507578063a212523214610521578063a22cb4651461054157600080fd5b80637dc0bf3f1461045c57806385076eec1461047c5780638da5cb5b146104925780638e15f473146104ba57600080fd5b80632eb2c2d6116101b05780634e1273f41161017f57806367d2be6f1161016457806367d2be6f146103ef57806367e743fb14610427578063715018a61461044757600080fd5b80634e1273f4146103a25780636246e4a1146103cf57600080fd5b80632eb2c2d61461032d57806336ff0dff1461034d5780633ccfd60b1461036d5780633ea50e091461038257600080fd5b80630f0aa83d116101ec5780630f0aa83d146102cf5780631b2ef1ca146102e557806321047894146102f85780632e2536811461030d57600080fd5b8062fdd58e1461021d57806301ffc9a71461025057806302fe5305146102805780630e89341c146102a2575b600080fd5b34801561022957600080fd5b5061023d610238366004612738565b610692565b6040519081526020015b60405180910390f35b34801561025c57600080fd5b5061027061026b366004612790565b61073b565b6040519015158152602001610247565b34801561028c57600080fd5b506102a061029b366004612867565b610820565b005b3480156102ae57600080fd5b506102c26102bd3660046128b8565b610886565b604051610247919061291e565b3480156102db57600080fd5b5061023d60095481565b6102a06102f3366004612931565b61091a565b34801561030457600080fd5b5060045461023d565b34801561031957600080fd5b506102a0610328366004612963565b610c21565b34801561033957600080fd5b506102a0610348366004612a44565b610d0b565b34801561035957600080fd5b506102a0610368366004612aee565b610dad565b34801561037957600080fd5b506102a0611070565b34801561038e57600080fd5b506102a061039d366004612931565b6111f4565b3480156103ae57600080fd5b506103c26103bd366004612b34565b6112c4565b6040516102479190612c3a565b3480156103db57600080fd5b506102a06103ea3660046128b8565b611402565b3480156103fb57600080fd5b5061023d61040a366004612738565b600d60209081526000928352604080842090915290825290205481565b34801561043357600080fd5b506102a0610442366004612931565b611461565b34801561045357600080fd5b506102a0611521565b34801561046857600080fd5b5061023d6104773660046128b8565b611587565b34801561048857600080fd5b5061023d60085481565b34801561049e57600080fd5b506003546040516001600160a01b039091168152602001610247565b3480156104c657600080fd5b5061023d6115a8565b3480156104db57600080fd5b5061023d6104ea366004612738565b600c60209081526000928352604080842090915290825290205481565b34801561051357600080fd5b50600a546102709060ff1681565b34801561052d57600080fd5b506102a061053c366004612931565b61162d565b34801561054d57600080fd5b506102a061055c366004612c4d565b611789565b34801561056d57600080fd5b5061023d61057c366004612931565b611798565b34801561058d57600080fd5b506102a061188d565b3480156105a257600080fd5b5061023d6105b13660046128b8565b611919565b3480156105c257600080fd5b5061023d6105d13660046128b8565b611929565b3480156105e257600080fd5b506102706105f1366004612c77565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561062b57600080fd5b506102a061063a366004612ca1565b611939565b34801561064b57600080fd5b506102a061065a366004612d06565b6119d4565b6102a061066d366004612d21565b611ab3565b34801561067e57600080fd5b5061023d61068d3660046128b8565b611c1e565b60006001600160a01b0383166107155760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a260000000000000000000000000000000000000000000000000000000014806107ce57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b8061081a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6003546001600160a01b0316331461087a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b61088381611c2e565b50565b60606002805461089590612d4d565b80601f01602080910402602001604051908101604052809291908181526020018280546108c190612d4d565b801561090e5780601f106108e35761010080835404028352916020019161090e565b820191906000526020600020905b8154815290600101906020018083116108f157829003601f168201915b50505050509050919050565b60045482111561096c5760405162461bcd60e51b815260206004820152601f60248201527f746869732074797065206f66206974656d20646f65736e277420657869737400604482015260640161070c565b6109768282611798565b3410156109c55760405162461bcd60e51b815260206004820152601c60248201527f7468652073656e742076616c7565206973206e6f7420656e6f75676800000000604482015260640161070c565b600a5460ff1615610a185760405162461bcd60e51b815260206004820152601f60248201527f6d696e74696e672069732070617573656420666f7220616c6c206974656d7300604482015260640161070c565b6000828152600b602052604090205460ff1615610a775760405162461bcd60e51b815260206004820152601e60248201527f6d696e74696e672069732070617573656420666f7220746865206974656d0000604482015260640161070c565b60068281548110610a8a57610a8a612da0565b90600052602060002001548160058481548110610aa957610aa9612da0565b9060005260206000200154610abe9190612dfe565b1115610b0c5760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e7420657863656564732074686520746f74616c20737570706c7900604482015260640161070c565b33610b595760405162461bcd60e51b815260206004820152601c60248201527f73656e6465722063616e2774206265206e756c6c206164647265737300000000604482015260640161070c565b610b7433838360405180602001604052806000815250611c3a565b8060058381548110610b8857610b88612da0565b906000526020600020016000828254610ba19190612dfe565b9091555050336000908152600c6020908152604080832085845290915281208054839290610bd0908490612dfe565b90915550506040805133815260208101849052908101829052600060608201527f033cf6bd9bcd4fd62eb9779323835700fa93d033c8fad9fa4777a705fc6d4ac99060800160405180910390a15050565b6003546001600160a01b03163314610c7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b600454821115610ccd5760405162461bcd60e51b815260206004820152601f60248201527f746869732074797065206f66206974656d20646f65736e277420657869737400604482015260640161070c565b6000918252600b602052604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6001600160a01b038516331480610d275750610d2785336105f1565b610d995760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f7665640000000000000000000000000000606482015260840161070c565b610da68585858585611d6a565b5050505050565b6003546001600160a01b03163314610e075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b6004548410610e585760405162461bcd60e51b815260206004820152601f60248201527f746869732074797065206f66206974656d20646f65736e277420657869737400604482015260640161070c565b60068481548110610e6b57610e6b612da0565b90600052602060002001548360058681548110610e8a57610e8a612da0565b9060005260206000200154610e9f9190612dfe565b1115610eed5760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e7420657863656564732074686520746f74616c20737570706c7900604482015260640161070c565b60008311610f3d5760405162461bcd60e51b815260206004820152601960248201527f616d6f756e74206d757374206265206174206c65617374203100000000000000604482015260640161070c565b6001600160a01b038216610f935760405162461bcd60e51b815260206004820152601c60248201527f706c617965722063616e2774206265206e756c6c206164647265737300000000604482015260640161070c565b610fae82858560405180602001604052806000815250611c3a565b8260058581548110610fc257610fc2612da0565b906000526020600020016000828254610fdb9190612dfe565b90915550506001600160a01b0382166000908152600c6020908152604080832087845290915281208054859290611013908490612dfe565b9091555050604080516001600160a01b03841681526020810186905290810184905281151560608201527f033cf6bd9bcd4fd62eb9779323835700fa93d033c8fad9fa4777a705fc6d4ac99060800160405180910390a150505050565b600047116110c05760405162461bcd60e51b815260206004820152601560248201527f62616c616e63652063616e2774206265207a65726f0000000000000000000000604482015260640161070c565b73fe38200d6206fcf177c8c2a25300feec3e3803f3734ee757cfeba27580ba587f8ae81f5ba63bdd021d7372a2547dcd6d114ba605ad5c18756fd7aeac467d6000611117600a611111476004612008565b90612014565b9050600061112b600a611111476004612008565b9050600061113f600a611111476002612008565b6040519091506001600160a01b0387169084156108fc029085906000818181858888f19350505050158015611178573d6000803e3d6000fd5b506040516001600160a01b0386169083156108fc029084906000818181858888f193505050501580156111af573d6000803e3d6000fd5b506040516001600160a01b0385169082156108fc029083906000818181858888f193505050501580156111e6573d6000803e3d6000fd5b505060006009555050505050565b6003546001600160a01b0316331461124e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b6004548211156112a05760405162461bcd60e51b815260206004820152601f60248201527f746869732074797065206f66206974656d20646f65736e277420657869737400604482015260640161070c565b80600783815481106112b4576112b4612da0565b6000918252602090912001555050565b6060815183511461133d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d617463680000000000000000000000000000000000000000000000606482015260840161070c565b6000835167ffffffffffffffff811115611359576113596127ad565b604051908082528060200260200182016040528015611382578160200160208202803683370190505b50905060005b84518110156113fa576113cd8582815181106113a6576113a6612da0565b60200260200101518583815181106113c0576113c0612da0565b6020026020010151610692565b8282815181106113df576113df612da0565b60209081029190910101526113f381612e16565b9050611388565b509392505050565b6003546001600160a01b0316331461145c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b600855565b6003546001600160a01b031633146114bb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b60045482111561150d5760405162461bcd60e51b815260206004820152601260248201527f6974656d20646f65736e27742065786973740000000000000000000000000000604482015260640161070c565b80600683815481106112b4576112b4612da0565b6003546001600160a01b0316331461157b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b6115856000612020565b565b6005818154811061159757600080fd5b600091825260209091200154905081565b600080600e60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156115fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116229190612e68565b509195945050505050565b6003546001600160a01b031633146116875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b600061169260045490565b6004805460018181019092557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b01829055600680548083019091557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0194909455600780548086019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68801929092555060058054928301905560007f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09092018290558152600b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b61179433838361208a565b5050565b6004546000908311156117ed5760405162461bcd60e51b815260206004820152601f60248201527f746869732074797065206f66206974656d20646f65736e277420657869737400604482015260640161070c565b6000821161183d5760405162461bcd60e51b815260206004820152601960248201527f616d6f756e74206d757374206265206174206c65617374203100000000000000604482015260640161070c565b611886826118806305f5e1006118806118546115a8565b6007898154811061186757611867612da0565b906000526020600020015461201490919063ffffffff16565b90612008565b9392505050565b6003546001600160a01b031633146118e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b600a80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b6006818154811061159757600080fd5b6004818154811061159757600080fd5b6001600160a01b038516331480611955575061195585336105f1565b6119c75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f7665640000000000000000000000000000000000000000000000606482015260840161070c565b610da6858585858561219c565b6003546001600160a01b03163314611a2e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161070c565b6001600160a01b038116611aaa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161070c565b61088381612020565b600454831115611b055760405162461bcd60e51b815260206004820152601f60248201527f746869732074797065206f66206974656d20646f65736e277420657869737400604482015260640161070c565b600854611b129083612008565b341015611b615760405162461bcd60e51b815260206004820152601c60248201527f7468652073656e742076616c7565206973206e6f7420656e6f75676800000000604482015260640161070c565b33611bae5760405162461bcd60e51b815260206004820152601c60248201527f73656e6465722063616e2774206265206e756c6c206164647265737300000000604482015260640161070c565b600854611bbb9083612008565b60096000828254611bcc9190612dfe565b90915550506040805133815260208101859052908101839052606081018290527fb9d6148d2351b6f2286572ec1079fd343e24f846c5a018843eb95afbc5ea4db19060800160405180910390a1505050565b6007818154811061159757600080fd5b60026117948282612f03565b6001600160a01b038416611cb65760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161070c565b336000611cc285612372565b90506000611ccf85612372565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290611d01908490612dfe565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611d61836000898989896123bd565b50505050505050565b8151835114611de15760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d61746368000000000000000000000000000000000000000000000000606482015260840161070c565b6001600160a01b038416611e5d5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161070c565b3360005b8451811015611f9a576000858281518110611e7e57611e7e612da0565b602002602001015190506000858381518110611e9c57611e9c612da0565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611f425760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e7366657200000000000000000000000000000000000000000000606482015260840161070c565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611f7f908490612dfe565b9250508190555050505080611f9390612e16565b9050611e61565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611fea929190612fff565b60405180910390a46120008187878787876125c1565b505050505050565b6000611886828461302d565b6000611886828461306a565b600380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036121115760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c660000000000000000000000000000000000000000000000606482015260840161070c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166122185760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161070c565b33600061222485612372565b9050600061223185612372565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156122ca5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e7366657200000000000000000000000000000000000000000000606482015260840161070c565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612307908490612dfe565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612367848a8a8a8a8a6123bd565b505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106123ac576123ac612da0565b602090810291909101015292915050565b6001600160a01b0384163b15612000576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e619061241a90899089908890889088906004016130a5565b6020604051808303816000875af1925050508015612455575060408051601f3d908101601f19168201909252612452918101906130e8565b60015b61250a57612461613105565b806308c379a00361249a5750612475613121565b80612480575061249c565b8060405162461bcd60e51b815260040161070c919061291e565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e746572000000000000000000000000606482015260840161070c565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e610000000000000000000000000000000000000000000000000000000014611d615760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e73000000000000000000000000000000000000000000000000606482015260840161070c565b6001600160a01b0384163b15612000576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c819061261e90899089908890889088906004016131c9565b6020604051808303816000875af1925050508015612659575060408051601f3d908101601f19168201909252612656918101906130e8565b60015b61266557612461613105565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c810000000000000000000000000000000000000000000000000000000014611d615760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e73000000000000000000000000000000000000000000000000606482015260840161070c565b80356001600160a01b038116811461273357600080fd5b919050565b6000806040838503121561274b57600080fd5b6127548361271c565b946020939093013593505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461088357600080fd5b6000602082840312156127a257600080fd5b813561188681612762565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715612802576128026127ad565b6040525050565b600067ffffffffffffffff831115612823576128236127ad565b60405161283a6020601f19601f87011601826127dc565b80915083815284848401111561284f57600080fd5b83836020830137600060208583010152509392505050565b60006020828403121561287957600080fd5b813567ffffffffffffffff81111561289057600080fd5b8201601f810184136128a157600080fd5b6128b084823560208401612809565b949350505050565b6000602082840312156128ca57600080fd5b5035919050565b6000815180845260005b818110156128f7576020818501810151868301820152016128db565b81811115612909576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061188660208301846128d1565b6000806040838503121561294457600080fd5b50508035926020909101359150565b8035801515811461273357600080fd5b6000806040838503121561297657600080fd5b8235915061298660208401612953565b90509250929050565b600067ffffffffffffffff8211156129a9576129a96127ad565b5060051b60200190565b600082601f8301126129c457600080fd5b813560206129d18261298f565b6040516129de82826127dc565b83815260059390931b85018201928281019150868411156129fe57600080fd5b8286015b84811015612a195780358352918301918301612a02565b509695505050505050565b600082601f830112612a3557600080fd5b61188683833560208501612809565b600080600080600060a08688031215612a5c57600080fd5b612a658661271c565b9450612a736020870161271c565b9350604086013567ffffffffffffffff80821115612a9057600080fd5b612a9c89838a016129b3565b94506060880135915080821115612ab257600080fd5b612abe89838a016129b3565b93506080880135915080821115612ad457600080fd5b50612ae188828901612a24565b9150509295509295909350565b60008060008060808587031215612b0457600080fd5b8435935060208501359250612b1b6040860161271c565b9150612b2960608601612953565b905092959194509250565b60008060408385031215612b4757600080fd5b823567ffffffffffffffff80821115612b5f57600080fd5b818501915085601f830112612b7357600080fd5b81356020612b808261298f565b604051612b8d82826127dc565b83815260059390931b8501820192828101915089841115612bad57600080fd5b948201945b83861015612bd257612bc38661271c565b82529482019490820190612bb2565b96505086013592505080821115612be857600080fd5b50612bf5858286016129b3565b9150509250929050565b600081518084526020808501945080840160005b83811015612c2f57815187529582019590820190600101612c13565b509495945050505050565b6020815260006118866020830184612bff565b60008060408385031215612c6057600080fd5b612c698361271c565b915061298660208401612953565b60008060408385031215612c8a57600080fd5b612c938361271c565b91506129866020840161271c565b600080600080600060a08688031215612cb957600080fd5b612cc28661271c565b9450612cd06020870161271c565b93506040860135925060608601359150608086013567ffffffffffffffff811115612cfa57600080fd5b612ae188828901612a24565b600060208284031215612d1857600080fd5b6118868261271c565b600080600060608486031215612d3657600080fd5b505081359360208301359350604090920135919050565b600181811c90821680612d6157607f821691505b602082108103612d9a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612e1157612e11612dcf565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612e4757612e47612dcf565b5060010190565b805169ffffffffffffffffffff8116811461273357600080fd5b600080600080600060a08688031215612e8057600080fd5b612e8986612e4e565b9450602086015193506040860151925060608601519150612eac60808701612e4e565b90509295509295909350565b601f821115612efe57600081815260208120601f850160051c81016020861015612edf5750805b601f850160051c820191505b8181101561200057828155600101612eeb565b505050565b815167ffffffffffffffff811115612f1d57612f1d6127ad565b612f3181612f2b8454612d4d565b84612eb8565b602080601f831160018114612f845760008415612f4e5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612000565b600085815260208120601f198616915b82811015612fb357888601518255948401946001909101908401612f94565b5085821015612fef57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6040815260006130126040830185612bff565b82810360208401526130248185612bff565b95945050505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561306557613065612dcf565b500290565b6000826130a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a060808301526130dd60a08301846128d1565b979650505050505050565b6000602082840312156130fa57600080fd5b815161188681612762565b600060033d111561311e5760046000803e5060005160e01c5b90565b600060443d101561312f5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561317d57505050505090565b82850191508151818111156131955750505050505090565b843d87010160208285010111156131af5750505050505090565b6131be602082860101876127dc565b509095945050505050565b60006001600160a01b03808816835280871660208401525060a060408301526131f560a0830186612bff565b82810360608401526132078186612bff565b9050828103608084015261321b81856128d1565b9897505050505050505056fea26469706673582212202cc7584937c84ac5269cd417d06ea2e90219c53d546c78e07ba2b45b57937cce64736f6c634300080f003368747470733a2f2f656d706972656f6673696768742e636f6d2f6d657461646174612f6974656d732f7b69647d2e6a736f6e

Loading