ETH Price: $2,424.02 (-1.37%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a08060162199892022-12-19 16:38:59686 days ago1671467939IN
 Create: HinataStorage
0 ETH0.0747100220.82566161

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HinataStorage

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : HinataStorage.sol
// solhint-disable
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";

contract HinataStorage is
    Initializable,
    ERC1155SupplyUpgradeable,
    IERC1155ReceiverUpgradeable,
    AccessControlUpgradeable,
    UUPSUpgradeable
{
    using StringsUpgradeable for uint256;
    using SafeERC20Upgradeable for IERC20Upgradeable;

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

    struct Collection {
        address owner;
        uint256 royaltyFee;
        uint256 royalty;
    }

    address public hinata;
    address public weth;
    mapping(address => mapping(uint256 => bool)) public allowedIds;

    string public baseURI;
    mapping(uint256 => string) public uris;
    mapping(uint256 => address) public artists;
    mapping(address => bool) public airdrops;

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyAdmin() {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Ownable: caller is not the owner");
        _;
    }

    function initialize(
        address[] memory owners,
        address _hinata,
        address _weth
    ) public initializer {
        __ERC1155Supply_init();
        __AccessControl_init();
        __UUPSUpgradeable_init();

        hinata = _hinata;
        weth = _weth;

        for (uint256 i = 0; i < owners.length; ++i) {
            _setupRole(DEFAULT_ADMIN_ROLE, owners[i]);
        }
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(MINTER_ROLE, msg.sender);
        _setupRole(MINTER_ROLE, hinata);
    }

    function _authorizeUpgrade(address) internal override onlyAdmin {}

    modifier onlyArtist() {
        require(hasRole(MINTER_ROLE, msg.sender), "Ownable: caller is not the artist");
        _;
    }

    function addArtist(address _user) public {
        grantRole(MINTER_ROLE, _user);
    }

    function addArtists(address[] calldata _users) external {
        uint256 len = _users.length;
        for (uint256 i; i < len; i += 1) {
            addArtist(_users[i]);
        }
    }

    function allowTokenIdsForArtist(
        address _user,
        uint256[] calldata _tokenIds,
        bool[] calldata _approved
    ) external onlyAdmin {
        require(_tokenIds.length == _approved.length, "Hinata: INVALID_ARGUMENTS");

        uint256 len = _tokenIds.length;
        for (uint256 i; i < len; i += 1) {
            allowedIds[_user][_tokenIds[i]] = _approved[i];
        }
    }

    function removeArtist(address _user) public {
        revokeRole(MINTER_ROLE, _user);
    }

    function removeArtists(address[] calldata _users) external {
        uint256 len = _users.length;
        for (uint256 i; i < len; i += 1) {
            removeArtist(_users[i]);
        }
    }

    function mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data,
        string memory uri_
    ) public {
        require(hasRole(MINTER_ROLE, msg.sender), "Hinata: NO_MINTER_ROLE");
        uris[id] = uri_;
        _mint(to, id, amount, data);
    }

    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public {
        require(hasRole(MINTER_ROLE, msg.sender), "Hinata: NO_MINTER_ROLE");
        _mintBatch(to, ids, amounts, data);
    }

    function mintArtistNFT(
        uint256 id,
        uint256 amount,
        bytes memory data,
        string memory uri_
    ) external onlyArtist {
        if (artists[id] == address(0)) artists[id] = msg.sender;
        require(artists[id] == msg.sender, "Hinata: NOT_OWNER");
        mint(msg.sender, id, amount, data, uri_);
    }

    function mintBatchArtistNFT(
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes memory data
    ) external onlyArtist {
        for (uint256 i; i < ids.length; i += 1) {
            if (artists[ids[i]] == address(0)) artists[ids[i]] = msg.sender;
            require(artists[ids[i]] == msg.sender, "Hinata: NOT_OWNER");
        }
        mintBatch(msg.sender, ids, amounts, data);
    }

    function mintAirdropNFT(
        address receiver,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) external {
        require(hinata == msg.sender);
        require(!airdrops[receiver], "Hinata: FREE_MINTED_ALREADY");
        airdrops[receiver] = true;
        mint(receiver, id, amount, data, uris[id]);
    }

    function setBaseURI(string memory baseURI_) external onlyAdmin {
        baseURI = baseURI_;
    }

    function setURI(uint256 id, string memory uri_) external onlyAdmin {
        uris[id] = uri_;
    }

    function uri(uint256 id) public view override returns (string memory) {
        if (bytes(uris[id]).length > 0) return uris[id];
        return string(abi.encodePacked(baseURI, id.toString()));
    }

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

    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
        return bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"));
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) external pure override returns (bytes4) {
        return
            bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"));
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC1155Upgradeable, IERC165Upgradeable, AccessControlUpgradeable)
        returns (bool)
    {
        return
            interfaceId == type(IERC1155Upgradeable).interfaceId ||
            interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId ||
            interfaceId == type(IAccessControlUpgradeable).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 2 of 21 : ERC1155SupplyUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable {
    function __ERC1155Supply_init() internal onlyInitializing {
    }

    function __ERC1155Supply_init_unchained() internal onlyInitializing {
    }
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155SupplyUpgradeable.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    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);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] -= amounts[i];
            }
        }
    }

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 3 of 21 : IERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

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

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

File 4 of 21 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 5 of 21 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 21 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

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

File 7 of 21 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @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 proxied contracts do not make use of 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.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
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() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

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

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 8 of 21 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.0;

import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 *
 * _Available since v4.1._
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
    address private immutable __self = address(this);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        require(address(this) != __self, "Function must be called through delegatecall");
        require(_getImplementation() == __self, "Function must be called through active proxy");
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
        _;
    }

    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate that the this implementation remains valid after an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
        return _IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeTo(address newImplementation) external virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data, true);
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeTo} and {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal override onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 9 of 21 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        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 virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 10 of 21 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

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 onlyInitializing {
        __ERC1155_init_unchained(uri_);
    }

    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {
        _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 {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155ReceiverUpgradeable.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.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;
    }

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[47] private __gap;
}

File 11 of 21 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

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 12 of 21 : IERC1155MetadataURIUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

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 13 of 21 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

File 14 of 21 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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 onlyInitializing {
    }

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 15 of 21 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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 onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 16 of 21 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822ProxiableUpgradeable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 18 of 21 : ERC1967UpgradeUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967UpgradeUpgradeable is Initializable {
    function __ERC1967Upgrade_init() internal onlyInitializing {
    }

    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
    }
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
        }
    }

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
    }

    /**
     * This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 19 of 21 : IBeaconUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeaconUpgradeable {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 20 of 21 : StorageSlotUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlotUpgradeable {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly {
            r.slot := slot
        }
    }
}

File 21 of 21 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","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":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","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":[{"internalType":"address","name":"_user","type":"address"}],"name":"addArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"addArtists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"airdrops","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"bool[]","name":"_approved","type":"bool[]"}],"name":"allowTokenIdsForArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"artists","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hinata","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"address","name":"_hinata","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"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":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"string","name":"uri_","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintAirdropNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"string","name":"uri_","type":"string"}],"name":"mintArtistNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintBatchArtistNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"removeArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"removeArtists","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":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"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":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uris","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a080604052346100315730608052613ff390816100378239608051818181610b9701528181610eed0152610f8b0152f35b600080fdfe60806040526004361015610013575b600080fd5b60003560e01c8062fdd58e1461035a57806301ffc9a7146103515780630291a853146103485780630e89341c1461033f5780631253c546146103365780631f7fdffa1461032d578063248a9ca31461032457806326c460611461031b5780632eb2c2d6146103125780632f2ff15d1461030957806336568abe146103005780633659cfe6146102f75780633fc8cef3146102ee578063416563f1146102e55780634d287f2b146102dc5780634e1273f4146102d35780634f1ef286146102ca5780634f558e79146102c157806352d1902d146102b857806355f804b3146102af5780636c0360eb146102a657806371085e521461029d578063862440e21461029457806386ac3f2e1461028b5780638c86f0a71461028257806390482d721461027957806391d14854146102705780639745831414610267578063978d5b761461025e578063a217fddf14610255578063a22cb4651461024c578063bc197c8114610243578063bd85b0391461023a578063c1341c4f14610231578063cd7e10c114610228578063d53913931461021f578063d547741f14610216578063d7879b2a1461020d578063e0a8410414610204578063e985e9c5146101fb578063f23a6e61146101f25763f242432a146101ea57600080fd5b61000e611dc9565b5061000e611d6e565b5061000e611d11565b5061000e611c3b565b5061000e611ac2565b5061000e611a7d565b5061000e611a53565b5061000e611a1d565b5061000e6119b5565b5061000e611988565b5061000e6118f8565b5061000e6117d4565b5061000e6117ad565b5061000e61178c565b5061000e611734565b5061000e6116dd565b5061000e6115c0565b5061000e61157c565b5061000e611422565b5061000e611302565b5061000e6112af565b5061000e61117b565b5061000e61103d565b5061000e610f77565b5061000e610f48565b5061000e610ea3565b5061000e610d8b565b5061000e610cb8565b5061000e610c66565b5061000e610c3b565b5061000e610b69565b5061000e610ad2565b5061000e610a11565b5061000e61098b565b5061000e610960565b5061000e610930565b5061000e6108b7565b5061000e6107fa565b5061000e6106e6565b5061000e61056e565b5061000e6103ba565b5061000e610374565b6001600160a01b0381160361000e57565b503461000e57604036600319011261000e5760206103a060043561039781610363565b602435906127dd565b604051908152f35b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e5761041d6004356103db816103a8565b63ffffffff60e01b16636cdb3d1360e11b81149081908215908161048c575b831561047b575b8315610421575b50506040519115158252509081906020820190565b0390f35b637965db0b60e01b8114935090918315610441575b505050388080610408565b92509061046a575b8115610459575b50388080610436565b6301ffc9a760e01b14905038610450565b6303a24d0760e21b81149150610449565b637965db0b60e01b81149350610401565b6303a24d0760e21b811493506103fa565b50634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176104cf57604052565b6104d761049d565b604052565b90601f801991011681019081106001600160401b038211176104cf57604052565b6020906001600160401b03811161051a575b601f01601f19160190565b61052261049d565b61050f565b81601f8201121561000e5780359061053e826104fd565b9261054c60405194856104dc565b8284526020838301011161000e57816000926020809301838601378301015290565b503461000e57608036600319011261000e5760043561058c81610363565b6024356064356001600160401b03811161000e576105ae903690600401610527565b61015f546001600160a01b03908116330361000e57831660005261016560205260ff60406000205416610633576001600160a01b038316600090815261016560205260409020610631939061060a90805460ff19166001179055565b61062761062284600052610163602052604060002090565b610754565b9260443591613928565b005b60405162461bcd60e51b815260206004820152601b60248201527f48696e6174613a20465245455f4d494e5445445f414c524541445900000000006044820152606490fd5b918091926000905b828210610698575011610691575050565b6000910152565b91508060209183015181860152018291610680565b906020916106c681518092818552858086019101610678565b601f01601f1916010190565b9060206106e39281815201906106ad565b90565b503461000e57602036600319011261000e5761041d610706600435613d3e565b6040519182916020835260208301906106ad565b90600182811c9216801561074a575b602083101461073457565b634e487b7160e01b600052602260045260246000fd5b91607f1691610729565b90604051918260008254926107688461071a565b9081845260019485811690816000146107d75750600114610794575b5050610792925003836104dc565b565b9093915060005260209081600020936000915b8183106107bf57505061079293508201013880610784565b855488840185015294850194879450918301916107a7565b91505061079294506020925060ff191682840152151560051b8201013880610784565b503461000e57602036600319011261000e5760043560005261016360205261041d6107066040600020610754565b6020906001600160401b038111610841575b60051b0190565b61084961049d565b61083a565b929161085982610828565b9161086760405193846104dc565b829481845260208094019160051b810192831161000e57905b82821061088d5750505050565b81358152908301908301610880565b9080601f8301121561000e578160206106e39335910161084e565b503461000e57608036600319011261000e576004356108d581610363565b6001600160401b039060243582811161000e576108f690369060040161089c565b60443583811161000e5761090e90369060040161089c565b9060643593841161000e5761092a610631943690600401610527565b92613bc2565b503461000e57602036600319011261000e5760043560005260c96020526020600160406000200154604051908152f35b503461000e57600036600319011261000e5761015f546040516001600160a01b039091168152602090f35b503461000e5760a036600319011261000e576004356109a981610363565b602435906109b682610363565b6001600160401b039160443583811161000e576109d790369060040161089c565b60643584811161000e576109ef90369060040161089c565b9160843594851161000e57610a0b610631953690600401610527565b9361290b565b503461000e5760408060031936011261000e5760043590602435610a3481610363565b60009280845260c9602052610a50600184862001543390611ed2565b80845260c960209081528385206001600160a01b03841660009081529152604090205460ff1615610a8057505051f35b80845260c960209081528385206001600160a01b0384166000908152915260409020805460ff19166001179055825133926001600160a01b03169190600080516020613efe833981519152908690a451f35b503461000e57604036600319011261000e57602435610af081610363565b336001600160a01b03821603610b0c576106319060043561214e565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461000e57602036600319011261000e57610631600435610b8a81610363565b610bdc6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811690610bc5308314156121de565b600080516020613f1e83398151915254161461223f565b336000908152600080516020613f5e83398151915260205260409020610c079060ff905b5416613624565b60405190602082018281106001600160401b03821117610c2e575b60405260008252612396565b610c3661049d565b610c22565b503461000e57600036600319011261000e57610160546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e57600435610c8481610363565b60018060a01b03166000526101616020526040600020602435600052602052602060ff604060002054166040519015158152f35b503461000e57602036600319011261000e57610631600435610cd981610363565b61366f565b81601f8201121561000e57803591610cf583610828565b92610d0360405194856104dc565b808452602092838086019260051b82010192831161000e578301905b828210610d2d575050505090565b8380918335610d3b81610363565b815201910190610d1f565b90815180825260208080930193019160005b828110610d66575050505090565b835185529381019392810192600101610d58565b9060206106e3928181520190610d46565b503461000e57604036600319011261000e576001600160401b0360043581811161000e57610dbd903690600401610cde565b9060243590811161000e57610dd690369060040161089c565b908051825103610e4c57610dea8151612871565b9160005b8251811015610e3e5780610e29610e18610e0b610e3994876128e9565b516001600160a01b031690565b610e2283866128e9565b51906127dd565b610e3382876128e9565b526128ba565b610dee565b6040518061041d8682610d7a565b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608490fd5b50604036600319011261000e57600435610ebc81610363565b602435906001600160401b03821161000e57610edf610631923690600401610527565b90610f1b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811690610bc5308314156121de565b336000908152600080516020613f5e83398151915260205260409020610f439060ff90610c00565b612469565b503461000e57602036600319011261000e57600435600052609760205260206040600020541515604051908152f35b503461000e57600036600319011261000e577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163003610fd257604051600080516020613f1e8339815191528152602090f35b60405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608490fd5b503461000e5760208060031936011261000e576001600160401b0360043581811161000e57611070903690600401610527565b600080805260c98452604080822033835260205281209193909290916110989060ff90610c00565b835190811161116e575b610162916110b9826110b4855461071a565b613874565b80601f83116001146110f557508394829394926110ea575b50508160011b916000199060031b1c1916179055604051f35b0151905038806110d1565b90601f19831695611117610162600052600080516020613f7e83398151915290565b9286905b8882106111565750508360019596971061113d575b505050811b019055604051f35b015160001960f88460031b161c19169055388080611130565b8060018596829496860151815501950193019061111b565b61117661049d565b6110a2565b503461000e5760008060031936011261124e576040519080610162908154906111a38261071a565b8086529260019280841690811561122157506001146111d9575b61041d866111cd818803826104dc565b604051918291826106d2565b81529250600080516020613f7e8339815191525b8284106112095750505081016020016111cd8261041d386111bd565b805460208587018101919091529093019281016111ed565b905086955061041d969350602092506111cd94915060ff191682840152151560051b8201019293386111bd565b80fd5b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b602060031982011261000e57600435906001600160401b03821161000e576112ab91600401611251565b9091565b503461000e576112be36611281565b9060005b8281106112cb57005b806112e66112dc6001938686613737565b35610cd981610363565b811981116112f5575b016112c2565b6112fd6128a3565b6112ef565b503461000e57604036600319011261000e576001600160401b0360243581811161000e57611334903690600401610527565b336000908152600080516020613f5e833981519152602090815260408220929391929091906113659060ff90610c00565b6004358352610163825260408320918451918211611415575b6113928261138c855461071a565b856138d4565b80601f83116001146113c257508394829394926110ea5750508160011b916000199060031b1c1916179055604051f35b90601f198316956113d885600052602060002090565b9286905b8882106113fd5750508360019596971061113d57505050811b019055604051f35b806001859682949686015181550195019301906113dc565b61141d61049d565b61137e565b503461000e57606036600319011261000e5760043561144081610363565b6001600160401b0360243581811161000e57611460903690600401611251565b909160443590811161000e5761147a903690600401611251565b336000908152600080516020613f5e8339815191526020526040902090949192906114a79060ff90610c00565b8481036115375760005b8181106114ba57005b8061151b6114d36114ce6001948a89613737565b61374f565b6001600160a01b03861660009081526101616020526040902061150a906114fb85888c613737565b35600052602052604060002090565b9060ff801983541691151516179055565b8119811161152a575b016114b1565b6115326128a3565b611524565b60405162461bcd60e51b815260206004820152601960248201527f48696e6174613a20494e56414c49445f415247554d454e5453000000000000006044820152606490fd5b503461000e57602036600319011261000e5760043561159a81610363565b60018060a01b0316600052610165602052602060ff604060002054166040519015158152f35b503461000e57606036600319011261000e576004356001600160401b03811161000e576115f1903690600401610cde565b6024356115fd81610363565b60443561160981610363565b6000549160ff8360081c1692836000146116d45750303b155b15611678576116379215938461164d5761351e565b61163d57005b61063161ff001960005416600055565b61166161010061ff00196000541617600055565b611673600160ff196000541617600055565b61351e565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b60ff1615611622565b503461000e57604036600319011261000e57602060ff61172860243561170281610363565b60043560005260c9845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b503461000e5761174336611281565b9060005b82811061175057005b806117706117616001938686613737565b3561176b81610363565b613759565b8119811161177f575b01611747565b6117876128a3565b611779565b503461000e57602036600319011261000e5761063160043561176b81610363565b503461000e57600036600319011261000e57602060405160008152f35b8015150361000e57565b503461000e57604036600319011261000e576004356117f281610363565b6024356117fe816117ca565b6001600160a01b038216913383146118745733600090815260666020526040902061184291839161150a91905b9060018060a01b0316600052602052604060002090565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608490fd5b9181601f8401121561000e578235916001600160401b03831161000e576020838186019501011161000e57565b503461000e5760a036600319011261000e57611915600435610363565b611920602435610363565b6001600160401b0360443581811161000e57611940903690600401611251565b505060643581811161000e5761195a903690600401611251565b505060843590811161000e576119749036906004016118cb565b505060405163bc197c8160e01b8152602090f35b503461000e57602036600319011261000e5760043560005260976020526020604060002054604051908152f35b503461000e5760a036600319011261000e576004356119d381610363565b6001600160401b039060643582811161000e576119f4903690600401610527565b60843592831161000e57611a0f610631933690600401610527565b916044359060243590613928565b503461000e57602036600319011261000e57600435600052610164602052602060018060a01b0360406000205416604051908152f35b503461000e57600036600319011261000e576020604051600080516020613f3e8339815191528152f35b503461000e57604036600319011261000e57610631602435600435611aa182610363565b8060005260c9602052611abd6001604060002001543390611ed2565b61214e565b503461000e57606036600319011261000e576001600160401b0360043581811161000e57611af4903690600401611251565b9060243583811161000e57611b0d903690600401611251565b91909360443590811161000e57611b28903690600401610527565b336000908152600080516020613f9e83398151915260205260409020909390611b569060ff905b5416613ca8565b60005b818110611b83575093611b74611b7c9261063196369161084e565b92369161084e565b9033613bc2565b80611bc5611bb9611bac611b9a6001958789613737565b35600052610164602052604060002090565b546001600160a01b031690565b6001600160a01b031690565b15611c05575b611be933611be3611bb9611bac611b9a86898b613737565b14613cfe565b81198111611bf8575b01611b59565b611c006128a3565b611bf2565b611c3633611c17611b9a848789613737565b80546001600160a01b0319166001600160a01b03909216919091179055565b611bcb565b503461000e57608036600319011261000e576004356001600160401b0360443581811161000e57611c70903690600401610527565b60643591821161000e57611c8b611cf3923690600401610527565b336000908152600080516020613f9e83398151915260205260408120909491929190611cb99060ff90611b4f565b8085526101646020526040852054611ce9906001600160a01b0390811615611cf8575b6040872054163314613cfe565b6024359033613928565b604051f35b6040872080546001600160a01b03191633179055611cdc565b503461000e57604036600319011261000e57602060ff611728600435611d3681610363565b60243590611d4382610363565b60018060a01b03166000526066845260406000209060018060a01b0316600052602052604060002090565b503461000e5760a036600319011261000e57611d8b600435610363565b611d96602435610363565b6084356001600160401b03811161000e57611db59036906004016118cb565b505060405163f23a6e6160e01b8152602090f35b503461000e5760a036600319011261000e57600435611de781610363565b602435611df381610363565b6084356001600160401b03811161000e57611e12903690600401610527565b906001600160a01b038316338114908115611e96575b5015611e3f57610631926064359160443591612b93565b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608490fd5b6000908152606660209081526040808320338452909152902060ff9150541638611e28565b90611ece60209282815194859201610678565b0190565b908160005260c960205260ff611efe8260406000209060018060a01b0316600052602052604060002090565b541615611f09575050565b6001600160a01b031690611f1b6122a0565b916030611f27846133c7565b536078611f33846133dd565b5360295b60018111611fe657611fe2611f9f611fca86611fbc611f5f88611f5a8915613428565b613473565b611f99604051958694611f99602087016017907f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081520190565b90611ebb565b7001034b99036b4b9b9b4b733903937b6329607d1b815260110190565b03601f1981018352826104dc565b60405162461bcd60e51b8152918291600483016106d2565b0390fd5b9080600f61202392166010811015612028575b6f181899199a1a9b1b9c1cb0b131b232b360811b901a61201984876133ee565b5360041c9161340d565b611f37565b6120306128d2565b611ff9565b6001600160a01b0381166000908152600080516020613f5e833981519152602052604081205460ff1615612067575050565b80805260c9602090815260408083206001600160a01b038516600090815292529020805460ff1916600117905560405133926001600160a01b03169190600080516020613efe833981519152908290a4565b6001600160a01b0381166000908152600080516020613f9e8339815191526020526040902054600080516020613f3e8339815191529060ff16156120fb575050565b600081815260c9602090815260408083206001600160a01b03861684529091529020805460ff1916600117905560405133926001600160a01b03169190600080516020613efe83398151915290600090a4565b600081815260c9602090815260408083206001600160a01b038616845290915290205460ff1661217c575050565b600081815260c9602090815260408083206001600160a01b03861684529091529020805460ff1916905560405133926001600160a01b031691907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b90600090a4565b156121e557565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608490fd5b1561224657565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608490fd5b60405190606082018281106001600160401b038211176122cd575b604052602a8252604082602036910137565b6122d561049d565b6122bb565b9081602091031261000e575190565b156122f057565b60405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608490fd5b60809060208152602e60208201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960408201526d6f6e206973206e6f74205555505360901b60608201520190565b906123c27f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b156123d157506107929061252c565b6040516352d1902d60e01b8152916020836004816001600160a01b0385165afa60009381612439575b506124185760405162461bcd60e51b815280611fe260048201612347565b612434600080516020613f1e83398151915261079294146122e9565b6125bc565b61245b91945060203d8111612462575b61245381836104dc565b8101906122da565b92386123fa565b503d612449565b906124957f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b156124a457506107929061252c565b6040516352d1902d60e01b8152916020836004816001600160a01b0385165afa6000938161250c575b506124eb5760405162461bcd60e51b815280611fe260048201612347565b612507600080516020613f1e83398151915261079294146122e9565b6126cc565b61252591945060203d81116124625761245381836104dc565b92386124cd565b803b1561256157600080516020613f1e83398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b906125c68261252c565b604051600092906001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8583a28251158015906126c5575b612611575b50505050565b813b1561267457509180826126629460208395519201905af4903d1561266c573d61263b816104fd565b9061264960405192836104dc565b8152809160203d92013e5b61265c612776565b91613387565b503880808061260b565b506060612654565b62461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608490fd5b5083612606565b6126d58161252c565b6040516001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600083a282511580159061276e575b61271b57505050565b813b1561267457506000828192602061276495519201905af43d15612767573d612744816104fd565b9061275260405192836104dc565b81523d6000602083013e61265c612776565b50565b6060612654565b506001612712565b60405190606082018281106001600160401b038211176127d0575b60405260278252660819985a5b195960ca1b6040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6127d861049d565b612791565b6001600160a01b038116156128185761281491600052606560205260406000209060018060a01b0316600052602052604060002090565b5490565b60405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608490fd5b9061287b82610828565b61288860405191826104dc565b8281528092612899601f1991610828565b0190602036910137565b50634e487b7160e01b600052601160045260246000fd5b60019060001981146128ca570190565b611ece6128a3565b50634e487b7160e01b600052603260045260246000fd5b60209181518110156128fe575b60051b010190565b6129066128d2565b6128f6565b6001600160a01b0380821696919592949392903388148015612a8e575b15612a2e5761293a8451865114612d23565b8516612947811515612ab1565b6129538585888a6132fd565b60005b84518110156129ea5780886129de6129d68a61182b8b6129848761297d6129e59a8f6128e9565b51926128e9565b51956129c5876129a28361182b866000526065602052604060002090565b546129af82821015612b0b565b039161182b846000526065602052604060002090565b556000526065602052604060002090565b918254612b87565b90556128ba565b612956565b5061079296919592976040517f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb339180612a258a8a83612d80565b0390a4336131e1565b60405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608490fd5b50600088815260666020908152604080832033845290915290205460ff16612928565b15612ab857565b60405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b15612b1257565b60405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608490fd5b8019603011612b7a575b60300190565b612b826128a3565b612b74565b811981116128ca570190565b6001600160a01b039594939291908682168015612bb08115612ab1565b612bb98561321b565b612bc28761321b565b998416918215612cdf575b612c77575b5061079297985085612bf28461182b886000526065602052604060002090565b54612bff82821015612b0b565b03612c188461182b886000526065602052604060002090565b55612c318461182b876000526065602052604060002090565b612c3c878254612b87565b9055604080518681526020810188905233917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6291a433613055565b969492909795939160005b8851811015612cca5780896129de612cbd612cac8f95612ca581612cc5986128e9565b51946128e9565b516000526097602052604060002090565b91825461324c565b612c82565b50919395985091939550610792968897612bd2565b98969492909795939160005b8b8a51821015612d1357908a6129de6129d6612cac84612ca581612d0e986128e9565b612ceb565b5050919395979092949698612bcd565b15612d2a57565b60405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608490fd5b9091612d976106e393604084526040840190610d46565b916020818403910152610d46565b9081602091031261000e57516106e3816103a8565b909260a0926106e39594600180861b03168352600060208401526040830152606082015281608082015201906106ad565b91926106e395949160a094600180871b0380921685521660208401526040830152606082015281608082015201906106ad565b60809060208152602860208201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b60608201520190565b60009060033d11612e7457565b905060046000803e60005160e01c90565b600060443d106106e357604051600319913d83016004833e81516001600160401b03918282113d602484011117612ee257818401948551938411612eea573d85010160208487010111612ee257506106e3929101602001906104dc565b949350505050565b50949350505050565b9390803b612f03575b5050505050565b612f2b9360006020946040519687958694859363f23a6e6160e01b9b8c865260048601612dba565b03926001600160a01b03165af160009181613025575b50612ffd5750506001612f52612e67565b6308c379a014612fce575b612f6c575b3880808080612efc565b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608490fd5b612fd6612e85565b80612fe15750612f5d565b60405162461bcd60e51b8152908190611fe290600483016106d2565b6001600160e01b03191614612f625760405162461bcd60e51b815280611fe260048201612e1e565b61304791925060203d811161304e575b61303f81836104dc565b810190612da5565b9038612f41565b503d613035565b9493919092813b613069575b505050505050565b60006020946130906040519788968795869463f23a6e6160e01b9c8d875260048701612deb565b03926001600160a01b03165af16000918161310d575b506130e557505060016130b7612e67565b6308c379a0146130d2575b612f6c575b388080808080613061565b6130da612e85565b80612fe157506130c2565b6001600160e01b031916146130c75760405162461bcd60e51b815280611fe260048201612e1e565b61312691925060203d811161304e5761303f81836104dc565b90386130a6565b9261315c6106e3959361316a9360018060a01b031686526000602087015260a0604087015260a0860190610d46565b908482036060860152610d46565b9160808184039101526106ad565b93906106e3959361315c9161316a9460018060a01b03809216885216602087015260a0604087015260a0860190610d46565b9390803b6131b9575050505050565b612f2b9360006020946040519687958694859363bc197c8160e01b9b8c86526004860161312d565b9493919092813b6131f457505050505050565b60006020946130906040519788968795869463bc197c8160e01b9c8d875260048701613178565b60405190613228826104b4565b60018252602082016020368237825115613240575290565b6132486128d2565b5290565b818110613257570390565b61325f6128a3565b0390565b919260005b8251811015613295578061327f61329092876128e9565b516129de6129d6612cac84886128e9565b613268565b50916001600160a01b0316156132aa57509050565b60005b81518110156132f757806132c46132e592866128e9565b516132d2612cac83866128e9565b9081548181106132ea575b0390556128ba565b6132ad565b6132f26128a3565b6132dd565b50509050565b9293926001600160a01b03919082161561334d575b161561331d57509050565b60005b81518110156132f7578061333761334892866128e9565b516129de612cbd612cac84876128e9565b613320565b929060005b835181101561337f578061336961337a92886128e9565b516129de6129d6612cac84896128e9565b613352565b509092613312565b90919015613393575090565b8151156133a35750805190602001fd5b60405162461bcd60e51b815260206004820152908190611fe29060248301906106ad565b6020908051156133d5570190565b611ece6128d2565b6021908051600110156133d5570190565b90602091805182101561340057010190565b6134086128d2565b010190565b801561341b575b6000190190565b6134236128a3565b613414565b1561342f57565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b60405190608082018281106001600160401b03821117613511575b60405260428252606036602084013760306134a8836133c7565b5360786134b4836133dd565b536041905b600182116134cc576106e3915015613428565b80600f6134fe92166010811015613504575b6f181899199a1a9b1b9c1cb0b131b232b360811b901a61201984866133ee565b906134b9565b61350c6128d2565b6134de565b61351961049d565b61348e565b9291909161352a6135bb565b6135326135bb565b61353a6135bb565b60018060a01b03916bffffffffffffffffffffffff60a01b8361015f9516818654161785558361016092169082541617905560005b845181101561359b57806135918461358a61359694896128e9565b5116612035565b6128ba565b61356f565b509250610792916135ab33612035565b6135b4336120b9565b54166120b9565b60ff60005460081c16156135cb57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b1561362b57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600080516020613f3e833981519152600081815260c96020527f51111423f5e835a1e334a686a7d9f998a65310f720d529827b76c12f396de483549091906136b8903390611ed2565b80825260c9602090815260408084206001600160a01b0386166000908152925290205460ff16156136e857505050565b80825260c9602090815260408084206001600160a01b038616600090815292529020805460ff1916600117905560405133936001600160a01b031692600080516020613efe83398151915291a4565b91908110156137475760051b0190565b6108496128d2565b356106e3816117ca565b600080516020613f3e833981519152600081815260c96020527f51111423f5e835a1e334a686a7d9f998a65310f720d529827b76c12f396de483549091906137a2903390611ed2565b80825260c9602090815260408084206001600160a01b0386166000908152925290205460ff166137d157505050565b80825260c9602090815260408084206001600160a01b038616600090815292529020805460ff1916905560405133936001600160a01b0316927ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b91a4565b1561383657565b60405162461bcd60e51b815260206004820152601660248201527548696e6174613a204e4f5f4d494e5445525f524f4c4560501b6044820152606490fd5b601f8111613880575050565b6000906101628252600080516020613f7e833981519152906020601f850160051c830194106138ca575b601f0160051c01915b8281106138bf57505050565b8181556001016138b3565b90925082906138aa565b90601f81116138e257505050565b600091825260208220906020601f850160051c8301941061391e575b601f0160051c01915b82811061391357505050565b818155600101613907565b90925082906138fe565b336000908152600080516020613f9e833981519152602090815260408220919796909161395a9060ff905b541661382f565b838852610163825260408820918151916001600160401b038311613a40575b61398d83613987865461071a565b866138d4565b81601f84116001146139cc5750908291610792999a926139c1575b50508160011b916000199060031b1c1916179055613aa3565b0151905038806139a8565b601f9a939a198b16906139e486600052602060002090565b94905b828210613a2857505091600193918b6107929b9c9410613a0f575b505050811b019055613aa3565b015160001960f88460031b161c19169055388080613a02565b806001869782949787015181550196019401906139e7565b613a4861049d565b613979565b15613a5457565b60405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b6001600160a01b0381169485159491939092613abf8615613a4d565b613ac88161321b565b94613ad28361321b565b9760005b8751811015613b035780613aed613afe928c6128e9565b516129de6129d6612cac848d6128e9565b613ad6565b5091939590929496613b79575b50610792959650613b2f8261182b856000526065602052604060002090565b613b3a858254612b87565b9055604080518481526020810186905260009133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629190a433612ef3565b94929095939160005b8651811015613baf5780613b99613baa928b6128e9565b516129de612cbd612cac848c6128e9565b613b82565b5091939650919350610792948695613b10565b336000908152600080516020613f9e83398151915260205260409020909491929190613bf09060ff90613953565b6001600160a01b03851693613c06851515613a4d565b613c138451845114612d23565b613c1e838588613263565b60005b8451811015613c635780613c38613c5e92866128e9565b516129de6129d68a61182b613c4d868c6128e9565b516000526065602052604060002090565b613c21565b509290946107929460006040517f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb339180613c9f898983612d80565b0390a4336131aa565b15613caf57565b60405162461bcd60e51b815260206004820152602160248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061727469736044820152601d60fa1b6064820152608490fd5b15613d0557565b60405162461bcd60e51b81526020600482015260116024820152702434b730ba309d102727aa2fa7aba722a960791b6044820152606490fd5b60009080825261016390602091808352613d5b604085205461071a565b613e145750613d6990613e25565b9060405192839181610162908154613d808161071a565b92600191808316908115613df15750600114613da9575b5050505050611fbc906106e393611ebb565b82529293509091600080516020613f7e8339815191525b838310613ddb5750505082010182611fbc6106e33880613d97565b8054888401860152879550918401918101613dc0565b60ff1916888701525050505080151502830101905082611fbc6106e33880613d97565b60409284926106e395525220610754565b8015613edf57806000908282935b613ecb5750613e41836104fd565b92613e4f60405194856104dc565b80845281601f19613e5f836104fd565b013660208701375b613e715750505090565b60018110613ebe575b6000190190600a90613ea9613e99613e93848406612b6a565b60ff1690565b60f81b6001600160f81b03191690565b841a613eb584876133ee565b53049081613e67565b613ec66128a3565b613e7a565b92613ed7600a916128ba565b930480613e33565b50604051613eec816104b4565b60018152600360fc1b60208201529056fe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681fe90a866a48a634a12852c1be675b683a22307409932a7443b8029347be75629af0939a5988989bfee913a9ad10b9335cb63ebc9fd2b69e5f877d0455ac91951111423f5e835a1e334a686a7d9f998a65310f720d529827b76c12f396de482a2646970667358221220bba814e4d4e49a6d9a8b7696fe7fb76c4f402e76b30de1dcdc54ffe6d0a0f8a864736f6c634300080f0033

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c8062fdd58e1461035a57806301ffc9a7146103515780630291a853146103485780630e89341c1461033f5780631253c546146103365780631f7fdffa1461032d578063248a9ca31461032457806326c460611461031b5780632eb2c2d6146103125780632f2ff15d1461030957806336568abe146103005780633659cfe6146102f75780633fc8cef3146102ee578063416563f1146102e55780634d287f2b146102dc5780634e1273f4146102d35780634f1ef286146102ca5780634f558e79146102c157806352d1902d146102b857806355f804b3146102af5780636c0360eb146102a657806371085e521461029d578063862440e21461029457806386ac3f2e1461028b5780638c86f0a71461028257806390482d721461027957806391d14854146102705780639745831414610267578063978d5b761461025e578063a217fddf14610255578063a22cb4651461024c578063bc197c8114610243578063bd85b0391461023a578063c1341c4f14610231578063cd7e10c114610228578063d53913931461021f578063d547741f14610216578063d7879b2a1461020d578063e0a8410414610204578063e985e9c5146101fb578063f23a6e61146101f25763f242432a146101ea57600080fd5b61000e611dc9565b5061000e611d6e565b5061000e611d11565b5061000e611c3b565b5061000e611ac2565b5061000e611a7d565b5061000e611a53565b5061000e611a1d565b5061000e6119b5565b5061000e611988565b5061000e6118f8565b5061000e6117d4565b5061000e6117ad565b5061000e61178c565b5061000e611734565b5061000e6116dd565b5061000e6115c0565b5061000e61157c565b5061000e611422565b5061000e611302565b5061000e6112af565b5061000e61117b565b5061000e61103d565b5061000e610f77565b5061000e610f48565b5061000e610ea3565b5061000e610d8b565b5061000e610cb8565b5061000e610c66565b5061000e610c3b565b5061000e610b69565b5061000e610ad2565b5061000e610a11565b5061000e61098b565b5061000e610960565b5061000e610930565b5061000e6108b7565b5061000e6107fa565b5061000e6106e6565b5061000e61056e565b5061000e6103ba565b5061000e610374565b6001600160a01b0381160361000e57565b503461000e57604036600319011261000e5760206103a060043561039781610363565b602435906127dd565b604051908152f35b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e5761041d6004356103db816103a8565b63ffffffff60e01b16636cdb3d1360e11b81149081908215908161048c575b831561047b575b8315610421575b50506040519115158252509081906020820190565b0390f35b637965db0b60e01b8114935090918315610441575b505050388080610408565b92509061046a575b8115610459575b50388080610436565b6301ffc9a760e01b14905038610450565b6303a24d0760e21b81149150610449565b637965db0b60e01b81149350610401565b6303a24d0760e21b811493506103fa565b50634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176104cf57604052565b6104d761049d565b604052565b90601f801991011681019081106001600160401b038211176104cf57604052565b6020906001600160401b03811161051a575b601f01601f19160190565b61052261049d565b61050f565b81601f8201121561000e5780359061053e826104fd565b9261054c60405194856104dc565b8284526020838301011161000e57816000926020809301838601378301015290565b503461000e57608036600319011261000e5760043561058c81610363565b6024356064356001600160401b03811161000e576105ae903690600401610527565b61015f546001600160a01b03908116330361000e57831660005261016560205260ff60406000205416610633576001600160a01b038316600090815261016560205260409020610631939061060a90805460ff19166001179055565b61062761062284600052610163602052604060002090565b610754565b9260443591613928565b005b60405162461bcd60e51b815260206004820152601b60248201527f48696e6174613a20465245455f4d494e5445445f414c524541445900000000006044820152606490fd5b918091926000905b828210610698575011610691575050565b6000910152565b91508060209183015181860152018291610680565b906020916106c681518092818552858086019101610678565b601f01601f1916010190565b9060206106e39281815201906106ad565b90565b503461000e57602036600319011261000e5761041d610706600435613d3e565b6040519182916020835260208301906106ad565b90600182811c9216801561074a575b602083101461073457565b634e487b7160e01b600052602260045260246000fd5b91607f1691610729565b90604051918260008254926107688461071a565b9081845260019485811690816000146107d75750600114610794575b5050610792925003836104dc565b565b9093915060005260209081600020936000915b8183106107bf57505061079293508201013880610784565b855488840185015294850194879450918301916107a7565b91505061079294506020925060ff191682840152151560051b8201013880610784565b503461000e57602036600319011261000e5760043560005261016360205261041d6107066040600020610754565b6020906001600160401b038111610841575b60051b0190565b61084961049d565b61083a565b929161085982610828565b9161086760405193846104dc565b829481845260208094019160051b810192831161000e57905b82821061088d5750505050565b81358152908301908301610880565b9080601f8301121561000e578160206106e39335910161084e565b503461000e57608036600319011261000e576004356108d581610363565b6001600160401b039060243582811161000e576108f690369060040161089c565b60443583811161000e5761090e90369060040161089c565b9060643593841161000e5761092a610631943690600401610527565b92613bc2565b503461000e57602036600319011261000e5760043560005260c96020526020600160406000200154604051908152f35b503461000e57600036600319011261000e5761015f546040516001600160a01b039091168152602090f35b503461000e5760a036600319011261000e576004356109a981610363565b602435906109b682610363565b6001600160401b039160443583811161000e576109d790369060040161089c565b60643584811161000e576109ef90369060040161089c565b9160843594851161000e57610a0b610631953690600401610527565b9361290b565b503461000e5760408060031936011261000e5760043590602435610a3481610363565b60009280845260c9602052610a50600184862001543390611ed2565b80845260c960209081528385206001600160a01b03841660009081529152604090205460ff1615610a8057505051f35b80845260c960209081528385206001600160a01b0384166000908152915260409020805460ff19166001179055825133926001600160a01b03169190600080516020613efe833981519152908690a451f35b503461000e57604036600319011261000e57602435610af081610363565b336001600160a01b03821603610b0c576106319060043561214e565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461000e57602036600319011261000e57610631600435610b8a81610363565b610bdc6001600160a01b037f000000000000000000000000e48f12107271fd469619ded9956d6abf764c7ec7811690610bc5308314156121de565b600080516020613f1e83398151915254161461223f565b336000908152600080516020613f5e83398151915260205260409020610c079060ff905b5416613624565b60405190602082018281106001600160401b03821117610c2e575b60405260008252612396565b610c3661049d565b610c22565b503461000e57600036600319011261000e57610160546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e57600435610c8481610363565b60018060a01b03166000526101616020526040600020602435600052602052602060ff604060002054166040519015158152f35b503461000e57602036600319011261000e57610631600435610cd981610363565b61366f565b81601f8201121561000e57803591610cf583610828565b92610d0360405194856104dc565b808452602092838086019260051b82010192831161000e578301905b828210610d2d575050505090565b8380918335610d3b81610363565b815201910190610d1f565b90815180825260208080930193019160005b828110610d66575050505090565b835185529381019392810192600101610d58565b9060206106e3928181520190610d46565b503461000e57604036600319011261000e576001600160401b0360043581811161000e57610dbd903690600401610cde565b9060243590811161000e57610dd690369060040161089c565b908051825103610e4c57610dea8151612871565b9160005b8251811015610e3e5780610e29610e18610e0b610e3994876128e9565b516001600160a01b031690565b610e2283866128e9565b51906127dd565b610e3382876128e9565b526128ba565b610dee565b6040518061041d8682610d7a565b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608490fd5b50604036600319011261000e57600435610ebc81610363565b602435906001600160401b03821161000e57610edf610631923690600401610527565b90610f1b6001600160a01b037f000000000000000000000000e48f12107271fd469619ded9956d6abf764c7ec7811690610bc5308314156121de565b336000908152600080516020613f5e83398151915260205260409020610f439060ff90610c00565b612469565b503461000e57602036600319011261000e57600435600052609760205260206040600020541515604051908152f35b503461000e57600036600319011261000e577f000000000000000000000000e48f12107271fd469619ded9956d6abf764c7ec76001600160a01b03163003610fd257604051600080516020613f1e8339815191528152602090f35b60405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608490fd5b503461000e5760208060031936011261000e576001600160401b0360043581811161000e57611070903690600401610527565b600080805260c98452604080822033835260205281209193909290916110989060ff90610c00565b835190811161116e575b610162916110b9826110b4855461071a565b613874565b80601f83116001146110f557508394829394926110ea575b50508160011b916000199060031b1c1916179055604051f35b0151905038806110d1565b90601f19831695611117610162600052600080516020613f7e83398151915290565b9286905b8882106111565750508360019596971061113d575b505050811b019055604051f35b015160001960f88460031b161c19169055388080611130565b8060018596829496860151815501950193019061111b565b61117661049d565b6110a2565b503461000e5760008060031936011261124e576040519080610162908154906111a38261071a565b8086529260019280841690811561122157506001146111d9575b61041d866111cd818803826104dc565b604051918291826106d2565b81529250600080516020613f7e8339815191525b8284106112095750505081016020016111cd8261041d386111bd565b805460208587018101919091529093019281016111ed565b905086955061041d969350602092506111cd94915060ff191682840152151560051b8201019293386111bd565b80fd5b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b602060031982011261000e57600435906001600160401b03821161000e576112ab91600401611251565b9091565b503461000e576112be36611281565b9060005b8281106112cb57005b806112e66112dc6001938686613737565b35610cd981610363565b811981116112f5575b016112c2565b6112fd6128a3565b6112ef565b503461000e57604036600319011261000e576001600160401b0360243581811161000e57611334903690600401610527565b336000908152600080516020613f5e833981519152602090815260408220929391929091906113659060ff90610c00565b6004358352610163825260408320918451918211611415575b6113928261138c855461071a565b856138d4565b80601f83116001146113c257508394829394926110ea5750508160011b916000199060031b1c1916179055604051f35b90601f198316956113d885600052602060002090565b9286905b8882106113fd5750508360019596971061113d57505050811b019055604051f35b806001859682949686015181550195019301906113dc565b61141d61049d565b61137e565b503461000e57606036600319011261000e5760043561144081610363565b6001600160401b0360243581811161000e57611460903690600401611251565b909160443590811161000e5761147a903690600401611251565b336000908152600080516020613f5e8339815191526020526040902090949192906114a79060ff90610c00565b8481036115375760005b8181106114ba57005b8061151b6114d36114ce6001948a89613737565b61374f565b6001600160a01b03861660009081526101616020526040902061150a906114fb85888c613737565b35600052602052604060002090565b9060ff801983541691151516179055565b8119811161152a575b016114b1565b6115326128a3565b611524565b60405162461bcd60e51b815260206004820152601960248201527f48696e6174613a20494e56414c49445f415247554d454e5453000000000000006044820152606490fd5b503461000e57602036600319011261000e5760043561159a81610363565b60018060a01b0316600052610165602052602060ff604060002054166040519015158152f35b503461000e57606036600319011261000e576004356001600160401b03811161000e576115f1903690600401610cde565b6024356115fd81610363565b60443561160981610363565b6000549160ff8360081c1692836000146116d45750303b155b15611678576116379215938461164d5761351e565b61163d57005b61063161ff001960005416600055565b61166161010061ff00196000541617600055565b611673600160ff196000541617600055565b61351e565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b60ff1615611622565b503461000e57604036600319011261000e57602060ff61172860243561170281610363565b60043560005260c9845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b503461000e5761174336611281565b9060005b82811061175057005b806117706117616001938686613737565b3561176b81610363565b613759565b8119811161177f575b01611747565b6117876128a3565b611779565b503461000e57602036600319011261000e5761063160043561176b81610363565b503461000e57600036600319011261000e57602060405160008152f35b8015150361000e57565b503461000e57604036600319011261000e576004356117f281610363565b6024356117fe816117ca565b6001600160a01b038216913383146118745733600090815260666020526040902061184291839161150a91905b9060018060a01b0316600052602052604060002090565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608490fd5b9181601f8401121561000e578235916001600160401b03831161000e576020838186019501011161000e57565b503461000e5760a036600319011261000e57611915600435610363565b611920602435610363565b6001600160401b0360443581811161000e57611940903690600401611251565b505060643581811161000e5761195a903690600401611251565b505060843590811161000e576119749036906004016118cb565b505060405163bc197c8160e01b8152602090f35b503461000e57602036600319011261000e5760043560005260976020526020604060002054604051908152f35b503461000e5760a036600319011261000e576004356119d381610363565b6001600160401b039060643582811161000e576119f4903690600401610527565b60843592831161000e57611a0f610631933690600401610527565b916044359060243590613928565b503461000e57602036600319011261000e57600435600052610164602052602060018060a01b0360406000205416604051908152f35b503461000e57600036600319011261000e576020604051600080516020613f3e8339815191528152f35b503461000e57604036600319011261000e57610631602435600435611aa182610363565b8060005260c9602052611abd6001604060002001543390611ed2565b61214e565b503461000e57606036600319011261000e576001600160401b0360043581811161000e57611af4903690600401611251565b9060243583811161000e57611b0d903690600401611251565b91909360443590811161000e57611b28903690600401610527565b336000908152600080516020613f9e83398151915260205260409020909390611b569060ff905b5416613ca8565b60005b818110611b83575093611b74611b7c9261063196369161084e565b92369161084e565b9033613bc2565b80611bc5611bb9611bac611b9a6001958789613737565b35600052610164602052604060002090565b546001600160a01b031690565b6001600160a01b031690565b15611c05575b611be933611be3611bb9611bac611b9a86898b613737565b14613cfe565b81198111611bf8575b01611b59565b611c006128a3565b611bf2565b611c3633611c17611b9a848789613737565b80546001600160a01b0319166001600160a01b03909216919091179055565b611bcb565b503461000e57608036600319011261000e576004356001600160401b0360443581811161000e57611c70903690600401610527565b60643591821161000e57611c8b611cf3923690600401610527565b336000908152600080516020613f9e83398151915260205260408120909491929190611cb99060ff90611b4f565b8085526101646020526040852054611ce9906001600160a01b0390811615611cf8575b6040872054163314613cfe565b6024359033613928565b604051f35b6040872080546001600160a01b03191633179055611cdc565b503461000e57604036600319011261000e57602060ff611728600435611d3681610363565b60243590611d4382610363565b60018060a01b03166000526066845260406000209060018060a01b0316600052602052604060002090565b503461000e5760a036600319011261000e57611d8b600435610363565b611d96602435610363565b6084356001600160401b03811161000e57611db59036906004016118cb565b505060405163f23a6e6160e01b8152602090f35b503461000e5760a036600319011261000e57600435611de781610363565b602435611df381610363565b6084356001600160401b03811161000e57611e12903690600401610527565b906001600160a01b038316338114908115611e96575b5015611e3f57610631926064359160443591612b93565b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608490fd5b6000908152606660209081526040808320338452909152902060ff9150541638611e28565b90611ece60209282815194859201610678565b0190565b908160005260c960205260ff611efe8260406000209060018060a01b0316600052602052604060002090565b541615611f09575050565b6001600160a01b031690611f1b6122a0565b916030611f27846133c7565b536078611f33846133dd565b5360295b60018111611fe657611fe2611f9f611fca86611fbc611f5f88611f5a8915613428565b613473565b611f99604051958694611f99602087016017907f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081520190565b90611ebb565b7001034b99036b4b9b9b4b733903937b6329607d1b815260110190565b03601f1981018352826104dc565b60405162461bcd60e51b8152918291600483016106d2565b0390fd5b9080600f61202392166010811015612028575b6f181899199a1a9b1b9c1cb0b131b232b360811b901a61201984876133ee565b5360041c9161340d565b611f37565b6120306128d2565b611ff9565b6001600160a01b0381166000908152600080516020613f5e833981519152602052604081205460ff1615612067575050565b80805260c9602090815260408083206001600160a01b038516600090815292529020805460ff1916600117905560405133926001600160a01b03169190600080516020613efe833981519152908290a4565b6001600160a01b0381166000908152600080516020613f9e8339815191526020526040902054600080516020613f3e8339815191529060ff16156120fb575050565b600081815260c9602090815260408083206001600160a01b03861684529091529020805460ff1916600117905560405133926001600160a01b03169190600080516020613efe83398151915290600090a4565b600081815260c9602090815260408083206001600160a01b038616845290915290205460ff1661217c575050565b600081815260c9602090815260408083206001600160a01b03861684529091529020805460ff1916905560405133926001600160a01b031691907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b90600090a4565b156121e557565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608490fd5b1561224657565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608490fd5b60405190606082018281106001600160401b038211176122cd575b604052602a8252604082602036910137565b6122d561049d565b6122bb565b9081602091031261000e575190565b156122f057565b60405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608490fd5b60809060208152602e60208201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960408201526d6f6e206973206e6f74205555505360901b60608201520190565b906123c27f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b156123d157506107929061252c565b6040516352d1902d60e01b8152916020836004816001600160a01b0385165afa60009381612439575b506124185760405162461bcd60e51b815280611fe260048201612347565b612434600080516020613f1e83398151915261079294146122e9565b6125bc565b61245b91945060203d8111612462575b61245381836104dc565b8101906122da565b92386123fa565b503d612449565b906124957f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1690565b156124a457506107929061252c565b6040516352d1902d60e01b8152916020836004816001600160a01b0385165afa6000938161250c575b506124eb5760405162461bcd60e51b815280611fe260048201612347565b612507600080516020613f1e83398151915261079294146122e9565b6126cc565b61252591945060203d81116124625761245381836104dc565b92386124cd565b803b1561256157600080516020613f1e83398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b906125c68261252c565b604051600092906001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8583a28251158015906126c5575b612611575b50505050565b813b1561267457509180826126629460208395519201905af4903d1561266c573d61263b816104fd565b9061264960405192836104dc565b8152809160203d92013e5b61265c612776565b91613387565b503880808061260b565b506060612654565b62461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608490fd5b5083612606565b6126d58161252c565b6040516001600160a01b0382167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600083a282511580159061276e575b61271b57505050565b813b1561267457506000828192602061276495519201905af43d15612767573d612744816104fd565b9061275260405192836104dc565b81523d6000602083013e61265c612776565b50565b6060612654565b506001612712565b60405190606082018281106001600160401b038211176127d0575b60405260278252660819985a5b195960ca1b6040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6127d861049d565b612791565b6001600160a01b038116156128185761281491600052606560205260406000209060018060a01b0316600052602052604060002090565b5490565b60405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608490fd5b9061287b82610828565b61288860405191826104dc565b8281528092612899601f1991610828565b0190602036910137565b50634e487b7160e01b600052601160045260246000fd5b60019060001981146128ca570190565b611ece6128a3565b50634e487b7160e01b600052603260045260246000fd5b60209181518110156128fe575b60051b010190565b6129066128d2565b6128f6565b6001600160a01b0380821696919592949392903388148015612a8e575b15612a2e5761293a8451865114612d23565b8516612947811515612ab1565b6129538585888a6132fd565b60005b84518110156129ea5780886129de6129d68a61182b8b6129848761297d6129e59a8f6128e9565b51926128e9565b51956129c5876129a28361182b866000526065602052604060002090565b546129af82821015612b0b565b039161182b846000526065602052604060002090565b556000526065602052604060002090565b918254612b87565b90556128ba565b612956565b5061079296919592976040517f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb339180612a258a8a83612d80565b0390a4336131e1565b60405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608490fd5b50600088815260666020908152604080832033845290915290205460ff16612928565b15612ab857565b60405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b15612b1257565b60405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608490fd5b8019603011612b7a575b60300190565b612b826128a3565b612b74565b811981116128ca570190565b6001600160a01b039594939291908682168015612bb08115612ab1565b612bb98561321b565b612bc28761321b565b998416918215612cdf575b612c77575b5061079297985085612bf28461182b886000526065602052604060002090565b54612bff82821015612b0b565b03612c188461182b886000526065602052604060002090565b55612c318461182b876000526065602052604060002090565b612c3c878254612b87565b9055604080518681526020810188905233917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6291a433613055565b969492909795939160005b8851811015612cca5780896129de612cbd612cac8f95612ca581612cc5986128e9565b51946128e9565b516000526097602052604060002090565b91825461324c565b612c82565b50919395985091939550610792968897612bd2565b98969492909795939160005b8b8a51821015612d1357908a6129de6129d6612cac84612ca581612d0e986128e9565b612ceb565b5050919395979092949698612bcd565b15612d2a57565b60405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608490fd5b9091612d976106e393604084526040840190610d46565b916020818403910152610d46565b9081602091031261000e57516106e3816103a8565b909260a0926106e39594600180861b03168352600060208401526040830152606082015281608082015201906106ad565b91926106e395949160a094600180871b0380921685521660208401526040830152606082015281608082015201906106ad565b60809060208152602860208201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b60608201520190565b60009060033d11612e7457565b905060046000803e60005160e01c90565b600060443d106106e357604051600319913d83016004833e81516001600160401b03918282113d602484011117612ee257818401948551938411612eea573d85010160208487010111612ee257506106e3929101602001906104dc565b949350505050565b50949350505050565b9390803b612f03575b5050505050565b612f2b9360006020946040519687958694859363f23a6e6160e01b9b8c865260048601612dba565b03926001600160a01b03165af160009181613025575b50612ffd5750506001612f52612e67565b6308c379a014612fce575b612f6c575b3880808080612efc565b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608490fd5b612fd6612e85565b80612fe15750612f5d565b60405162461bcd60e51b8152908190611fe290600483016106d2565b6001600160e01b03191614612f625760405162461bcd60e51b815280611fe260048201612e1e565b61304791925060203d811161304e575b61303f81836104dc565b810190612da5565b9038612f41565b503d613035565b9493919092813b613069575b505050505050565b60006020946130906040519788968795869463f23a6e6160e01b9c8d875260048701612deb565b03926001600160a01b03165af16000918161310d575b506130e557505060016130b7612e67565b6308c379a0146130d2575b612f6c575b388080808080613061565b6130da612e85565b80612fe157506130c2565b6001600160e01b031916146130c75760405162461bcd60e51b815280611fe260048201612e1e565b61312691925060203d811161304e5761303f81836104dc565b90386130a6565b9261315c6106e3959361316a9360018060a01b031686526000602087015260a0604087015260a0860190610d46565b908482036060860152610d46565b9160808184039101526106ad565b93906106e3959361315c9161316a9460018060a01b03809216885216602087015260a0604087015260a0860190610d46565b9390803b6131b9575050505050565b612f2b9360006020946040519687958694859363bc197c8160e01b9b8c86526004860161312d565b9493919092813b6131f457505050505050565b60006020946130906040519788968795869463bc197c8160e01b9c8d875260048701613178565b60405190613228826104b4565b60018252602082016020368237825115613240575290565b6132486128d2565b5290565b818110613257570390565b61325f6128a3565b0390565b919260005b8251811015613295578061327f61329092876128e9565b516129de6129d6612cac84886128e9565b613268565b50916001600160a01b0316156132aa57509050565b60005b81518110156132f757806132c46132e592866128e9565b516132d2612cac83866128e9565b9081548181106132ea575b0390556128ba565b6132ad565b6132f26128a3565b6132dd565b50509050565b9293926001600160a01b03919082161561334d575b161561331d57509050565b60005b81518110156132f7578061333761334892866128e9565b516129de612cbd612cac84876128e9565b613320565b929060005b835181101561337f578061336961337a92886128e9565b516129de6129d6612cac84896128e9565b613352565b509092613312565b90919015613393575090565b8151156133a35750805190602001fd5b60405162461bcd60e51b815260206004820152908190611fe29060248301906106ad565b6020908051156133d5570190565b611ece6128d2565b6021908051600110156133d5570190565b90602091805182101561340057010190565b6134086128d2565b010190565b801561341b575b6000190190565b6134236128a3565b613414565b1561342f57565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b60405190608082018281106001600160401b03821117613511575b60405260428252606036602084013760306134a8836133c7565b5360786134b4836133dd565b536041905b600182116134cc576106e3915015613428565b80600f6134fe92166010811015613504575b6f181899199a1a9b1b9c1cb0b131b232b360811b901a61201984866133ee565b906134b9565b61350c6128d2565b6134de565b61351961049d565b61348e565b9291909161352a6135bb565b6135326135bb565b61353a6135bb565b60018060a01b03916bffffffffffffffffffffffff60a01b8361015f9516818654161785558361016092169082541617905560005b845181101561359b57806135918461358a61359694896128e9565b5116612035565b6128ba565b61356f565b509250610792916135ab33612035565b6135b4336120b9565b54166120b9565b60ff60005460081c16156135cb57565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b1561362b57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600080516020613f3e833981519152600081815260c96020527f51111423f5e835a1e334a686a7d9f998a65310f720d529827b76c12f396de483549091906136b8903390611ed2565b80825260c9602090815260408084206001600160a01b0386166000908152925290205460ff16156136e857505050565b80825260c9602090815260408084206001600160a01b038616600090815292529020805460ff1916600117905560405133936001600160a01b031692600080516020613efe83398151915291a4565b91908110156137475760051b0190565b6108496128d2565b356106e3816117ca565b600080516020613f3e833981519152600081815260c96020527f51111423f5e835a1e334a686a7d9f998a65310f720d529827b76c12f396de483549091906137a2903390611ed2565b80825260c9602090815260408084206001600160a01b0386166000908152925290205460ff166137d157505050565b80825260c9602090815260408084206001600160a01b038616600090815292529020805460ff1916905560405133936001600160a01b0316927ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b91a4565b1561383657565b60405162461bcd60e51b815260206004820152601660248201527548696e6174613a204e4f5f4d494e5445525f524f4c4560501b6044820152606490fd5b601f8111613880575050565b6000906101628252600080516020613f7e833981519152906020601f850160051c830194106138ca575b601f0160051c01915b8281106138bf57505050565b8181556001016138b3565b90925082906138aa565b90601f81116138e257505050565b600091825260208220906020601f850160051c8301941061391e575b601f0160051c01915b82811061391357505050565b818155600101613907565b90925082906138fe565b336000908152600080516020613f9e833981519152602090815260408220919796909161395a9060ff905b541661382f565b838852610163825260408820918151916001600160401b038311613a40575b61398d83613987865461071a565b866138d4565b81601f84116001146139cc5750908291610792999a926139c1575b50508160011b916000199060031b1c1916179055613aa3565b0151905038806139a8565b601f9a939a198b16906139e486600052602060002090565b94905b828210613a2857505091600193918b6107929b9c9410613a0f575b505050811b019055613aa3565b015160001960f88460031b161c19169055388080613a02565b806001869782949787015181550196019401906139e7565b613a4861049d565b613979565b15613a5457565b60405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b6001600160a01b0381169485159491939092613abf8615613a4d565b613ac88161321b565b94613ad28361321b565b9760005b8751811015613b035780613aed613afe928c6128e9565b516129de6129d6612cac848d6128e9565b613ad6565b5091939590929496613b79575b50610792959650613b2f8261182b856000526065602052604060002090565b613b3a858254612b87565b9055604080518481526020810186905260009133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f629190a433612ef3565b94929095939160005b8651811015613baf5780613b99613baa928b6128e9565b516129de612cbd612cac848c6128e9565b613b82565b5091939650919350610792948695613b10565b336000908152600080516020613f9e83398151915260205260409020909491929190613bf09060ff90613953565b6001600160a01b03851693613c06851515613a4d565b613c138451845114612d23565b613c1e838588613263565b60005b8451811015613c635780613c38613c5e92866128e9565b516129de6129d68a61182b613c4d868c6128e9565b516000526065602052604060002090565b613c21565b509290946107929460006040517f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb339180613c9f898983612d80565b0390a4336131aa565b15613caf57565b60405162461bcd60e51b815260206004820152602160248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652061727469736044820152601d60fa1b6064820152608490fd5b15613d0557565b60405162461bcd60e51b81526020600482015260116024820152702434b730ba309d102727aa2fa7aba722a960791b6044820152606490fd5b60009080825261016390602091808352613d5b604085205461071a565b613e145750613d6990613e25565b9060405192839181610162908154613d808161071a565b92600191808316908115613df15750600114613da9575b5050505050611fbc906106e393611ebb565b82529293509091600080516020613f7e8339815191525b838310613ddb5750505082010182611fbc6106e33880613d97565b8054888401860152879550918401918101613dc0565b60ff1916888701525050505080151502830101905082611fbc6106e33880613d97565b60409284926106e395525220610754565b8015613edf57806000908282935b613ecb5750613e41836104fd565b92613e4f60405194856104dc565b80845281601f19613e5f836104fd565b013660208701375b613e715750505090565b60018110613ebe575b6000190190600a90613ea9613e99613e93848406612b6a565b60ff1690565b60f81b6001600160f81b03191690565b841a613eb584876133ee565b53049081613e67565b613ec66128a3565b613e7a565b92613ed7600a916128ba565b930480613e33565b50604051613eec816104b4565b60018152600360fc1b60208201529056fe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681fe90a866a48a634a12852c1be675b683a22307409932a7443b8029347be75629af0939a5988989bfee913a9ad10b9335cb63ebc9fd2b69e5f877d0455ac91951111423f5e835a1e334a686a7d9f998a65310f720d529827b76c12f396de482a2646970667358221220bba814e4d4e49a6d9a8b7696fe7fb76c4f402e76b30de1dcdc54ffe6d0a0f8a864736f6c634300080f0033

Block Transaction Difficulty 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
Loading...
Loading
[ 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.