Contract 0xdcdaB251151c345AD527851ECa783521Ea3209E0 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xbcf7ea85c44cf8ede0235cece1de85fcb749fec2f7da3c950cb96221ceec255fSet Ghostmarket ...153867412022-05-30 20:01:32124 days 17 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.000783978 26
0x49cb8ec57443b83d6c2de3d193a21712ca3a08a9bed271d29aa67d154924e94fWithdraw153867372022-05-30 20:01:24124 days 17 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.000967044 26
0xd3e269145fb5031b4388cd71e51d6b27293de2450f707b4a15fcf7d1ef917f40Set Approval For...141746732022-05-02 11:07:42153 days 2 hrs ago0x72148258c0b59a8ed53b7a6badc87b90f1debbfe IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.002837245713 61.462798696
0x5977f1ace2874c95dc5f55810cfa0784a2673578dec4c4373669c9a647f6d359Safe Transfer Fr...141746732022-05-02 11:07:42153 days 2 hrs ago0x72148258c0b59a8ed53b7a6badc87b90f1debbfe IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.003782191415 64.191979217
0xeea99c03f9d1d731f35f419299e776509999af36e7896c5ab6e56723d52e28beSafe Transfer Fr...141746732022-05-02 11:07:42153 days 2 hrs ago0x72148258c0b59a8ed53b7a6badc87b90f1debbfe IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.003545616297 60.176787133
0x01fa7140d7101f76d00988651037973d243c592d4e958247e08f35772406e34c0x83fa237b141743962022-05-02 10:58:18153 days 2 hrs ago0x72148258c0b59a8ed53b7a6badc87b90f1debbfe IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.00871558509 60.395716734
0x0dec8ef5e0a027f6edfba0d1f78cfd0fc727885d70ae720f6c65d4e5b7815d350x83fa237b131197462022-04-07 18:35:55177 days 19 hrs ago0xb6556a0ea8cfc92a42d1646eb0eaf40efb7463f9 IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.007348786155 96.348460868
0xb628b778e902abe6c9078f71b35e6991064aa899257e9a78ed9e1e801a74e18cSet Approval For...113071532022-02-23 20:59:54220 days 16 hrs ago0xdcd0cdbbd2e2e4fa0d8e736c6fd24b884cb6a72a IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.00115405 25
0x02e4c315efc5512dc04b1d5ac2af26b4287b8bdc4a46d56f0b000e87d39b0c250x83fa237b113069362022-02-23 20:52:40220 days 16 hrs ago0xdcd0cdbbd2e2e4fa0d8e736c6fd24b884cb6a72a IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.005071291201 35.145057393
0x3c440f4ac4deed980b0b8be9ee385ea8ab5b599206f0e9313579b7f55b752e050x83fa237b113069212022-02-23 20:52:10220 days 16 hrs ago0xdcd0cdbbd2e2e4fa0d8e736c6fd24b884cb6a72a IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.005019457916 34.785842409
0x62c8c3af5bcfaccf72b9e36479878cd8c6881f82d659d272afc202b3eca139db0x83fa237b113069212022-02-23 20:52:10220 days 16 hrs ago0xdcd0cdbbd2e2e4fa0d8e736c6fd24b884cb6a72a IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.004940879941 34.241281406
0x5a21978daaa64681784353b429da54cc4ace31f7663ae486f20a8b02f66e94150x83fa237b110783242022-02-18 11:39:13226 days 2 hrs ago0xe38f7fa724c4d85d6c04f3796663a948d706415d IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.0036071 25
0x52b5a05646fced05e7e2cc7fedc89c451ab176696a7eb11d98d67bd332426b25Set Approval For...107495082022-02-10 20:07:28233 days 17 hrs ago0x9e111f0ba6a963b6e8083ab3ee442d3a7c323e87 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.003198883202 69.296893599
0xeffcfdaad1e67bc8547c33de8d59a707ff2163f8f64b9c84b4bf72c5c846035b0x83fa237b107491022022-02-10 19:53:37233 days 17 hrs ago0x9e111f0ba6a963b6e8083ab3ee442d3a7c323e87 IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.010508589358 72.820559905
0xdbe40b246ee74fae8627ab51cc4770276481c931b9e3c14d13a121982bfa3e18Set Approval For...106301922022-02-08 1:48:35236 days 11 hrs ago0xf13ce4d2f506641cab43edc51257588730d70139 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.001160616743 25.142254313
0x75516c9bfdfe221d433c54263bba9cdcd01fe454cef3d912eb28add48f11c4ef0x83fa237b106300902022-02-08 1:45:27236 days 11 hrs ago0xf13ce4d2f506641cab43edc51257588730d70139 IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.003639520548 25.222601794
0xbe29031658affd7a17424562ebdf48b44d0d8ff9fb4fd038661667dd97881792Burn100520782022-01-25 21:03:01249 days 16 hrs ago0x8d9f1f2be39b3f37692b14cae192254182b8c37f IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.000821475 25
0x89d09ea65cee640ef4ac17dad6dff49e8b12d163410f8bfefd9bb5b5f4174d83Set Approval For...91582532022-01-05 7:23:31270 days 6 hrs ago0x8d9f1f2be39b3f37692b14cae192254182b8c37f IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.00115405 25
0x1e342ed6be76ce66a15368b14089ffca7c58e6767e43373c4273403bf5c546220x83fa237b91569072022-01-05 6:37:50270 days 7 hrs ago0x8d9f1f2be39b3f37692b14cae192254182b8c37f IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.0036074 25
0x0a99fa701cbd5633b6980b25a3b6f0ec287330366d085c18803880d2251484b8Set Approval For...90483782022-01-02 17:52:21272 days 19 hrs ago0xda50343534a5a313d0dd8e74cb572beb62f3516c IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.00115405 25
0x63f68407e872151aae8ff7951b0d5b1b62e205c9e33a0c3c58557d46cff0cc1b0x83fa237b90481912022-01-02 17:46:07272 days 19 hrs ago0xda50343534a5a313d0dd8e74cb572beb62f3516c IN  0xdcdab251151c345ad527851eca783521ea3209e00.0015 AVAX0.00592859905 36.73324649
0x39ee53c9a9dbd370b8cc491d134b5083879d6e8f79ad496f962b3fe0cf921de3Withdraw77358502021-12-03 3:17:55303 days 10 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.0009295525
0xed97aae81f4739986394ca4a06da5f1f2c9a3d0c9813f7cb71e9dc5091c70b64Set Ghostmarket ...77315872021-12-03 0:53:14303 days 12 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.00118312525
0x97f5a2b7129e76b1f323ced440f8aab68ced311341ce9d18e211c0ad1e4daef7Set Approval For...68778522021-11-13 3:48:41323 days 9 hrs ago0xe42679dd278899c33c28698a5e8abc3a58b71524 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.0006565525
0xa786dd88bd573e746a724821ff6dc00f98c5a44a194c6bd3d77d03c16c52efffSet Approval For...68778392021-11-13 3:48:15323 days 9 hrs ago0xe42679dd278899c33c28698a5e8abc3a58b71524 IN  0xdcdab251151c345ad527851eca783521ea3209e00 AVAX0.0011540525
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x49cb8ec57443b83d6c2de3d193a21712ca3a08a9bed271d29aa67d154924e94f153867372022-05-30 20:01:24124 days 17 hrs ago 0xdcdab251151c345ad527851eca783521ea3209e00x07714a8bf073510996d948d8aa39f8e32627fe620.015 AVAX
0x39ee53c9a9dbd370b8cc491d134b5083879d6e8f79ad496f962b3fe0cf921de377358502021-12-03 3:17:55303 days 10 hrs ago 0xdcdab251151c345ad527851eca783521ea3209e00x07714a8bf073510996d948d8aa39f8e32627fe620.006 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GhostMarketERC1155

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 1337 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 22 : GhostmarketERC1155.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./ERC1155PresetMinterPauserUpgradeableCustom.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol";

/**
 * @dev ERC1155 token with minting, burning, pause, royalties & lock content functions.
 */

contract GhostMarketERC1155 is Initializable, ERC1155PresetMinterPauserUpgradeableCustom, ReentrancyGuardUpgradeable, OwnableUpgradeable, ERC165StorageUpgradeable {
	string public name;
	string public symbol;

	// struct for royalties fees
	struct Royalty {
		address payable recipient;
		uint256 value;
	}

	// tokenId => royalties array
	mapping(uint256 => Royalty[]) internal _royalties;

	// tokenId => locked content array
	mapping(uint256 => string) internal _lockedContent;

	// tokenId => locked content view counter array
	mapping(uint256 => uint256) internal _lockedContentViewTracker;
    
    // tokenId => attributes array
	mapping(uint256 => string) internal _metadataJson;

	// events
	event LockedContentViewed(address msgSender, uint256 tokenId, string lockedContent);
	event MintFeesWithdrawn(address feeWithdrawer, uint256 withdrawAmount);
	event MintFeesUpdated(address feeUpdater, uint256 newValue);
	event Minted(address toAddress, uint256 tokenId, string externalURI, uint256 amount);

    // mint fees balance
	uint256 internal _payedMintFeesBalance;

	// mint fees value
	uint256 internal _ghostmarketMintFees;

	/**
	 * bytes4(keccak256(_INTERFACE_ID_ERC1155_GHOSTMARKET)) == 0x94407210
	 */
	bytes4 constant _INTERFACE_ID_ERC1155_GHOSTMARKET = bytes4(keccak256("_INTERFACE_ID_ERC1155_GHOSTMARKET"));

	/**
	 * bytes4(keccak256(_GHOSTMARKET_NFT_ROYALTIES)) == 0xe42093a6
	 */
	bytes4 constant _GHOSTMARKET_NFT_ROYALTIES = bytes4(keccak256("_GHOSTMARKET_NFT_ROYALTIES"));

	function initialize(string memory _name, string memory _symbol, string memory uri)
        public
        virtual
        initializer
    {
		__Context_init_unchained();
		__ERC165_init_unchained();
		__AccessControl_init_unchained();
		__AccessControlEnumerable_init_unchained();
		__ERC1155_init_unchained(uri);
		__ERC1155Burnable_init_unchained();
		__Pausable_init_unchained();
		__ERC1155Pausable_init_unchained();
		__ERC1155PresetMinterPauser_init_unchained();
		__Ownable_init_unchained();
		_registerInterface(_INTERFACE_ID_ERC1155_GHOSTMARKET);
		_registerInterface(_GHOSTMARKET_NFT_ROYALTIES);
		name = _name;
		symbol = _symbol;
		_tokenIdTracker.increment();
	}

	using CountersUpgradeable for CountersUpgradeable.Counter;

	// _tokenIdTracker to generate automated token IDs
	CountersUpgradeable.Counter private _tokenIdTracker;

	/**
	 * @dev See {IERC165-supportsInterface}.
	 */
	function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155PresetMinterPauserUpgradeableCustom, ERC165StorageUpgradeable) returns (bool) {
		return super.supportsInterface(interfaceId);
	}
	
	/**
		* @dev check if msg.sender is owner of NFT id
		*/
	function _ownerOf(uint256 tokenId)
			internal
			view
			returns (bool)
	{
			return balanceOf(msg.sender, tokenId) != 0;
	}


    /**
	 * @dev set a NFT royalties fees & recipients
	 * fee basis points 10000 = 100%
	 */
	function _saveRoyalties(uint256 tokenId, Royalty[] memory royalties)
        internal
    {
		for (uint256 i = 0; i < royalties.length; i++) {
			require(royalties[i].recipient != address(0x0), "Recipient should be present");
			require(royalties[i].value > 0, "Royalties value should be positive");
            require(royalties[i].value <= 5000, "Royalties value should not be more than 50%");
			_royalties[tokenId].push(royalties[i]);
		}
	}

    /**
	 * @dev set a NFT custom attributes to contract storage
	 */
	function _setMetadataJson(uint256 tokenId, string memory metadataJson)
        internal
    {
		_metadataJson[tokenId] = metadataJson;
	}

	/**
	 * @dev set a NFT locked content as string
	 */
	function _setLockedContent(uint256 tokenId, string memory content)
        internal
    {
		_lockedContent[tokenId] = content;
	}

	/**
	 * @dev check mint fees sent to contract
	 * emits MintFeesPaid event if set
	 */
	function _checkMintFees()
        internal
    {
		if (_ghostmarketMintFees > 0) {
			require(msg.value == _ghostmarketMintFees, "Wrong fees value sent to GhostMarket for mint fees");
		}
		if (msg.value > 0) {
			_payedMintFeesBalance += msg.value;
		}
	}

	/**
	 * @dev increment a NFT locked content view tracker
	 */
	function _incrementCurrentLockedContentViewTracker(uint256 tokenId)
        internal
    {
		_lockedContentViewTracker[tokenId] = _lockedContentViewTracker[tokenId] + 1;
	}

	/**
	 * @dev mint NFT, set royalties, set metadata json, set lockedcontent
	 * emits Minted event
	 */
	function mintGhost(address to, uint256 amount, bytes memory data, Royalty[] memory royalties, string memory externalURI, string memory metadata, string memory lockedcontent)
        external
        payable
        nonReentrant
    {
		require(to != address(0x0), "to can't be empty");
		require(keccak256(abi.encodePacked(externalURI)) != keccak256(abi.encodePacked("")), "externalURI can't be empty");
		mint(to, _tokenIdTracker.current(), amount, data);
		if (royalties.length > 0) {
			_saveRoyalties(_tokenIdTracker.current(), royalties);
		}
		if (keccak256(abi.encodePacked(metadata)) != keccak256(abi.encodePacked(""))) {
			_setMetadataJson(_tokenIdTracker.current(), metadata);
		}
		if (keccak256(abi.encodePacked(lockedcontent)) != keccak256(abi.encodePacked(""))) {
			_setLockedContent(_tokenIdTracker.current(), lockedcontent);
		}
		_checkMintFees();
		emit Minted(to, _tokenIdTracker.current(), externalURI, amount);
		_tokenIdTracker.increment();
	}

	/**
	 * @dev withdraw contract balance
	 * emits MintFeesWithdrawn event
	 */
	function withdraw(uint256 withdrawAmount)
        external
        onlyOwner
    {
		require(withdrawAmount > 0 && withdrawAmount <= _payedMintFeesBalance, "Withdraw amount should be greater then 0 and less then contract balance");
		_payedMintFeesBalance -= withdrawAmount;
		(bool success, ) = msg.sender.call{value: withdrawAmount}("");
		require(success, "Transfer failed.");
		emit MintFeesWithdrawn(msg.sender, withdrawAmount);
	}

    /**
	 * @dev sets Ghostmarket mint fees as uint256
	 * emits MintFeesUpdated event
	 */
	function setGhostmarketMintFee(uint256 gmmf)
        external
    {
		require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Caller must have admin role to set mint fees");
		_ghostmarketMintFees = gmmf;
		emit MintFeesUpdated(msg.sender, _ghostmarketMintFees);
	}

	/**
	 * @return get Ghostmarket mint fees
	 */
	function getGhostmarketMintFees()
        external
        view
        returns (uint256)
    {
		return _ghostmarketMintFees;
	}

	/**
	 * @dev get locked content for a NFT
	 * emits LockedContentViewed event
	 */
	function getLockedContent(uint256 tokenId)
        external
    {
    require(_ownerOf(tokenId), "Caller must be the owner of the NFT");
		_incrementCurrentLockedContentViewTracker(tokenId);
		emit LockedContentViewed(msg.sender, tokenId, _lockedContent[tokenId]);
	}

	/**
	 * @dev get a NFT current locked content view tracker
	 */
	function getCurrentLockedContentViewTracker(uint256 tokenId)
        external
        view
        returns (uint256)
    {
		return _lockedContentViewTracker[tokenId];
	}

	/**
	 * @dev get a NFT custom attributes
	 */
	function getMetadataJson(uint256 tokenId)
        external
        view
        returns (string memory)
    {
		return _metadataJson[tokenId];
	}

	/**
	 * @dev get royalties array
	 */
	function getRoyalties(uint256 tokenId)
        external
        view
        returns (Royalty[] memory)
    {
		return 	_royalties[tokenId];
	}

	/**
	 * @dev get a NFT royalties recipients
	 */
	function getRoyaltiesRecipients(uint256 tokenId)
        external
        view
        returns (address payable[] memory)
    {
		Royalty[] memory royalties = _royalties[tokenId];
		address payable[] memory result = new address payable[](royalties.length);
		for (uint256 i = 0; i < royalties.length; i++) {
			result[i] = royalties[i].recipient;
		}
		return result;
	}

	/**
	 * @dev get a NFT royalties fees
	 * fee basis points 10000 = 100%
	 */
	function getRoyaltiesBps(uint256 tokenId)
        external
        view
        returns (uint256[] memory)
    {
		Royalty[] memory royalties = _royalties[tokenId];
		uint256[] memory result = new uint256[](royalties.length);
		for (uint256 i = 0; i < royalties.length; i++) {
			result[i] = royalties[i].value;
		}
		return result;
	}

  /**
	 * @dev current _tokenIdTracker
	 */
	function getCurrentCounter()
        external
        view
        returns (uint256)
    {
		return _tokenIdTracker.current();
	}

	uint256[50] private __gap;
}

File 2 of 22 : ERC1155PresetMinterPauserUpgradeableCustom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @dev {ERC1155} token, including:
 *
 *  - ability for holders to burn (destroy) their tokens
 *  - a minter role that allows for token minting (creation)
 *  - a pauser role that allows to stop all token transfers
 *
 * This contract uses {AccessControl} to lock permissioned functions using the
 * different roles - head to its documentation for details.
 *
 * The account that deploys the contract will be granted the minter and pauser
 * roles, as well as the default admin role, which will let it grant both minter
 * and pauser roles to other accounts.
 */
contract ERC1155PresetMinterPauserUpgradeableCustom is
	Initializable,
	ContextUpgradeable,
	AccessControlEnumerableUpgradeable,
	ERC1155BurnableUpgradeable,
	ERC1155PausableUpgradeable
{

	bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
	bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
	bytes32 public constant POLYNETWORK_ROLE = keccak256("POLYNETWORK_ROLE");

	/**
	 * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that
	 * deploys the contract.
	 */
	function __ERC1155PresetMinterPauser_init(string memory uri) internal initializer {
		__Context_init_unchained();
		__ERC165_init_unchained();
		__AccessControl_init_unchained();
		__AccessControlEnumerable_init_unchained();
		__ERC1155_init_unchained(uri);
		__ERC1155Burnable_init_unchained();
		__Pausable_init_unchained();
		__ERC1155Pausable_init_unchained();
		__ERC1155PresetMinterPauser_init_unchained();
	}

	function __ERC1155PresetMinterPauser_init_unchained() internal initializer {
		_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
		_setupRole(MINTER_ROLE, _msgSender());
		_setupRole(PAUSER_ROLE, _msgSender());
		_setupRole(POLYNETWORK_ROLE, _msgSender());
	}

	/**
	 * @dev polynetwork CrossChainNFTMapping
	 */
	function mintWithURI(
		address to,
		uint256 tokenId,
		string memory uri,
		uint256 amount
	) external {
		require(hasRole(POLYNETWORK_ROLE, _msgSender()), "mintWithURI: must have POLYNETWORK_ROLE role to mint");
		_mint(to, tokenId, amount, "");
		_setURI(uri);
	}

	function setURI(string memory uri_) external {
		require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have admin role to set new uri");
		_setURI(uri_);
	}

	/**
	 * @dev Creates `amount` new tokens for `to`, of token type `id`.
	 *
	 * See {ERC1155-_mint}.
	 *
	 * Requirements:
	 *
	 * - the caller must have the `MINTER_ROLE`.
	 */
	function mint(
		address to,
		uint256 id,
		uint256 amount,
		bytes memory data
	) internal virtual {
		_mint(to, id, amount, data);
	}

	/**
	 * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}.
	 */
	function mintBatch(
		address to,
		uint256[] memory ids,
		uint256[] memory amounts,
		bytes memory data
	) internal virtual {
		require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint");

		_mintBatch(to, ids, amounts, data);
	}

	/**
	 * @dev Pauses all token transfers.
	 *
	 * See {ERC1155Pausable} and {Pausable-_pause}.
	 *
	 * Requirements:
	 *
	 * - the caller must have the `PAUSER_ROLE`.
	 */
	function pause() public virtual {
		require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to pause");
		_pause();
	}

	/**
	 * @dev Unpauses all token transfers.
	 *
	 * See {ERC1155Pausable} and {Pausable-_unpause}.
	 *
	 * Requirements:
	 *
	 * - the caller must have the `PAUSER_ROLE`.
	 */
	function unpause() public virtual {
		require(hasRole(PAUSER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have pauser role to unpause");
		_unpause();
	}

	/**
	 * @dev See {IERC165-supportsInterface}.
	 */
	function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable) returns (bool) {
		return super.supportsInterface(interfaceId);
	}

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

	uint256[50] private __gap;
}

File 3 of 22 : CountersUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

File 4 of 22 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
    uint256[49] private __gap;
}

File 5 of 22 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 6 of 22 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

File 7 of 22 : ERC165StorageUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Storage based implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {
    function __ERC165Storage_init() internal initializer {
        __ERC165_init_unchained();
        __ERC165Storage_init_unchained();
    }

    function __ERC165Storage_init_unchained() internal initializer {
    }
    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

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

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
    uint256[49] private __gap;
}

File 8 of 22 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC1155Upgradeable.sol";
import "./IERC1155ReceiverUpgradeable.sol";
import "./extensions/IERC1155MetadataURIUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {
    using AddressUpgradeable 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}.
     */
    function __ERC1155_init(string memory uri_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC1155_init_unchained(uri_);
    }

    function __ERC1155_init_unchained(string memory uri_) internal initializer {
        _setURI(uri_);
    }

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

        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");
        _balances[id][from] = fromBalance - amount;
        _balances[id][to] += amount;

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

        _doSafeTransferAcceptanceCheck(operator, 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(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );

        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");
            _balances[id][from] = fromBalance - amount;
            _balances[id][to] += amount;
        }

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

        return array;
    }
    uint256[47] private __gap;
}

File 9 of 22 : ERC1155BurnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC1155Upgradeable.sol";
import "../../../proxy/utils/Initializable.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 ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable {
    function __ERC1155Burnable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC1155Burnable_init_unchained();
    }

    function __ERC1155Burnable_init_unchained() internal initializer {
    }
    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);
    }
    uint256[50] private __gap;
}

File 10 of 22 : ERC1155PausableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC1155Upgradeable.sol";
import "../../../security/PausableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev ERC1155 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155PausableUpgradeable is Initializable, ERC1155Upgradeable, PausableUpgradeable {
    function __ERC1155Pausable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __Pausable_init_unchained();
        __ERC1155Pausable_init_unchained();
    }

    function __ERC1155Pausable_init_unchained() internal initializer {
    }
    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    )
        internal
        virtual
        override
    {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        require(!paused(), "ERC1155Pausable: token transfer while paused");
    }
    uint256[50] private __gap;
}

File 11 of 22 : AccessControlEnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./AccessControlUpgradeable.sol";
import "../utils/structs/EnumerableSetUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerableUpgradeable {
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {
    function __AccessControlEnumerable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __AccessControl_init_unchained();
        __AccessControlEnumerable_init_unchained();
    }

    function __AccessControlEnumerable_init_unchained() internal initializer {
    }
    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    mapping (bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {grantRole} to track enumerable memberships
     */
    function grantRole(bytes32 role, address account) public virtual override {
        super.grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {revokeRole} to track enumerable memberships
     */
    function revokeRole(bytes32 role, address account) public virtual override {
        super.revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {renounceRole} to track enumerable memberships
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        super.renounceRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {_setupRole} to track enumerable memberships
     */
    function _setupRole(bytes32 role, address account) internal virtual override {
        super._setupRole(role, account);
        _roleMembers[role].add(account);
    }
    uint256[49] private __gap;
}

File 12 of 22 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/*
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
    uint256[50] private __gap;
}

File 13 of 22 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.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 IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @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 14 of 22 : IERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155ReceiverUpgradeable is IERC165Upgradeable {

    /**
        @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 15 of 22 : IERC1155MetadataURIUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.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 IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {
    /**
     * @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 16 of 22 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 17 of 22 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal initializer {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal initializer {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}

File 18 of 22 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @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 19 of 22 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @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.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _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());
    }
    uint256[49] private __gap;
}

File 20 of 22 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    function __AccessControl_init_unchained() internal initializer {
    }
    struct RoleData {
        mapping (address => bool) members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 21 of 22 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    struct Set {
        // Storage of set values
        bytes32[] _values;

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

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

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

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

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

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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


    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

File 22 of 22 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

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

Contract ABI

[{"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":"msgSender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"lockedContent","type":"string"}],"name":"LockedContentViewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeUpdater","type":"address"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"MintFeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeWithdrawer","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"MintFeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"externalURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":[],"name":"POLYNETWORK_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":[],"name":"getCurrentCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCurrentLockedContentViewTracker","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGhostmarketMintFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLockedContent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMetadataJson","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct GhostMarketERC1155.Royalty[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyaltiesBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyaltiesRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"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":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct GhostMarketERC1155.Royalty[]","name":"royalties","type":"tuple[]"},{"internalType":"string","name":"externalURI","type":"string"},{"internalType":"string","name":"metadata","type":"string"},{"internalType":"string","name":"lockedcontent","type":"string"}],"name":"mintGhost","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWithURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gmmf","type":"uint256"}],"name":"setGhostmarketMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50614d0a806100206000396000f3fe6080604052600436106102db5760003560e01c80639010d07c11610184578063d5391393116100d6578063e985e9c51161008a578063f2fde38b11610064578063f2fde38b1461088a578063f5298aca146108aa578063f7d027de146108ca57600080fd5b8063e985e9c5146107f4578063edcbc0bd1461083d578063f242432a1461086a57600080fd5b8063dac0f3d9116100bb578063dac0f3d91461078a578063e24dbeae146107aa578063e63ab1e9146107c057600080fd5b8063d539139314610736578063d547741f1461076a57600080fd5b8063a22cb46511610138578063c1793c5811610112578063c1793c58146106c8578063c6f4f0f0146106e8578063ca15c8731461071657600080fd5b8063a22cb4651461065b578063a6487c531461067b578063bb3bafd61461069b57600080fd5b806395d89b411161016957806395d89b41146105fd5780639ceea66514610612578063a217fddf1461064657600080fd5b80639010d07c1461059757806391d14854146105b757600080fd5b806336568abe1161023d5780636b20c454116101f157806383fa237b116101cb57806383fa237b1461053c5780638456cb591461054f5780638da5cb5b1461056457600080fd5b80636b20c454146104f2578063715018a61461051257806373448c461461052757600080fd5b80633f4ba83a116102225780633f4ba83a146104975780634e1273f4146104ac5780635c975abb146104d957600080fd5b806336568abe1461045757806336edac961461047757600080fd5b80631c7e78f3116102945780632e1a7d4d116102795780632e1a7d4d146103f75780632eb2c2d6146104175780632f2ff15d1461043757600080fd5b80631c7e78f3146103a7578063248a9ca3146103c757600080fd5b806302fe5305116102c557806302fe53051461034357806306fdde03146103655780630e89341c1461038757600080fd5b8062fdd58e146102e057806301ffc9a714610313575b600080fd5b3480156102ec57600080fd5b506103006102fb36600461432d565b6108ea565b6040519081526020015b60405180910390f35b34801561031f57600080fd5b5061033361032e3660046145fb565b610998565b604051901515815260200161030a565b34801561034f57600080fd5b5061036361035e366004614633565b6109a3565b005b34801561037157600080fd5b5061037a610a2c565b60405161030a9190614a6a565b34801561039357600080fd5b5061037a6103a236600461459e565b610abb565b3480156103b357600080fd5b506103636103c236600461459e565b610b4f565b3480156103d357600080fd5b506103006103e236600461459e565b60009081526065602052604090206001015490565b34801561040357600080fd5b5061036361041236600461459e565b610c20565b34801561042357600080fd5b50610363610432366004614178565b610e13565b34801561044357600080fd5b506103636104523660046145b6565b61118a565b34801561046357600080fd5b506103636104723660046145b6565b6111b1565b34801561048357600080fd5b5061036361049236600461443e565b6111d3565b3480156104a357600080fd5b50610363611299565b3480156104b857600080fd5b506104cc6104c73660046144d1565b61133f565b60405161030a9190614a29565b3480156104e557600080fd5b5061012d5460ff16610333565b3480156104fe57600080fd5b5061036361050d366004614289565b6114b5565b34801561051e57600080fd5b5061036361153a565b34801561053357600080fd5b506103006115ee565b61036361054a366004614358565b6115ff565b34801561055b57600080fd5b5061036361186a565b34801561057057600080fd5b506101f5546001600160a01b03165b6040516001600160a01b03909116815260200161030a565b3480156105a357600080fd5b5061057f6105b23660046145da565b61190e565b3480156105c357600080fd5b506103336105d23660046145b6565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561060957600080fd5b5061037a61192d565b34801561061e57600080fd5b506103007f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d807981565b34801561065257600080fd5b50610300600081565b34801561066757600080fd5b506103636106763660046142fc565b61193b565b34801561068757600080fd5b5061036361069636600461466e565b611a26565b3480156106a757600080fd5b506106bb6106b636600461459e565b611bb7565b60405161030a91906149d1565b3480156106d457600080fd5b506104cc6106e336600461459e565b611c40565b3480156106f457600080fd5b5061030061070336600461459e565b600090815261025d602052604090205490565b34801561072257600080fd5b5061030061073136600461459e565b611d85565b34801561074257600080fd5b506103007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561077657600080fd5b506103636107853660046145b6565b611d9c565b34801561079657600080fd5b506103636107a536600461459e565b611da6565b3480156107b657600080fd5b5061026054610300565b3480156107cc57600080fd5b506103007f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b34801561080057600080fd5b5061033361080f366004614140565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b34801561084957600080fd5b5061085d61085836600461459e565b611e5f565b60405161030a9190614984565b34801561087657600080fd5b50610363610885366004614222565b611fb1565b34801561089657600080fd5b506103636108a5366004614124565b6121f8565b3480156108b657600080fd5b506103636108c536600461449d565b61233a565b3480156108d657600080fd5b5061037a6108e536600461459e565b6123bf565b60006001600160a01b03831661096d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610992826123dd565b6109ae6000336105d2565b610a205760405162461bcd60e51b815260206004820152603e60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652061646d696e20726f6c6520746f20736574206e65772075726900006064820152608401610964565b610a298161240f565b50565b6102598054610a3a90614b32565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6690614b32565b8015610ab35780601f10610a8857610100808354040283529160200191610ab3565b820191906000526020600020905b815481529060010190602001808311610a9657829003601f168201915b505050505081565b606060cb8054610aca90614b32565b80601f0160208091040260200160405190810160405280929190818152602001828054610af690614b32565b8015610b435780601f10610b1857610100808354040283529160200191610b43565b820191906000526020600020905b815481529060010190602001808311610b2657829003601f168201915b50505050509050919050565b610b5881612426565b610bca5760405162461bcd60e51b815260206004820152602360248201527f43616c6c6572206d75737420626520746865206f776e6572206f66207468652060448201527f4e465400000000000000000000000000000000000000000000000000000000006064820152608401610964565b610bd38161243a565b600081815261025c60205260409081902090517f544b1d1249133c50ce89743ed1ca34a815bd50d42b71e6d331a1ac560013a8ec91610c1591339185916148c5565b60405180910390a150565b6101f5546001600160a01b03163314610c7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b600081118015610c8e575061025f548111155b610d265760405162461bcd60e51b815260206004820152604760248201527f576974686472617720616d6f756e742073686f756c642062652067726561746560448201527f72207468656e203020616e64206c657373207468656e20636f6e74726163742060648201527f62616c616e636500000000000000000000000000000000000000000000000000608482015260a401610964565b8061025f6000828254610d399190614ad8565b9091555050604051600090339083908381818185875af1925050503d8060008114610d80576040519150601f19603f3d011682016040523d82523d6000602084013e610d85565b606091505b5050905080610dd65760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610964565b60408051338152602081018490527f3c897fa64265e543b9d36df079688f87240185d1bf1a937e4c45a56e11678736910160405180910390a15050565b8151835114610e755760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610964565b6001600160a01b038416610ed95760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610964565b6001600160a01b038516331480610ef55750610ef5853361080f565b610f675760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610964565b33610f76818787878787612468565b60005b845181101561111c576000858281518110610fa457634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110610fd057634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260c9835260408082206001600160a01b038e1683529093529190912054909150818110156110775760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610964565b6110818282614ad8565b60c9600085815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020819055508160c9600085815260200190815260200160002060008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546111019190614aa1565b925050819055505050508061111590614bc0565b9050610f79565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161116c929190614a3c565b60405180910390a4611182818787878787612476565b505050505050565b611194828261262b565b60008281526097602052604090206111ac9082612651565b505050565b6111bb8282612666565b60008281526097602052604090206111ac90826126ee565b6111fd7f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d8079336105d2565b61126f5760405162461bcd60e51b815260206004820152603460248201527f6d696e74576974685552493a206d757374206861766520504f4c594e4554574f60448201527f524b5f524f4c4520726f6c6520746f206d696e740000000000000000000000006064820152608401610964565b61128a84848360405180602001604052806000815250612703565b6112938261240f565b50505050565b6112c37f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336105d2565b6113355760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610964565b61133d612829565b565b606081518351146113b85760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610964565b6000835167ffffffffffffffff8111156113e257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561140b578160200160208202803683370190505b50905060005b84518110156114ad5761147285828151811061143d57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061146557634e487b7160e01b600052603260045260246000fd5b60200260200101516108ea565b82828151811061149257634e487b7160e01b600052603260045260246000fd5b60209081029190910101526114a681614bc0565b9050611411565b509392505050565b6001600160a01b0383163314806114d157506114d1833361080f565b61152f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b6111ac8383836128c7565b6101f5546001600160a01b031633146115955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b6101f5546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36101f5805473ffffffffffffffffffffffffffffffffffffffff19169055565b60006115fa6102615490565b905090565b60026101c35414156116535760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610964565b60026101c3556001600160a01b0387166116af5760405162461bcd60e51b815260206004820152601160248201527f746f2063616e277420626520656d7074790000000000000000000000000000006044820152606401610964565b60408051600081526020810180835281519020916116cf9186910161474e565b6040516020818303038152906040528051906020012014156117335760405162461bcd60e51b815260206004820152601a60248201527f65787465726e616c5552492063616e277420626520656d7074790000000000006044820152606401610964565b611748876117416102615490565b8888612b3a565b8351156117625761176261175c6102615490565b85612b46565b60408051600081526020810180835281519020916117829185910161474e565b60405160208183030381529060405280519060200120146117b0576117b06117aa6102615490565b83612dbd565b60408051600081526020810180835281519020916117d09184910161474e565b60405160208183030381529060405280519060200120146117fe576117fe6117f86102615490565b82612ddd565b611806612dfd565b7ff5c82eda717141c5f0cfeb894e7b7819c158a337b62ec13d412aecad30b0ad9e876118326102615490565b8589604051611844949392919061488c565b60405180910390a161185b61026180546001019055565b505060016101c3555050505050565b6118947f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336105d2565b6119065760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610964565b61133d612e9e565b60008281526097602052604081206119269083612f28565b9392505050565b61025a8054610a3a90614b32565b336001600160a01b03831614156119ba5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610964565b33600081815260ca602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600054610100900460ff1680611a3f575060005460ff16155b611aa25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015611ac4576000805461ffff19166101011790555b611acc612f34565b611ad4612f34565b611adc612f34565b611ae4612f34565b611aed82612fe6565b611af5612f34565b611afd6130a2565b611b05612f34565b611b0d61315f565b611b15613286565b611b3e7f94407210afedd72cdb4464e227401c7df8809575d2576d9f50e0d5cba8a92e55613389565b611b677fe42093a63818e0c931c15fda9036d0d8995a638e7acfabc8355a4789766e8de9613389565b8351611b7b90610259906020870190613ef6565b508251611b909061025a906020860190613ef6565b50611ba061026180546001019055565b8015611293576000805461ff001916905550505050565b606061025b6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611c35576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611bed565b505050509050919050565b600081815261025b60209081526040808320805482518185028101850190935280835260609493849084015b82821015611cb4576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611c6c565b5050505090506000815167ffffffffffffffff811115611ce457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611d0d578160200160208202803683370190505b50905060005b82518110156114ad57828181518110611d3c57634e487b7160e01b600052603260045260246000fd5b602002602001015160200151828281518110611d6857634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611d7d81614bc0565b915050611d13565b600081815260976020526040812061099290613409565b6111bb8282613413565b611db16000336105d2565b611e235760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206d75737420686176652061646d696e20726f6c6520746f207360448201527f6574206d696e74206665657300000000000000000000000000000000000000006064820152608401610964565b61026081905560408051338152602081018390527f7801094d3234fa70b910ee2d953591f831bb371292f4f1d114a9111f2391c8129101610c15565b600081815261025b60209081526040808320805482518185028101850190935280835260609493849084015b82821015611ed3576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611e8b565b5050505090506000815167ffffffffffffffff811115611f0357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611f2c578160200160208202803683370190505b50905060005b82518110156114ad57828181518110611f5b57634e487b7160e01b600052603260045260246000fd5b602002602001015160000151828281518110611f8757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611fa981614bc0565b915050611f32565b6001600160a01b0384166120155760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610964565b6001600160a01b0385163314806120315750612031853361080f565b61208f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b336120ae81878761209f88613439565b6120a888613439565b87612468565b600084815260c9602090815260408083206001600160a01b038a168452909152902054838110156121475760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610964565b6121518482614ad8565b600086815260c9602090815260408083206001600160a01b038c8116855292528083209390935588168152908120805486929061218f908490614aa1565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46121ef828888888888613492565b50505050505050565b6101f5546001600160a01b031633146122535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b6001600160a01b0381166122cf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610964565b6101f5546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36101f5805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001600160a01b0383163314806123565750612356833361080f565b6123b45760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b6111ac83838361359d565b600081815261025e60205260409020805460609190610aca90614b32565b60006123e882613722565b806109925750506001600160e01b0319166000908152610227602052604090205460ff1690565b80516124229060cb906020840190613ef6565b5050565b600061243233836108ea565b151592915050565b600081815261025d6020526040902054612455906001614aa1565b600091825261025d602052604090912055565b61118286868686868661372d565b6001600160a01b0384163b156111825760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906124ba90899089908890889088906004016147eb565b602060405180830381600087803b1580156124d457600080fd5b505af1925050508015612504575060408051601f3d908101601f1916820190925261250191810190614617565b60015b6125ba57612510614c07565b806308c379a0141561254a5750612525614c1f565b80612530575061254c565b8060405162461bcd60e51b81526004016109649190614a6a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610964565b6001600160e01b0319811663bc197c8160e01b146121ef5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610964565b60008281526065602052604090206001015461264781336137a7565b6111ac8383613827565b6000611926836001600160a01b0384166138c9565b6001600160a01b03811633146126e45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610964565b6124228282613918565b6000611926836001600160a01b03841661399b565b6001600160a01b03841661277f5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610964565b336127908160008761209f88613439565b600084815260c9602090815260408083206001600160a01b0389168452909152812080548592906127c2908490614aa1565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461282281600087878787613492565b5050505050565b61012d5460ff1661287c5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610964565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0383166129295760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610964565b805182511461298b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610964565b60003390506129ae81856000868660405180602001604052806000815250612468565b60005b8351811015612adb5760008482815181106129dc57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000848381518110612a0857634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260c9835260408082206001600160a01b038c168352909352919091205490915081811015612a955760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610964565b612a9f8282614ad8565b600093845260c9602090815260408086206001600160a01b038c1687529091529093209290925550819050612ad381614bc0565b9150506129b1565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612b2c929190614a3c565b60405180910390a450505050565b61129384848484612703565b60005b81518110156111ac5760006001600160a01b0316828281518110612b7d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b03161415612be05760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610964565b6000828281518110612c0257634e487b7160e01b600052603260045260246000fd5b60200260200101516020015111612c815760405162461bcd60e51b815260206004820152602260248201527f526f79616c746965732076616c75652073686f756c6420626520706f7369746960448201527f76650000000000000000000000000000000000000000000000000000000000006064820152608401610964565b611388828281518110612ca457634e487b7160e01b600052603260045260246000fd5b6020026020010151602001511115612d245760405162461bcd60e51b815260206004820152602b60248201527f526f79616c746965732076616c75652073686f756c64206e6f74206265206d6f60448201527f7265207468616e203530250000000000000000000000000000000000000000006064820152608401610964565b600083815261025b602052604090208251839083908110612d5557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518254600180820185556000948552938390208251600290920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691909117815591015191015580612db581614bc0565b915050612b49565b600082815261025e6020908152604090912082516111ac92840190613ef6565b600082815261025c6020908152604090912082516111ac92840190613ef6565b6102605415612e7e57610260543414612e7e5760405162461bcd60e51b815260206004820152603260248201527f57726f6e6720666565732076616c75652073656e7420746f2047686f73744d6160448201527f726b657420666f72206d696e74206665657300000000000000000000000000006064820152608401610964565b341561133d573461025f6000828254612e979190614aa1565b9091555050565b61012d5460ff1615612ef25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610964565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128aa3390565b60006119268383613ab2565b600054610100900460ff1680612f4d575060005460ff16155b612fb05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612fd2576000805461ffff19166101011790555b8015610a29576000805461ff001916905550565b600054610100900460ff1680612fff575060005460ff16155b6130625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015613084576000805461ffff19166101011790555b61308d8261240f565b8015612422576000805461ff00191690555050565b600054610100900460ff16806130bb575060005460ff16155b61311e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015613140576000805461ffff19166101011790555b61012d805460ff191690558015610a29576000805461ff001916905550565b600054610100900460ff1680613178575060005460ff16155b6131db5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff161580156131fd576000805461ffff19166101011790555b613208600033613b61565b6132327f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633613b61565b61325c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33613b61565b612fd27f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d807933613b61565b600054610100900460ff168061329f575060005460ff16155b6133025760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015613324576000805461ffff19166101011790555b6101f5805473ffffffffffffffffffffffffffffffffffffffff19163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610a29576000805461ff001916905550565b6001600160e01b031980821614156133e35760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610964565b6001600160e01b031916600090815261022760205260409020805460ff19166001179055565b6000610992825490565b60008281526065602052604090206001015461342f81336137a7565b6111ac8383613918565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061348157634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b156111825760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134d69089908990889088908890600401614849565b602060405180830381600087803b1580156134f057600080fd5b505af1925050508015613520575060408051601f3d908101601f1916820190925261351d91810190614617565b60015b61352c57612510614c07565b6001600160e01b0319811663f23a6e6160e01b146121ef5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610964565b6001600160a01b0383166135ff5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610964565b3361362e8185600061361087613439565b61361987613439565b60405180602001604052806000815250612468565b600083815260c9602090815260408083206001600160a01b0388168452909152902054828110156136ad5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610964565b6136b78382614ad8565b600085815260c9602090815260408083206001600160a01b038a811680865291845282852095909555815189815292830188905292938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b600061099282613b6b565b61012d5460ff16156111825760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201527f7768696c652070617573656400000000000000000000000000000000000000006064820152608401610964565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16612422576137e5816001600160a01b03166014613bdd565b6137f0836020613bdd565b60405160200161380192919061476a565b60408051601f198184030181529082905262461bcd60e51b825261096491600401614a6a565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166124225760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556138853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461391057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610992565b506000610992565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156124225760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008181526001830160205260408120548015613aa85760006139bf600183614ad8565b85549091506000906139d390600190614ad8565b905060008660000182815481106139fa57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613a2b57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260018901909152604090208490558654879080613a6c57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610992565b6000915050610992565b81546000908210613b2b5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60448201527f64730000000000000000000000000000000000000000000000000000000000006064820152608401610964565b826000018281548110613b4e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6111948282613e4c565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480613bce57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610992575061099282613e56565b60606000613bec836002614ab9565b613bf7906002614aa1565b67ffffffffffffffff811115613c1d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613c47576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613c8c57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613cfd57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613d39846002614ab9565b613d44906001614aa1565b90505b6001811115613dfd577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613d9357634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613db757634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93613df681614b1b565b9050613d47565b5083156119265760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610964565b6124228282613827565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061099257506109928260006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061099257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610992565b828054613f0290614b32565b90600052602060002090601f016020900481019282613f245760008555613f6a565b82601f10613f3d57805160ff1916838001178555613f6a565b82800160010185558215613f6a579182015b82811115613f6a578251825591602001919060010190613f4f565b50613f76929150613f7a565b5090565b5b80821115613f765760008155600101613f7b565b8035613f9a81614ca9565b919050565b600082601f830112613faf578081fd5b81356020613fbc82614a7d565b60408051613fca8382614b93565b8481528381019250868401600686901b88018501891015613fe9578687fd5b865b868110156140335783828b031215614001578788fd5b835161400c81614b6d565b823561401781614ca9565b8152828701358782015285529385019390830190600101613feb565b509098975050505050505050565b600082601f830112614051578081fd5b8135602061405e82614a7d565b60405161406b8282614b93565b8381528281019150858301600585901b8701840188101561408a578586fd5b855b858110156140a85781358452928401929084019060010161408c565b5090979650505050505050565b600082601f8301126140c5578081fd5b813567ffffffffffffffff8111156140df576140df614bf1565b6040516140f6601f8301601f191660200182614b93565b81815284602083860101111561410a578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215614135578081fd5b813561192681614ca9565b60008060408385031215614152578081fd5b823561415d81614ca9565b9150602083013561416d81614ca9565b809150509250929050565b600080600080600060a0868803121561418f578081fd5b853561419a81614ca9565b945060208601356141aa81614ca9565b9350604086013567ffffffffffffffff808211156141c6578283fd5b6141d289838a01614041565b945060608801359150808211156141e7578283fd5b6141f389838a01614041565b93506080880135915080821115614208578283fd5b50614215888289016140b5565b9150509295509295909350565b600080600080600060a08688031215614239578081fd5b853561424481614ca9565b9450602086013561425481614ca9565b93506040860135925060608601359150608086013567ffffffffffffffff81111561427d578182fd5b614215888289016140b5565b60008060006060848603121561429d578081fd5b83356142a881614ca9565b9250602084013567ffffffffffffffff808211156142c4578283fd5b6142d087838801614041565b935060408601359150808211156142e5578283fd5b506142f286828701614041565b9150509250925092565b6000806040838503121561430e578182fd5b823561431981614ca9565b91506020830135801515811461416d578182fd5b6000806040838503121561433f578182fd5b823561434a81614ca9565b946020939093013593505050565b600080600080600080600060e0888a031215614372578485fd5b61437b88613f8f565b965060208801359550604088013567ffffffffffffffff8082111561439e578687fd5b6143aa8b838c016140b5565b965060608a01359150808211156143bf578384fd5b6143cb8b838c01613f9f565b955060808a01359150808211156143e0578384fd5b6143ec8b838c016140b5565b945060a08a0135915080821115614401578384fd5b61440d8b838c016140b5565b935060c08a0135915080821115614422578283fd5b5061442f8a828b016140b5565b91505092959891949750929550565b60008060008060808587031215614453578182fd5b843561445e81614ca9565b935060208501359250604085013567ffffffffffffffff811115614480578283fd5b61448c878288016140b5565b949793965093946060013593505050565b6000806000606084860312156144b1578081fd5b83356144bc81614ca9565b95602085013595506040909401359392505050565b600080604083850312156144e3578182fd5b823567ffffffffffffffff808211156144fa578384fd5b818501915085601f83011261450d578384fd5b8135602061451a82614a7d565b6040516145278282614b93565b8381528281019150858301600585901b870184018b1015614546578889fd5b8896505b8487101561457157803561455d81614ca9565b83526001969096019591830191830161454a565b5096505086013592505080821115614587578283fd5b5061459485828601614041565b9150509250929050565b6000602082840312156145af578081fd5b5035919050565b600080604083850312156145c8578182fd5b82359150602083013561416d81614ca9565b600080604083850312156145ec578182fd5b50508035926020909101359150565b60006020828403121561460c578081fd5b813561192681614cbe565b600060208284031215614628578081fd5b815161192681614cbe565b600060208284031215614644578081fd5b813567ffffffffffffffff81111561465a578182fd5b614666848285016140b5565b949350505050565b600080600060608486031215614682578081fd5b833567ffffffffffffffff80821115614699578283fd5b6146a5878388016140b5565b945060208601359150808211156146ba578283fd5b6146c6878388016140b5565b935060408601359150808211156146db578283fd5b506142f2868287016140b5565b6000815180845260208085019450808401835b83811015614717578151875295820195908201906001016146fb565b509495945050505050565b6000815180845261473a816020860160208601614aef565b601f01601f19169290920160200192915050565b60008251614760818460208701614aef565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516147a2816017850160208801614aef565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516147df816028840160208801614aef565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a0604083015261481760a08301866146e8565b828103606084015261482981866146e8565b9050828103608084015261483d8185614722565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261488160a0830184614722565b979650505050505050565b6001600160a01b03851681528360208201526080604082015260006148b46080830185614722565b905082606083015295945050505050565b6001600160a01b03841681526000602084818401526060604084015281845483600182811c9150808316806148fb57607f831692505b85831081141561491957634e487b7160e01b87526022600452602487fd5b6060880183905260808801818015614938576001811461494957614973565b60ff19861682528782019650614973565b60008b815260209020895b8681101561496d57815484820152908501908901614954565b83019750505b50949b9a5050505050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156149c55783516001600160a01b0316835292840192918401916001016149a0565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015614a1c57815180516001600160a01b031685528601518685015292840192908501906001016149ee565b5091979650505050505050565b60208152600061192660208301846146e8565b604081526000614a4f60408301856146e8565b8281036020840152614a6181856146e8565b95945050505050565b6020815260006119266020830184614722565b600067ffffffffffffffff821115614a9757614a97614bf1565b5060051b60200190565b60008219821115614ab457614ab4614bdb565b500190565b6000816000190483118215151615614ad357614ad3614bdb565b500290565b600082821015614aea57614aea614bdb565b500390565b60005b83811015614b0a578181015183820152602001614af2565b838111156112935750506000910152565b600081614b2a57614b2a614bdb565b506000190190565b600181811c90821680614b4657607f821691505b60208210811415614b6757634e487b7160e01b600052602260045260246000fd5b50919050565b6040810181811067ffffffffffffffff82111715614b8d57614b8d614bf1565b60405250565b601f8201601f1916810167ffffffffffffffff81118282101715614bb957614bb9614bf1565b6040525050565b6000600019821415614bd457614bd4614bdb565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614c1c57600481823e5160e01c5b90565b600060443d1015614c2d5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715614c5d57505050505090565b8285019150815181811115614c755750505050505090565b843d8701016020828501011115614c8f5750505050505090565b614c9e60208286010187614b93565b509095945050505050565b6001600160a01b0381168114610a2957600080fd5b6001600160e01b031981168114610a2957600080fdfea264697066735822122089e0cd8536ce91d3b63985847f68cdc33760e7810bca66cc8578d8c3fd2a2f8764736f6c63430008040033

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.