POL Price: $0.626746 (-3.63%)
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Burn646300102024-11-23 9:36:1819 days ago1732354578IN
0xF1c82f5d...Fc6d33fb3
0 POL0.00429791131.04192339
Mint Ghost645878472024-11-22 8:25:2020 days ago1732263920IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0051355475.23614125
Set Approval For...625874842024-10-03 15:47:1170 days ago1727970431IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0015205733.00009467
Set Approval For...625468062024-10-02 15:39:5371 days ago1727883593IN
0xF1c82f5d...Fc6d33fb3
0 POL0.000727530.00001526
Mint Ghost621097502024-09-21 20:20:0682 days ago1726950006IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0022089232.361
Safe Transfer Fr...613112482024-09-01 20:03:20102 days ago1725221000IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0016231530.00000002
Safe Transfer Fr...603000882024-08-07 12:23:50127 days ago1723033430IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0019952736.87774682
Mint Ghost602999762024-08-07 12:19:34127 days ago1723033174IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0044553732.69228572
Burn602957602024-08-07 9:44:56127 days ago1723023896IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0008399730.00137373
Burn602954292024-08-07 9:32:40127 days ago1723023160IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0006425130.00045311
Set Approval For...599658612024-07-29 22:41:38136 days ago1722292898IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0013848630.00000001
Set Approval For...593168542024-07-13 16:50:33152 days ago1720889433IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0013823430.00000004
Mint Ghost592946132024-07-13 3:21:27152 days ago1720840887IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0042389931.10461276
Set Approval For...592354532024-07-11 15:56:05154 days ago1720713365IN
0xF1c82f5d...Fc6d33fb3
0 POL0.003370773.15215133
Set Approval For...592350422024-07-11 15:41:33154 days ago1720712493IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0021982547.62033732
Mint Ghost592349432024-07-11 15:38:01154 days ago1720712281IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0073991954.29324578
Mint Ghost587537652024-06-29 15:33:33166 days ago1719675213IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0042073930.87000016
Mint Ghost587537212024-06-29 15:31:59166 days ago1719675119IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0040884630.00000009
Mint Ghost587536852024-06-29 15:30:23166 days ago1719675023IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0040884630.00000007
Set Approval For...585435532024-06-24 9:16:48171 days ago1719220608IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0040910988.62477709
Mint Ghost585062302024-06-23 10:28:35172 days ago1719138515IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0040888230.00000039
Burn578631322024-06-07 6:01:52188 days ago1717740112IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0009839430.00000003
Set Approval For...578630302024-06-07 5:58:16188 days ago1717739896IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0013848630.00000003
Mint Ghost571880112024-05-20 15:00:22206 days ago1716217222IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0048456735.55937723
Set Approval For...571879682024-05-20 14:58:50206 days ago1716217130IN
0xF1c82f5d...Fc6d33fb3
0 POL0.0016283535.27482795
View all transactions

Latest 2 internal transactions

Parent Transaction Hash Block From To
289647062022-05-30 19:58:21927 days ago1653940701
0xF1c82f5d...Fc6d33fb3
2.7 POL
220717952021-12-03 2:19:181106 days ago1638497958
0xF1c82f5d...Fc6d33fb3
7.7 POL
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GhostMarketERC1155

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 1337 runs

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

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

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

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

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

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

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

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

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

    // mint fees balance
	uint256 internal _payedMintFeesBalance;

	// mint fees value
	uint256 internal _ghostmarketMintFees;

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

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

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

	using CountersUpgradeable for CountersUpgradeable.Counter;

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library 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;
        }
    }

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

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

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

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

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

    uint256 private _status;

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

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

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

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

    function __Ownable_init_unchained() internal initializer {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC1155Upgradeable.sol";
import "./IERC1155ReceiverUpgradeable.sol";
import "./extensions/IERC1155MetadataURIUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {
    using AddressUpgradeable for address;

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

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

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

    /**
     * @dev See {_setURI}.
     */
    function __ERC1155_init(string memory uri_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC1155_init_unchained(uri_);
    }

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC1155} that allows token holders to destroy both their
 * own tokens and those that they have been approved to use.
 *
 * _Available since v3.1._
 */
abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable {
    function __ERC1155Burnable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC1155Burnable_init_unchained();
    }

    function __ERC1155Burnable_init_unchained() internal initializer {
    }
    function burn(
        address account,
        uint256 id,
        uint256 value
    ) public virtual {
        require(
            account == _msgSender() || isApprovedForAll(account, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        _burn(account, id, value);
    }

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

        _burnBatch(account, ids, values);
    }
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

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

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

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

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

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

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

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

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

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

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

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

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155ReceiverUpgradeable is IERC165Upgradeable {
    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

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

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

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

    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

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal initializer {
        __ERC165_init_unchained();
    }

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _paused = false;
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

            if (lastIndex != toDeleteIndex) {
                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) {
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"msgSender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"lockedContent","type":"string"}],"name":"LockedContentViewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeUpdater","type":"address"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"MintFeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeWithdrawer","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"MintFeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"externalURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POLYNETWORK_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCurrentCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCurrentLockedContentViewTracker","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGhostmarketMintFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLockedContent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMetadataJson","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct GhostMarketERC1155.Royalty[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyaltiesBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyaltiesRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct GhostMarketERC1155.Royalty[]","name":"royalties","type":"tuple[]"},{"internalType":"string","name":"externalURI","type":"string"},{"internalType":"string","name":"metadata","type":"string"},{"internalType":"string","name":"lockedcontent","type":"string"}],"name":"mintGhost","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintWithURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gmmf","type":"uint256"}],"name":"setGhostmarketMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50614b9d806100206000396000f3fe6080604052600436106102db5760003560e01c80639010d07c11610184578063d5391393116100d6578063e985e9c51161008a578063f2fde38b11610064578063f2fde38b1461088a578063f5298aca146108aa578063f7d027de146108ca57600080fd5b8063e985e9c5146107f4578063edcbc0bd1461083d578063f242432a1461086a57600080fd5b8063dac0f3d9116100bb578063dac0f3d91461078a578063e24dbeae146107aa578063e63ab1e9146107c057600080fd5b8063d539139314610736578063d547741f1461076a57600080fd5b8063a22cb46511610138578063c1793c5811610112578063c1793c58146106c8578063c6f4f0f0146106e8578063ca15c8731461071657600080fd5b8063a22cb4651461065b578063a6487c531461067b578063bb3bafd61461069b57600080fd5b806395d89b411161016957806395d89b41146105fd5780639ceea66514610612578063a217fddf1461064657600080fd5b80639010d07c1461059757806391d14854146105b757600080fd5b806336568abe1161023d5780636b20c454116101f157806383fa237b116101cb57806383fa237b1461053c5780638456cb591461054f5780638da5cb5b1461056457600080fd5b80636b20c454146104f2578063715018a61461051257806373448c461461052757600080fd5b80633f4ba83a116102225780633f4ba83a146104975780634e1273f4146104ac5780635c975abb146104d957600080fd5b806336568abe1461045757806336edac961461047757600080fd5b80631c7e78f3116102945780632e1a7d4d116102795780632e1a7d4d146103f75780632eb2c2d6146104175780632f2ff15d1461043757600080fd5b80631c7e78f3146103a7578063248a9ca3146103c757600080fd5b806302fe5305116102c557806302fe53051461034357806306fdde03146103655780630e89341c1461038757600080fd5b8062fdd58e146102e057806301ffc9a714610313575b600080fd5b3480156102ec57600080fd5b506103006102fb3660046141c0565b6108ea565b6040519081526020015b60405180910390f35b34801561031f57600080fd5b5061033361032e36600461448e565b610998565b604051901515815260200161030a565b34801561034f57600080fd5b5061036361035e3660046144c6565b6109a3565b005b34801561037157600080fd5b5061037a610a2c565b60405161030a91906148fd565b34801561039357600080fd5b5061037a6103a2366004614431565b610abb565b3480156103b357600080fd5b506103636103c2366004614431565b610b4f565b3480156103d357600080fd5b506103006103e2366004614431565b60009081526065602052604090206001015490565b34801561040357600080fd5b50610363610412366004614431565b610c20565b34801561042357600080fd5b5061036361043236600461400b565b610e13565b34801561044357600080fd5b50610363610452366004614449565b610eb5565b34801561046357600080fd5b50610363610472366004614449565b610edc565b34801561048357600080fd5b506103636104923660046142d1565b610efe565b3480156104a357600080fd5b50610363610fc4565b3480156104b857600080fd5b506104cc6104c7366004614364565b61106a565b60405161030a91906148bc565b3480156104e557600080fd5b5061012d5460ff16610333565b3480156104fe57600080fd5b5061036361050d36600461411c565b6111e0565b34801561051e57600080fd5b50610363611265565b34801561053357600080fd5b506103006112ca565b61036361054a3660046141eb565b6112db565b34801561055b57600080fd5b50610363611546565b34801561057057600080fd5b506101f5546001600160a01b03165b6040516001600160a01b03909116815260200161030a565b3480156105a357600080fd5b5061057f6105b236600461446d565b6115ea565b3480156105c357600080fd5b506103336105d2366004614449565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561060957600080fd5b5061037a611609565b34801561061e57600080fd5b506103007f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d807981565b34801561065257600080fd5b50610300600081565b34801561066757600080fd5b5061036361067636600461418f565b611617565b34801561068757600080fd5b50610363610696366004614501565b611702565b3480156106a757600080fd5b506106bb6106b6366004614431565b611893565b60405161030a9190614864565b3480156106d457600080fd5b506104cc6106e3366004614431565b61191c565b3480156106f457600080fd5b50610300610703366004614431565b600090815261025d602052604090205490565b34801561072257600080fd5b50610300610731366004614431565b611a61565b34801561074257600080fd5b506103007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561077657600080fd5b50610363610785366004614449565b611a78565b34801561079657600080fd5b506103636107a5366004614431565b611a82565b3480156107b657600080fd5b5061026054610300565b3480156107cc57600080fd5b506103007f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b34801561080057600080fd5b5061033361080f366004613fd3565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b34801561084957600080fd5b5061085d610858366004614431565b611b3b565b60405161030a9190614817565b34801561087657600080fd5b506103636108853660046140b5565b611c8d565b34801561089657600080fd5b506103636108a5366004613fb7565b611d14565b3480156108b657600080fd5b506103636108c5366004614330565b611df4565b3480156108d657600080fd5b5061037a6108e5366004614431565b611e79565b60006001600160a01b03831661096d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b600061099282611e97565b6109ae6000336105d2565b610a205760405162461bcd60e51b815260206004820152603e60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652061646d696e20726f6c6520746f20736574206e65772075726900006064820152608401610964565b610a2981611ec9565b50565b6102598054610a3a906149c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610a66906149c5565b8015610ab35780601f10610a8857610100808354040283529160200191610ab3565b820191906000526020600020905b815481529060010190602001808311610a9657829003601f168201915b505050505081565b606060cb8054610aca906149c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610af6906149c5565b8015610b435780601f10610b1857610100808354040283529160200191610b43565b820191906000526020600020905b815481529060010190602001808311610b2657829003601f168201915b50505050509050919050565b610b5881611ee0565b610bca5760405162461bcd60e51b815260206004820152602360248201527f43616c6c6572206d75737420626520746865206f776e6572206f66207468652060448201527f4e465400000000000000000000000000000000000000000000000000000000006064820152608401610964565b610bd381611ef4565b600081815261025c60205260409081902090517f544b1d1249133c50ce89743ed1ca34a815bd50d42b71e6d331a1ac560013a8ec91610c159133918591614758565b60405180910390a150565b6101f5546001600160a01b03163314610c7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b600081118015610c8e575061025f548111155b610d265760405162461bcd60e51b815260206004820152604760248201527f576974686472617720616d6f756e742073686f756c642062652067726561746560448201527f72207468656e203020616e64206c657373207468656e20636f6e74726163742060648201527f62616c616e636500000000000000000000000000000000000000000000000000608482015260a401610964565b8061025f6000828254610d39919061496b565b9091555050604051600090339083908381818185875af1925050503d8060008114610d80576040519150601f19603f3d011682016040523d82523d6000602084013e610d85565b606091505b5050905080610dd65760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610964565b60408051338152602081018490527f3c897fa64265e543b9d36df079688f87240185d1bf1a937e4c45a56e11678736910160405180910390a15050565b6001600160a01b038516331480610e2f5750610e2f853361080f565b610ea15760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610964565b610eae8585858585611f22565b5050505050565b610ebf82826121c0565b6000828152609760205260409020610ed790826121e6565b505050565b610ee682826121fb565b6000828152609760205260409020610ed79082612283565b610f287f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d8079336105d2565b610f9a5760405162461bcd60e51b815260206004820152603460248201527f6d696e74576974685552493a206d757374206861766520504f4c594e4554574f60448201527f524b5f524f4c4520726f6c6520746f206d696e740000000000000000000000006064820152608401610964565b610fb584848360405180602001604052806000815250612298565b610fbe82611ec9565b50505050565b610fee7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336105d2565b6110605760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610964565b6110686123c6565b565b606081518351146110e35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610964565b6000835167ffffffffffffffff81111561110d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611136578160200160208202803683370190505b50905060005b84518110156111d85761119d85828151811061116857634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061119057634e487b7160e01b600052603260045260246000fd5b60200260200101516108ea565b8282815181106111bd57634e487b7160e01b600052603260045260246000fd5b60209081029190910101526111d181614a53565b905061113c565b509392505050565b6001600160a01b0383163314806111fc57506111fc833361080f565b61125a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b610ed7838383612464565b6101f5546001600160a01b031633146112c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b61106860006126ca565b60006112d66102615490565b905090565b60026101c354141561132f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610964565b60026101c3556001600160a01b03871661138b5760405162461bcd60e51b815260206004820152601160248201527f746f2063616e277420626520656d7074790000000000000000000000000000006044820152606401610964565b60408051600081526020810180835281519020916113ab918691016145e1565b60405160208183030381529060405280519060200120141561140f5760405162461bcd60e51b815260206004820152601a60248201527f65787465726e616c5552492063616e277420626520656d7074790000000000006044820152606401610964565b6114248761141d6102615490565b888861272a565b83511561143e5761143e6114386102615490565b85612736565b604080516000815260208101808352815190209161145e918591016145e1565b604051602081830303815290604052805190602001201461148c5761148c6114866102615490565b836129ad565b60408051600081526020810180835281519020916114ac918491016145e1565b60405160208183030381529060405280519060200120146114da576114da6114d46102615490565b826129cd565b6114e26129ed565b7ff5c82eda717141c5f0cfeb894e7b7819c158a337b62ec13d412aecad30b0ad9e8761150e6102615490565b8589604051611520949392919061471f565b60405180910390a161153761026180546001019055565b505060016101c3555050505050565b6115707f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336105d2565b6115e25760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610964565b611068612a8e565b60008281526097602052604081206116029083612b18565b9392505050565b61025a8054610a3a906149c5565b336001600160a01b03831614156116965760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610964565b33600081815260ca602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600054610100900460ff168061171b575060005460ff16155b61177e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff161580156117a0576000805461ffff19166101011790555b6117a8612b24565b6117b0612b24565b6117b8612b24565b6117c0612b24565b6117c982612bd6565b6117d1612b24565b6117d9612c92565b6117e1612b24565b6117e9612d4f565b6117f1612e76565b61181a7f94407210afedd72cdb4464e227401c7df8809575d2576d9f50e0d5cba8a92e55612f1d565b6118437fe42093a63818e0c931c15fda9036d0d8995a638e7acfabc8355a4789766e8de9612f1d565b835161185790610259906020870190613d89565b50825161186c9061025a906020860190613d89565b5061187c61026180546001019055565b8015610fbe576000805461ff001916905550505050565b606061025b6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611911576000848152602090819020604080518082019091526002850290910180546001600160a01b031682526001908101548284015290835290920191016118c9565b505050509050919050565b600081815261025b60209081526040808320805482518185028101850190935280835260609493849084015b82821015611990576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611948565b5050505090506000815167ffffffffffffffff8111156119c057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156119e9578160200160208202803683370190505b50905060005b82518110156111d857828181518110611a1857634e487b7160e01b600052603260045260246000fd5b602002602001015160200151828281518110611a4457634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611a5981614a53565b9150506119ef565b600081815260976020526040812061099290612f9d565b610ee68282612fa7565b611a8d6000336105d2565b611aff5760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206d75737420686176652061646d696e20726f6c6520746f207360448201527f6574206d696e74206665657300000000000000000000000000000000000000006064820152608401610964565b61026081905560408051338152602081018390527f7801094d3234fa70b910ee2d953591f831bb371292f4f1d114a9111f2391c8129101610c15565b600081815261025b60209081526040808320805482518185028101850190935280835260609493849084015b82821015611baf576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611b67565b5050505090506000815167ffffffffffffffff811115611bdf57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c08578160200160208202803683370190505b50905060005b82518110156111d857828181518110611c3757634e487b7160e01b600052603260045260246000fd5b602002602001015160000151828281518110611c6357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611c8581614a53565b915050611c0e565b6001600160a01b038516331480611ca95750611ca9853361080f565b611d075760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b610eae8585858585612fcd565b6101f5546001600160a01b03163314611d6f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b6001600160a01b038116611deb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610964565b610a29816126ca565b6001600160a01b038316331480611e105750611e10833361080f565b611e6e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b610ed7838383613182565b600081815261025e60205260409020805460609190610aca906149c5565b6000611ea2826132ff565b806109925750506001600160e01b0319166000908152610227602052604090205460ff1690565b8051611edc9060cb906020840190613d89565b5050565b6000611eec33836108ea565b151592915050565b600081815261025d6020526040902054611f0f906001614934565b600091825261025d602052604090912055565b8151835114611f845760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610964565b6001600160a01b038416611fe85760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610964565b33611ff781878787878761330a565b60005b845181101561215257600085828151811061202557634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061205157634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260c9835260408082206001600160a01b038e1683529093529190912054909150818110156120f85760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610964565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612137908490614934565b925050819055505050508061214b90614a53565b9050611ffa565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516121a29291906148cf565b60405180910390a46121b8818787878787613318565b505050505050565b6000828152606560205260409020600101546121dc81336134cd565b610ed7838361354d565b6000611602836001600160a01b0384166135ef565b6001600160a01b03811633146122795760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610964565b611edc828261363e565b6000611602836001600160a01b0384166136c1565b6001600160a01b0384166123145760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610964565b3361233481600087612325886137de565b61232e886137de565b8761330a565b600084815260c9602090815260408083206001600160a01b038916845290915281208054859290612366908490614934565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610eae81600087878787613837565b61012d5460ff166124195760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610964565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0383166124c65760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610964565b80518251146125285760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610964565b600033905061254b8185600086866040518060200160405280600081525061330a565b60005b835181101561266b57600084828151811061257957634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008483815181106125a557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260c9835260408082206001600160a01b038c1683529093529190912054909150818110156126325760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610964565b600092835260c9602090815260408085206001600160a01b038b168652909152909220910390558061266381614a53565b91505061254e565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516126bc9291906148cf565b60405180910390a450505050565b6101f580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610fbe84848484612298565b60005b8151811015610ed75760006001600160a01b031682828151811061276d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b031614156127d05760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610964565b60008282815181106127f257634e487b7160e01b600052603260045260246000fd5b602002602001015160200151116128715760405162461bcd60e51b815260206004820152602260248201527f526f79616c746965732076616c75652073686f756c6420626520706f7369746960448201527f76650000000000000000000000000000000000000000000000000000000000006064820152608401610964565b61138882828151811061289457634e487b7160e01b600052603260045260246000fd5b60200260200101516020015111156129145760405162461bcd60e51b815260206004820152602b60248201527f526f79616c746965732076616c75652073686f756c64206e6f74206265206d6f60448201527f7265207468616e203530250000000000000000000000000000000000000000006064820152608401610964565b600083815261025b60205260409020825183908390811061294557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518254600180820185556000948552938390208251600290920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091178155910151910155806129a581614a53565b915050612739565b600082815261025e602090815260409091208251610ed792840190613d89565b600082815261025c602090815260409091208251610ed792840190613d89565b6102605415612a6e57610260543414612a6e5760405162461bcd60e51b815260206004820152603260248201527f57726f6e6720666565732076616c75652073656e7420746f2047686f73744d6160448201527f726b657420666f72206d696e74206665657300000000000000000000000000006064820152608401610964565b3415611068573461025f6000828254612a879190614934565b9091555050565b61012d5460ff1615612ae25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610964565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124473390565b60006116028383613942565b600054610100900460ff1680612b3d575060005460ff16155b612ba05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612bc2576000805461ffff19166101011790555b8015610a29576000805461ff001916905550565b600054610100900460ff1680612bef575060005460ff16155b612c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612c74576000805461ffff19166101011790555b612c7d82611ec9565b8015611edc576000805461ff00191690555050565b600054610100900460ff1680612cab575060005460ff16155b612d0e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612d30576000805461ffff19166101011790555b61012d805460ff191690558015610a29576000805461ff001916905550565b600054610100900460ff1680612d68575060005460ff16155b612dcb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612ded576000805461ffff19166101011790555b612df860003361397a565b612e227f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361397a565b612e4c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361397a565b612bc27f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d80793361397a565b600054610100900460ff1680612e8f575060005460ff16155b612ef25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612f14576000805461ffff19166101011790555b612bc2336126ca565b6001600160e01b03198082161415612f775760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610964565b6001600160e01b031916600090815261022760205260409020805460ff19166001179055565b6000610992825490565b600082815260656020526040902060010154612fc381336134cd565b610ed7838361363e565b6001600160a01b0384166130315760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610964565b33613041818787612325886137de565b600084815260c9602090815260408083206001600160a01b038a168452909152902054838110156130da5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610964565b600085815260c9602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613119908490614934565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613179828888888888613837565b50505050505050565b6001600160a01b0383166131e45760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610964565b33613213818560006131f5876137de565b6131fe876137de565b6040518060200160405280600081525061330a565b600083815260c9602090815260408083206001600160a01b0388168452909152902054828110156132925760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610964565b600084815260c9602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b600061099282613984565b6121b88686868686866139f6565b6001600160a01b0384163b156121b85760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061335c908990899088908890889060040161467e565b602060405180830381600087803b15801561337657600080fd5b505af19250505080156133a6575060408051601f3d908101601f191682019092526133a3918101906144aa565b60015b61345c576133b2614a9a565b806308c379a014156133ec57506133c7614ab2565b806133d257506133ee565b8060405162461bcd60e51b815260040161096491906148fd565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610964565b6001600160e01b0319811663bc197c8160e01b146131795760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610964565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16611edc5761350b816001600160a01b03166014613a70565b613516836020613a70565b6040516020016135279291906145fd565b60408051601f198184030181529082905262461bcd60e51b8252610964916004016148fd565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16611edc5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135ab3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461363657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610992565b506000610992565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615611edc5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815260018301602052604081205480156137d45760006136e560018361496b565b85549091506000906136f99060019061496b565b905081811461377a57600086600001828154811061372757634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061375857634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061379957634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610992565b6000915050610992565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061382657634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b156121b85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061387b90899089908890889088906004016146dc565b602060405180830381600087803b15801561389557600080fd5b505af19250505080156138c5575060408051601f3d908101601f191682019092526138c2918101906144aa565b60015b6138d1576133b2614a9a565b6001600160e01b0319811663f23a6e6160e01b146131795760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610964565b600082600001828154811061396757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b610ebf8282613cdf565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806139e757506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610992575061099282613ce9565b61012d5460ff16156121b85760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201527f7768696c652070617573656400000000000000000000000000000000000000006064820152608401610964565b60606000613a7f83600261494c565b613a8a906002614934565b67ffffffffffffffff811115613ab057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ada576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613b1f57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613b9057634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613bcc84600261494c565b613bd7906001614934565b90505b6001811115613c90577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613c2657634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613c4a57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93613c89816149ae565b9050613bda565b5083156116025760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610964565b611edc828261354d565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061099257506109928260006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061099257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610992565b828054613d95906149c5565b90600052602060002090601f016020900481019282613db75760008555613dfd565b82601f10613dd057805160ff1916838001178555613dfd565b82800160010185558215613dfd579182015b82811115613dfd578251825591602001919060010190613de2565b50613e09929150613e0d565b5090565b5b80821115613e095760008155600101613e0e565b8035613e2d81614b3c565b919050565b600082601f830112613e42578081fd5b81356020613e4f82614910565b60408051613e5d8382614a26565b8481528381019250868401600686901b88018501891015613e7c578687fd5b865b86811015613ec65783828b031215613e94578788fd5b8351613e9f81614a00565b8235613eaa81614b3c565b8152828701358782015285529385019390830190600101613e7e565b509098975050505050505050565b600082601f830112613ee4578081fd5b81356020613ef182614910565b604051613efe8282614a26565b8381528281019150858301600585901b87018401881015613f1d578586fd5b855b85811015613f3b57813584529284019290840190600101613f1f565b5090979650505050505050565b600082601f830112613f58578081fd5b813567ffffffffffffffff811115613f7257613f72614a84565b604051613f89601f8301601f191660200182614a26565b818152846020838601011115613f9d578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215613fc8578081fd5b813561160281614b3c565b60008060408385031215613fe5578081fd5b8235613ff081614b3c565b9150602083013561400081614b3c565b809150509250929050565b600080600080600060a08688031215614022578081fd5b853561402d81614b3c565b9450602086013561403d81614b3c565b9350604086013567ffffffffffffffff80821115614059578283fd5b61406589838a01613ed4565b9450606088013591508082111561407a578283fd5b61408689838a01613ed4565b9350608088013591508082111561409b578283fd5b506140a888828901613f48565b9150509295509295909350565b600080600080600060a086880312156140cc578081fd5b85356140d781614b3c565b945060208601356140e781614b3c565b93506040860135925060608601359150608086013567ffffffffffffffff811115614110578182fd5b6140a888828901613f48565b600080600060608486031215614130578081fd5b833561413b81614b3c565b9250602084013567ffffffffffffffff80821115614157578283fd5b61416387838801613ed4565b93506040860135915080821115614178578283fd5b5061418586828701613ed4565b9150509250925092565b600080604083850312156141a1578182fd5b82356141ac81614b3c565b915060208301358015158114614000578182fd5b600080604083850312156141d2578182fd5b82356141dd81614b3c565b946020939093013593505050565b600080600080600080600060e0888a031215614205578485fd5b61420e88613e22565b965060208801359550604088013567ffffffffffffffff80821115614231578687fd5b61423d8b838c01613f48565b965060608a0135915080821115614252578384fd5b61425e8b838c01613e32565b955060808a0135915080821115614273578384fd5b61427f8b838c01613f48565b945060a08a0135915080821115614294578384fd5b6142a08b838c01613f48565b935060c08a01359150808211156142b5578283fd5b506142c28a828b01613f48565b91505092959891949750929550565b600080600080608085870312156142e6578182fd5b84356142f181614b3c565b935060208501359250604085013567ffffffffffffffff811115614313578283fd5b61431f87828801613f48565b949793965093946060013593505050565b600080600060608486031215614344578081fd5b833561434f81614b3c565b95602085013595506040909401359392505050565b60008060408385031215614376578182fd5b823567ffffffffffffffff8082111561438d578384fd5b818501915085601f8301126143a0578384fd5b813560206143ad82614910565b6040516143ba8282614a26565b8381528281019150858301600585901b870184018b10156143d9578889fd5b8896505b848710156144045780356143f081614b3c565b8352600196909601959183019183016143dd565b509650508601359250508082111561441a578283fd5b5061442785828601613ed4565b9150509250929050565b600060208284031215614442578081fd5b5035919050565b6000806040838503121561445b578182fd5b82359150602083013561400081614b3c565b6000806040838503121561447f578182fd5b50508035926020909101359150565b60006020828403121561449f578081fd5b813561160281614b51565b6000602082840312156144bb578081fd5b815161160281614b51565b6000602082840312156144d7578081fd5b813567ffffffffffffffff8111156144ed578182fd5b6144f984828501613f48565b949350505050565b600080600060608486031215614515578081fd5b833567ffffffffffffffff8082111561452c578283fd5b61453887838801613f48565b9450602086013591508082111561454d578283fd5b61455987838801613f48565b9350604086013591508082111561456e578283fd5b5061418586828701613f48565b6000815180845260208085019450808401835b838110156145aa5781518752958201959082019060010161458e565b509495945050505050565b600081518084526145cd816020860160208601614982565b601f01601f19169290920160200192915050565b600082516145f3818460208701614982565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614635816017850160208801614982565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614672816028840160208801614982565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a060408301526146aa60a083018661457b565b82810360608401526146bc818661457b565b905082810360808401526146d081856145b5565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261471460a08301846145b5565b979650505050505050565b6001600160a01b038516815283602082015260806040820152600061474760808301856145b5565b905082606083015295945050505050565b6001600160a01b03841681526000602084818401526060604084015281845483600182811c91508083168061478e57607f831692505b8583108114156147ac57634e487b7160e01b87526022600452602487fd5b60608801839052608088018180156147cb57600181146147dc57614806565b60ff19861682528782019650614806565b60008b815260209020895b86811015614800578154848201529085019089016147e7565b83019750505b50949b9a5050505050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156148585783516001600160a01b031683529284019291840191600101614833565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156148af57815180516001600160a01b03168552860151868501529284019290850190600101614881565b5091979650505050505050565b602081526000611602602083018461457b565b6040815260006148e2604083018561457b565b82810360208401526148f4818561457b565b95945050505050565b60208152600061160260208301846145b5565b600067ffffffffffffffff82111561492a5761492a614a84565b5060051b60200190565b6000821982111561494757614947614a6e565b500190565b600081600019048311821515161561496657614966614a6e565b500290565b60008282101561497d5761497d614a6e565b500390565b60005b8381101561499d578181015183820152602001614985565b83811115610fbe5750506000910152565b6000816149bd576149bd614a6e565b506000190190565b600181811c908216806149d957607f821691505b602082108114156149fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6040810181811067ffffffffffffffff82111715614a2057614a20614a84565b60405250565b601f8201601f1916810167ffffffffffffffff81118282101715614a4c57614a4c614a84565b6040525050565b6000600019821415614a6757614a67614a6e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614aaf57600481823e5160e01c5b90565b600060443d1015614ac05790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715614af057505050505090565b8285019150815181811115614b085750505050505090565b843d8701016020828501011115614b225750505050505090565b614b3160208286010187614a26565b509095945050505050565b6001600160a01b0381168114610a2957600080fd5b6001600160e01b031981168114610a2957600080fdfea264697066735822122006ff9a836d2734da634fec5e2f8a8d982fb02efcf2a46a92266604d2685cf6f964736f6c63430008040033

Deployed Bytecode

0x6080604052600436106102db5760003560e01c80639010d07c11610184578063d5391393116100d6578063e985e9c51161008a578063f2fde38b11610064578063f2fde38b1461088a578063f5298aca146108aa578063f7d027de146108ca57600080fd5b8063e985e9c5146107f4578063edcbc0bd1461083d578063f242432a1461086a57600080fd5b8063dac0f3d9116100bb578063dac0f3d91461078a578063e24dbeae146107aa578063e63ab1e9146107c057600080fd5b8063d539139314610736578063d547741f1461076a57600080fd5b8063a22cb46511610138578063c1793c5811610112578063c1793c58146106c8578063c6f4f0f0146106e8578063ca15c8731461071657600080fd5b8063a22cb4651461065b578063a6487c531461067b578063bb3bafd61461069b57600080fd5b806395d89b411161016957806395d89b41146105fd5780639ceea66514610612578063a217fddf1461064657600080fd5b80639010d07c1461059757806391d14854146105b757600080fd5b806336568abe1161023d5780636b20c454116101f157806383fa237b116101cb57806383fa237b1461053c5780638456cb591461054f5780638da5cb5b1461056457600080fd5b80636b20c454146104f2578063715018a61461051257806373448c461461052757600080fd5b80633f4ba83a116102225780633f4ba83a146104975780634e1273f4146104ac5780635c975abb146104d957600080fd5b806336568abe1461045757806336edac961461047757600080fd5b80631c7e78f3116102945780632e1a7d4d116102795780632e1a7d4d146103f75780632eb2c2d6146104175780632f2ff15d1461043757600080fd5b80631c7e78f3146103a7578063248a9ca3146103c757600080fd5b806302fe5305116102c557806302fe53051461034357806306fdde03146103655780630e89341c1461038757600080fd5b8062fdd58e146102e057806301ffc9a714610313575b600080fd5b3480156102ec57600080fd5b506103006102fb3660046141c0565b6108ea565b6040519081526020015b60405180910390f35b34801561031f57600080fd5b5061033361032e36600461448e565b610998565b604051901515815260200161030a565b34801561034f57600080fd5b5061036361035e3660046144c6565b6109a3565b005b34801561037157600080fd5b5061037a610a2c565b60405161030a91906148fd565b34801561039357600080fd5b5061037a6103a2366004614431565b610abb565b3480156103b357600080fd5b506103636103c2366004614431565b610b4f565b3480156103d357600080fd5b506103006103e2366004614431565b60009081526065602052604090206001015490565b34801561040357600080fd5b50610363610412366004614431565b610c20565b34801561042357600080fd5b5061036361043236600461400b565b610e13565b34801561044357600080fd5b50610363610452366004614449565b610eb5565b34801561046357600080fd5b50610363610472366004614449565b610edc565b34801561048357600080fd5b506103636104923660046142d1565b610efe565b3480156104a357600080fd5b50610363610fc4565b3480156104b857600080fd5b506104cc6104c7366004614364565b61106a565b60405161030a91906148bc565b3480156104e557600080fd5b5061012d5460ff16610333565b3480156104fe57600080fd5b5061036361050d36600461411c565b6111e0565b34801561051e57600080fd5b50610363611265565b34801561053357600080fd5b506103006112ca565b61036361054a3660046141eb565b6112db565b34801561055b57600080fd5b50610363611546565b34801561057057600080fd5b506101f5546001600160a01b03165b6040516001600160a01b03909116815260200161030a565b3480156105a357600080fd5b5061057f6105b236600461446d565b6115ea565b3480156105c357600080fd5b506103336105d2366004614449565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561060957600080fd5b5061037a611609565b34801561061e57600080fd5b506103007f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d807981565b34801561065257600080fd5b50610300600081565b34801561066757600080fd5b5061036361067636600461418f565b611617565b34801561068757600080fd5b50610363610696366004614501565b611702565b3480156106a757600080fd5b506106bb6106b6366004614431565b611893565b60405161030a9190614864565b3480156106d457600080fd5b506104cc6106e3366004614431565b61191c565b3480156106f457600080fd5b50610300610703366004614431565b600090815261025d602052604090205490565b34801561072257600080fd5b50610300610731366004614431565b611a61565b34801561074257600080fd5b506103007f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561077657600080fd5b50610363610785366004614449565b611a78565b34801561079657600080fd5b506103636107a5366004614431565b611a82565b3480156107b657600080fd5b5061026054610300565b3480156107cc57600080fd5b506103007f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b34801561080057600080fd5b5061033361080f366004613fd3565b6001600160a01b03918216600090815260ca6020908152604080832093909416825291909152205460ff1690565b34801561084957600080fd5b5061085d610858366004614431565b611b3b565b60405161030a9190614817565b34801561087657600080fd5b506103636108853660046140b5565b611c8d565b34801561089657600080fd5b506103636108a5366004613fb7565b611d14565b3480156108b657600080fd5b506103636108c5366004614330565b611df4565b3480156108d657600080fd5b5061037a6108e5366004614431565b611e79565b60006001600160a01b03831661096d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b50600081815260c9602090815260408083206001600160a01b03861684529091529020545b92915050565b600061099282611e97565b6109ae6000336105d2565b610a205760405162461bcd60e51b815260206004820152603e60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652061646d696e20726f6c6520746f20736574206e65772075726900006064820152608401610964565b610a2981611ec9565b50565b6102598054610a3a906149c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610a66906149c5565b8015610ab35780601f10610a8857610100808354040283529160200191610ab3565b820191906000526020600020905b815481529060010190602001808311610a9657829003601f168201915b505050505081565b606060cb8054610aca906149c5565b80601f0160208091040260200160405190810160405280929190818152602001828054610af6906149c5565b8015610b435780601f10610b1857610100808354040283529160200191610b43565b820191906000526020600020905b815481529060010190602001808311610b2657829003601f168201915b50505050509050919050565b610b5881611ee0565b610bca5760405162461bcd60e51b815260206004820152602360248201527f43616c6c6572206d75737420626520746865206f776e6572206f66207468652060448201527f4e465400000000000000000000000000000000000000000000000000000000006064820152608401610964565b610bd381611ef4565b600081815261025c60205260409081902090517f544b1d1249133c50ce89743ed1ca34a815bd50d42b71e6d331a1ac560013a8ec91610c159133918591614758565b60405180910390a150565b6101f5546001600160a01b03163314610c7b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b600081118015610c8e575061025f548111155b610d265760405162461bcd60e51b815260206004820152604760248201527f576974686472617720616d6f756e742073686f756c642062652067726561746560448201527f72207468656e203020616e64206c657373207468656e20636f6e74726163742060648201527f62616c616e636500000000000000000000000000000000000000000000000000608482015260a401610964565b8061025f6000828254610d39919061496b565b9091555050604051600090339083908381818185875af1925050503d8060008114610d80576040519150601f19603f3d011682016040523d82523d6000602084013e610d85565b606091505b5050905080610dd65760405162461bcd60e51b815260206004820152601060248201527f5472616e73666572206661696c65642e000000000000000000000000000000006044820152606401610964565b60408051338152602081018490527f3c897fa64265e543b9d36df079688f87240185d1bf1a937e4c45a56e11678736910160405180910390a15050565b6001600160a01b038516331480610e2f5750610e2f853361080f565b610ea15760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610964565b610eae8585858585611f22565b5050505050565b610ebf82826121c0565b6000828152609760205260409020610ed790826121e6565b505050565b610ee682826121fb565b6000828152609760205260409020610ed79082612283565b610f287f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d8079336105d2565b610f9a5760405162461bcd60e51b815260206004820152603460248201527f6d696e74576974685552493a206d757374206861766520504f4c594e4554574f60448201527f524b5f524f4c4520726f6c6520746f206d696e740000000000000000000000006064820152608401610964565b610fb584848360405180602001604052806000815250612298565b610fbe82611ec9565b50505050565b610fee7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336105d2565b6110605760405162461bcd60e51b815260206004820152603b60248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f20756e706175736500000000006064820152608401610964565b6110686123c6565b565b606081518351146110e35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610964565b6000835167ffffffffffffffff81111561110d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611136578160200160208202803683370190505b50905060005b84518110156111d85761119d85828151811061116857634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061119057634e487b7160e01b600052603260045260246000fd5b60200260200101516108ea565b8282815181106111bd57634e487b7160e01b600052603260045260246000fd5b60209081029190910101526111d181614a53565b905061113c565b509392505050565b6001600160a01b0383163314806111fc57506111fc833361080f565b61125a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b610ed7838383612464565b6101f5546001600160a01b031633146112c05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b61106860006126ca565b60006112d66102615490565b905090565b60026101c354141561132f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610964565b60026101c3556001600160a01b03871661138b5760405162461bcd60e51b815260206004820152601160248201527f746f2063616e277420626520656d7074790000000000000000000000000000006044820152606401610964565b60408051600081526020810180835281519020916113ab918691016145e1565b60405160208183030381529060405280519060200120141561140f5760405162461bcd60e51b815260206004820152601a60248201527f65787465726e616c5552492063616e277420626520656d7074790000000000006044820152606401610964565b6114248761141d6102615490565b888861272a565b83511561143e5761143e6114386102615490565b85612736565b604080516000815260208101808352815190209161145e918591016145e1565b604051602081830303815290604052805190602001201461148c5761148c6114866102615490565b836129ad565b60408051600081526020810180835281519020916114ac918491016145e1565b60405160208183030381529060405280519060200120146114da576114da6114d46102615490565b826129cd565b6114e26129ed565b7ff5c82eda717141c5f0cfeb894e7b7819c158a337b62ec13d412aecad30b0ad9e8761150e6102615490565b8589604051611520949392919061471f565b60405180910390a161153761026180546001019055565b505060016101c3555050505050565b6115707f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336105d2565b6115e25760405162461bcd60e51b815260206004820152603960248201527f455243313135355072657365744d696e7465725061757365723a206d7573742060448201527f686176652070617573657220726f6c6520746f207061757365000000000000006064820152608401610964565b611068612a8e565b60008281526097602052604081206116029083612b18565b9392505050565b61025a8054610a3a906149c5565b336001600160a01b03831614156116965760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610964565b33600081815260ca602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600054610100900460ff168061171b575060005460ff16155b61177e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff161580156117a0576000805461ffff19166101011790555b6117a8612b24565b6117b0612b24565b6117b8612b24565b6117c0612b24565b6117c982612bd6565b6117d1612b24565b6117d9612c92565b6117e1612b24565b6117e9612d4f565b6117f1612e76565b61181a7f94407210afedd72cdb4464e227401c7df8809575d2576d9f50e0d5cba8a92e55612f1d565b6118437fe42093a63818e0c931c15fda9036d0d8995a638e7acfabc8355a4789766e8de9612f1d565b835161185790610259906020870190613d89565b50825161186c9061025a906020860190613d89565b5061187c61026180546001019055565b8015610fbe576000805461ff001916905550505050565b606061025b6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611911576000848152602090819020604080518082019091526002850290910180546001600160a01b031682526001908101548284015290835290920191016118c9565b505050509050919050565b600081815261025b60209081526040808320805482518185028101850190935280835260609493849084015b82821015611990576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611948565b5050505090506000815167ffffffffffffffff8111156119c057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156119e9578160200160208202803683370190505b50905060005b82518110156111d857828181518110611a1857634e487b7160e01b600052603260045260246000fd5b602002602001015160200151828281518110611a4457634e487b7160e01b600052603260045260246000fd5b602090810291909101015280611a5981614a53565b9150506119ef565b600081815260976020526040812061099290612f9d565b610ee68282612fa7565b611a8d6000336105d2565b611aff5760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206d75737420686176652061646d696e20726f6c6520746f207360448201527f6574206d696e74206665657300000000000000000000000000000000000000006064820152608401610964565b61026081905560408051338152602081018390527f7801094d3234fa70b910ee2d953591f831bb371292f4f1d114a9111f2391c8129101610c15565b600081815261025b60209081526040808320805482518185028101850190935280835260609493849084015b82821015611baf576000848152602090819020604080518082019091526002850290910180546001600160a01b03168252600190810154828401529083529092019101611b67565b5050505090506000815167ffffffffffffffff811115611bdf57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c08578160200160208202803683370190505b50905060005b82518110156111d857828181518110611c3757634e487b7160e01b600052603260045260246000fd5b602002602001015160000151828281518110611c6357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611c8581614a53565b915050611c0e565b6001600160a01b038516331480611ca95750611ca9853361080f565b611d075760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b610eae8585858585612fcd565b6101f5546001600160a01b03163314611d6f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610964565b6001600160a01b038116611deb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610964565b610a29816126ca565b6001600160a01b038316331480611e105750611e10833361080f565b611e6e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610964565b610ed7838383613182565b600081815261025e60205260409020805460609190610aca906149c5565b6000611ea2826132ff565b806109925750506001600160e01b0319166000908152610227602052604090205460ff1690565b8051611edc9060cb906020840190613d89565b5050565b6000611eec33836108ea565b151592915050565b600081815261025d6020526040902054611f0f906001614934565b600091825261025d602052604090912055565b8151835114611f845760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610964565b6001600160a01b038416611fe85760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610964565b33611ff781878787878761330a565b60005b845181101561215257600085828151811061202557634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061205157634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260c9835260408082206001600160a01b038e1683529093529190912054909150818110156120f85760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610964565b600083815260c9602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612137908490614934565b925050819055505050508061214b90614a53565b9050611ffa565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516121a29291906148cf565b60405180910390a46121b8818787878787613318565b505050505050565b6000828152606560205260409020600101546121dc81336134cd565b610ed7838361354d565b6000611602836001600160a01b0384166135ef565b6001600160a01b03811633146122795760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610964565b611edc828261363e565b6000611602836001600160a01b0384166136c1565b6001600160a01b0384166123145760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610964565b3361233481600087612325886137de565b61232e886137de565b8761330a565b600084815260c9602090815260408083206001600160a01b038916845290915281208054859290612366908490614934565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610eae81600087878787613837565b61012d5460ff166124195760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610964565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0383166124c65760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610964565b80518251146125285760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610964565b600033905061254b8185600086866040518060200160405280600081525061330a565b60005b835181101561266b57600084828151811061257957634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008483815181106125a557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260c9835260408082206001600160a01b038c1683529093529190912054909150818110156126325760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610964565b600092835260c9602090815260408085206001600160a01b038b168652909152909220910390558061266381614a53565b91505061254e565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516126bc9291906148cf565b60405180910390a450505050565b6101f580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610fbe84848484612298565b60005b8151811015610ed75760006001600160a01b031682828151811061276d57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516001600160a01b031614156127d05760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610964565b60008282815181106127f257634e487b7160e01b600052603260045260246000fd5b602002602001015160200151116128715760405162461bcd60e51b815260206004820152602260248201527f526f79616c746965732076616c75652073686f756c6420626520706f7369746960448201527f76650000000000000000000000000000000000000000000000000000000000006064820152608401610964565b61138882828151811061289457634e487b7160e01b600052603260045260246000fd5b60200260200101516020015111156129145760405162461bcd60e51b815260206004820152602b60248201527f526f79616c746965732076616c75652073686f756c64206e6f74206265206d6f60448201527f7265207468616e203530250000000000000000000000000000000000000000006064820152608401610964565b600083815261025b60205260409020825183908390811061294557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518254600180820185556000948552938390208251600290920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091178155910151910155806129a581614a53565b915050612739565b600082815261025e602090815260409091208251610ed792840190613d89565b600082815261025c602090815260409091208251610ed792840190613d89565b6102605415612a6e57610260543414612a6e5760405162461bcd60e51b815260206004820152603260248201527f57726f6e6720666565732076616c75652073656e7420746f2047686f73744d6160448201527f726b657420666f72206d696e74206665657300000000000000000000000000006064820152608401610964565b3415611068573461025f6000828254612a879190614934565b9091555050565b61012d5460ff1615612ae25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610964565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124473390565b60006116028383613942565b600054610100900460ff1680612b3d575060005460ff16155b612ba05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612bc2576000805461ffff19166101011790555b8015610a29576000805461ff001916905550565b600054610100900460ff1680612bef575060005460ff16155b612c525760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612c74576000805461ffff19166101011790555b612c7d82611ec9565b8015611edc576000805461ff00191690555050565b600054610100900460ff1680612cab575060005460ff16155b612d0e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612d30576000805461ffff19166101011790555b61012d805460ff191690558015610a29576000805461ff001916905550565b600054610100900460ff1680612d68575060005460ff16155b612dcb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612ded576000805461ffff19166101011790555b612df860003361397a565b612e227f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361397a565b612e4c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361397a565b612bc27f8a9d57248f1015d5cac20111fe2512477434cf493627e5e959ca751e593d80793361397a565b600054610100900460ff1680612e8f575060005460ff16155b612ef25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610964565b600054610100900460ff16158015612f14576000805461ffff19166101011790555b612bc2336126ca565b6001600160e01b03198082161415612f775760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610964565b6001600160e01b031916600090815261022760205260409020805460ff19166001179055565b6000610992825490565b600082815260656020526040902060010154612fc381336134cd565b610ed7838361363e565b6001600160a01b0384166130315760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610964565b33613041818787612325886137de565b600084815260c9602090815260408083206001600160a01b038a168452909152902054838110156130da5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610964565b600085815260c9602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613119908490614934565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613179828888888888613837565b50505050505050565b6001600160a01b0383166131e45760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610964565b33613213818560006131f5876137de565b6131fe876137de565b6040518060200160405280600081525061330a565b600083815260c9602090815260408083206001600160a01b0388168452909152902054828110156132925760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610964565b600084815260c9602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b600061099282613984565b6121b88686868686866139f6565b6001600160a01b0384163b156121b85760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061335c908990899088908890889060040161467e565b602060405180830381600087803b15801561337657600080fd5b505af19250505080156133a6575060408051601f3d908101601f191682019092526133a3918101906144aa565b60015b61345c576133b2614a9a565b806308c379a014156133ec57506133c7614ab2565b806133d257506133ee565b8060405162461bcd60e51b815260040161096491906148fd565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610964565b6001600160e01b0319811663bc197c8160e01b146131795760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610964565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16611edc5761350b816001600160a01b03166014613a70565b613516836020613a70565b6040516020016135279291906145fd565b60408051601f198184030181529082905262461bcd60e51b8252610964916004016148fd565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16611edc5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135ab3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600081815260018301602052604081205461363657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610992565b506000610992565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff1615611edc5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600081815260018301602052604081205480156137d45760006136e560018361496b565b85549091506000906136f99060019061496b565b905081811461377a57600086600001828154811061372757634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061375857634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061379957634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610992565b6000915050610992565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061382657634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b156121b85760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061387b90899089908890889088906004016146dc565b602060405180830381600087803b15801561389557600080fd5b505af19250505080156138c5575060408051601f3d908101601f191682019092526138c2918101906144aa565b60015b6138d1576133b2614a9a565b6001600160e01b0319811663f23a6e6160e01b146131795760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610964565b600082600001828154811061396757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b610ebf8282613cdf565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806139e757506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610992575061099282613ce9565b61012d5460ff16156121b85760405162461bcd60e51b815260206004820152602c60248201527f455243313135355061757361626c653a20746f6b656e207472616e736665722060448201527f7768696c652070617573656400000000000000000000000000000000000000006064820152608401610964565b60606000613a7f83600261494c565b613a8a906002614934565b67ffffffffffffffff811115613ab057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ada576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613b1f57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613b9057634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000613bcc84600261494c565b613bd7906001614934565b90505b6001811115613c90577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613c2657634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613c4a57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93613c89816149ae565b9050613bda565b5083156116025760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610964565b611edc828261354d565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061099257506109928260006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061099257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610992565b828054613d95906149c5565b90600052602060002090601f016020900481019282613db75760008555613dfd565b82601f10613dd057805160ff1916838001178555613dfd565b82800160010185558215613dfd579182015b82811115613dfd578251825591602001919060010190613de2565b50613e09929150613e0d565b5090565b5b80821115613e095760008155600101613e0e565b8035613e2d81614b3c565b919050565b600082601f830112613e42578081fd5b81356020613e4f82614910565b60408051613e5d8382614a26565b8481528381019250868401600686901b88018501891015613e7c578687fd5b865b86811015613ec65783828b031215613e94578788fd5b8351613e9f81614a00565b8235613eaa81614b3c565b8152828701358782015285529385019390830190600101613e7e565b509098975050505050505050565b600082601f830112613ee4578081fd5b81356020613ef182614910565b604051613efe8282614a26565b8381528281019150858301600585901b87018401881015613f1d578586fd5b855b85811015613f3b57813584529284019290840190600101613f1f565b5090979650505050505050565b600082601f830112613f58578081fd5b813567ffffffffffffffff811115613f7257613f72614a84565b604051613f89601f8301601f191660200182614a26565b818152846020838601011115613f9d578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215613fc8578081fd5b813561160281614b3c565b60008060408385031215613fe5578081fd5b8235613ff081614b3c565b9150602083013561400081614b3c565b809150509250929050565b600080600080600060a08688031215614022578081fd5b853561402d81614b3c565b9450602086013561403d81614b3c565b9350604086013567ffffffffffffffff80821115614059578283fd5b61406589838a01613ed4565b9450606088013591508082111561407a578283fd5b61408689838a01613ed4565b9350608088013591508082111561409b578283fd5b506140a888828901613f48565b9150509295509295909350565b600080600080600060a086880312156140cc578081fd5b85356140d781614b3c565b945060208601356140e781614b3c565b93506040860135925060608601359150608086013567ffffffffffffffff811115614110578182fd5b6140a888828901613f48565b600080600060608486031215614130578081fd5b833561413b81614b3c565b9250602084013567ffffffffffffffff80821115614157578283fd5b61416387838801613ed4565b93506040860135915080821115614178578283fd5b5061418586828701613ed4565b9150509250925092565b600080604083850312156141a1578182fd5b82356141ac81614b3c565b915060208301358015158114614000578182fd5b600080604083850312156141d2578182fd5b82356141dd81614b3c565b946020939093013593505050565b600080600080600080600060e0888a031215614205578485fd5b61420e88613e22565b965060208801359550604088013567ffffffffffffffff80821115614231578687fd5b61423d8b838c01613f48565b965060608a0135915080821115614252578384fd5b61425e8b838c01613e32565b955060808a0135915080821115614273578384fd5b61427f8b838c01613f48565b945060a08a0135915080821115614294578384fd5b6142a08b838c01613f48565b935060c08a01359150808211156142b5578283fd5b506142c28a828b01613f48565b91505092959891949750929550565b600080600080608085870312156142e6578182fd5b84356142f181614b3c565b935060208501359250604085013567ffffffffffffffff811115614313578283fd5b61431f87828801613f48565b949793965093946060013593505050565b600080600060608486031215614344578081fd5b833561434f81614b3c565b95602085013595506040909401359392505050565b60008060408385031215614376578182fd5b823567ffffffffffffffff8082111561438d578384fd5b818501915085601f8301126143a0578384fd5b813560206143ad82614910565b6040516143ba8282614a26565b8381528281019150858301600585901b870184018b10156143d9578889fd5b8896505b848710156144045780356143f081614b3c565b8352600196909601959183019183016143dd565b509650508601359250508082111561441a578283fd5b5061442785828601613ed4565b9150509250929050565b600060208284031215614442578081fd5b5035919050565b6000806040838503121561445b578182fd5b82359150602083013561400081614b3c565b6000806040838503121561447f578182fd5b50508035926020909101359150565b60006020828403121561449f578081fd5b813561160281614b51565b6000602082840312156144bb578081fd5b815161160281614b51565b6000602082840312156144d7578081fd5b813567ffffffffffffffff8111156144ed578182fd5b6144f984828501613f48565b949350505050565b600080600060608486031215614515578081fd5b833567ffffffffffffffff8082111561452c578283fd5b61453887838801613f48565b9450602086013591508082111561454d578283fd5b61455987838801613f48565b9350604086013591508082111561456e578283fd5b5061418586828701613f48565b6000815180845260208085019450808401835b838110156145aa5781518752958201959082019060010161458e565b509495945050505050565b600081518084526145cd816020860160208601614982565b601f01601f19169290920160200192915050565b600082516145f3818460208701614982565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614635816017850160208801614982565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614672816028840160208801614982565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a060408301526146aa60a083018661457b565b82810360608401526146bc818661457b565b905082810360808401526146d081856145b5565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261471460a08301846145b5565b979650505050505050565b6001600160a01b038516815283602082015260806040820152600061474760808301856145b5565b905082606083015295945050505050565b6001600160a01b03841681526000602084818401526060604084015281845483600182811c91508083168061478e57607f831692505b8583108114156147ac57634e487b7160e01b87526022600452602487fd5b60608801839052608088018180156147cb57600181146147dc57614806565b60ff19861682528782019650614806565b60008b815260209020895b86811015614800578154848201529085019089016147e7565b83019750505b50949b9a5050505050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156148585783516001600160a01b031683529284019291840191600101614833565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b828110156148af57815180516001600160a01b03168552860151868501529284019290850190600101614881565b5091979650505050505050565b602081526000611602602083018461457b565b6040815260006148e2604083018561457b565b82810360208401526148f4818561457b565b95945050505050565b60208152600061160260208301846145b5565b600067ffffffffffffffff82111561492a5761492a614a84565b5060051b60200190565b6000821982111561494757614947614a6e565b500190565b600081600019048311821515161561496657614966614a6e565b500290565b60008282101561497d5761497d614a6e565b500390565b60005b8381101561499d578181015183820152602001614985565b83811115610fbe5750506000910152565b6000816149bd576149bd614a6e565b506000190190565b600181811c908216806149d957607f821691505b602082108114156149fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6040810181811067ffffffffffffffff82111715614a2057614a20614a84565b60405250565b601f8201601f1916810167ffffffffffffffff81118282101715614a4c57614a4c614a84565b6040525050565b6000600019821415614a6757614a67614a6e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614aaf57600481823e5160e01c5b90565b600060443d1015614ac05790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715614af057505050505090565b8285019150815181811115614b085750505050505090565b843d8701016020828501011115614b225750505050505090565b614b3160208286010187614a26565b509095945050505050565b6001600160a01b0381168114610a2957600080fd5b6001600160e01b031981168114610a2957600080fdfea264697066735822122006ff9a836d2734da634fec5e2f8a8d982fb02efcf2a46a92266604d2685cf6f964736f6c63430008040033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.