Contract 0xA9218C6d51b87EB3ee74E14Cb5D50BDE00Be7021 7

 
Txn Hash Method
Block
From
To
Value
0x307ac16485fcbfd20bc12152a9e6b86280e0538428868deb85c851965269d83bMint Collection1101911632023-09-29 9:51:431 day 5 hrs ago0x4a607a77722d81dbdbae167b48b3655bd50f75f7 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000249811140.04275813
0xae9cefc86d5f95b17fe4fb95a86837a4e56f80e4ef3121ea3aaa99d6a11ceb36Mint Collection1099924392023-09-24 19:27:355 days 20 hrs ago0x6f277a0c36184ad4d1c26fdf8c97637c38733b29 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000522164520.143814934
0xe698967bb2adc0ae33d6c017d1fa51c7dfc6a82534a6eb4e4967b72706d0fb2bMint Collection1096922622023-09-17 20:41:4112 days 19 hrs ago0x63797dd015834014471a92326ec931444e702571 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0001486360620.481821572
0xa4b9193e22a0f145d619baaebf39651ee804fad9396cffe2764b28d3a943ca6aMint Collection1096557352023-09-17 0:24:0713 days 15 hrs ago0x7bfee91193d9df2ac0bfe90191d40f23c773c060 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000685470250.2263543
0xc09845ed245c710d825e4a7965aaffb13d13ecdd5b7c7d5b054343625b7e6e63Mint Collection1095456272023-09-14 11:13:5116 days 4 hrs ago0x4a607a77722d81dbdbae167b48b3655bd50f75f7 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.000014234350.000000091
0xaff58c99fe29363872013650d24ca5838b047ef246317eabbb948d163c929838Mint Collection1093400522023-09-09 17:01:2120 days 22 hrs ago0x16d5b231dc27ed5a2b0b80ec4e188314c49b1698 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000138031660.000000093
0x0ed4eb45646278a2bf665bce0b462995393bd70e6e68fdd7760bcf285f2b4516Mint Collection1093400362023-09-09 17:00:4920 days 22 hrs ago0x16d5b231dc27ed5a2b0b80ec4e188314c49b1698 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000151225010.000970057
0xf4ca7b70ed3b61cf38ab2cacc1774e0b5a7e96ff7397845cd50a54e00157bea6Mint Collection1092552602023-09-07 17:54:5722 days 21 hrs ago0x09fa38eba245bb68354b8950fa2fe71f02863393 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000275560680.0004865
0x25181818b534c607c17b1e006625862b217b580a3ddabd0146b982c65008f821Mint Collection1089487732023-08-31 15:38:4330 days 4 mins ago0xbd48855db52b9d0b5ea728e75fb20b74297ac70e IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000491264380.000009713
0x13aecd4e1fdbb7883be3e28d0733ffed580be04a276145647552c1df9896cd7eMint Collection1089337982023-08-31 7:19:3330 days 8 hrs ago0x1140321cce279b4a2158571eb377669def562ac4 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000207288220.000000093
0x0fdbc8399394041ce0a57923f85b00ea2929aa1b17c8225265951cce81214f91Mint Collection1089337872023-08-31 7:19:1130 days 8 hrs ago0x1140321cce279b4a2158571eb377669def562ac4 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000204639680.000000091
0x1481665505413be347fd8fa98652757f4f5eb59abcff4295a679877b19cde91aMint Collection1089166962023-08-30 21:49:2930 days 17 hrs ago0x4be80a823e619ef57a61cc19b6bfb72974df0604 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000277142020.000236055
0x344d7fb716634feeac5fdb5438439c275b562872a6c9a9976d06f2c04f99c2c7Mint Collection1089166702023-08-30 21:48:3730 days 17 hrs ago0x4be80a823e619ef57a61cc19b6bfb72974df0604 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000280709540.000266891
0x78b5bb93b3ef6f76a5eb154ca68a35d7235a04fe940fe845915c57d48ee8484bMint Collection1089023552023-08-30 13:51:2731 days 1 hr ago0xf5f61157f3c13e4bbc5c42e75ae80946b72de83f IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000370164930.0006735
0x190e40cb65417784e6a86d5db0589aafa0651c4313a9f6f149d047880c89edf5Mint Collection1089023502023-08-30 13:51:1731 days 1 hr ago0xf5f61157f3c13e4bbc5c42e75ae80946b72de83f IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000355399520.0006735
0xd9d2818d60f28db769f059392498ad40155bcad33253fbb5c4dd41975e272f90Mint Collection1088839892023-08-30 3:39:1531 days 12 hrs ago0x4ffaa20f217d5117b57fd6ff0e70e069029f5553 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000241300710.000000998
0x4a07e7a8861718db8ccf3ed1463e01446ffed31a848a65bcca75e83d0ed2c261Mint Collection1088839852023-08-30 3:39:0731 days 12 hrs ago0x4ffaa20f217d5117b57fd6ff0e70e069029f5553 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000242976530.000000999
0x059d830d9e30302e3dd60f886b512c6e5e690dddcd7a2bd59f10a0fe314d061fMint Item1088637342023-08-29 16:24:0531 days 23 hrs ago0x85d72c6922479ba67bf85f11cc1e3e21d6074bd8 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0001100488830.213800289
0xad6b29d2d14e92de13ce61eba1af72bab162f3d161a3359a646cf663ae2b92deMint Collection1088618512023-08-29 15:21:1932 days 21 mins ago0xcfb331ade6d66ad1cb6765a2dd51ad3aa9a1400e IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0001957596420.2624322
0x05c833b787c12a57714b985946408c9ac48c12a3652101bce2b091278fb34c1eMint Collection1088618392023-08-29 15:20:5532 days 22 mins ago0xcfb331ade6d66ad1cb6765a2dd51ad3aa9a1400e IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0001835234680.198686941
0x3c90a42069fc4aefad605b465fbb21ae55063598190e9479dd5b2b51d8f01dfeMint Collection1088209702023-08-28 16:38:3732 days 23 hrs ago0x23a881e335a116e8edf04ad2c254ed10ce489abf IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000765490940.095296557
0x49044cde5d62c528b7313e67a06694b3af03269783c6f70f23e886102a449bd7Mint Collection1088209582023-08-28 16:38:1332 days 23 hrs ago0x23a881e335a116e8edf04ad2c254ed10ce489abf IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000747791880.097798442
0xbdcf2e8d1f950a39f4a437c6f0bd92367f6c736ab9a3f51a9d7d065bfbd59526Mint Collection1088146812023-08-28 13:08:5933 days 2 hrs ago0xb15521a8eb7072fcf9908aa07757bcd9eca6d6eb IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000701937220.088418783
0xed2720dce65acc5f28d83f15721b491ea636ac06d262e5107cd40e8174004d3bTransfer Ownersh...1088146342023-08-28 13:07:2533 days 2 hrs ago0x088cda4c48750442548ab476af5eea7135394063 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000584714850.088397309
0xdce9fcc7a9f5210de0eab72f952f2ea0620ff77dcc4761859babf86e501731eaUpdate Whitelist...1088143202023-08-28 12:56:5733 days 2 hrs ago0x088cda4c48750442548ab476af5eea7135394063 IN  0xa9218c6d51b87eb3ee74e14cb5d50bde00be70210 ETH0.0000869972790.082397353
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xf9bd6b64c34cb14ba2b4ffdeec5574400a66a644cc18ee2640e9d933d6d1fee51075378182023-07-29 23:46:5362 days 15 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x5e76fb92af36606f53a65cc0f27d587aa14f0d584693184d4d016a978e4ec0021075378152023-07-29 23:46:4762 days 15 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0xd2c689c3894ad91de76560703e7ef710096c586b400ba5525a97784aa01344171075378122023-07-29 23:46:4162 days 15 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x2cb878611de42114ec70651c6545cc3cf153dedd7bd74df35125fdc47e4f7ff81071487692023-07-20 23:38:3571 days 16 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x678b9ff9b3211a16d87515679d00900f5315bd861125867273c8c3ef3d4aafe91070772172023-07-19 7:53:3173 days 7 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0xa223164da199d29826dfcdbabb5e906c7b3446aa7b8ba05abc0b5e375b809c9d1070757022023-07-19 7:03:0173 days 8 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x9b81f393a69cb6b4cca437eb0d257c0c5d987613530bde731343cd2919a1aedc1069488592023-07-16 8:34:5576 days 7 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x9122ef887a67909ee2de3758513bb270f10b710d1e694a515fb3118d8f00970c1068827982023-07-14 19:52:5377 days 19 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x796b21fdf3c1af74b9be5e52fb1d278a832ffe35dd9887afb9354baa4e7e93c81068827892023-07-14 19:52:3577 days 19 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x05b60492d6322ff510a434ccca97766b679dc0045ddb60e9b67f7001aacc5a301068827782023-07-14 19:52:1377 days 19 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0xe7e48ae80d773c4a3bccff8cea126c7426659e7cdce99908bdcb8e670073d3111068709452023-07-14 13:17:4778 days 2 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x50fd81dc60eb97274945d6e2fb12dd8c93b7e15c7e4cf25720d0f9fd15893e0b1068709342023-07-14 13:17:2578 days 2 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x9f3b49ae038a6abda087abcf2924cec9f15670a70c5dc759116855f167b505991065830742023-07-07 21:22:0584 days 18 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x5a92d213d35c2df4c4f14ccaad7c2dda36a781628eda3aaa7b848b2bb17fa8211065830532023-07-07 21:21:2384 days 18 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x92c754749929507e7e35ae8d335414141f6704196c5e79b95c66fc033dc00cb01065830402023-07-07 21:20:5784 days 18 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x285d9bc12151ee5c5241941d12018780fa73a693b0dc5039e2a393914846f8341061216522023-06-27 5:01:2195 days 10 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0xb3293eb75f3a133289fe22c4242fef4629b216056a0e221d307ddf717ec3f44d1061216362023-06-27 5:00:4995 days 10 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x704915491c30a7f439253078887562034314711b892cb56f88dbfa8c73e573f71060742852023-06-26 2:42:2796 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x05ff83b9f6970eaeea756bc8da7ff73591289fa6686fe903c95f84f0bf1707531060742772023-06-26 2:42:1196 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x041b1207bd82e505f88e37ef2a82c7422babc139c378de1d0e484114a76668231060742682023-06-26 2:41:5396 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0xc52640ffc79d222625714977add57e6bc42c23aa68aac6f76c515f5df40a155e1060742592023-06-26 2:41:3596 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0xc800fad34d9545530f11a5393e06e717c514895f214e19c75c14d382e3807ce11059878772023-06-24 2:42:1198 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x4840b5d0e890f1ce230b5a57733328baab3cabc48321a18e35e6c16b6122071f1059865662023-06-24 1:58:2998 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x09615930283de066cd44f1f43666c0de105b9f3f39cc3c034c46359936bfd86f1059865572023-06-24 1:58:1198 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
0x7091f15912fd30d6e43b33f8c8eac5c950ef1739a0f82b47a8f20a96f6241c281059865472023-06-24 1:57:5198 days 13 hrs ago 0xa9218c6d51b87eb3ee74e14cb5d50bde00be7021 0xc392133eea695603b51a5d5de73655d571c2ce510 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TaleOfThalesNFTs

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : TaleOfThalesNFTs.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-4.4.1/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts-4.4.1/access/Ownable.sol";
import "@openzeppelin/contracts-4.4.1/security/Pausable.sol";
import "@openzeppelin/contracts-4.4.1/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts-4.4.1/utils/Counters.sol";

import "../../interfaces/IStakingThales.sol";

contract TaleOfThalesNFTs is ERC1155, Ownable, Pausable, ERC1155Burnable {
    /* ========== LIBRARIES ========== */

    using Counters for Counters.Counter;

    /* ========== STATE VARIABLES ========== */
    Counters.Counter private _lastCollectionId;
    Counters.Counter private _lastItemId;

    enum Type {
        headWear,
        topWear,
        footWear,
        weapon
    }

    struct Item {
        uint256 index;
        Type itemType;
    }

    string public name = "Tale of Thales";

    string public symbol = "TOT";

    mapping(uint256 => Item[]) public collectionToItems;
    mapping(uint256 => uint256) public itemIndexToCollection;
    mapping(uint256 => mapping(address => bool)) public addressCanMintCollection;
    mapping(uint256 => mapping(uint8 => uint256)) public collectionToTypeMapping;

    mapping(address => mapping(uint256 => bool)) public addressAlreadyMintedItem;

    IStakingThales public staking;
    mapping(uint256 => uint256) public collectionToMinimumStakeAmount;
    mapping(uint256 => uint256) public collectionToMinimalVolume;

    /* ========== CONSTRUCTOR ========== */

    constructor(address _stakingAddress, string memory newuri) ERC1155(newuri) {
        require(_stakingAddress != address(0), "Invalid address");
        staking = IStakingThales(_stakingAddress);
    }

    /* ========== VIEW ========== */

    function getLatestItemIndex() public view returns (uint256) {
        return _lastItemId.current();
    }

    function getLatestCollectionIndex() public view returns (uint256) {
        return _lastCollectionId.current();
    }

    function isEligibleToMintItem(uint256 _itemIndex, address _minter) public view returns (bool) {
        if (itemIndexToCollection[_itemIndex] == 0) return false;
        if (addressAlreadyMintedItem[_minter][_itemIndex] == true) return false;
        if (balanceOf(_minter, _itemIndex) > 0) return false;

        uint256 _collectionIndex = getCollectionIndexFromItemIndex(_itemIndex);

        return isEligibleToMintCollection(_collectionIndex, _minter);
    }

    function isEligibleToMintCollection(uint256 _collectionIndex, address _minter) public view returns (bool eligible) {
        if (_checkStakingConditionForAddress(_minter, 0, _collectionIndex)) {
            eligible = true;
        } else if (_checkVolumeConditionForAddress(_minter, 0, _collectionIndex)) {
            eligible = true;
        } else {
            if (addressCanMintCollection[_collectionIndex][_minter]) eligible = true;
        }
        return eligible;
    }

    /* ========== OWC ========== */

    function mintItem(uint256 _itemId) external whenNotPaused {
        require(isEligibleToMintItem(_itemId, msg.sender), "Address is not eligible to mint this item");
        _mint(msg.sender, _itemId, 1, "");
        addressAlreadyMintedItem[msg.sender][_itemId] = true;
        emit ItemMinted(_itemId, msg.sender);
    }

    function mintCollection(uint256 _collectionIndex) external whenNotPaused {
        require(isEligibleToMintCollection(_collectionIndex, msg.sender), "Address is not eligible to mint this collection");

        Item[] memory items = collectionToItems[_collectionIndex];
        require(items.length > 0, "There are no items in this collection");

        uint256[] memory itemsToMint = new uint256[](4);
        uint256[] memory amountToMint = new uint256[](4);

        bool anythingToMint = false;

        for (uint256 i = 0; i < items.length; i++) {
            if (balanceOf(msg.sender, collectionToItems[_collectionIndex][i].index) > 0) continue;
            if (addressAlreadyMintedItem[msg.sender][collectionToItems[_collectionIndex][i].index] == true) continue;
            addressAlreadyMintedItem[msg.sender][collectionToItems[_collectionIndex][i].index] = true;
            anythingToMint = true;
            itemsToMint[i] = collectionToItems[_collectionIndex][i].index;
            amountToMint[i] = 1;
        }

        require(anythingToMint, "There is nothing to mint.");

        _mintBatch(msg.sender, itemsToMint, amountToMint, "");
        emit CollectionMinted(itemsToMint, msg.sender);
    }

    function addNewCollection(
        bool _stakeCondition,
        bool _volumeCondition,
        uint256 _minimumStakeAmount,
        uint256 _minimumVolumeAmount,
        address[] calldata _whitelistedAddresses
    ) external onlyOwner whenNotPaused {
        _lastCollectionId.increment();
        if (_stakeCondition) {
            collectionToMinimumStakeAmount[_lastCollectionId.current()] = _minimumStakeAmount;
        } else if (_volumeCondition) {
            collectionToMinimalVolume[_lastCollectionId.current()] = _minimumVolumeAmount;
        } else {
            require(_whitelistedAddresses.length > 0, "Whitelist cannot be empty");
        }

        if (_whitelistedAddresses.length > 0) {
            for (uint256 i = 0; i < _whitelistedAddresses.length; i++) {
                addressCanMintCollection[_lastCollectionId.current()][_whitelistedAddresses[i]] = true;
            }
        }
    }

    function addItemToCollection(uint8 _itemType, uint256 _collectionIndex) external onlyOwner whenNotPaused {
        require(_collectionIndex <= _lastCollectionId.current(), "Collection with given index do not exist.");
        require(
            collectionToTypeMapping[_collectionIndex][_itemType] == 0,
            "This type of wear is already added to collection."
        );
        _lastItemId.increment();
        collectionToItems[_collectionIndex].push(Item(_lastItemId.current(), Type(_itemType)));
        itemIndexToCollection[_lastItemId.current()] = _collectionIndex;
        collectionToTypeMapping[_collectionIndex][_itemType] = _lastItemId.current();
        emit AddedNewItemToCollection(_lastItemId.current(), _collectionIndex, _itemType);
    }

    function updateWhitelistForCollection(
        uint256 _collectionId,
        address[] calldata _whitelistedAddresses,
        bool _flag
    ) public onlyOwner whenNotPaused {
        require(_whitelistedAddresses.length > 0, "Whitelist cannot be empty");
        require(_collectionId <= _lastCollectionId.current(), "Collection with entered id does not exists");

        for (uint256 index = 0; index < _whitelistedAddresses.length; index++) {
            // only if current flag is different, if same skip it
            if (addressCanMintCollection[_collectionId][_whitelistedAddresses[index]] != _flag) {
                addressCanMintCollection[_collectionId][_whitelistedAddresses[index]] = _flag;
                emit WhitelistUpdated(_whitelistedAddresses[index], _collectionId);
            }
        }
    }

    function updateMintingCondition(
        uint256 _collectionIndex,
        uint256 _minVolumeAmount,
        uint256 _minStakingAmount
    ) external onlyOwner whenNotPaused {
        require(_minVolumeAmount > 0 || _minStakingAmount > 0, "One of the condition must be entered.");
        require(!(_minVolumeAmount > 0 && _minStakingAmount > 0), "Can not add both conditions");
        if (_minStakingAmount > 0) {
            collectionToMinimalVolume[_collectionIndex] = 0;
            collectionToMinimumStakeAmount[_collectionIndex] = _minStakingAmount;
        } else {
            collectionToMinimalVolume[_collectionIndex] = _minVolumeAmount;
            collectionToMinimumStakeAmount[_collectionIndex] = 0;
        }
        emit MintingConditionUpdated(_minVolumeAmount, _minStakingAmount);
    }

    function getCollectionIndexFromItemIndex(uint256 _itemIndex) public view returns (uint256) {
        require(itemIndexToCollection[_itemIndex] != 0, "Item is not added into collection or not created");
        return itemIndexToCollection[_itemIndex];
    }

    /* ========== INTERNAL ========== */

    function _checkStakingConditionForAddress(
        address _minter,
        uint256 _itemIndex,
        uint256 _collectionIndex
    ) internal view returns (bool) {
        uint256 _collectionId = _collectionIndex != 0 ? _collectionIndex : itemIndexToCollection[_itemIndex];
        return
            collectionToMinimumStakeAmount[_collectionId] != 0 &&
            (staking.stakedBalanceOf(_minter) > collectionToMinimumStakeAmount[_collectionId] ||
                addressCanMintCollection[_collectionId][_minter]);
    }

    function _checkVolumeConditionForAddress(
        address _minter,
        uint256 _itemIndex,
        uint256 _collectionIndex
    ) internal view returns (bool) {
        uint256 _collectionId = _collectionIndex != 0 ? _collectionIndex : itemIndexToCollection[_itemIndex];
        return
            collectionToMinimalVolume[_collectionId] != 0 &&
            (staking.getAMMVolume(_minter) > collectionToMinimalVolume[_collectionId] ||
                addressCanMintCollection[_collectionId][_minter]);
    }

    /* ========== CONTRACT MANAGMENT ========== */

    function setURI(string memory newuri) public onlyOwner whenNotPaused {
        _setURI(newuri);
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    event AddedNewItemToCollection(uint256 _itemIndex, uint256 _collectionIndex, uint8 _itemType);
    event ItemMinted(uint256 _itemIndex, address _minter);
    event CollectionMinted(uint256[] _items, address _minter);
    event WhitelistUpdated(address whitelisted, uint256 _collectionIndex);
    event MintingConditionUpdated(uint256 _minVolumeAmount, uint256 _minStakingAmount);
}

File 2 of 14 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: address zero is not a valid owner");
        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 token 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: caller is not token 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}.
     *
     * 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 _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`
     *
     * Emits a {TransferSingle} event.
     *
     * 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}.
     *
     * Emits a {TransferBatch} event.
     *
     * 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 an {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 `ids` and `amounts` 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 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 14 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 5 of 14 : ERC1155Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155Burnable is ERC1155 {
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );

        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 6 of 14 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

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

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

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 7 of 14 : IStakingThales.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.16;

interface IStakingThales {
    function updateVolume(address account, uint amount) external;

    /* ========== VIEWS / VARIABLES ==========  */
    function totalStakedAmount() external view returns (uint);

    function stakedBalanceOf(address account) external view returns (uint);

    function currentPeriodRewards() external view returns (uint);

    function currentPeriodFees() external view returns (uint);

    function getLastPeriodOfClaimedRewards(address account) external view returns (uint);

    function getRewardsAvailable(address account) external view returns (uint);

    function getRewardFeesAvailable(address account) external view returns (uint);

    function getAlreadyClaimedRewards(address account) external view returns (uint);

    function getContractRewardFunds() external view returns (uint);

    function getContractFeeFunds() external view returns (uint);

    function getAMMVolume(address account) external view returns (uint);
}

File 8 of 14 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 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 9 of 14 : 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 10 of 14 : 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 11 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 14 : 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 13 of 14 : 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 14 of 14 : 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": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingAddress","type":"address"},{"internalType":"string","name":"newuri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_itemIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_collectionIndex","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"_itemType","type":"uint8"}],"name":"AddedNewItemToCollection","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"_items","type":"uint256[]"},{"indexed":false,"internalType":"address","name":"_minter","type":"address"}],"name":"CollectionMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_itemIndex","type":"uint256"},{"indexed":false,"internalType":"address","name":"_minter","type":"address"}],"name":"ItemMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_minVolumeAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_minStakingAmount","type":"uint256"}],"name":"MintingConditionUpdated","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":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"whitelisted","type":"address"},{"indexed":false,"internalType":"uint256","name":"_collectionIndex","type":"uint256"}],"name":"WhitelistUpdated","type":"event"},{"inputs":[{"internalType":"uint8","name":"_itemType","type":"uint8"},{"internalType":"uint256","name":"_collectionIndex","type":"uint256"}],"name":"addItemToCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_stakeCondition","type":"bool"},{"internalType":"bool","name":"_volumeCondition","type":"bool"},{"internalType":"uint256","name":"_minimumStakeAmount","type":"uint256"},{"internalType":"uint256","name":"_minimumVolumeAmount","type":"uint256"},{"internalType":"address[]","name":"_whitelistedAddresses","type":"address[]"}],"name":"addNewCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"addressAlreadyMintedItem","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"addressCanMintCollection","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionToItems","outputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"enum TaleOfThalesNFTs.Type","name":"itemType","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionToMinimalVolume","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"collectionToMinimumStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"collectionToTypeMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemIndex","type":"uint256"}],"name":"getCollectionIndexFromItemIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestCollectionIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestItemIndex","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":"_collectionIndex","type":"uint256"},{"internalType":"address","name":"_minter","type":"address"}],"name":"isEligibleToMintCollection","outputs":[{"internalType":"bool","name":"eligible","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemIndex","type":"uint256"},{"internalType":"address","name":"_minter","type":"address"}],"name":"isEligibleToMintItem","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemIndexToCollection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionIndex","type":"uint256"}],"name":"mintCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemId","type":"uint256"}],"name":"mintItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"contract IStakingThales","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionIndex","type":"uint256"},{"internalType":"uint256","name":"_minVolumeAmount","type":"uint256"},{"internalType":"uint256","name":"_minStakingAmount","type":"uint256"}],"name":"updateMintingCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionId","type":"uint256"},{"internalType":"address[]","name":"_whitelistedAddresses","type":"address[]"},{"internalType":"bool","name":"_flag","type":"bool"}],"name":"updateWhitelistForCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60c0604052600e60808190526d54616c65206f66205468616c657360901b60a090815262000031916006919062000193565b50604080518082019091526003808252621513d560ea1b60209092019182526200005e9160079162000193565b503480156200006c57600080fd5b5060405162003902380380620039028339810160408190526200008f9162000239565b806200009b8162000128565b50620000a73362000141565b6003805460ff60a01b191690556001600160a01b038216620001015760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640160405180910390fd5b50600d80546001600160a01b0319166001600160a01b039290921691909117905562000385565b80516200013d90600290602084019062000193565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001a19062000332565b90600052602060002090601f016020900481019282620001c5576000855562000210565b82601f10620001e057805160ff191683800117855562000210565b8280016001018555821562000210579182015b8281111562000210578251825591602001919060010190620001f3565b506200021e92915062000222565b5090565b5b808211156200021e576000815560010162000223565b600080604083850312156200024c578182fd5b82516001600160a01b038116811462000263578283fd5b602084810151919350906001600160401b038082111562000282578384fd5b818601915086601f83011262000296578384fd5b815181811115620002ab57620002ab6200036f565b604051601f8201601f19908116603f01168101908382118183101715620002d657620002d66200036f565b816040528281528986848701011115620002ee578687fd5b8693505b82841015620003115784840186015181850187015292850192620002f2565b828411156200032257868684830101525b8096505050505050509250929050565b600181811c908216806200034757607f821691505b602082108114156200036957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61356d80620003956000396000f3fe608060405234801561001057600080fd5b50600436106102315760003560e01c8063715018a611610130578063b0e1a692116100b8578063ec9700571161007c578063ec97005714610572578063ee37f7d51461057a578063f242432a14610582578063f2fde38b14610595578063f5298aca146105a857600080fd5b8063b0e1a692146104c5578063b76fbda7146104f0578063c5cff0cf14610503578063d6c0f22b14610523578063e985e9c51461053657600080fd5b806389f331bb116100ff57806389f331bb146104585780638da5cb5b1461048657806395d89b4114610497578063a21d3a861461049f578063a22cb465146104b257600080fd5b8063715018a6146103fa57806372e963da146104025780638456cb5914610422578063891eecdb1461042a57600080fd5b806337f12269116101be5780634e1273f4116101825780634e1273f41461038f5780635c975abb146103af5780635d997d5f146103c15780636b20c454146103d45780636caac7f5146103e757600080fd5b806337f12269146103155780633f4ba83a1461032857806345ff46701461033057806348953ab0146103435780634cf088d91461036457600080fd5b80630e89341c116102055780630e89341c146102a957806312bc9e62146102bc57806317fb8594146102cf5780632eb2c2d6146102e25780632fe27747146102f557600080fd5b8062fdd58e1461023657806301ffc9a71461025c57806302fe53051461027f57806306fdde0314610294575b600080fd5b610249610244366004612c45565b6105bb565b6040519081526020015b60405180910390f35b61026f61026a366004612ddf565b610654565b6040519015158152602001610253565b61029261028d366004612e17565b6106a4565b005b61029c6106c0565b604051610253919061311c565b61029c6102b7366004612e5c565b61074e565b6102926102ca366004612f77565b6107e2565b6102926102dd366004612e5c565b610a42565b6102926102f0366004612aa5565b610b2e565b610249610303366004612e5c565b600e6020526000908152604090205481565b61026f610323366004612e8c565b610b7a565b610292610c07565b61024961033e366004612e5c565b610c19565b610356610351366004612f09565b610ca0565b604051610253929190613365565b600d54610377906001600160a01b031681565b6040516001600160a01b039091168152602001610253565b6103a261039d366004612ca0565b610cdf565b60405161025391906130ba565b600354600160a01b900460ff1661026f565b61026f6103cf366004612e8c565b610e40565b6102926103e2366004612bac565b610ea8565b6102926103f5366004612e5c565b610ef0565b61029261137a565b610249610410366004612e5c565b60096020526000908152604090205481565b61029261138c565b61026f610438366004612e8c565b600a60209081526000928352604080842090915290825290205460ff1681565b61026f610466366004612c45565b600c60209081526000928352604080842090915290825290205460ff1681565b6003546001600160a01b0316610377565b61029c61139c565b6102926104ad366004612eae565b6113a9565b6102926104c0366004612c1c565b6115d4565b6102496104d3366004612f55565b600b60209081526000928352604080842090915290825290205481565b6102926104fe366004612d6a565b6115e3565b610249610511366004612e5c565b600f6020526000908152604090205481565b610292610531366004612f2a565b611731565b61026f610544366004612a73565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61024961188b565b61024961189b565b610292610590366004612b4a565b6118a6565b6102926105a3366004612a59565b6118eb565b6102926105b6366004612c6e565b611961565b60006001600160a01b03831661062b5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061068557506001600160e01b031982166303a24d0760e21b145b8061064e57506301ffc9a760e01b6001600160e01b031983161461064e565b6106ac6119a4565b6106b46119fe565b6106bd81611a4b565b50565b600680546106cd906133d2565b80601f01602080910402602001604051908101604052809291908181526020018280546106f9906133d2565b80156107465780601f1061071b57610100808354040283529160200191610746565b820191906000526020600020905b81548152906001019060200180831161072957829003601f168201915b505050505081565b60606002805461075d906133d2565b80601f0160208091040260200160405190810160405280929190818152602001828054610789906133d2565b80156107d65780601f106107ab576101008083540402835291602001916107d6565b820191906000526020600020905b8154815290600101906020018083116107b957829003601f168201915b50505050509050919050565b6107ea6119a4565b6107f26119fe565b6004548111156108565760405162461bcd60e51b815260206004820152602960248201527f436f6c6c656374696f6e207769746820676976656e20696e64657820646f206e60448201526837ba1032bc34b9ba1760b91b6064820152608401610622565b6000818152600b6020908152604080832060ff86168452909152902054156108da5760405162461bcd60e51b815260206004820152603160248201527f546869732074797065206f66207765617220697320616c72656164792061646460448201527032b2103a379031b7b63632b1ba34b7b71760791b6064820152608401610622565b6108e8600580546001019055565b60086000828152602001908152602001600020604051806040016040528061090f60055490565b81526020018460ff16600381111561093757634e487b7160e01b600052602160045260246000fd5b600381111561095657634e487b7160e01b600052602160045260246000fd5b905281546001818101845560009384526020938490208351600290930201918255928201518184018054939492939192909160ff1916908360038111156109ad57634e487b7160e01b600052602160045260246000fd5b0217905550505080600960006109c260055490565b81526020810191909152604001600020556005546000828152600b6020908152604080832060ff871684529091529020557fe60b7b17b274cc2809ecf001eecf9c4ccbbbabb00ce56f1f1dff20b391508519610a1d60055490565b604080519182526020820184905260ff85169082015260600160405180910390a15050565b610a4a6119fe565b610a548133610b7a565b610ab25760405162461bcd60e51b815260206004820152602960248201527f41646472657373206973206e6f7420656c696769626c6520746f206d696e742060448201526874686973206974656d60b81b6064820152608401610622565b610ace3382600160405180602001604052806000815250611a5e565b336000818152600c60209081526040808320858452825291829020805460ff191660011790558151848152908101929092527f3eb4c124be0920e4713555dbe232230397c708afe4add51d03b61584e46d8acd910160405180910390a150565b6001600160a01b038516331480610b4a5750610b4a8533610544565b610b665760405162461bcd60e51b81526004016106229061312f565b610b738585858585611b2f565b5050505050565b600082815260096020526040812054610b955750600061064e565b6001600160a01b0382166000908152600c6020908152604080832086845290915290205460ff16151560011415610bce5750600061064e565b6000610bda83856105bb565b1115610be85750600061064e565b6000610bf384610c19565b9050610bff8184610e40565b949350505050565b610c0f6119a4565b610c17611cdf565b565b600081815260096020526040812054610c8d5760405162461bcd60e51b815260206004820152603060248201527f4974656d206973206e6f7420616464656420696e746f20636f6c6c656374696f60448201526f1b881bdc881b9bdd0818dc99585d195960821b6064820152608401610622565b5060009081526009602052604090205490565b60086020528160005260406000208181548110610cbc57600080fd5b60009182526020909120600290910201805460019091015490925060ff16905082565b60608151835114610d445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610622565b600083516001600160401b03811115610d6d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610d96578160200160208202803683370190505b50905060005b8451811015610e3857610dfd858281518110610dc857634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610df057634e487b7160e01b600052603260045260246000fd5b60200260200101516105bb565b828281518110610e1d57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610e3181613439565b9050610d9c565b509392505050565b6000610e4e82600085611d34565b15610e5b5750600161064e565b610e6782600085611e35565b15610e745750600161064e565b6000838152600a602090815260408083206001600160a01b038616845290915290205460ff161561064e5750600192915050565b6001600160a01b038316331480610ec45750610ec48333610544565b610ee05760405162461bcd60e51b81526004016106229061312f565b610eeb838383611eb3565b505050565b610ef86119fe565b610f028133610e40565b610f665760405162461bcd60e51b815260206004820152602f60248201527f41646472657373206973206e6f7420656c696769626c6520746f206d696e742060448201526e3a3434b99031b7b63632b1ba34b7b760891b6064820152608401610622565b600081815260086020908152604080832080548251818502810185019093528083529192909190849084015b828210156110235783829060005260206000209060020201604051806040016040529081600082015481526020016001820160009054906101000a900460ff166003811115610ff157634e487b7160e01b600052602160045260246000fd5b600381111561101057634e487b7160e01b600052602160045260246000fd5b8152505081526020019060010190610f92565b50505050905060008151116110885760405162461bcd60e51b815260206004820152602560248201527f546865726520617265206e6f206974656d7320696e207468697320636f6c6c6560448201526431ba34b7b760d91b6064820152608401610622565b60408051600480825260a0820190925260009160208201608080368337505060408051600480825260a082019092529293506000929150602082016080803683370190505090506000805b84518110156112d157600086815260086020526040812080546111279133918590811061111057634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600001546105bb565b1115611132576112bf565b336000908152600c602090815260408083208984526008909252822080549192918490811061117157634e487b7160e01b600052603260045260246000fd5b60009182526020808320600290920290910154835282019290925260400190205460ff161515600114156111a4576112bf565b336000908152600c602090815260408083208984526008909252822080546001939190859081106111e557634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154815260200190815260200160002060006101000a81548160ff0219169083151502179055506001915060086000878152602001908152602001600020818154811061125257634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000015484828151811061128457634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060018382815181106112b257634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b806112c981613439565b9150506110d3565b508061131f5760405162461bcd60e51b815260206004820152601960248201527f5468657265206973206e6f7468696e6720746f206d696e742e000000000000006044820152606401610622565b61133a3384846040518060200160405280600081525061205a565b7fad0b94fd1f01cbecef7d3a548a5e8015f80468e5d008c41b3d8c6d06ed5ed8a4833360405161136b9291906130cd565b60405180910390a15050505050565b6113826119a4565b610c1760006121c1565b6113946119a4565b610c17612213565b600780546106cd906133d2565b6113b16119a4565b6113b96119fe565b816114025760405162461bcd60e51b815260206004820152601960248201527857686974656c6973742063616e6e6f7420626520656d70747960381b6044820152606401610622565b6004548411156114675760405162461bcd60e51b815260206004820152602a60248201527f436f6c6c656374696f6e207769746820656e746572656420696420646f6573206044820152696e6f742065786973747360b01b6064820152608401610622565b60005b82811015610b73576000858152600a60205260408120831515918686858181106114a457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906114b99190612a59565b6001600160a01b0316815260208101919091526040016000205460ff161515146115c2576000858152600a60205260408120839186868581811061150d57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906115229190612a59565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f226d670a329c4a93cf8c1a5baeceda320e89031fe0a65343c51678bd8b5a652e84848381811061158b57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906115a09190612a59565b604080516001600160a01b039092168252602082018890520160405180910390a15b806115cc81613439565b91505061146a565b6115df338383612256565b5050565b6115eb6119a4565b6115f36119fe565b611601600480546001019055565b851561162b5783600e600061161560045490565b8152602081019190915260400160002055611688565b841561163f5782600f600061161560045490565b806116885760405162461bcd60e51b815260206004820152601960248201527857686974656c6973742063616e6e6f7420626520656d70747960381b6044820152606401610622565b80156117295760005b81811015611727576001600a60006116a860045490565b815260200190815260200160002060008585858181106116d857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906116ed9190612a59565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061171f81613439565b915050611691565b505b505050505050565b6117396119a4565b6117416119fe565b60008211806117505750600081115b6117aa5760405162461bcd60e51b815260206004820152602560248201527f4f6e65206f662074686520636f6e646974696f6e206d75737420626520656e7460448201526432b932b21760d91b6064820152608401610622565b6000821180156117ba5750600081115b156118075760405162461bcd60e51b815260206004820152601b60248201527f43616e206e6f742061646420626f746820636f6e646974696f6e7300000000006044820152606401610622565b8015611830576000838152600f60209081526040808320839055600e909152902081905561184d565b6000838152600f60209081526040808320859055600e9091528120555b60408051838152602081018390527f76dddcd8a20bef104d0468eb268f3b52cd66034274e169ba0217b29aebdf779d910160405180910390a1505050565b600061189660045490565b905090565b600061189660055490565b6001600160a01b0385163314806118c257506118c28533610544565b6118de5760405162461bcd60e51b81526004016106229061312f565b610b738585858585612337565b6118f36119a4565b6001600160a01b0381166119585760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610622565b6106bd816121c1565b6001600160a01b03831633148061197d575061197d8333610544565b6119995760405162461bcd60e51b81526004016106229061312f565b610eeb838383612461565b6003546001600160a01b03163314610c175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610622565b600354600160a01b900460ff1615610c175760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610622565b80516115df906002906020840190612843565b6001600160a01b038416611a845760405162461bcd60e51b815260040161062290613324565b336000611a9085612565565b90506000611a9d85612565565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290611acf9084906133ba565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611727836000898989896125be565b8151835114611b505760405162461bcd60e51b8152600401610622906132dc565b6001600160a01b038416611b765760405162461bcd60e51b81526004016106229061320a565b3360005b8451811015611c79576000858281518110611ba557634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110611bd157634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611c215760405162461bcd60e51b815260040161062290613292565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611c5e9084906133ba565b9250508190555050505080611c7290613439565b9050611b7a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611cc99291906130f7565b60405180910390a4611729818787878787612729565b611ce76127f3565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60008082611d5057600084815260096020526040902054611d52565b825b6000818152600e602052604090205490915015801590611e2c57506000818152600e60205260409081902054600d549151631676539160e01b81526001600160a01b038881166004830152919291909116906316765391906024015b60206040518083038186803b158015611dc657600080fd5b505afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe9190612e74565b1180611e2c57506000818152600a602090815260408083206001600160a01b038916845290915290205460ff165b95945050505050565b60008082611e5157600084815260096020526040902054611e53565b825b6000818152600f602052604090205490915015801590611e2c57506000818152600f60205260409081902054600d549151639a09edab60e01b81526001600160a01b03888116600483015291929190911690639a09edab90602401611dae565b6001600160a01b038316611ed95760405162461bcd60e51b81526004016106229061324f565b8051825114611efa5760405162461bcd60e51b8152600401610622906132dc565b604080516020810190915260009081905233905b8351811015611fec576000848281518110611f3957634e487b7160e01b600052603260045260246000fd5b602002602001015190506000848381518110611f6557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015611fb55760405162461bcd60e51b8152600401610622906131c6565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580611fe481613439565b915050611f0e565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161203d9291906130f7565b60405180910390a460408051602081019091526000905250505050565b6001600160a01b0384166120805760405162461bcd60e51b815260040161062290613324565b81518351146120a15760405162461bcd60e51b8152600401610622906132dc565b3360005b8451811015612159578381815181106120ce57634e487b7160e01b600052603260045260246000fd5b60200260200101516000808784815181106120f957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461214191906133ba565b9091555081905061215181613439565b9150506120a5565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516121aa9291906130f7565b60405180910390a4610b7381600087878787612729565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61221b6119fe565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d173390565b816001600160a01b0316836001600160a01b031614156122ca5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610622565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661235d5760405162461bcd60e51b81526004016106229061320a565b33600061236985612565565b9050600061237685612565565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156123b95760405162461bcd60e51b815260040161062290613292565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906123f69084906133ba565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612456848a8a8a8a8a6125be565b505050505050505050565b6001600160a01b0383166124875760405162461bcd60e51b81526004016106229061324f565b33600061249384612565565b905060006124a084612565565b60408051602080820183526000918290528882528181528282206001600160a01b038b16835290522054909150848110156124ed5760405162461bcd60e51b8152600401610622906131c6565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611727565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106125ad57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b156117295760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126029089908990889088908890600401613075565b602060405180830381600087803b15801561261c57600080fd5b505af192505050801561264c575060408051601f3d908101601f1916820190925261264991810190612dfb565b60015b6126f957612658613480565b806308c379a01415612692575061266d613498565b806126785750612694565b8060405162461bcd60e51b8152600401610622919061311c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610622565b6001600160e01b0319811663f23a6e6160e01b146117275760405162461bcd60e51b81526004016106229061317e565b6001600160a01b0384163b156117295760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061276d9089908990889088908890600401613017565b602060405180830381600087803b15801561278757600080fd5b505af19250505080156127b7575060408051601f3d908101601f191682019092526127b491810190612dfb565b60015b6127c357612658613480565b6001600160e01b0319811663bc197c8160e01b146117275760405162461bcd60e51b81526004016106229061317e565b600354600160a01b900460ff16610c175760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610622565b82805461284f906133d2565b90600052602060002090601f01602090048101928261287157600085556128b7565b82601f1061288a57805160ff19168380011785556128b7565b828001600101855582156128b7579182015b828111156128b757825182559160200191906001019061289c565b506128c39291506128c7565b5090565b5b808211156128c357600081556001016128c8565b60006001600160401b038311156128f5576128f561346a565b60405161290c601f8501601f19166020018261340d565b80915083815284848401111561292157600080fd5b83836020830137600060208583010152509392505050565b80356001600160a01b038116811461295057600080fd5b919050565b60008083601f840112612966578182fd5b5081356001600160401b0381111561297c578182fd5b6020830191508360208260051b850101111561299757600080fd5b9250929050565b600082601f8301126129ae578081fd5b813560206129bb82613397565b6040516129c8828261340d565b8381528281019150858301600585901b870184018810156129e7578586fd5b855b85811015612a05578135845292840192908401906001016129e9565b5090979650505050505050565b8035801515811461295057600080fd5b600082601f830112612a32578081fd5b612a41838335602085016128dc565b9392505050565b803560ff8116811461295057600080fd5b600060208284031215612a6a578081fd5b612a4182612939565b60008060408385031215612a85578081fd5b612a8e83612939565b9150612a9c60208401612939565b90509250929050565b600080600080600060a08688031215612abc578081fd5b612ac586612939565b9450612ad360208701612939565b935060408601356001600160401b0380821115612aee578283fd5b612afa89838a0161299e565b94506060880135915080821115612b0f578283fd5b612b1b89838a0161299e565b93506080880135915080821115612b30578283fd5b50612b3d88828901612a22565b9150509295509295909350565b600080600080600060a08688031215612b61578081fd5b612b6a86612939565b9450612b7860208701612939565b9350604086013592506060860135915060808601356001600160401b03811115612ba0578182fd5b612b3d88828901612a22565b600080600060608486031215612bc0578283fd5b612bc984612939565b925060208401356001600160401b0380821115612be4578384fd5b612bf08783880161299e565b93506040860135915080821115612c05578283fd5b50612c128682870161299e565b9150509250925092565b60008060408385031215612c2e578182fd5b612c3783612939565b9150612a9c60208401612a12565b60008060408385031215612c57578182fd5b612c6083612939565b946020939093013593505050565b600080600060608486031215612c82578081fd5b612c8b84612939565b95602085013595506040909401359392505050565b60008060408385031215612cb2578182fd5b82356001600160401b0380821115612cc8578384fd5b818501915085601f830112612cdb578384fd5b81356020612ce882613397565b604051612cf5828261340d565b8381528281019150858301600585901b870184018b1015612d14578889fd5b8896505b84871015612d3d57612d2981612939565b835260019690960195918301918301612d18565b5096505086013592505080821115612d53578283fd5b50612d608582860161299e565b9150509250929050565b60008060008060008060a08789031215612d82578384fd5b612d8b87612a12565b9550612d9960208801612a12565b9450604087013593506060870135925060808701356001600160401b03811115612dc1578182fd5b612dcd89828a01612955565b979a9699509497509295939492505050565b600060208284031215612df0578081fd5b8135612a4181613521565b600060208284031215612e0c578081fd5b8151612a4181613521565b600060208284031215612e28578081fd5b81356001600160401b03811115612e3d578182fd5b8201601f81018413612e4d578182fd5b610bff848235602084016128dc565b600060208284031215612e6d578081fd5b5035919050565b600060208284031215612e85578081fd5b5051919050565b60008060408385031215612e9e578182fd5b82359150612a9c60208401612939565b60008060008060608587031215612ec3578182fd5b8435935060208501356001600160401b03811115612edf578283fd5b612eeb87828801612955565b9094509250612efe905060408601612a12565b905092959194509250565b60008060408385031215612f1b578182fd5b50508035926020909101359150565b600080600060608486031215612f3e578081fd5b505081359360208301359350604090920135919050565b60008060408385031215612f67578182fd5b82359150612a9c60208401612a48565b60008060408385031215612f89578182fd5b612c6083612a48565b6000815180845260208085019450808401835b83811015612fc157815187529582019590820190600101612fa5565b509495945050505050565b60008151808452815b81811015612ff157602081850181015186830182015201612fd5565b818111156130025782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0386811682528516602082015260a06040820181905260009061304390830186612f92565b82810360608401526130558186612f92565b905082810360808401526130698185612fcc565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906130af90830184612fcc565b979650505050505050565b602081526000612a416020830184612f92565b6040815260006130e06040830185612f92565b905060018060a01b03831660208301529392505050565b60408152600061310a6040830185612f92565b8281036020840152611e2c8185612f92565b602081526000612a416020830184612fcc565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b828152604081016004831061338a57634e487b7160e01b600052602160045260246000fd5b8260208301529392505050565b60006001600160401b038211156133b0576133b061346a565b5060051b60200190565b600082198211156133cd576133cd613454565b500190565b600181811c908216806133e657607f821691505b6020821081141561340757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156134325761343261346a565b6040525050565b600060001982141561344d5761344d613454565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561349557600481823e5160e01c5b90565b600060443d10156134a65790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156134d557505050505090565b82850191508151818111156134ed5750505050505090565b843d87010160208285010111156135075750505050505090565b6135166020828601018761340d565b509095945050505050565b6001600160e01b0319811681146106bd57600080fdfea2646970667358221220dc4253dc1dac9aa89539f46bae24318a604db16e4da68ea6e49665f42fed36a164736f6c63430008040033000000000000000000000000c392133eea695603b51a5d5de73655d571c2ce510000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004a68747470733a2f2f7468616c65732d70726f746f636f6c2e73332e65752d6e6f7274682d312e616d617a6f6e6177732e636f6d2f54616c654f665468616c65732f7b69647d2e6a736f6e00000000000000000000000000000000000000000000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c392133eea695603b51a5d5de73655d571c2ce510000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004a68747470733a2f2f7468616c65732d70726f746f636f6c2e73332e65752d6e6f7274682d312e616d617a6f6e6177732e636f6d2f54616c654f665468616c65732f7b69647d2e6a736f6e00000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _stakingAddress (address): 0xC392133eEa695603B51a5d5de73655d571c2CE51
Arg [1] : newuri (string): https://thales-protocol.s3.eu-north-1.amazonaws.com/TaleOfThales/{id}.json

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000c392133eea695603b51a5d5de73655d571c2ce51
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 000000000000000000000000000000000000000000000000000000000000004a
Arg [3] : 68747470733a2f2f7468616c65732d70726f746f636f6c2e73332e65752d6e6f
Arg [4] : 7274682d312e616d617a6f6e6177732e636f6d2f54616c654f665468616c6573
Arg [5] : 2f7b69647d2e6a736f6e00000000000000000000000000000000000000000000


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