Contract 0x068bEF92987D16eF682FF017B822CA1211401EaF 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf3f198e5186c9b85f29683bfb1be44abef6cde8492b0d5590d70685b6858b1fdSet Approval For...205033622022-10-01 8:46:411 day 4 hrs ago0xd0ad8dd78d38dd3ec8dbb370e0035e7204d7fd1f IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.001223876 26.5
0x6a20bb38b035c93b51bb50a03148b1c37e182b759e84f0f8905a309173fba9590x2fffbf26205032242022-10-01 8:42:011 day 4 hrs ago0xd0ad8dd78d38dd3ec8dbb370e0035e7204d7fd1f IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.0044649055 26.5
0xbda8b33d173f89db425c96cd1c425feae0ca5cc8f0e558fbe8dd96e130fcaaa40x2fffbf26204651592022-09-30 10:49:232 days 2 hrs ago0xd0ad8dd78d38dd3ec8dbb370e0035e7204d7fd1f IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.004444611102 26.825346
0xf61a4f035d9ef10093ba0859b472b4e421da783c5e55cc8302059188d8d9d453Burn200331872022-09-19 12:37:1013 days 15 mins ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.0024064385 26.5
0x95f1c4570365ff8b9b4cb61f6d92603ed181153bf53535a4f898ae08ffb345150x2fffbf26199783432022-09-17 21:26:1914 days 15 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006270589 26.5
0xf2125abcb7b4c24fce804410f8091852761356bdfeac541d0b1f0c85cf1cd4ed0x2fffbf26199780582022-09-17 21:13:2114 days 15 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006270589 26.5
0xe1b3ca00ad0f6ac9d41db610bc725fb4528ebf126c7ee5841ce6006c440b2d840x2fffbf26199779222022-09-17 21:07:3614 days 15 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006408407084 27.082430012
0x9197389f45d5f39885a1274168541099d3549f43778e4ad13a98b9f2d3a16b0a0x2fffbf26199777942022-09-17 21:01:4414 days 15 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006270589 26.5
0x803b833936127e7ac27e394eb6a76354fd1632a02884c4993b7c8c813d2167480x2fffbf26199777102022-09-17 20:57:4514 days 15 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006270589 26.5
0xca67f1b277ddf3faf72234bf0cadf59ce0d93bba14994d982ae5060f4bfe00440x2fffbf26199775672022-09-17 20:51:4514 days 16 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006270589 26.5
0x682686d35916850934a5ddc0bc6db34d651e2cb6c1573023e02c3cc4aa9cc0c60x2fffbf26199773982022-09-17 20:44:0614 days 16 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006270589 26.5
0x64bccbac377a86dee86c949a08e8397d0cddd6ab4c3f75941f1aacb3345f2346Set Approval For...199618742022-09-17 9:36:5115 days 3 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.001223876 26.5
0x0818b6ffb92b90833dd050be14b1a1dd115a5137b3b356766cf9b514121c13150x2fffbf26199617922022-09-17 9:33:0915 days 3 hrs ago0x18360540c0113243452b4edbd7c272e809ec1eaa IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006196389 26.5
0xd2fdc31d917338cd28e8ba51181d6f49e639f2889307423d732c3b36546ad014Set Approval For...198380692022-09-13 17:33:0718 days 19 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.001223876 26.5
0x03ce3e1e293acc23e5c11492ed4c06c649de67be660a70264d4893746e51265bSet Approval For...198380462022-09-13 17:32:1118 days 19 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.000755872 26
0xbe72b842da3bb2183faddd3dc0bb336067aef5dfac85e206cd4bfd0f65758805Set Approval For...198380322022-09-13 17:31:3818 days 19 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.001223876 26.5
0x3026b74a7393fef2e6ea889bd685a2b17dc2d4ffb19445c4f27431573eb96f04Set Approval For...198380192022-09-13 17:31:0518 days 19 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.000755872 26
0x92551ebd1a55c39c18cf6a0c519fe43248bd6e4bd40f70f473f47a848c0eeaa4Set Approval For...198216402022-09-13 6:07:0419 days 6 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.001223876 26.5
0x1780a13a44bd5c7fae36ad66f3df2b10d006fcea04aa485e90e802406896b225Set Approval For...198215802022-09-13 6:04:1219 days 6 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.000755872 26
0xe36d746147ef125eccefc37a7f9f0d37415dd0d99d23a2bd56decba4f2a8ef59Set Approval For...192275752022-08-28 11:34:0735 days 1 hr ago0xf87d44b0b26d5819ad19ededeab189cb114e447d IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.0012665962 27.425
0x3a83a0eb1fc9de177471023664f3e8160ac9ac64a892c7e6c3cd9e3eb44483490x2fffbf26192274212022-08-28 11:28:5935 days 1 hr ago0xf87d44b0b26d5819ad19ededeab189cb114e447d IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.0043907055 26.5
0x441f537fa346dbfd83940932049abefedfd9717265fa1b00b5a3bdf86812cab9Set Approval For...179596202022-07-29 17:15:1164 days 19 hrs ago0xd8efa44289528ec1cb0540a15a7d222cd16f3e4c IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.001223876 26.5
0x724329ab9abc9fbdf155cc7834cf00cbbbbe8cee854245e994d7a7af5035c57dSet Approval For...178856232022-07-27 22:35:0466 days 14 hrs ago0xd8efa44289528ec1cb0540a15a7d222cd16f3e4c IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.00127006 27.5
0xe926ee4d8f8bff42a899f1e067f51b750db952c7f3fbcea64fa88799e17d54410x2fffbf26178854852022-07-27 22:30:2166 days 14 hrs ago0xd8efa44289528ec1cb0540a15a7d222cd16f3e4c IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.006430215 27.5
0xe834279afb23d777d4e00380dca8ca25cdd3b8342fb93b9936db7bc8bddf4c9dSet Ghostmarket ...153867152022-05-30 20:00:40124 days 16 hrs ago0x07714a8bf073510996d948d8aa39f8e32627fe62 IN  0x068bef92987d16ef682ff017b822ca1211401eaf0 AVAX0.000785122 26
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0xed40ef20452cbdf98a94808e4a203eebef54ee1a5760ec01d54f7a9a1d61fcc1153867072022-05-30 20:00:22124 days 16 hrs ago 0x068bef92987d16ef682ff017b822ca1211401eaf0x07714a8bf073510996d948d8aa39f8e32627fe620.051 AVAX
0x2f4020478e73b6bdac1951d2e8d084ef7f2b26b4d50b1abcaaa4965b0784e4ce77358212021-12-03 3:16:56303 days 9 hrs ago 0x068bef92987d16ef682ff017b822ca1211401eaf0x07714a8bf073510996d948d8aa39f8e32627fe620.0585 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GhostMarketERC721

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 25 : GhostmarketERC721.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./ERC721PresetMinterPauserAutoIdUpgradeableCustom.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol";

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

contract GhostMarketERC721 is Initializable, ERC721PresetMinterPauserAutoIdUpgradeableCustom, ReentrancyGuardUpgradeable, OwnableUpgradeable, ERC165StorageUpgradeable {

	// 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 feeChanger, uint256 newValue);
	event Minted(address toAddress, uint256 tokenId, string externalURI);

	// mint fees balance
	uint256 internal _payedMintFeesBalance;

	// mint fees value
	uint256 internal _ghostmarketMintFees;

	/**
	 * bytes4(keccak256(_INTERFACE_ID_ERC721_GHOSTMARKET)) == 0xee40ffc1
	 */
	bytes4 constant _INTERFACE_ID_ERC721_GHOSTMARKET = bytes4(keccak256("_INTERFACE_ID_ERC721_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
        override
        initializer
    {
		__Context_init_unchained();
		__ERC165_init_unchained();
		__AccessControl_init_unchained();
		__AccessControlEnumerable_init_unchained();
		__ERC721Enumerable_init_unchained();
		__ERC721Burnable_init_unchained();
		__Pausable_init_unchained();
		__ERC721Pausable_init_unchained();
		__ERC721URIStorage_init_unchained();
		__ERC721_init_unchained(name, symbol);
		__ERC721PresetMinterPauserAutoId_init_unchained(uri);
		__Ownable_init_unchained();
		_registerInterface(_INTERFACE_ID_ERC721_GHOSTMARKET);
		_registerInterface(_GHOSTMARKET_NFT_ROYALTIES);
	}

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

    /**
	 * @dev set a NFT royalties fees & recipients
	 * fee basis points 10000 = 100%
	 */
	function _saveRoyalties(uint256 tokenId, Royalty[] memory royalties)
        internal
    {
		require(_exists(tokenId), "ERC721: approved query for nonexistent token");
		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, 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);
		uint256 tokenId = getLastTokenID();
		if (royalties.length > 0) {
			_saveRoyalties(tokenId, royalties);
		}
		if (keccak256(abi.encodePacked(metadata)) != keccak256(abi.encodePacked(""))) {
			_setMetadataJson(tokenId, metadata);
		}
		if (keccak256(abi.encodePacked(lockedcontent)) != keccak256(abi.encodePacked(""))) {
			_setLockedContent(tokenId, lockedcontent);
		}
		_checkMintFees();
		emit Minted(to, tokenId, externalURI);
	}

    /**
     * @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 bulk burn NFT
	 */
	function burnBatch(uint256[] memory tokensId)
        external
    {
		for (uint256 i = 0; i < tokensId.length; i++) {
			burn(tokensId[i]);
		}
	}

	/**
	 * @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) == msg.sender, "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;
	}

	uint256[50] private __gap;
}

File 2 of 25 : ERC721PresetMinterPauserAutoIdUpgradeableCustom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @dev {ERC721} 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
 *  - token ID and URI autogeneration
 *
 * 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 ERC721PresetMinterPauserAutoIdUpgradeableCustom is
	Initializable,
	ContextUpgradeable,
	AccessControlEnumerableUpgradeable,
	ERC721EnumerableUpgradeable,
	ERC721BurnableUpgradeable,
	ERC721PausableUpgradeable,
	ERC721URIStorageUpgradeable
{
	function initialize(
		string memory name,
		string memory symbol,
		string memory baseTokenURI
	) public virtual initializer {
		__ERC721PresetMinterPauserAutoId_init(name, symbol, baseTokenURI);
	}

	using CountersUpgradeable for CountersUpgradeable.Counter;

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

	CountersUpgradeable.Counter private _tokenIdTracker;

	string private _baseTokenURI;

	/**
	 * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the
	 * account that deploys the contract.
	 *
	 * Token URIs will be autogenerated based on `baseURI` and their token IDs.
	 * See {ERC721-tokenURI}.
	 */
	function __ERC721PresetMinterPauserAutoId_init(
		string memory name,
		string memory symbol,
		string memory baseTokenURI
	) internal initializer {
		__Context_init_unchained();
		__ERC165_init_unchained();
		__AccessControl_init_unchained();
		__AccessControlEnumerable_init_unchained();
		__ERC721_init_unchained(name, symbol);
		__ERC721Enumerable_init_unchained();
		__ERC721Burnable_init_unchained();
		__Pausable_init_unchained();
		__ERC721Pausable_init_unchained();
		__ERC721PresetMinterPauserAutoId_init_unchained(baseTokenURI);
		__ERC721URIStorage_init_unchained();
	}

	function __ERC721PresetMinterPauserAutoId_init_unchained(string memory baseTokenURI) internal initializer {
		_baseTokenURI = baseTokenURI;
		_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
		_setupRole(MINTER_ROLE, _msgSender());
		_setupRole(PAUSER_ROLE, _msgSender());
		_setupRole(POLYNETWORK_ROLE, _msgSender());
		_tokenIdTracker.increment();
	}

	function _baseURI() internal view virtual override returns (string memory) {
		return _baseTokenURI;
	}

	/**
	 * @dev Creates a new token for `to`. Its token ID will be automatically
	 * assigned (and available on the emitted {IERC721-Transfer} event), and the token
	 * URI autogenerated based on the base URI passed at construction.
	 *
	 * See {ERC721-_mint}.
	 *
	 * Requirements:
	 *
	 * - the caller must have the `MINTER_ROLE`.
	 */
	function mint(address to) internal virtual {
		// We cannot just use balanceOf to create the new tokenId because tokens
		// can be burned (destroyed), so we need a separate counter.
		_mint(to, _tokenIdTracker.current());
		_tokenIdTracker.increment();
	}

	function _burn(uint256 tokenId) internal override(ERC721URIStorageUpgradeable, ERC721Upgradeable) {
		ERC721URIStorageUpgradeable._burn(tokenId);
	}

	/**
	 * @dev See {IERC721Metadata-tokenURI}.
	 */
	function tokenURI(uint256 tokenId) public view virtual override(ERC721URIStorageUpgradeable, ERC721Upgradeable) returns (string memory) {
		return ERC721URIStorageUpgradeable.tokenURI(tokenId);
	}

	/**
	 * @dev polynetwork CrossChainNFTMapping
	 */
	function mintWithURI(
		address to,
		uint256 tokenId,
		string memory uri
	) external {
		require(hasRole(POLYNETWORK_ROLE, _msgSender()), "mintWithURI: must have POLYNETWORK_ROLE role to mint");
		require(!_exists(tokenId), "token id already exist");
		_safeMint(to, tokenId);
		_setTokenURI(tokenId, uri);
	}

	function _safeMint(address to, uint256 tokenId) internal virtual override {
		super._safeMint(to, tokenId);
	}

	/**
	 * @dev update tokenURI
	 */
	function _setTokenURI(uint256 tokenId, string memory tokenUri) internal virtual override {
		ERC721URIStorageUpgradeable._setTokenURI(tokenId, tokenUri);
	}

	function getCurrentCounter() public view returns (uint256) {
		return _tokenIdTracker.current();
	}

	function getLastTokenID() public view returns (uint256) {
		if (_tokenIdTracker.current() == 1) {
			return _tokenIdTracker.current();
		} else return _tokenIdTracker.current() - 1;
	}

	function setBaseTokenURI(string memory baseTokenURI) public {
		require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setBaseTokenURI: must have ADMIN role to change this");
		_baseTokenURI = baseTokenURI;
	}

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

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

	function _beforeTokenTransfer(
		address from,
		address to,
		uint256 tokenId
	) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable) {
		super._beforeTokenTransfer(from, to, tokenId);
	}

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

	uint256[50] private __gap;
}

File 3 of 25 : 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 4 of 25 : 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 5 of 25 : 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 6 of 25 : ERC721Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./extensions/IERC721MetadataUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/StringsUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping (uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping (address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping (uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0
            ? string(abi.encodePacked(baseURI, tokenId.toString()))
            : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
     * in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721Upgradeable.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal virtual {
        require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        private returns (bool)
    {
        if (to.isContract()) {
            try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    // solhint-disable-next-line no-inline-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
    uint256[44] private __gap;
}

File 7 of 25 : ERC721URIStorageUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable {
    function __ERC721URIStorage_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721URIStorage_init_unchained();
    }

    function __ERC721URIStorage_init_unchained() internal initializer {
    }
    using StringsUpgradeable for uint256;

    // Optional mapping for token URIs
    mapping (uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
    uint256[49] private __gap;
}

File 8 of 25 : ERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "./IERC721EnumerableUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {
    function __ERC721Enumerable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721Enumerable_init_unchained();
    }

    function __ERC721Enumerable_init_unchained() internal initializer {
    }
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721Upgradeable.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
    uint256[46] private __gap;
}

File 9 of 25 : ERC721BurnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721Upgradeable.sol";
import "../../../utils/ContextUpgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {
    function __ERC721Burnable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721Burnable_init_unchained();
    }

    function __ERC721Burnable_init_unchained() internal initializer {
    }
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
    uint256[50] private __gap;
}

File 10 of 25 : ERC721PausableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev ERC721 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.
 */
abstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable {
    function __ERC721Pausable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __Pausable_init_unchained();
        __ERC721Pausable_init_unchained();
    }

    function __ERC721Pausable_init_unchained() internal initializer {
    }
    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

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

File 11 of 25 : 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 25 : 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 25 : 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 14 of 25 : 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 15 of 25 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
      * - `from` cannot be the zero address.
      * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

File 16 of 25 : IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721ReceiverUpgradeable {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}

File 17 of 25 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {

    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 18 of 25 : 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 19 of 25 : 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);
    }

}

File 20 of 25 : 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 21 of 25 : 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 22 of 25 : IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 23 of 25 : 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 24 of 25 : 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 25 of 25 : 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));
    }
}

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":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":"feeChanger","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"}],"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","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":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokensId","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[],"name":"getLastTokenID","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 GhostMarketERC721.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":"owner","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"},{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct GhostMarketERC721.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"}],"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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gmmf","type":"uint256"}],"name":"setGhostmarketMintFee","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":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","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":"withdrawAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50615002806100206000396000f3fe6080604052600436106103295760003560e01c80638456cb59116101a5578063c6f4f0f0116100ec578063e24dbeae11610095578063e985e9c51161006f578063e985e9c514610950578063edcbc0bd14610999578063f2fde38b146109c6578063f7d027de146109e657600080fd5b8063e24dbeae146108e6578063e4623c1b146108fc578063e63ab1e91461091c57600080fd5b8063d5391393116100c6578063d539139314610872578063d547741f146108a6578063dac0f3d9146108c657600080fd5b8063c6f4f0f014610804578063c87b56dd14610832578063ca15c8731461085257600080fd5b8063a217fddf1161014e578063b88d4fde11610128578063b88d4fde1461078a578063bb3bafd6146107aa578063c1793c58146107d757600080fd5b8063a217fddf14610735578063a22cb4651461074a578063a6487c531461076a57600080fd5b806391d148541161017f57806391d14854146106a657806395d89b41146106ec5780639ceea6651461070157600080fd5b80638456cb59146106525780638da5cb5b146106675780639010d07c1461068657600080fd5b80632fffbf26116102745780634a99950b1161021d5780636352211e116101f75780636352211e146105e857806370a0823114610608578063715018a61461062857806373448c461461063d57600080fd5b80634a99950b1461058f5780634f6ccce7146105af5780635c975abb146105cf57600080fd5b80633f4ba83a1161024e5780633f4ba83a1461053a57806342842e0e1461054f57806342966c681461056f57600080fd5b80632fffbf26146104e757806330176e13146104fa57806336568abe1461051a57600080fd5b80631c7e78f3116102d65780632e1a7d4d116102b05780632e1a7d4d146104875780632f2ff15d146104a75780632f745c59146104c757600080fd5b80631c7e78f31461041757806323b872dd14610437578063248a9ca31461045757600080fd5b8063095ea7b311610307578063095ea7b3146103bd5780630e094137146103df57806318160ddd1461040257600080fd5b806301ffc9a71461032e57806306fdde0314610363578063081812fc14610385575b600080fd5b34801561033a57600080fd5b5061034e6103493660046149d9565b610a06565b60405190151581526020015b60405180910390f35b34801561036f57600080fd5b50610378610a17565b60405161035a9190614dbf565b34801561039157600080fd5b506103a56103a036600461497c565b610aa9565b6040516001600160a01b03909116815260200161035a565b3480156103c957600080fd5b506103dd6103d8366004614867565b610b43565b005b3480156103eb57600080fd5b506103f4610c75565b60405190815260200161035a565b34801561040e57600080fd5b5060fd546103f4565b34801561042357600080fd5b506103dd61043236600461497c565b610cac565b34801561044357600080fd5b506103dd610452366004614633565b610d88565b34801561046357600080fd5b506103f461047236600461497c565b60009081526065602052604090206001015490565b34801561049357600080fd5b506103dd6104a236600461497c565b610e10565b3480156104b357600080fd5b506103dd6104c2366004614994565b611003565b3480156104d357600080fd5b506103f46104e2366004614867565b611025565b6103dd6104f53660046146f0565b6110cd565b34801561050657600080fd5b506103dd610515366004614a11565b611303565b34801561052657600080fd5b506103dd610535366004614994565b611398565b34801561054657600080fd5b506103dd6113ba565b34801561055b57600080fd5b506103dd61056a366004614633565b611462565b34801561057b57600080fd5b506103dd61058a36600461497c565b61147d565b34801561059b57600080fd5b506103dd6105aa366004614892565b611504565b3480156105bb57600080fd5b506103f46105ca36600461497c565b611619565b3480156105db57600080fd5b5061015f5460ff1661034e565b3480156105f457600080fd5b506103a561060336600461497c565b6116cb565b34801561061457600080fd5b506103f46106233660046145df565b611756565b34801561063457600080fd5b506103dd6117f0565b34801561064957600080fd5b506103f4611897565b34801561065e57600080fd5b506103dd6118a3565b34801561067357600080fd5b5061025b546001600160a01b03166103a5565b34801561069257600080fd5b506103a56106a13660046149b8565b611947565b3480156106b257600080fd5b5061034e6106c1366004614994565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156106f857600080fd5b50610378611966565b34801561070d57600080fd5b506103f47f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d807981565b34801561074157600080fd5b506103f4600081565b34801561075657600080fd5b506103dd610765366004614836565b611975565b34801561077657600080fd5b506103dd610785366004614a44565b611a3a565b34801561079657600080fd5b506103dd6107a5366004614673565b611ba5565b3480156107b657600080fd5b506107ca6107c536600461497c565b611c2d565b60405161035a9190614d2f565b3480156107e357600080fd5b506107f76107f236600461497c565b611cb6565b60405161035a9190614d87565b34801561081057600080fd5b506103f461081f36600461497c565b60009081526102c1602052604090205490565b34801561083e57600080fd5b5061037861084d36600461497c565b611e03565b34801561085e57600080fd5b506103f461086d36600461497c565b611e0e565b34801561087e57600080fd5b506103f47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b3480156108b257600080fd5b506103dd6108c1366004614994565b611e25565b3480156108d257600080fd5b506103dd6108e136600461497c565b611e2f565b3480156108f257600080fd5b506102c4546103f4565b34801561090857600080fd5b506103dd6109173660046148e9565b611ee8565b34801561092857600080fd5b506103f47f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b34801561095c57600080fd5b5061034e61096b3660046145fb565b6001600160a01b03918216600090815260ce6020908152604080832093909416825291909152205460ff1690565b3480156109a557600080fd5b506109b96109b436600461497c565b611f36565b60405161035a9190614ce2565b3480156109d257600080fd5b506103dd6109e13660046145df565b612088565b3480156109f257600080fd5b50610378610a0136600461497c565b6121bd565b6000610a1182612260565b92915050565b606060c98054610a2690614ef5565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5290614ef5565b8015610a9f5780601f10610a7457610100808354040283529160200191610a9f565b820191906000526020600020905b815481529060010190602001808311610a8257829003601f168201915b5050505050905090565b600081815260cb60205260408120546001600160a01b0316610b275760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b50600090815260cd60205260409020546001600160a01b031690565b6000610b4e826116cb565b9050806001600160a01b0316836001600160a01b03161415610bd85760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b1e565b336001600160a01b0382161480610bf45750610bf4813361096b565b610c665760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b1e565b610c708383612292565b505050565b6000610c816101f55490565b60011415610c9657506101f55490565b905090565b6001610ca26101f55490565b610c919190614e9b565b33610cb6826116cb565b6001600160a01b031614610d325760405162461bcd60e51b815260206004820152602360248201527f43616c6c6572206d75737420626520746865206f776e6572206f66207468652060448201527f4e465400000000000000000000000000000000000000000000000000000000006064820152608401610b1e565b610d3b81612300565b60008181526102c060205260409081902090517f544b1d1249133c50ce89743ed1ca34a815bd50d42b71e6d331a1ac560013a8ec91610d7d9133918591614c23565b60405180910390a150565b610d93335b8261232e565b610e055760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b1e565b610c70838383612425565b61025b546001600160a01b03163314610e6b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b1e565b600081118015610e7e57506102c3548111155b610f165760405162461bcd60e51b815260206004820152604760248201527f576974686472617720616d6f756e742073686f756c642062652067726561746560448201527f72207468656e203020616e64206c657373207468656e20636f6e74726163742060648201527f62616c616e636500000000000000000000000000000000000000000000000000608482015260a401610b1e565b806102c36000828254610f299190614e9b565b9091555050604051600090339083908381818185875af1925050503d8060008114610f70576040519150601f19603f3d011682016040523d82523d6000602084013e610f75565b606091505b5050905080610fc65760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610b1e565b60408051338152602081018490527f3c897fa64265e543b9d36df079688f87240185d1bf1a937e4c45a56e11678736910160405180910390a15050565b61100d82826125fd565b6000828152609760205260409020610c709082612623565b600061103083611756565b82106110a45760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b1e565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b60026102295414156111215760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b1e565b6002610229556001600160a01b03851661117d5760405162461bcd60e51b815260206004820152601160248201527f746f2063616e277420626520656d7074790000000000000000000000000000006044820152606401610b1e565b604080516000815260208101808352815190209161119d91869101614aea565b6040516020818303038152906040528051906020012014156112015760405162461bcd60e51b815260206004820152601a60248201527f65787465726e616c5552492063616e277420626520656d7074790000000000006044820152606401610b1e565b61120a85612638565b6000611214610c75565b85519091501561122857611228818661265a565b604080516000815260208101808352815190209161124891869101614aea565b604051602081830303815290604052805190602001201461126d5761126d818461293d565b604080516000815260208101808352815190209161128d91859101614aea565b60405160208183030381529060405280519060200120146112b2576112b2818361295d565b6112ba61297d565b7fe7cd4ce7f2a465edc730269a1305e8a48bad821e8fb7e152ec413829c01a53c48682866040516112ed93929190614bf2565b60405180910390a1505060016102295550505050565b61130e6000336106c1565b6113805760405162461bcd60e51b815260206004820152603460248201527f73657442617365546f6b656e5552493a206d75737420686176652041444d494e60448201527f20726f6c6520746f206368616e676520746869730000000000000000000000006064820152608401610b1e565b8051611394906101f6906020840190614499565b5050565b6113a28282612a1e565b6000828152609760205260409020610c709082612aa6565b6113e47f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336106c1565b611458576040805162461bcd60e51b81526020600482015260248101919091527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20756e70617573656064820152608401610b1e565b611460612abb565b565b610c7083838360405180602001604052806000815250611ba5565b61148633610d8d565b6114f85760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610b1e565b61150181612b59565b50565b61152e7f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d8079336106c1565b6115a05760405162461bcd60e51b815260206004820152603460248201527f6d696e74576974685552493a206d757374206861766520504f4c594e4554574f60448201527f524b5f524f4c4520726f6c6520746f206d696e740000000000000000000000006064820152608401610b1e565b600082815260cb60205260409020546001600160a01b0316156116055760405162461bcd60e51b815260206004820152601660248201527f746f6b656e20696420616c7265616479206578697374000000000000000000006044820152606401610b1e565b61160f8383612b62565b610c708282612b6c565b600061162460fd5490565b82106116985760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b1e565b60fd82815481106116b957634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600081815260cb60205260408120546001600160a01b031680610a115760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610b1e565b60006001600160a01b0382166117d45760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b1e565b506001600160a01b0316600090815260cc602052604090205490565b61025b546001600160a01b0316331461184b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b1e565b61025b546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a361025b80546001600160a01b0319169055565b6000610c916101f55490565b6118cd7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336106c1565b61193f5760405162461bcd60e51b815260206004820152603e60248201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060448201527f6d75737420686176652070617573657220726f6c6520746f20706175736500006064820152608401610b1e565b611460612b76565b600082815260976020526040812061195f9083612c00565b9392505050565b606060ca8054610a2690614ef5565b6001600160a01b0382163314156119ce5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b1e565b33600081815260ce602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600054610100900460ff1680611a53575060005460ff16155b611ab65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b1e565b600054610100900460ff16158015611ad8576000805461ffff19166101011790555b611ae0612c0c565b611ae8612c0c565b611af0612c0c565b611af8612c0c565b611b00612c0c565b611b08612c0c565b611b10612cbe565b611b18612c0c565b611b20612c0c565b611b2a8484612d7b565b611b3382612e57565b611b3b612fb7565b611b647fee40ffc1ec8332b0837bd418921ada6378fb242be0d51d747626add0fc93894b6130ad565b611b8d7fe42093a63818e0c931c15fda9036d0d8995a638e7acfabc8355a4789766e8de96130ad565b8015611b9f576000805461ff00191690555b50505050565b611baf338361232e565b611c215760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b1e565b611b9f8484848461312d565b60606102bf6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611cab576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611c63565b505050509050919050565b60008181526102bf60209081526040808320805482518185028101850190935280835260609493849084015b82821015611d2a576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611ce2565b5050505090506000815167ffffffffffffffff811115611d5a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611d83578160200160208202803683370190505b50905060005b8251811015611dfb57828181518110611db257634e487b7160e01b600052603260045260246000fd5b602002602001015160200151828281518110611dde57634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611df381614f30565b915050611d89565b509392505050565b6060610a11826131b6565b6000818152609760205260408120610a1190613335565b6113a2828261333f565b611e3a6000336106c1565b611eac5760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206d75737420686176652061646d696e20726f6c6520746f207360448201527f6574206d696e74206665657300000000000000000000000000000000000000006064820152608401610b1e565b6102c481905560408051338152602081018390527f7801094d3234fa70b910ee2d953591f831bb371292f4f1d114a9111f2391c8129101610d7d565b60005b815181101561139457611f24828281518110611f1757634e487b7160e01b600052603260045260246000fd5b602002602001015161147d565b80611f2e81614f30565b915050611eeb565b60008181526102bf60209081526040808320805482518185028101850190935280835260609493849084015b82821015611faa576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611f62565b5050505090506000815167ffffffffffffffff811115611fda57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612003578160200160208202803683370190505b50905060005b8251811015611dfb5782818151811061203257634e487b7160e01b600052603260045260246000fd5b60200260200101516000015182828151811061205e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061208081614f30565b915050612009565b61025b546001600160a01b031633146120e35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b1e565b6001600160a01b03811661215f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b1e565b61025b546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a361025b80546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526102c2602052604090208054606091906121db90614ef5565b80601f016020809104026020016040519081016040528092919081815260200182805461220790614ef5565b80156122545780601f1061222957610100808354040283529160200191612254565b820191906000526020600020905b81548152906001019060200180831161223757829003601f168201915b50505050509050919050565b600061226b82613365565b80610a115750506001600160e01b031916600090815261028d602052604090205460ff1690565b600081815260cd6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122c7826116cb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526102c1602052604090205461231b906001614e50565b60009182526102c1602052604090912055565b600081815260cb60205260408120546001600160a01b03166123a75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b1e565b60006123b2836116cb565b9050806001600160a01b0316846001600160a01b031614806123ed5750836001600160a01b03166123e284610aa9565b6001600160a01b0316145b8061241d57506001600160a01b03808216600090815260ce602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612438826116cb565b6001600160a01b0316146124b45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610b1e565b6001600160a01b03821661252f5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b1e565b61253a838383613370565b612545600082612292565b6001600160a01b038316600090815260cc6020526040812080546001929061256e908490614e9b565b90915550506001600160a01b038216600090815260cc6020526040812080546001929061259c908490614e50565b9091555050600081815260cb602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600082815260656020526040902060010154612619813361337b565b610c7083836133fb565b600061195f836001600160a01b03841661349d565b61264b816126466101f55490565b6134ec565b6115016101f580546001019055565b600082815260cb60205260409020546001600160a01b03166126d35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b1e565b60005b8151811015610c705760006001600160a01b031682828151811061270a57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b0316141561276d5760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610b1e565b600082828151811061278f57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001511161280e5760405162461bcd60e51b815260206004820152602260248201527f526f79616c746965732076616c75652073686f756c6420626520706f7369746960448201527f76650000000000000000000000000000000000000000000000000000000000006064820152608401610b1e565b61138882828151811061283157634e487b7160e01b600052603260045260246000fd5b60200260200101516020015111156128b15760405162461bcd60e51b815260206004820152602b60248201527f526f79616c746965732076616c75652073686f756c64206e6f74206265206d6f60448201527f7265207468616e203530250000000000000000000000000000000000000000006064820152608401610b1e565b60008381526102bf6020526040902082518390839081106128e257634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825460018082018555600094855293839020825160029092020180546001600160a01b0319166001600160a01b039092169190911781559101519101558061293581614f30565b9150506126d6565b60008281526102c2602090815260409091208251610c7092840190614499565b60008281526102c0602090815260409091208251610c7092840190614499565b6102c454156129fe576102c45434146129fe5760405162461bcd60e51b815260206004820152603260248201527f57726f6e6720666565732076616c75652073656e7420746f2047686f73744d6160448201527f726b657420666f72206d696e74206665657300000000000000000000000000006064820152608401610b1e565b341561146057346102c36000828254612a179190614e50565b9091555050565b6001600160a01b0381163314612a9c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610b1e565b611394828261363a565b600061195f836001600160a01b0384166136bd565b61015f5460ff16612b0e5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610b1e565b61015f805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611501816137d4565b6113948282613816565b6113948282613830565b61015f5460ff1615612bca5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b1e565b61015f805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612b3c3390565b600061195f83836138da565b600054610100900460ff1680612c25575060005460ff16155b612c885760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b1e565b600054610100900460ff16158015612caa576000805461ffff19166101011790555b8015611501576000805461ff001916905550565b600054610100900460ff1680612cd7575060005460ff16155b612d3a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b1e565b600054610100900460ff16158015612d5c576000805461ffff19166101011790555b61015f805460ff191690558015611501576000805461ff001916905550565b600054610100900460ff1680612d94575060005460ff16155b612df75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b1e565b600054610100900460ff16158015612e19576000805461ffff19166101011790555b8251612e2c9060c9906020860190614499565b508151612e409060ca906020850190614499565b508015610c70576000805461ff0019169055505050565b600054610100900460ff1680612e70575060005460ff16155b612ed35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b1e565b600054610100900460ff16158015612ef5576000805461ffff19166101011790555b8151612f09906101f6906020850190614499565b50612f15600033613989565b612f3f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633613989565b612f697f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33613989565b612f937f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d807933613989565b612fa26101f580546001019055565b8015611394576000805461ff00191690555050565b600054610100900460ff1680612fd0575060005460ff16155b6130335760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610b1e565b600054610100900460ff16158015613055576000805461ffff19166101011790555b61025b80546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611501576000805461ff001916905550565b6001600160e01b031980821614156131075760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610b1e565b6001600160e01b031916600090815261028d60205260409020805460ff19166001179055565b613138848484612425565b61314484848484613993565b611b9f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b1e565b600081815260cb60205260409020546060906001600160a01b03166132435760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610b1e565b60008281526101c360205260408120805461325d90614ef5565b80601f016020809104026020016040519081016040528092919081815260200182805461328990614ef5565b80156132d65780601f106132ab576101008083540402835291602001916132d6565b820191906000526020600020905b8154815290600101906020018083116132b957829003601f168201915b5050505050905060006132e7613af6565b90508051600014156132fa575092915050565b81511561332c578082604051602001613314929190614b06565b60405160208183030381529060405292505050919050565b61241d84613b06565b6000610a11825490565b60008281526065602052604090206001015461335b813361337b565b610c70838361363a565b6000610a1182613bee565b610c70838383613c2c565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16611394576133b9816001600160a01b03166014613cb1565b6133c4836020613cb1565b6040516020016133d5929190614b35565b60408051601f198184030181529082905262461bcd60e51b8252610b1e91600401614dbf565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166113945760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556134593390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008181526001830160205260408120546134e457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a11565b506000610a11565b6001600160a01b0382166135425760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b1e565b600081815260cb60205260409020546001600160a01b0316156135a75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b1e565b6135b360008383613370565b6001600160a01b038216600090815260cc602052604081208054600192906135dc908490614e50565b9091555050600081815260cb602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156113945760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815260018301602052604081205480156137ca5760006136e1600183614e9b565b85549091506000906136f590600190614e9b565b9050600086600001828154811061371c57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061374d57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526001890190915260409020849055865487908061378e57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a11565b6000915050610a11565b6137dd81613ebc565b60008181526101c36020526040902080546137f790614ef5565b1590506115015760008181526101c3602052604081206115019161451d565b611394828260405180602001604052806000815250613f63565b600082815260cb60205260409020546001600160a01b03166138ba5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610b1e565b60008281526101c3602090815260409091208251610c7092840190614499565b815460009082106139535760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60448201527f64730000000000000000000000000000000000000000000000000000000000006064820152608401610b1e565b82600001828154811061397657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b61100d8282613fec565b60006001600160a01b0384163b15613aeb57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906139d7903390899088908890600401614bb6565b602060405180830381600087803b1580156139f157600080fd5b505af1925050508015613a21575060408051601f3d908101601f19168201909252613a1e918101906149f5565b60015b613ad1573d808015613a4f576040519150601f19603f3d011682016040523d82523d6000602084013e613a54565b606091505b508051613ac95760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b1e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061241d565b506001949350505050565b60606101f68054610a2690614ef5565b600081815260cb60205260409020546060906001600160a01b0316613b935760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610b1e565b6000613b9d613af6565b90506000815111613bbd576040518060200160405280600081525061195f565b80613bc784613ff6565b604051602001613bd8929190614b06565b6040516020818303038152906040529392505050565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610a115750610a1182614110565b613c37838383614182565b61015f5460ff1615610c705760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201527f68696c65207061757365640000000000000000000000000000000000000000006064820152608401610b1e565b60606000613cc0836002614e7c565b613ccb906002614e50565b67ffffffffffffffff811115613cf157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613d1b576020820181803683370190505b509050600360fc1b81600081518110613d4457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613d9d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613dc1846002614e7c565b613dcc906001614e50565b90505b6001811115613e6d577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613e1b57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613e3f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613e6681614ede565b9050613dcf565b50831561195f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b1e565b6000613ec7826116cb565b9050613ed581600084613370565b613ee0600083612292565b6001600160a01b038116600090815260cc60205260408120805460019290613f09908490614e9b565b9091555050600082815260cb602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b613f6d83836134ec565b613f7a6000848484613993565b610c705760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b1e565b61139482826133fb565b60608161401a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614044578061402e81614f30565b915061403d9050600a83614e68565b915061401e565b60008167ffffffffffffffff81111561406d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614097576020820181803683370190505b5090505b841561241d576140ac600183614e9b565b91506140b9600a86614f4b565b6140c4906030614e50565b60f81b8183815181106140e757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350614109600a86614e68565b945061409b565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061417357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a115750610a118261423a565b6001600160a01b0383166141dd576141d88160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b614200565b816001600160a01b0316836001600160a01b031614614200576142008382614278565b6001600160a01b03821661421757610c7081614315565b826001600160a01b0316826001600160a01b031614610c7057610c7082826143ee565b60006001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610a115750610a1182614432565b6000600161428584611756565b61428f9190614e9b565b600083815260fc60205260409020549091508082146142e2576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd5460009061432790600190614e9b565b600083815260fe602052604081205460fd805493945090928490811061435d57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060fd838154811061438c57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd8054806143d257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006143f983611756565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a1157507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a11565b8280546144a590614ef5565b90600052602060002090601f0160209004810192826144c7576000855561450d565b82601f106144e057805160ff191683800117855561450d565b8280016001018555821561450d579182015b8281111561450d5782518255916020019190600101906144f2565b50614519929150614553565b5090565b50805461452990614ef5565b6000825580601f10614539575050565b601f01602090049060005260206000209081019061150191905b5b808211156145195760008155600101614554565b600067ffffffffffffffff83111561458257614582614f8b565b614595601f8401601f1916602001614dfb565b90508281528383830111156145a957600080fd5b828260208301376000602084830101529392505050565b600082601f8301126145d0578081fd5b61195f83833560208501614568565b6000602082840312156145f0578081fd5b813561195f81614fa1565b6000806040838503121561460d578081fd5b823561461881614fa1565b9150602083013561462881614fa1565b809150509250929050565b600080600060608486031215614647578081fd5b833561465281614fa1565b9250602084013561466281614fa1565b929592945050506040919091013590565b60008060008060808587031215614688578081fd5b843561469381614fa1565b935060208501356146a381614fa1565b925060408501359150606085013567ffffffffffffffff8111156146c5578182fd5b8501601f810187136146d5578182fd5b6146e487823560208401614568565b91505092959194509250565b600080600080600060a08688031215614707578081fd5b853561471281614fa1565b945060208681013567ffffffffffffffff8082111561472f578384fd5b818901915089601f830112614742578384fd5b813561475561475082614e2c565b614dfb565b8082825285820191508585018d878560061b8801011115614774578788fd5b8795505b838610156147c1576040818f03121561478f578788fd5b614797614dd2565b81356147a281614fa1565b8152818801358882015283526001959095019491860191604001614778565b509850505060408901359250808311156147d9578384fd5b6147e58a848b016145c0565b955060608901359250808311156147fa578384fd5b6148068a848b016145c0565b9450608089013592508083111561481b578384fd5b5050614829888289016145c0565b9150509295509295909350565b60008060408385031215614848578182fd5b823561485381614fa1565b915060208301358015158114614628578182fd5b60008060408385031215614879578182fd5b823561488481614fa1565b946020939093013593505050565b6000806000606084860312156148a6578081fd5b83356148b181614fa1565b925060208401359150604084013567ffffffffffffffff8111156148d3578182fd5b6148df868287016145c0565b9150509250925092565b600060208083850312156148fb578182fd5b823567ffffffffffffffff811115614911578283fd5b8301601f81018513614921578283fd5b803561492f61475082614e2c565b80828252848201915084840188868560051b870101111561494e578687fd5b8694505b83851015614970578035835260019490940193918501918501614952565b50979650505050505050565b60006020828403121561498d578081fd5b5035919050565b600080604083850312156149a6578182fd5b82359150602083013561462881614fa1565b600080604083850312156149ca578182fd5b50508035926020909101359150565b6000602082840312156149ea578081fd5b813561195f81614fb6565b600060208284031215614a06578081fd5b815161195f81614fb6565b600060208284031215614a22578081fd5b813567ffffffffffffffff811115614a38578182fd5b61241d848285016145c0565b600080600060608486031215614a58578081fd5b833567ffffffffffffffff80821115614a6f578283fd5b614a7b878388016145c0565b94506020860135915080821115614a90578283fd5b614a9c878388016145c0565b93506040860135915080821115614ab1578283fd5b506148df868287016145c0565b60008151808452614ad6816020860160208601614eb2565b601f01601f19169290920160200192915050565b60008251614afc818460208701614eb2565b9190910192915050565b60008351614b18818460208801614eb2565b835190830190614b2c818360208801614eb2565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b6d816017850160208801614eb2565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614baa816028840160208801614eb2565b01602801949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614be86080830184614abe565b9695505050505050565b6001600160a01b0384168152826020820152606060408201526000614c1a6060830184614abe565b95945050505050565b6001600160a01b03841681526000602084818401526060604084015281845483600182811c915080831680614c5957607f831692505b858310811415614c7757634e487b7160e01b87526022600452602487fd5b6060880183905260808801818015614c965760018114614ca757614cd1565b60ff19861682528782019650614cd1565b60008b815260209020895b86811015614ccb57815484820152908501908901614cb2565b83019750505b50949b9a5050505050505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614d235783516001600160a01b031683529284019291840191600101614cfe565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015614d7a57815180516001600160a01b03168552860151868501529284019290850190600101614d4c565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614d2357835183529284019291840191600101614da3565b60208152600061195f6020830184614abe565b6040805190810167ffffffffffffffff81118282101715614df557614df5614f8b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715614e2457614e24614f8b565b604052919050565b600067ffffffffffffffff821115614e4657614e46614f8b565b5060051b60200190565b60008219821115614e6357614e63614f5f565b500190565b600082614e7757614e77614f75565b500490565b6000816000190483118215151615614e9657614e96614f5f565b500290565b600082821015614ead57614ead614f5f565b500390565b60005b83811015614ecd578181015183820152602001614eb5565b83811115611b9f5750506000910152565b600081614eed57614eed614f5f565b506000190190565b600181811c90821680614f0957607f821691505b60208210811415614f2a57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415614f4457614f44614f5f565b5060010190565b600082614f5a57614f5a614f75565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461150157600080fd5b6001600160e01b03198116811461150157600080fdfea2646970667358221220f389c8693a4d556143b85b2141a57d7e4b671d7e1eb92b68b1a03a7221423c7464736f6c63430008040033

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.