Contract 0x1482E9509117792cDecf9d3AEA2F203c563c8216

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xca5488af2031f5e2948c176fdd48df52dea674cb14d6d3e5919bc0c275d613d2Open Chest205236382022-10-01 20:22:5217 hrs 5 mins ago0xe07343d970d2d9e68d887eddedaf0e41cdcbe2b1 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0082593287528.75
0x24cdc39e4033271441e05eae1b8925b1e1b859aea66ecc1d4662606497bafa75Open Chest205236292022-10-01 20:22:3417 hrs 6 mins ago0xe07343d970d2d9e68d887eddedaf0e41cdcbe2b1 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0076761637528.75
0x266018d7e176da6429c95b9e160a75279f80c91bb29f2bb7c4b5b4b21756e531Open Chest204983262022-10-01 5:49:121 day 7 hrs ago0x746d708b046c3a13b42012356219bcffabf9d219 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0074629825 28.75
0xe77d820ecce483fa2775eaf97264c7f60f1754147edda5a2a6ac94187065c280Open Chest204929942022-10-01 2:44:101 day 10 hrs ago0x64bdc75ee2f2e2c89f2acafae5bac4f1cd553845 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.00706999875 28.75
0x71a527431bb712fec11ab7467436453428d706a8b31e497480191301c691efb2Safe Transfer Fr...204489562022-09-30 1:33:442 days 11 hrs ago0x9b3ccbe3faa61dadc9c55f54146cb4b929c39806 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0016969975 28.75
0xae63ec858a9c06baad66a3e4d6f0274ad65337d71c02c205686115c7a581b601Open Chest204174402022-09-29 7:37:383 days 5 hrs ago0x2d7fb0d36c6f4f6adff4ebfd9e12654af9cbb35a IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.00614782525
0xfdaf869c1e3d039b4f56c2825957ac74dc491d97f6f580d4387db45411f73970Open Chest203681592022-09-28 3:27:424 days 10 hrs ago0xb5dde00de1535f0a3c938d32ded182364bb788ec IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.007462982528.75
0x73e3d8549b993bb1d5389903095c981ef1df0204484538891f69fc62c664eb43Open Chest203681522022-09-28 3:27:284 days 10 hrs ago0xb5dde00de1535f0a3c938d32ded182364bb788ec IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0076761637528.75
0xa37e49174b9dd104d191c842562e4772c97e4c16006eaf540761531940abfdcfOpen Chest203681432022-09-28 3:27:094 days 10 hrs ago0xb5dde00de1535f0a3c938d32ded182364bb788ec IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0070699987528.75
0x19296037183c819ca205c612d9922026f0e556ad0446148031babb82cae40f4bOpen Chest203534372022-09-27 19:02:524 days 18 hrs ago0xee53fc293229e9ad7edfc91d31f3646190ed2ca1 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0076816837528.75
0xdca1a121341a296658e953e28b98d6664534f90a2cfc6f325c8505d3e4bc1cb6Open Hero Chest203451612022-09-27 14:19:454 days 23 hrs ago0x83b92f92f520e591430589c60daf847228d0bebd IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.00620036875 28.75
0x5e7d74c55d35ed63a8986831d27215294b281522394a2d5974d9b220e0a000cbOpen Chest203334572022-09-27 7:39:015 days 5 hrs ago0x77a0bc6b1ec2a02bada0b871181bd5546cb32460 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0074629825 28.75
0xbd45ebb8161f108a81d5456814f04758f5d88fbd4d52a721772c5b1dbc67c432Safe Transfer Fr...203147782022-09-26 20:58:345 days 16 hrs ago0xe07343d970d2d9e68d887eddedaf0e41cdcbe2b1 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0008659525
0xd207b801f1d0162b24f1f953efe7c017d40fd42c20d7646204dfe5443f72d24dSafe Transfer Fr...203147652022-09-26 20:58:005 days 16 hrs ago0xe07343d970d2d9e68d887eddedaf0e41cdcbe2b1 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0008659525
0xc808159a5b66bc811ebebb6ca758fc68d9bddf8c4579504b4783a11f1232424cOpen Chest203102262022-09-26 18:21:515 days 19 hrs ago0x165436d07c5453ae241f01c4a4c0a5faf0b30284 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.00826484875 28.75
0xe6aa9998d8d70aa4551a6a612c68186213d5a85445e25fc756782bcc67043c64Open Chest202937052022-09-26 8:52:416 days 4 hrs ago0x32ceaf7c364211e38a2166504127c6da14a44b50 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.007462982528.75
0x42b1f914b6182467807909556c6ea2caacec80c89ce8ec5212acc8c8ce95fadfOpen Chest202936872022-09-26 8:52:106 days 4 hrs ago0x32ceaf7c364211e38a2166504127c6da14a44b50 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0076816837528.75
0x83274898d76b4d4e681dfebe8a2c836737333daf2322961c4556e2eccaae6453Open Chest202936722022-09-26 8:51:406 days 4 hrs ago0x32ceaf7c364211e38a2166504127c6da14a44b50 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0070755187528.75
0x5361333355d2ad4c5ce651d35ff3676978a39d0f5dd66e9597fad212dafe7d0cOpen Chest202924222022-09-26 8:08:016 days 5 hrs ago0x2a3fe1d75bfa563f2eaca105f646d96a9f90f934 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0082703687528.75
0x3c7c9f61b922d9e7c727521995bd1f400b00d5dbfc51f0cecedcf665a2398d86Open Chest202924072022-09-26 8:07:286 days 5 hrs ago0x2a3fe1d75bfa563f2eaca105f646d96a9f90f934 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0070699987528.75
0xffdf87691549590522effdc1b674b88f46c59c99884a384a99d644ea54199812Open Chest202923892022-09-26 8:06:526 days 5 hrs ago0x2a3fe1d75bfa563f2eaca105f646d96a9f90f934 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.007462982528.75
0x1c7f53fe27303fd7679bcabcdf130a21833ac78c620eaba744259e644172cbd0Open Chest202923752022-09-26 8:06:236 days 5 hrs ago0x2a3fe1d75bfa563f2eaca105f646d96a9f90f934 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0070755187528.75
0x1b65fead92ba90e3792a583d4fbccab314c27c0a12b57aa6b0b29078eac17bc6Safe Transfer Fr...202902562022-09-26 6:53:206 days 6 hrs ago0x9b3ccbe3faa61dadc9c55f54146cb4b929c39806 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0016969975 28.75
0x34793089a7263076bb7c292384084a99f3188460883f1c56ee0ec59b359f9941Safe Transfer Fr...202902422022-09-26 6:52:526 days 6 hrs ago0x9b3ccbe3faa61dadc9c55f54146cb4b929c39806 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0016969975 28.75
0xfdec395c58111f0f8b8de93ec328fbf81750850cee87fad8d7107d9869f0d75bSafe Transfer Fr...202902312022-09-26 6:52:296 days 6 hrs ago0x9b3ccbe3faa61dadc9c55f54146cb4b929c39806 IN  0x1482e9509117792cdecf9d3aea2f203c563c82160 AVAX0.0016973425 28.75
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GunfireAvaxChest

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : GunfireAvaxChest.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";

interface IGunFire1155 {
	function upgrade(uint256 _id, uint256 _rarity, uint256 _level, uint256 _mainAttribute) external;
	function mint(address account, uint256 id, uint256 amount, uint8 kind, uint256 _type, uint256 _rarity, uint256 _level, uint256 _mainAttr, bytes memory data) external;
	function currentId() view external returns(uint256);
	function mintEquipment(address account, uint256 _type, uint256 _rarity, uint256 _level, bytes memory data) external;
	function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external;

	struct EquipmentInfo {
        uint256 equipmentType;
        uint256 rarity;
        uint256 level;
        uint256 attribute;
    }

	event FragBatchMinted(address indexed user, uint256[] ids, uint256[] amounts);
    event FragMinted(address indexed sender, address indexed user, uint256 id, uint256 amount);
    event EquipmentMinted(address indexed sender, address indexed user, uint256 id, EquipmentInfo equipment);
    event EquipmentUpgrade(uint256 id, EquipmentInfo equipment);
}

/// @custom:security-contact [email protected]
contract GunfireAvaxChest is ERC1155, AccessControl, Pausable, ERC1155Burnable {
	bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
	bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

	mapping (address => bool) public operatorAddresses;
	mapping (uint256 => bool) public isHeroChest;

	// chest id => kind => typeId[]
	mapping (uint256 => mapping(uint256 => uint256[])) fTypes;
	// chest id => kind => typeId[]
	mapping (uint256 => mapping(uint256 => uint256[])) eTypes;


	uint256 public seed;
	uint8 constant public equipmentMaterial = 4;
    uint8 constant public equipment = 5;
	address public nftAddress;

	struct ChestInfo {
		bool initialized;
		uint256 minFrags;
		uint256 maxFrags;
		uint256[] set1;
		uint256[] weightedSet1;

		uint256[] set2;
		uint256[] rarity2;
		uint256[] weightedSet2;
	}

	struct HeroChestInfo {
		bool initialized;
		uint256[] shardAmount;
		uint256[] weightedShardAmount;

		uint256[] set1;
		uint256[] weightedSet1;

		uint256[] set2;
		uint256[] weightedSet2;

		uint256[] set3;
		uint256[] weightedSet3;

		mapping (uint256 => uint256) idToMinFrags;
		mapping (uint256 => uint256) idToMaxFrags;
	}

	mapping(uint256 => ChestInfo) public chestInfo;
	mapping(uint256 => HeroChestInfo) public heroChestInfo;

	string public constant name = "Gunfire Avax Chest";
    string public constant symbol = "GACHEST";

	constructor(address _nftAddress) ERC1155("https://api.gunfireavax.io/chest/{id}.json") {
		_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
		_setupRole(PAUSER_ROLE, msg.sender);
		_setupRole(MINTER_ROLE, msg.sender);
		nftAddress = _nftAddress;
		seed = block.timestamp;
	}

	function setURI(string memory newuri) public onlyRole(DEFAULT_ADMIN_ROLE) {
		_setURI(newuri);
	}

	function pause() public onlyRole(PAUSER_ROLE) {
		_pause();
	}

	function unpause() public onlyRole(PAUSER_ROLE) {
		_unpause();
	}

	function setupChest(uint256 _chestId, uint256 _minFrag, uint256 _maxFrag, uint256[] memory _set1, uint256[] memory _weightedSet1, uint256[] memory _set2, uint256[] memory _rarity2, uint256[] memory _weightedSet2) external  onlyRole(DEFAULT_ADMIN_ROLE) {
		require(_set1.length == _weightedSet1.length, "SetupChest: Set 1 Mismatch!");
		require(_set2.length == _weightedSet2.length, "SetupChest: Set 2 Mismatch!");
		require(_set2.length == _rarity2.length, "SetupChest: Rarity 2 Mismatch!");
		chestInfo[_chestId] = ChestInfo(true, _minFrag, _maxFrag, _set1, _weightedSet1, _set2, _rarity2, _weightedSet2);
	}

	function setupTypes(bool _isFragment, uint256 _chestId, uint256 _kind, uint256[] calldata _types) external onlyRole(DEFAULT_ADMIN_ROLE) {
		if (_isFragment) {
			fTypes[_chestId][_kind] = _types;
		} else {
			eTypes[_chestId][_kind] = _types;
		}
	}

	function setupHeroChest(uint256 _chestId,
		uint256[] calldata _shardAmount, uint256[] calldata _weightedShardAmount,
		uint256[] calldata _indexToId,
		uint256[] calldata _indexToValueMin, uint256[] calldata _indexToValueMax) external onlyRole(DEFAULT_ADMIN_ROLE) {
		isHeroChest[_chestId] = true;
		HeroChestInfo storage heroChest = heroChestInfo[_chestId];
		heroChest.shardAmount = _shardAmount;
		heroChest.weightedShardAmount = _weightedShardAmount;
		for (uint256 i = 0 ; i < _indexToId.length; i ++) {
			heroChest.idToMinFrags[_indexToId[i]] = _indexToValueMin[i];
			heroChest.idToMaxFrags[_indexToId[i]] = _indexToValueMax[i];
		}
	}

	function setupHeroChestSet(uint256 _chestId,
		uint256[] calldata _set1, uint256[] calldata _set2, uint256[] calldata _set3)
		external onlyRole(DEFAULT_ADMIN_ROLE) {
		require(isHeroChest[_chestId], "Not Setup Chest!");
		HeroChestInfo storage heroChest = heroChestInfo[_chestId];
		heroChest.set1 = _set1;
		heroChest.set2 = _set2;
		heroChest.set3 = _set3;
	}

	function setupHeroChestWeight(uint256 _chestId,
		uint256[] calldata _weightedSet1, uint256[] calldata _weightedSet2, uint256[] calldata _weightedSet3)
		external onlyRole(DEFAULT_ADMIN_ROLE) {
		require(isHeroChest[_chestId], "Not Setup Chest!");
		HeroChestInfo storage heroChest = heroChestInfo[_chestId];
		heroChest.initialized = true;
		heroChest.weightedSet1 = _weightedSet1;
		heroChest.weightedSet2 = _weightedSet2;
		heroChest.weightedSet3 = _weightedSet3;
	}

	function openChest(uint256 _chestId) public {
		require(tx.origin == msg.sender, "Really, contract?!");
		require(!isHeroChest[_chestId], "GunfireChest: This is not equipment Chest!");
		burn(msg.sender, _chestId, 1);
		ChestInfo memory chest = chestInfo[_chestId];
		if (chest.set1.length != 0) {
			uint256 rs1 = _weightedRandom(seed, chest.weightedSet1);
			uint256 kind1 = chest.set1[rs1];
			uint256 fragAmount = chest.minFrags + _randomNumber(seed, (chest.maxFrags - chest.minFrags + 1));
			uint256 type1Index = _randomNumber(seed, fTypes[_chestId][kind1].length);
			uint256 type1 = fTypes[_chestId][kind1][type1Index];
			IGunFire1155(nftAddress).mint(msg.sender, kind1 * 1000 + type1, fragAmount, equipmentMaterial, 0, 0, 0, 0, "0x00");
		}
		uint256 rs2 = _weightedRandom(seed, chest.weightedSet2);
		uint256 kind2 = chest.set2[rs2];
		uint256 type2Index = _randomNumber(seed, eTypes[_chestId][kind2].length);
		uint256 type2 = eTypes[_chestId][kind2][type2Index];
		uint256 equip2 = kind2 * 1000 + type2;
		IGunFire1155(nftAddress).mintEquipment(msg.sender, equip2, chest.rarity2[rs2], 1, "0x00");
	}

	function openHeroChest(uint256 _chestId) public {
		require(tx.origin == msg.sender, "Really, contract?!");
		require(isHeroChest[_chestId], "GunfireChest: This is not Hero Chest!");
		burn(msg.sender, _chestId, 1);
		HeroChestInfo storage chest = heroChestInfo[_chestId];
		uint256[] memory ids = new uint256[](3);
		uint256[] memory amounts = new uint256[](3);

		uint256 frag1AmountIdx = _weightedRandom(seed, chest.weightedShardAmount);
		uint256 frag1Idx = _weightedRandom(seed, chest.weightedSet1);
		ids[0] = chest.set1[frag1Idx];
		amounts[0] = chest.shardAmount[frag1AmountIdx];

		uint256 frag2Idx = _weightedRandom(seed, chest.weightedSet2);
		ids[1] = chest.set2[frag2Idx];
		amounts[1] = chest.idToMinFrags[ids[1]] + _randomNumber(seed, (chest.idToMaxFrags[ids[1]] - chest.idToMinFrags[ids[1]] + 1));

		uint256 frag3Idx = _weightedRandom(seed, chest.weightedSet3);
		ids[2] = chest.set3[frag3Idx];
		amounts[2] = chest.idToMinFrags[ids[2]] + _randomNumber(seed, (chest.idToMaxFrags[ids[2]] - chest.idToMinFrags[ids[2]] + 1));
		IGunFire1155(nftAddress).mintBatch(msg.sender, ids, amounts, "0x00");
	}

	function mint(address account, uint256 id, uint256 amount, bytes memory data)
		public
		onlyRole(MINTER_ROLE)
	{
		require(chestInfo[id].initialized || heroChestInfo[id].initialized, "Chest wasn't setup!");
		_mint(account, id, amount, data);
	}

	function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
		public
		onlyRole(MINTER_ROLE)
	{
		for (uint256 i = 0; i < ids.length; i++) {
		   require(chestInfo[ids[i]].initialized || heroChestInfo[ids[i]].initialized, "Chest wasn't setup!");
		}
		_mintBatch(to, ids, amounts, data);
	}

	function setOperatorAddress(address _operator, bool permission) external onlyRole(DEFAULT_ADMIN_ROLE) {
		operatorAddresses[_operator] = permission;
	}

	function isApprovedForAll(address owner, address operator) public override view returns (bool isOperator) {
		// Whitelist Marketplace proxy contract for easy trading.
		if (operatorAddresses[operator]) {
			return true;
		}
		return ERC1155.isApprovedForAll(owner, operator);
	}

	function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
		internal
		whenNotPaused
		override(ERC1155)
	{
		super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
	}

	// The following functions are overrides required by Solidity.

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

	// AUX Random
	function _random(uint256 _seed) internal view returns (uint256) {
		uint256 randomNumber = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), block.timestamp, gasleft(), msg.sender, _seed)));
		return randomNumber;
	}

	function _randomNumber(uint256 _seed, uint256 _number) internal returns (uint256) {
		if (_number == 0) {
			return 0;
		} else if (_number == 1) {
			_number = 2;
		}
		seed = _random(_seed);
		return (seed % _number);
	}

	function _weightedRandom(uint256 _seed, uint256[] memory _weightedArr) internal returns (uint256) {
		uint256 randomNumber = _random(_seed);
		seed = randomNumber;
		uint256 sumProbability;
		if (_weightedArr.length == 1) {
            return 0;
        }
		for (uint256 i = 1; i < _weightedArr.length; i ++) {
            _weightedArr[i] += _weightedArr[i - 1];
        }
		sumProbability = _weightedArr[_weightedArr.length - 1];
		if (sumProbability == 0) {
		    return 0;
	    }
		randomNumber = randomNumber % sumProbability;
        for (uint256 i = 0; i < _weightedArr.length; i ++) {
            if (randomNumber < _weightedArr[i]) {
                return i;
            }
        }
		return 0;
	}
}

File 2 of 14 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `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();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

    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 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 4 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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 v4.4.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 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 owner nor approved"
        );

        _burnBatch(account, ids, values);
    }
}

File 6 of 14 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

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

File 7 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

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

File 8 of 14 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 9 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 10 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 11 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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 12 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (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);
}

File 13 of 14 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

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

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

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

File 14 of 14 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nftAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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"}],"name":"chestInfo","outputs":[{"internalType":"bool","name":"initialized","type":"bool"},{"internalType":"uint256","name":"minFrags","type":"uint256"},{"internalType":"uint256","name":"maxFrags","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"equipment","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"equipmentMaterial","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"heroChestInfo","outputs":[{"internalType":"bool","name":"initialized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isHeroChest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chestId","type":"uint256"}],"name":"openChest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chestId","type":"uint256"}],"name":"openHeroChest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operatorAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"permission","type":"bool"}],"name":"setOperatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chestId","type":"uint256"},{"internalType":"uint256","name":"_minFrag","type":"uint256"},{"internalType":"uint256","name":"_maxFrag","type":"uint256"},{"internalType":"uint256[]","name":"_set1","type":"uint256[]"},{"internalType":"uint256[]","name":"_weightedSet1","type":"uint256[]"},{"internalType":"uint256[]","name":"_set2","type":"uint256[]"},{"internalType":"uint256[]","name":"_rarity2","type":"uint256[]"},{"internalType":"uint256[]","name":"_weightedSet2","type":"uint256[]"}],"name":"setupChest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chestId","type":"uint256"},{"internalType":"uint256[]","name":"_shardAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_weightedShardAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_indexToId","type":"uint256[]"},{"internalType":"uint256[]","name":"_indexToValueMin","type":"uint256[]"},{"internalType":"uint256[]","name":"_indexToValueMax","type":"uint256[]"}],"name":"setupHeroChest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chestId","type":"uint256"},{"internalType":"uint256[]","name":"_set1","type":"uint256[]"},{"internalType":"uint256[]","name":"_set2","type":"uint256[]"},{"internalType":"uint256[]","name":"_set3","type":"uint256[]"}],"name":"setupHeroChestSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chestId","type":"uint256"},{"internalType":"uint256[]","name":"_weightedSet1","type":"uint256[]"},{"internalType":"uint256[]","name":"_weightedSet2","type":"uint256[]"},{"internalType":"uint256[]","name":"_weightedSet3","type":"uint256[]"}],"name":"setupHeroChestWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isFragment","type":"bool"},{"internalType":"uint256","name":"_chestId","type":"uint256"},{"internalType":"uint256","name":"_kind","type":"uint256"},{"internalType":"uint256[]","name":"_types","type":"uint256[]"}],"name":"setupTypes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162004f2138038062004f2183398101604081905262000034916200025f565b6040518060600160405280602a815260200162004ef7602a91396200005981620000f3565b506004805460ff19169055620000716000336200010c565b6200009d7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336200010c565b620000c97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336200010c565b600a80546001600160a01b0319166001600160a01b039290921691909117905542600955620002cc565b805162000108906002906020840190620001b9565b5050565b60008281526003602090815260408083206001600160a01b038516845290915290205462000108908390839060ff16620001085760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001753390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620001c7906200028f565b90600052602060002090601f016020900481019282620001eb576000855562000236565b82601f106200020657805160ff191683800117855562000236565b8280016001018555821562000236579182015b828111156200023657825182559160200191906001019062000219565b506200024492915062000248565b5090565b5b8082111562000244576000815560010162000249565b60006020828403121562000271578081fd5b81516001600160a01b038116811462000288578182fd5b9392505050565b600181811c90821680620002a457607f821691505b60208210811415620002c657634e487b7160e01b600052602260045260246000fd5b50919050565b614c1b80620002dc6000396000f3fe608060405234801561001057600080fd5b50600436106102dd5760003560e01c806374c9f2a311610186578063af8b965b116100e3578063d547741f11610097578063e985e9c511610071578063e985e9c514610704578063f242432a14610717578063f5298aca1461072a57600080fd5b8063d547741f146106b7578063d9828174146106ca578063e63ab1e9146106dd57600080fd5b8063b7d61bd1116100c8578063b7d61bd114610675578063cc6a0f921461067d578063d53913931461069057600080fd5b8063af8b965b1461064f578063b0b88f6a1461066257600080fd5b806391d148541161013a578063a0095b331161011f578063a0095b3314610621578063a217fddf14610634578063a22cb4651461063c57600080fd5b806391d14854146105ac57806395d89b41146105e557600080fd5b80637c838b1c1161016b5780637c838b1c146105885780637d94792a1461059b5780638456cb59146105a457600080fd5b806374c9f2a31461055b578063790f03201461057557600080fd5b806336568abe1161023f5780635bf8633a116101f35780636a0f5dd3116101cd5780636a0f5dd3146105125780636b20c45414610535578063731133e91461054857600080fd5b80635bf8633a146104c95780635c975abb146104f45780636075eb7d146104ff57600080fd5b80633f4ba83a116102245780633f4ba83a1461045157806342109f1e146104595780634e1273f4146104a957600080fd5b806336568abe1461041b57806338625faa1461042e57600080fd5b80631f7fdffa116102965780632eb2c2d61161027b5780632eb2c2d6146103d25780632f2ff15d146103e55780633306724b146103f857600080fd5b80631f7fdffa1461039c578063248a9ca3146103af57600080fd5b806302fe5305116102c757806302fe53051461032b57806306fdde03146103405780630e89341c1461038957600080fd5b8062fdd58e146102e257806301ffc9a714610308575b600080fd5b6102f56102f03660046140b8565b61073d565b6040519081526020015b60405180910390f35b61031b6103163660046142d1565b6107e9565b60405190151581526020016102ff565b61033e610339366004614309565b6107f4565b005b61037c6040518060400160405280601281526020017f47756e666972652041766178204368657374000000000000000000000000000081525081565b6040516102ff9190614902565b61037c610397366004614297565b61080d565b61033e6103aa366004613ffa565b6108a1565b6102f56103bd366004614297565b60009081526003602052604090206001015490565b61033e6103e0366004613e80565b6109d5565b61033e6103f33660046142af565b610a70565b61031b610406366004614297565b600c6020526000908152604090205460ff1681565b61033e6104293660046142af565b610a9b565b61031b61043c366004613e34565b60056020526000908152604090205460ff1681565b61033e610b23565b61048c610467366004614297565b600b6020526000908152604090208054600182015460029092015460ff909116919083565b6040805193151584526020840192909252908201526060016102ff565b6104bc6104b7366004614166565b610b59565b6040516102ff91906148c1565b600a546104dc906001600160a01b031681565b6040516001600160a01b0390911681526020016102ff565b60045460ff1661031b565b61033e61050d366004614297565b610ccf565b61031b610520366004614297565b60066020526000908152604090205460ff1681565b61033e610543366004613f89565b6112af565b61033e610556366004614113565b611348565b610563600581565b60405160ff90911681526020016102ff565b61033e610583366004614357565b6113f6565b61033e610596366004614297565b6114a6565b6102f560095481565b61033e611b32565b61031b6105ba3660046142af565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b61037c6040518060400160405280600781526020017f474143484553540000000000000000000000000000000000000000000000000081525081565b61033e61062f3660046144f1565b611b65565b6102f5600081565b61033e61064a36600461408f565b611d74565b61033e61065d3660046143f7565b611d7f565b61033e610670366004614231565b611eca565b610563600481565b61033e61068b366004614357565b611f34565b6102f57f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61033e6106c53660046142af565b611fe3565b61033e6106d836600461408f565b612009565b6102f57f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61031b610712366004613e4e565b612041565b61033e610725366004613f26565b61209b565b61033e6107383660046140e1565b612136565b60006001600160a01b0383166107c05760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006107e3826121cf565b60006108008133612225565b610809826122a5565b5050565b60606002805461081c90614a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461084890614a0a565b80156108955780601f1061086a57610100808354040283529160200191610895565b820191906000526020600020905b81548152906001019060200180831161087857829003601f168201915b50505050509050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66108cc8133612225565b60005b84518110156109c157600b60008683815181106108fc57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182528101919091526040016000205460ff16806109635750600c600086838151811061094457634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182528101919091526040016000205460ff165b6109af5760405162461bcd60e51b815260206004820152601360248201527f4368657374207761736e2774207365747570210000000000000000000000000060448201526064016107b7565b806109b981614a72565b9150506108cf565b506109ce858585856122b8565b5050505050565b6001600160a01b0385163314806109f157506109f18533612041565b610a635760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016107b7565b6109ce85858585856124da565b600082815260036020526040902060010154610a8c8133612225565b610a96838361279a565b505050565b6001600160a01b0381163314610b195760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016107b7565b610809828261283c565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610b4e8133612225565b610b566128bf565b50565b60608151835114610bd25760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016107b7565b6000835167ffffffffffffffff811115610bfc57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c25578160200160208202803683370190505b50905060005b8451811015610cc757610c8c858281518110610c5757634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610c7f57634e487b7160e01b600052603260045260246000fd5b602002602001015161073d565b828281518110610cac57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610cc081614a72565b9050610c2b565b509392505050565b323314610d1e5760405162461bcd60e51b815260206004820152601260248201527f5265616c6c792c20636f6e74726163743f21000000000000000000000000000060448201526064016107b7565b60008181526006602052604090205460ff1615610da35760405162461bcd60e51b815260206004820152602a60248201527f47756e6669726543686573743a2054686973206973206e6f742065717569706d60448201527f656e74204368657374210000000000000000000000000000000000000000000060648201526084016107b7565b610daf33826001612136565b6000818152600b60209081526040808320815161010081018352815460ff1615158152600182015481850152600282015481840152600382018054845181870281018701909552808552919492936060860193909290830182828015610e3457602002820191906000526020600020905b815481526020019060010190808311610e20575b5050505050815260200160048201805480602002602001604051908101604052809291908181526020018280548015610e8c57602002820191906000526020600020905b815481526020019060010190808311610e78575b5050505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015610ee457602002820191906000526020600020905b815481526020019060010190808311610ed0575b5050505050815260200160068201805480602002602001604051908101604052809291908181526020018280548015610f3c57602002820191906000526020600020905b815481526020019060010190808311610f28575b5050505050815260200160078201805480602002602001604051908101604052809291908181526020018280548015610f9457602002820191906000526020600020905b815481526020019060010190808311610f80575b5050505050815250509050806060015151600014611130576000610fbe600954836080015161295b565b9050600082606001518281518110610fe657634e487b7160e01b600052603260045260246000fd5b60200260200101519050600061101c6009548560200151866040015161100c919061498e565b611017906001614939565b612ac9565b846020015161102b9190614939565b6009546000878152600760209081526040808320878452909152812054929350916110569190612ac9565b60008781526007602090815260408083208784529091528120805492935090918390811061109457634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600a549091506001600160a01b031663b0b49c9833836110c2886103e8614951565b6110cc9190614939565b8660046000806000806040518963ffffffff1660e01b81526004016110f8989796959493929190614837565b600060405180830381600087803b15801561111257600080fd5b505af1158015611126573d6000803e3d6000fd5b5050505050505050505b60006111426009548360e0015161295b565b905060008260a00151828151811061116a57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160095460008781526008845260408082208483529094529283205491935061119d91612ac9565b6000868152600860209081526040808320868452909152812080549293509091839081106111db57634e487b7160e01b600052603260045260246000fd5b60009182526020822001549150816111f5856103e8614951565b6111ff9190614939565b9050600a60009054906101000a90046001600160a01b03166001600160a01b031663e965099333838960c00151898151811061124b57634e487b7160e01b600052603260045260246000fd5b602002602001015160016040518563ffffffff1660e01b815260040161127494939291906147d9565b600060405180830381600087803b15801561128e57600080fd5b505af11580156112a2573d6000803e3d6000fd5b5050505050505050505050565b6001600160a01b0383163314806112cb57506112cb8333612041565b61133d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f766564000000000000000000000000000000000000000000000060648201526084016107b7565b610a96838383612aff565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66113738133612225565b6000848152600b602052604090205460ff168061139e57506000848152600c602052604090205460ff165b6113ea5760405162461bcd60e51b815260206004820152601360248201527f4368657374207761736e2774207365747570210000000000000000000000000060448201526064016107b7565b6109ce85858585612daa565b60006114028133612225565b60008881526006602052604090205460ff166114605760405162461bcd60e51b815260206004820152601060248201527f4e6f74205365747570204368657374210000000000000000000000000000000060448201526064016107b7565b6000888152600c6020526040902061147c600382018989613bbf565b5061148b600582018787613bbf565b5061149a600782018585613bbf565b50505050505050505050565b3233146114f55760405162461bcd60e51b815260206004820152601260248201527f5265616c6c792c20636f6e74726163743f21000000000000000000000000000060448201526064016107b7565b60008181526006602052604090205460ff166115795760405162461bcd60e51b815260206004820152602560248201527f47756e6669726543686573743a2054686973206973206e6f74204865726f204360448201527f686573742100000000000000000000000000000000000000000000000000000060648201526084016107b7565b61158533826001612136565b6000818152600c60205260408082208151600380825260808201909352909291816020016020820280368337505060408051600380825260808201909252929350600092915060208201606080368337019050509050600061163b6009548560020180548060200260200160405190810160405280929190818152602001828054801561163157602002820191906000526020600020905b81548152602001906001019080831161161d575b505050505061295b565b9050600061169b60095486600401805480602002602001604051908101604052809291908181526020018280548015611631576020028201919060005260206000209081548152602001906001019080831161161d57505050505061295b565b90508460030181815481106116c057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154846000815181106116ec57634e487b7160e01b600052603260045260246000fd5b60200260200101818152505084600101828154811061171b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001548360008151811061174757634e487b7160e01b600052603260045260246000fd5b60200260200101818152505060006117b160095487600601805480602002602001604051908101604052809291908181526020018280548015611631576020028201919060005260206000209081548152602001906001019080831161161d57505050505061295b565b90508560050181815481106117d657634e487b7160e01b600052603260045260246000fd5b90600052602060002001548560018151811061180257634e487b7160e01b600052603260045260246000fd5b60200260200101818152505061189a6009548760090160008860018151811061183b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205488600a0160008960018151811061187957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205461100c919061498e565b866009016000876001815181106118c157634e487b7160e01b600052603260045260246000fd5b60200260200101518152602001908152602001600020546118e29190614939565b8460018151811061190357634e487b7160e01b600052603260045260246000fd5b602002602001018181525050600061196d60095488600801805480602002602001604051908101604052809291908181526020018280548015611631576020028201919060005260206000209081548152602001906001019080831161161d57505050505061295b565b905086600701818154811061199257634e487b7160e01b600052603260045260246000fd5b9060005260206000200154866002815181106119be57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050611a35600954886009016000896002815181106119f757634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000205489600a0160008a60028151811061187957634e487b7160e01b600052603260045260246000fd5b87600901600088600281518110611a5c57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002054611a7d9190614939565b85600281518110611a9e57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152600a546040517f1f7fdffa0000000000000000000000000000000000000000000000000000000081526001600160a01b0390911690631f7fdffa90611af69033908a908a90600401614762565b600060405180830381600087803b158015611b1057600080fd5b505af1158015611b24573d6000803e3d6000fd5b505050505050505050505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a611b5d8133612225565b610b56612ed6565b6000611b718133612225565b8451865114611bc25760405162461bcd60e51b815260206004820152601b60248201527f536574757043686573743a205365742031204d69736d6174636821000000000060448201526064016107b7565b8151845114611c135760405162461bcd60e51b815260206004820152601b60248201527f536574757043686573743a205365742032204d69736d6174636821000000000060448201526064016107b7565b8251845114611c645760405162461bcd60e51b815260206004820152601e60248201527f536574757043686573743a205261726974792032204d69736d6174636821000060448201526064016107b7565b60405180610100016040528060011515815260200189815260200188815260200187815260200186815260200185815260200184815260200183815250600b60008b815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160010155604082015181600201556060820151816003019080519060200190611d04929190613c0a565b5060808201518051611d20916004840191602090910190613c0a565b5060a08201518051611d3c916005840191602090910190613c0a565b5060c08201518051611d58916006840191602090910190613c0a565b5060e08201518051611b24916007840191602090910190613c0a565b610809338383612f5e565b6000611d8b8133612225565b60008c8152600660209081526040808320805460ff19166001908117909155600c90925290912090611dc09082018d8d613bbf565b50611dcf600282018b8b613bbf565b5060005b87811015611eba57868682818110611dfb57634e487b7160e01b600052603260045260246000fd5b905060200201358260090160008b8b85818110611e2857634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002081905550848482818110611e6157634e487b7160e01b600052603260045260246000fd5b9050602002013582600a0160008b8b85818110611e8e57634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020819055508080611eb290614a72565b915050611dd3565b5050505050505050505050505050565b6000611ed68133612225565b8515611f065760008581526007602090815260408083208784529091529020611f00908484613bbf565b50611f2c565b60008581526008602090815260408083208784529091529020611f2a908484613bbf565b505b505050505050565b6000611f408133612225565b60008881526006602052604090205460ff16611f9e5760405162461bcd60e51b815260206004820152601060248201527f4e6f74205365747570204368657374210000000000000000000000000000000060448201526064016107b7565b6000888152600c60205260409020805460ff19166001178155611fc5600482018989613bbf565b50611fd4600682018787613bbf565b5061149a600882018585613bbf565b600082815260036020526040902060010154611fff8133612225565b610a96838361283c565b60006120158133612225565b506001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b6001600160a01b03811660009081526005602052604081205460ff161561206a575060016107e3565b6001600160a01b0380841660009081526001602090815260408083209386168352929052205460ff165b9392505050565b6001600160a01b0385163314806120b757506120b78533612041565b6121295760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f766564000000000000000000000000000000000000000000000060648201526084016107b7565b6109ce8585858585613053565b6001600160a01b03831633148061215257506121528333612041565b6121c45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f766564000000000000000000000000000000000000000000000060648201526084016107b7565b610a96838383613213565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107e357506107e3826133bf565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff1661080957612263816001600160a01b031660146134a2565b61226e8360206134a2565b60405160200161227f929190614640565b60408051601f198184030181529082905262461bcd60e51b82526107b791600401614902565b8051610809906002906020840190613c45565b6001600160a01b0384166123345760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016107b7565b81518351146123ab5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016107b7565b336123bb81600087878787613711565b60005b8451811015612472578381815181106123e757634e487b7160e01b600052603260045260246000fd5b602002602001015160008087848151811061241257634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461245a9190614939565b9091555081905061246a81614a72565b9150506123be565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516124c39291906148d4565b60405180910390a46109ce81600087878787613769565b81518351146125515760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016107b7565b6001600160a01b0384166125cd5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016107b7565b336125dc818787878787613711565b60005b845181101561273457600085828151811061260a57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061263657634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156126dc5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e736665720000000000000000000000000000000000000000000060648201526084016107b7565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612719908490614939565b925050819055505050508061272d90614a72565b90506125df565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516127849291906148d4565b60405180910390a4611f2c818787878787613769565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff166108095760008281526003602090815260408083206001600160a01b03851684529091529020805460ff191660011790556127f83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff16156108095760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60045460ff166129115760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016107b7565b6004805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000806129678461397d565b9050806009819055506000835160011415612987576000925050506107e3565b60015b8451811015612a0e578461299f60018361498e565b815181106129bd57634e487b7160e01b600052603260045260246000fd5b60200260200101518582815181106129e557634e487b7160e01b600052603260045260246000fd5b602002602001018181516129f99190614939565b90525080612a0681614a72565b91505061298a565b508360018551612a1e919061498e565b81518110612a3c57634e487b7160e01b600052603260045260246000fd5b602002602001015190508060001415612a5a576000925050506107e3565b612a648183614aab565b915060005b8451811015612abd57848181518110612a9257634e487b7160e01b600052603260045260246000fd5b6020026020010151831015612aab5792506107e3915050565b80612ab581614a72565b915050612a69565b50600095945050505050565b600081612ad8575060006107e3565b8160011415612ae657600291505b612aef8361397d565b6009819055612094908390614aab565b6001600160a01b038316612b7b5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016107b7565b8051825114612bf25760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016107b7565b6000339050612c1581856000868660405180602001604052806000815250613711565b60005b8351811015612d4b576000848281518110612c4357634e487b7160e01b600052603260045260246000fd5b602002602001015190506000848381518110612c6f57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015612d145760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e63650000000000000000000000000000000000000000000000000000000060648201526084016107b7565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580612d4381614a72565b915050612c18565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612d9c9291906148d4565b60405180910390a450505050565b6001600160a01b038416612e265760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016107b7565b33612e4681600087612e37886139fc565b612e40886139fc565b87613711565b6000848152602081815260408083206001600160a01b038916845290915281208054859290612e76908490614939565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46109ce81600087878787613a55565b60045460ff1615612f295760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107b7565b6004805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861293e3390565b816001600160a01b0316836001600160a01b03161415612fe65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016107b7565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166130cf5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016107b7565b336130df818787612e37886139fc565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156131765760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e736665720000000000000000000000000000000000000000000060648201526084016107b7565b6000858152602081815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906131b3908490614939565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f2a828888888888613a55565b6001600160a01b03831661328f5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016107b7565b336132be818560006132a0876139fc565b6132a9876139fc565b60405180602001604052806000815250613711565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156133545760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e63650000000000000000000000000000000000000000000000000000000060648201526084016107b7565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a2600000000000000000000000000000000000000000000000000000000148061345257507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b806107e357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107e3565b606060006134b1836002614951565b6134bc906002614939565b67ffffffffffffffff8111156134e257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561350c576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061355157634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106135c257634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006135fe846002614951565b613609906001614939565b90505b60018111156136c2577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061365857634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061367c57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c936136bb816149d5565b905061360c565b5083156120945760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107b7565b60045460ff16156137645760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016107b7565b611f2c565b6001600160a01b0384163b15611f2c576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c81906137c690899089908890889088906004016146c1565b602060405180830381600087803b1580156137e057600080fd5b505af1925050508015613810575060408051601f3d908101601f1916820190925261380d918101906142ed565b60015b6138c65761381c614af7565b806308c379a014156138565750613831614b0f565b8061383c5750613858565b8060405162461bcd60e51b81526004016107b79190614902565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016107b7565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c810000000000000000000000000000000000000000000000000000000014611f2a5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e7300000000000000000000000000000000000000000000000060648201526084016107b7565b60008061398b60014361498e565b40425a60408051602081019490945283019190915260608083019190915233901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660808201526094810184905260b40160408051601f1981840301815291905280516020909101209392505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613a4457634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b15611f2c576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e6190613ab2908990899088908890889060040161471f565b602060405180830381600087803b158015613acc57600080fd5b505af1925050508015613afc575060408051601f3d908101601f19168201909252613af9918101906142ed565b60015b613b085761381c614af7565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e610000000000000000000000000000000000000000000000000000000014611f2a5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e7300000000000000000000000000000000000000000000000060648201526084016107b7565b828054828255906000526020600020908101928215613bfa579160200282015b82811115613bfa578235825591602001919060010190613bdf565b50613c06929150613cb8565b5090565b828054828255906000526020600020908101928215613bfa579160200282015b82811115613bfa578251825591602001919060010190613c2a565b828054613c5190614a0a565b90600052602060002090601f016020900481019282613c735760008555613bfa565b82601f10613c8c57805160ff1916838001178555613bfa565b82800160010185558215613bfa5791820182811115613bfa578251825591602001919060010190613c2a565b5b80821115613c065760008155600101613cb9565b600067ffffffffffffffff831115613ce757613ce7614ae1565b604051613cfe6020601f19601f8701160182614a45565b809150838152848484011115613d1357600080fd5b83836020830137600060208583010152509392505050565b80356001600160a01b0381168114613d4257600080fd5b919050565b60008083601f840112613d58578182fd5b50813567ffffffffffffffff811115613d6f578182fd5b6020830191508360208260051b8501011115613d8a57600080fd5b9250929050565b600082601f830112613da1578081fd5b81356020613dae82614915565b604051613dbb8282614a45565b8381528281019150858301600585901b87018401881015613dda578586fd5b855b85811015613df857813584529284019290840190600101613ddc565b5090979650505050505050565b80358015158114613d4257600080fd5b600082601f830112613e25578081fd5b61209483833560208501613ccd565b600060208284031215613e45578081fd5b61209482613d2b565b60008060408385031215613e60578081fd5b613e6983613d2b565b9150613e7760208401613d2b565b90509250929050565b600080600080600060a08688031215613e97578081fd5b613ea086613d2b565b9450613eae60208701613d2b565b9350604086013567ffffffffffffffff80821115613eca578283fd5b613ed689838a01613d91565b94506060880135915080821115613eeb578283fd5b613ef789838a01613d91565b93506080880135915080821115613f0c578283fd5b50613f1988828901613e15565b9150509295509295909350565b600080600080600060a08688031215613f3d578081fd5b613f4686613d2b565b9450613f5460208701613d2b565b93506040860135925060608601359150608086013567ffffffffffffffff811115613f7d578182fd5b613f1988828901613e15565b600080600060608486031215613f9d578283fd5b613fa684613d2b565b9250602084013567ffffffffffffffff80821115613fc2578384fd5b613fce87838801613d91565b93506040860135915080821115613fe3578283fd5b50613ff086828701613d91565b9150509250925092565b6000806000806080858703121561400f578384fd5b61401885613d2b565b9350602085013567ffffffffffffffff80821115614034578485fd5b61404088838901613d91565b94506040870135915080821115614055578384fd5b61406188838901613d91565b93506060870135915080821115614076578283fd5b5061408387828801613e15565b91505092959194509250565b600080604083850312156140a1578182fd5b6140aa83613d2b565b9150613e7760208401613e05565b600080604083850312156140ca578182fd5b6140d383613d2b565b946020939093013593505050565b6000806000606084860312156140f5578081fd5b6140fe84613d2b565b95602085013595506040909401359392505050565b60008060008060808587031215614128578182fd5b61413185613d2b565b93506020850135925060408501359150606085013567ffffffffffffffff81111561415a578182fd5b61408387828801613e15565b60008060408385031215614178578182fd5b823567ffffffffffffffff8082111561418f578384fd5b818501915085601f8301126141a2578384fd5b813560206141af82614915565b6040516141bc8282614a45565b8381528281019150858301600585901b870184018b10156141db578889fd5b8896505b84871015614204576141f081613d2b565b8352600196909601959183019183016141df565b509650508601359250508082111561421a578283fd5b5061422785828601613d91565b9150509250929050565b600080600080600060808688031215614248578283fd5b61425186613e05565b94506020860135935060408601359250606086013567ffffffffffffffff81111561427a578182fd5b61428688828901613d47565b969995985093965092949392505050565b6000602082840312156142a8578081fd5b5035919050565b600080604083850312156142c1578182fd5b82359150613e7760208401613d2b565b6000602082840312156142e2578081fd5b813561209481614bb7565b6000602082840312156142fe578081fd5b815161209481614bb7565b60006020828403121561431a578081fd5b813567ffffffffffffffff811115614330578182fd5b8201601f81018413614340578182fd5b61434f84823560208401613ccd565b949350505050565b60008060008060008060006080888a031215614371578485fd5b87359650602088013567ffffffffffffffff8082111561438f578687fd5b61439b8b838c01613d47565b909850965060408a01359150808211156143b3578384fd5b6143bf8b838c01613d47565b909650945060608a01359150808211156143d7578384fd5b506143e48a828b01613d47565b989b979a50959850939692959293505050565b600080600080600080600080600080600060c08c8e031215614417578485fd5b8b359a5067ffffffffffffffff8060208e01351115614434578586fd5b6144448e60208f01358f01613d47565b909b50995060408d0135811015614459578586fd5b6144698e60408f01358f01613d47565b909950975060608d013581101561447e578586fd5b61448e8e60608f01358f01613d47565b909750955060808d01358110156144a3578485fd5b6144b38e60808f01358f01613d47565b909550935060a08d01358110156144c8578283fd5b506144d98d60a08e01358e01613d47565b81935080925050509295989b509295989b9093969950565b600080600080600080600080610100898b03121561450d578182fd5b883597506020890135965060408901359550606089013567ffffffffffffffff80821115614539578384fd5b6145458c838d01613d91565b965060808b013591508082111561455a578384fd5b6145668c838d01613d91565b955060a08b013591508082111561457b578384fd5b6145878c838d01613d91565b945060c08b013591508082111561459c578384fd5b6145a88c838d01613d91565b935060e08b01359150808211156145bd578283fd5b506145ca8b828c01613d91565b9150509295985092959890939650565b6000815180845260208085019450808401835b83811015614609578151875295820195908201906001016145ed565b509495945050505050565b6000815180845261462c8160208601602086016149a5565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516146788160178501602088016149a5565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516146b58160288401602088016149a5565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a060408301526146ed60a08301866145da565b82810360608401526146ff81866145da565b905082810360808401526147138185614614565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261475760a0830184614614565b979650505050505050565b6001600160a01b038416815260806020820152600061478460808301856145da565b828103604084015261479681856145da565b8381036060850152600481527f307830300000000000000000000000000000000000000000000000000000000060208201529050604081015b9695505050505050565b6001600160a01b038516815283602082015282604082015281606082015260a0608082015260006147cf60a08301600481527f3078303000000000000000000000000000000000000000000000000000000000602082015260400190565b60006101206001600160a01b038b16835289602084015288604084015260ff881660608401528660808401528560a08401528460c08401528360e0840152806101008401526148b2818401600481527f3078303000000000000000000000000000000000000000000000000000000000602082015260400190565b9b9a5050505050505050505050565b60208152600061209460208301846145da565b6040815260006148e760408301856145da565b82810360208401526148f981856145da565b95945050505050565b6020815260006120946020830184614614565b600067ffffffffffffffff82111561492f5761492f614ae1565b5060051b60200190565b6000821982111561494c5761494c614acb565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561498957614989614acb565b500290565b6000828210156149a0576149a0614acb565b500390565b60005b838110156149c05781810151838201526020016149a8565b838111156149cf576000848401525b50505050565b6000816149e4576149e4614acb565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680614a1e57607f821691505b60208210811415614a3f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f19601f830116810181811067ffffffffffffffff82111715614a6b57614a6b614ae1565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614aa457614aa4614acb565b5060010190565b600082614ac657634e487b7160e01b81526012600452602481fd5b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614b0c57600481823e5160e01c5b90565b600060443d1015614b1d5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715614b6b57505050505090565b8285019150815181811115614b835750505050505090565b843d8701016020828501011115614b9d5750505050505090565b614bac60208286010187614a45565b509095945050505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610b5657600080fdfea26469706673582212207a789f1cc63ad282ce9d1ad5524679ba42601f7dca8c601e7b98b7959f6559d364736f6c6343000804003368747470733a2f2f6170692e67756e66697265617661782e696f2f63686573742f7b69647d2e6a736f6e000000000000000000000000c4957dc87e1cbd031621f9aae8346c35384d4e69

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

000000000000000000000000c4957dc87e1cbd031621f9aae8346c35384d4e69

-----Decoded View---------------
Arg [0] : _nftAddress (address): 0xc4957dc87e1cbd031621f9aae8346c35384d4e69

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c4957dc87e1cbd031621f9aae8346c35384d4e69


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.