Contract 0xbcb6343651dbefbecd732a3b916840311609245f

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd7d10970f700aa8e664820845b2f12e0c49cf5b7f1899710f48bba834cc5ebebSafe Transfer Fr...150011002022-06-18 14:40:05170 days 5 hrs ago0xaa0dee58a36b72c774317eb5f71afb2a04c85527 IN  0xbcb6343651dbefbecd732a3b916840311609245f0 ETH0.000193629665 ETH
0x0d71b0a32150243f38ec8365b414de5885209de9ed5486e8ef483ff6502cd88f0x60806040113705332022-05-07 0:10:03212 days 20 hrs ago0xb013abd83f0bd173e9f14ce7d6e420ad711483b4 IN  Create: TreasureFragment0 ETH0.025037175882 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xe05f80892f02bdee2bdd466622f74aa34aac3d8ac6c08c8ebeeb1c7c5a1280ba439026892022-12-05 20:27:062 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0xe05f80892f02bdee2bdd466622f74aa34aac3d8ac6c08c8ebeeb1c7c5a1280ba439026892022-12-05 20:27:062 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x45278ac3868bf7222d53703dd925558763822b8a4d35f51a0c9e26700bcbce9f439023922022-12-05 20:25:364 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x7f8114daf70080dd939919718a167f37e073dfdc4133f6d345d5207b95eeb56a439023072022-12-05 20:25:074 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x7f8114daf70080dd939919718a167f37e073dfdc4133f6d345d5207b95eeb56a439023072022-12-05 20:25:074 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x3c4adfb8a5c94ca7595323a37e56ad6e1cb6fa3591aef565c047c5167bdfe145439021092022-12-05 20:24:005 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x89ad1d62f7f7354ec68ab97f2d6fd846cc279856ca70b47e20b1867deca5d156439021032022-12-05 20:23:585 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0xa34d0b7578483bc55e3bdf84a89e47e1a288f25b27beabf1317efc96dbaf1b6d439012322022-12-05 20:19:2810 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x8c0af531bc7a44eb21bdfe4aba7b1a48e3024ee63b08c0beb4603c9721be98c4439011192022-12-05 20:18:4510 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x8c0af531bc7a44eb21bdfe4aba7b1a48e3024ee63b08c0beb4603c9721be98c4439011192022-12-05 20:18:4510 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x9887c3d0442adea63dd0a510af8e6ab4166453f1dac02beb1f12549c688dc3d7439009732022-12-05 20:17:4911 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x9887c3d0442adea63dd0a510af8e6ab4166453f1dac02beb1f12549c688dc3d7439009732022-12-05 20:17:4911 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
0x50ae274960281a68e54bc5a0449c583d75f3912e26dac56301e08a55bf9356ca439009212022-12-05 20:17:3112 mins ago 0x756e4f3bb69c47d492abf2a52af320190c174c55 0xbcb6343651dbefbecd732a3b916840311609245f0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TreasureFragment

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }

    /**
     * @dev 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 2 of 20 : 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 3 of 20 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

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

    /**
     * @dev 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 4 of 20 : 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;
    }

    /**
     * @dev 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 5 of 20 : 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 6 of 20 : 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 7 of 20 : ERC1155BurnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol)

pragma solidity ^0.8.0;

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

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

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

        _burn(account, id, value);
    }

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

        _burnBatch(account, ids, values);
    }

    /**
     * @dev 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 8 of 20 : 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 9 of 20 : 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 10 of 20 : 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;
    }

    /**
     * @dev 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 11 of 20 : 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 12 of 20 : 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;
    }

    /**
     * @dev 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 13 of 20 : 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 14 of 20 : ITreasureFragment.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";

interface ITreasureFragment is IERC1155Upgradeable {

    function mint(address _to, uint256 _id, uint256 _amount) external;

    function burn(address account, uint256 id, uint256 value) external;

    function burnBatch(address account, uint256[] memory ids, uint256[] memory values) external;

    function adminSafeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount) external;

    function adminSafeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _amounts) external;
}

File 15 of 20 : TreasureFragment.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";

import "./TreasureFragmentState.sol";

contract TreasureFragment is Initializable, ITreasureFragment, TreasureFragmentState {
    using StringsUpgradeable for uint256;

    function initialize() external initializer {
        TreasureFragmentState.__TreasureFragmentState_init();
    }

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

        require(isAdmin(msg.sender) || isOwner(), "TreasureFragment: Only admin or owner can transfer");
    }

    function mint(address _to, uint256 _id, uint256 _amount) external override onlyAdminOrOwner whenNotPaused {

        _mint(_to, _id, _amount, "");
    }

    function adminSafeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount) external override onlyAdminOrOwner whenNotPaused {
        _safeTransferFrom(_from, _to, _id, _amount, "");
    }

    function adminSafeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _amounts) external override onlyAdminOrOwner whenNotPaused {
        _safeBatchTransferFrom(_from, _to, _ids, _amounts, "");
    }

    function burn(
        address account,
        uint256 id,
        uint256 value)
    public
    override
    onlyAdminOrOwner
    whenNotPaused
    {
        _burn(account, id, value);
    }

    function burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory values)
    public
    override
    onlyAdminOrOwner
    whenNotPaused
    {
        _burnBatch(account, ids, values);
    }

}

File 16 of 20 : TreasureFragmentState.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import "../../shared/ERC1155HybridUpgradeable.sol";
import "./ITreasureFragment.sol";

abstract contract TreasureFragmentState is Initializable, ERC1155HybridUpgradeable {

    function __TreasureFragmentState_init() internal initializer {
        AdminableUpgradeable.__Adminable_init();
        ERC1155HybridUpgradeable.__ERC1155Hybrid_init();
    }
}

File 17 of 20 : AdminableUpgradeable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

import "./UtilitiesUpgradeable.sol";

// Do not add state to this contract.
//
contract AdminableUpgradeable is UtilitiesUpgradeable {

    mapping(address => bool) private admins;

    function __Adminable_init() internal initializer {
        UtilitiesUpgradeable.__Utilities__init();
    }

    function addAdmin(address _address) external onlyOwner {
        admins[_address] = true;
    }

    function addAdmins(address[] calldata _addresses) external onlyOwner {
        for(uint256 i = 0; i < _addresses.length; i++) {
            admins[_addresses[i]] = true;
        }
    }

    function removeAdmin(address _address) external onlyOwner {
        admins[_address] = false;
    }

    function removeAdmins(address[] calldata _addresses) external onlyOwner {
        for(uint256 i = 0; i < _addresses.length; i++) {
            admins[_addresses[i]] = false;
        }
    }

    function setPause(bool _shouldPause) external onlyAdminOrOwner {
        if(_shouldPause) {
            _pause();
        } else {
            _unpause();
        }
    }

    function isAdmin(address _address) public view returns(bool) {
        return admins[_address];
    }

    modifier onlyAdmin() {
        require(admins[msg.sender], "Not admin");
        _;
    }

    modifier onlyAdminOrOwner() {
        require(admins[msg.sender] || isOwner(), "Not admin or owner");
        _;
    }

    uint256[50] private __gap;
}

File 18 of 20 : BBase64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title BBase64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides a function for encoding some bytes in BBase64
/// @notice NOT BUILT BY ETHERORCS/TREASURE TEAM. Thanks Bretch Devos!
library BBase64 {
    string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
               dataPtr := add(dataPtr, 3)

               // read 3 bytes
               let input := mload(dataPtr)

               // write 4 characters
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
               resultPtr := add(resultPtr, 1)
               mstore(resultPtr, shl(248, mload(add(tablePtr, and(        input,  0x3F)))))
               resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }
}

File 19 of 20 : ERC1155HybridUpgradeable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";

import "./AdminableUpgradeable.sol";
import "./BBase64.sol";

abstract contract ERC1155HybridUpgradeable is Initializable, ERC1155Upgradeable, AdminableUpgradeable {

    event TokenTraitChanged(uint256 _tokenId, TraitData _traitData);

    enum PropertyType {
        STRING,
        NUMBER
    }

    struct Property {
        string name;
        string value;
        PropertyType propertyType;
    }

    struct TraitData {
        string name;
        string description;
        string url;
        Property[] properties;
    }

    // storage of each image data
    mapping(uint256 => TraitData) public tokenIdToTraitData;

    mapping(uint256 => mapping(string => string)) public tokenIdToPropertyNameToPropertyValue;

    function __ERC1155Hybrid_init() internal onlyInitializing {
        ERC1155Upgradeable.__ERC1155_init("");
        AdminableUpgradeable.__Adminable_init();
    }

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

        require(!paused(), "ERC1155Hybrid: Cannot transfer while paused");
    }

    function uploadTraitData(
        uint256 _tokenId,
        TraitData calldata _traitData)
    external
    onlyAdminOrOwner
    {

        Property[] memory _oldProperties = tokenIdToTraitData[_tokenId].properties;
        for(uint256 i = 0; i < _oldProperties.length; i++) {
            tokenIdToPropertyNameToPropertyValue[_tokenId][_oldProperties[i].name] = "";
        }

        tokenIdToTraitData[_tokenId] = _traitData;

        for(uint256 i = 0; i < _traitData.properties.length; i++) {
            tokenIdToPropertyNameToPropertyValue[_tokenId][_traitData.properties[i].name] = _traitData.properties[i].value;
        }

        emit TokenTraitChanged(_tokenId, _traitData);
    }

    function exists(uint256 _tokenId) public view returns(bool) {
        return !compareStrings(tokenIdToTraitData[_tokenId].name, "");
    }

    function propertyValueForToken(uint256 _tokenId, string calldata _propertyName) public view returns(string memory) {
        return tokenIdToPropertyNameToPropertyValue[_tokenId][_propertyName];
    }

    function uri(
        uint256 _tokenId)
    public
    view
    override
    tokenIdExists(_tokenId)
    returns(string memory)
    {
        TraitData storage _traitData = tokenIdToTraitData[_tokenId];
        string memory metadata = string(abi.encodePacked(
            '{"name": "',
            _traitData.name,
            '", "description": "',
            _traitData.description,
            '", "image": "',
            _traitData.url,
            '", "attributes": [',
            _generateAttributeString(_traitData),
            ']}'
        ));

        return string(abi.encodePacked(
            "data:application/json;base64,",
            BBase64.encode(bytes(metadata))
        ));
    }

    function _generateAttributeString(TraitData storage _traitData) private view returns(string memory) {
        if(_traitData.properties.length == 0) {
            return '';
        }

        string memory _returnString;

        for(uint256 i = 0; i < _traitData.properties.length; i++) {

            _returnString = string(abi.encodePacked(
                _returnString,
                '{"trait_type":"',
                _traitData.properties[i].name,
                '","value":',
                _traitData.properties[i].propertyType == PropertyType.STRING ? '"' : '',
                _traitData.properties[i].value,
                _traitData.properties[i].propertyType == PropertyType.STRING ? '"' : '',
                '}',
                i < _traitData.properties.length - 1 ? ',' : ''
            ));
        }

        return _returnString;
    }

    modifier tokenIdExists(uint256 _tokenId) {
        require(exists(_tokenId), "ERC1155Hyrbid: Token ID does not exist");

        _;
    }

    uint256[48] private __gap;
}

File 20 of 20 : UtilitiesUpgradeable.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

contract UtilitiesUpgradeable is Initializable, OwnableUpgradeable, PausableUpgradeable {

    function __Utilities__init() internal initializer {
        OwnableUpgradeable.__Ownable_init();
        PausableUpgradeable.__Pausable_init();

        _pause();
    }

    modifier nonZeroAddress(address _address) {
        require(address(0) != _address, "0 address");
        _;
    }

    modifier nonZeroLength(uint[] memory _array) {
        require(_array.length > 0, "Empty array");
        _;
    }

    modifier lengthsAreEqual(uint[] memory _array1, uint[] memory _array2) {
        require(_array1.length == _array2.length, "Unequal lengths");
        _;
    }

    modifier onlyEOA() {
        /* solhint-disable avoid-tx-origin */
        require(msg.sender == tx.origin, "No contracts");
        _;
    }

    function isOwner() internal view returns(bool) {
        return owner() == msg.sender;
    }

    function compareStrings(string memory a, string memory b) internal pure returns (bool) {
        return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"url","type":"string"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"value","type":"string"},{"internalType":"enum ERC1155HybridUpgradeable.PropertyType","name":"propertyType","type":"uint8"}],"internalType":"struct ERC1155HybridUpgradeable.Property[]","name":"properties","type":"tuple[]"}],"indexed":false,"internalType":"struct ERC1155HybridUpgradeable.TraitData","name":"_traitData","type":"tuple"}],"name":"TokenTraitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addAdmins","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[]"}],"name":"adminSafeBatchTransferFrom","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"}],"name":"adminSafeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_propertyName","type":"string"}],"name":"propertyValueForToken","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeAdmins","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"bool","name":"_shouldPause","type":"bool"}],"name":"setPause","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":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"name":"tokenIdToPropertyNameToPropertyValue","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToTraitData","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"url","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"url","type":"string"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"value","type":"string"},{"internalType":"enum ERC1155HybridUpgradeable.PropertyType","name":"propertyType","type":"uint8"}],"internalType":"struct ERC1155HybridUpgradeable.Property[]","name":"properties","type":"tuple[]"}],"internalType":"struct ERC1155HybridUpgradeable.TraitData","name":"_traitData","type":"tuple"}],"name":"uploadTraitData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50614221806100206000396000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c80637048027511610104578063a878b95d116100a2578063f242432a11610071578063f242432a14610428578063f2fde38b1461043b578063f5298aca1461044e578063f54934071461046157600080fd5b8063a878b95d146103b3578063af6827a4146103c6578063bedb86fb146103d9578063e985e9c5146103ec57600080fd5b80638da5cb5b116100de5780638da5cb5b1461035f57806398c333451461037a5780639c54df641461038d578063a22cb465146103a057600080fd5b8063704802751461033c578063715018a61461034f5780638129fc1c1461035757600080fd5b80632eb2c2d6116101715780634f558e791161014b5780634f558e79146102f85780635c975abb1461030b5780635d11af0a146103165780636b20c4541461032957600080fd5b80632eb2c2d6146102b2578063377e11e0146102c55780634e1273f4146102d857600080fd5b8063156e29f6116101ad578063156e29f61461023c5780631785f53c1461025157806324d7806c146102645780632bab97591461029057600080fd5b8062fdd58e146101d357806301ffc9a7146101f95780630e89341c1461021c575b600080fd5b6101e66101e1366004612a33565b610474565b6040519081526020015b60405180910390f35b61020c610207366004612a73565b61050d565b60405190151581526020016101f0565b61022f61022a366004612a97565b61055f565b6040516101f09190612b08565b61024f61024a366004612b1b565b61063f565b005b61024f61025f366004612b4e565b6106bf565b61020c610272366004612b4e565b6001600160a01b0316600090815260fb602052604090205460ff1690565b6102a361029e366004612a97565b61070a565b6040516101f093929190612b69565b61024f6102c0366004612cff565b6108c5565b61024f6102d3366004612df3565b61095c565b6102eb6102e6366004612e34565b6109f8565b6040516101f09190612f39565b61020c610306366004612a97565b610b21565b60c95460ff1661020c565b61024f610324366004612f4c565b610bda565b61024f610337366004612f99565b610f9c565b61024f61034a366004612b4e565b611007565b61024f611055565b61024f61108b565b6097546040516001600160a01b0390911681526020016101f0565b61022f61038836600461300c565b611105565b61024f61039b366004612df3565b6111cb565b61024f6103ae366004613097565b611267565b61024f6103c13660046130ca565b611276565b61024f6103d436600461310c565b6112f8565b61024f6103e736600461319c565b6113dd565b61020c6103fa3660046131b7565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b61024f6104363660046131e1565b611430565b61024f610449366004612b4e565b6114b7565b61024f61045c366004612b1b565b61154f565b61022f61046f366004613245565b6115ba565b60006001600160a01b0383166104e55760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061053e57506001600160e01b031982166303a24d0760e21b145b8061055957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60608161056b81610b21565b6105c65760405162461bcd60e51b815260206004820152602660248201527f455243313135354879726269643a20546f6b656e20494420646f6573206e6f7460448201526508195e1a5cdd60d21b60648201526084016104dc565b600083815261012e60205260408120908160018101600282016105e883611671565b6040516020016105fb9493929190613339565b60405160208183030381529060405290506106158161185b565b60405160200161062591906133eb565b604051602081830303815290604052935050505b50919050565b33600090815260fb602052604090205460ff168061066057506106606119c2565b61067c5760405162461bcd60e51b81526004016104dc90613430565b60c95460ff161561069f5760405162461bcd60e51b81526004016104dc9061345c565b6106ba838383604051806020016040528060008152506119e6565b505050565b6097546001600160a01b031633146106e95760405162461bcd60e51b81526004016104dc90613486565b6001600160a01b0316600090815260fb60205260409020805460ff19169055565b61012e6020526000908152604090208054819061072690613295565b80601f016020809104026020016040519081016040528092919081815260200182805461075290613295565b801561079f5780601f106107745761010080835404028352916020019161079f565b820191906000526020600020905b81548152906001019060200180831161078257829003601f168201915b5050505050908060010180546107b490613295565b80601f01602080910402602001604051908101604052809291908181526020018280546107e090613295565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b50505050509080600201805461084290613295565b80601f016020809104026020016040519081016040528092919081815260200182805461086e90613295565b80156108bb5780601f10610890576101008083540402835291602001916108bb565b820191906000526020600020905b81548152906001019060200180831161089e57829003601f168201915b5050505050905083565b6001600160a01b0385163314806108e157506108e185336103fa565b6109485760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016104dc565b6109558585858585611af8565b5050505050565b6097546001600160a01b031633146109865760405162461bcd60e51b81526004016104dc90613486565b60005b818110156106ba57600060fb60008585858181106109a9576109a96134bb565b90506020020160208101906109be9190612b4e565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806109f0816134e7565b915050610989565b60608151835114610a5d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104dc565b600083516001600160401b03811115610a7857610a78612bac565b604051908082528060200260200182016040528015610aa1578160200160208202803683370190505b50905060005b8451811015610b1957610aec858281518110610ac557610ac56134bb565b6020026020010151858381518110610adf57610adf6134bb565b6020026020010151610474565b828281518110610afe57610afe6134bb565b6020908102919091010152610b12816134e7565b9050610aa7565b509392505050565b600081815261012e602052604081208054610bd39190610b4090613295565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6c90613295565b8015610bb95780601f10610b8e57610100808354040283529160200191610bb9565b820191906000526020600020905b815481529060010190602001808311610b9c57829003601f168201915b505050505060405180602001604052806000815250611c9d565b1592915050565b33600090815260fb602052604090205460ff1680610bfb5750610bfb6119c2565b610c175760405162461bcd60e51b81526004016104dc90613430565b600082815261012e6020908152604080832060030180548251818502810185019093528083529192909190849084015b82821015610dd05783829060005260206000209060030201604051806060016040529081600082018054610c7a90613295565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca690613295565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b50505050508152602001600182018054610d0c90613295565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3890613295565b8015610d855780601f10610d5a57610100808354040283529160200191610d85565b820191906000526020600020905b815481529060010190602001808311610d6857829003601f168201915b5050509183525050600282015460209091019060ff166001811115610dac57610dac613502565b6001811115610dbd57610dbd613502565b8152505081526020019060010190610c47565b50505050905060005b8151811015610e65576040518060200160405280600081525061012f6000868152602001908152602001600020838381518110610e1857610e186134bb565b602002602001015160000151604051610e319190613518565b90815260200160405180910390209080519060200190610e5292919061290a565b5080610e5d816134e7565b915050610dd9565b50600083815261012e602052604090208290610e81828261399e565b90505060005b610e946060840184613696565b9050811015610f5d57610eaa6060840184613696565b82818110610eba57610eba6134bb565b9050602002810190610ecc91906136df565b610eda906020810190613534565b600086815261012f60205260409020610ef66060870187613696565b85818110610f0657610f066134bb565b9050602002810190610f1891906136df565b610f229080613534565b604051610f30929190613aae565b908152604051908190036020019020610f4a92909161298e565b5080610f55816134e7565b915050610e87565b507f6c3287c0b18d88e6284d3bf5614931027e950c9bed4f674e545d85082bffd9d08383604051610f8f929190613c00565b60405180910390a1505050565b33600090815260fb602052604090205460ff1680610fbd5750610fbd6119c2565b610fd95760405162461bcd60e51b81526004016104dc90613430565b60c95460ff1615610ffc5760405162461bcd60e51b81526004016104dc9061345c565b6106ba838383611cf6565b6097546001600160a01b031633146110315760405162461bcd60e51b81526004016104dc90613486565b6001600160a01b0316600090815260fb60205260409020805460ff19166001179055565b6097546001600160a01b0316331461107f5760405162461bcd60e51b81526004016104dc90613486565b6110896000611e87565b565b600054610100900460ff166110a65760005460ff16156110aa565b303b155b6110c65760405162461bcd60e51b81526004016104dc90613ce6565b600054610100900460ff161580156110e8576000805461ffff19166101011790555b6110f0611ed9565b8015611102576000805461ff00191690555b50565b606061012f6000858152602001908152602001600020838360405161112b929190613aae565b9081526020016040518091039020805461114490613295565b80601f016020809104026020016040519081016040528092919081815260200182805461117090613295565b80156111bd5780601f10611192576101008083540402835291602001916111bd565b820191906000526020600020905b8154815290600101906020018083116111a057829003601f168201915b505050505090509392505050565b6097546001600160a01b031633146111f55760405162461bcd60e51b81526004016104dc90613486565b60005b818110156106ba57600160fb6000858585818110611218576112186134bb565b905060200201602081019061122d9190612b4e565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061125f816134e7565b9150506111f8565b611272338383611f46565b5050565b33600090815260fb602052604090205460ff168061129757506112976119c2565b6112b35760405162461bcd60e51b81526004016104dc90613430565b60c95460ff16156112d65760405162461bcd60e51b81526004016104dc9061345c565b6112f28484848460405180602001604052806000815250612027565b50505050565b33600090815260fb602052604090205460ff168061131957506113196119c2565b6113355760405162461bcd60e51b81526004016104dc90613430565b60c95460ff16156113585760405162461bcd60e51b81526004016104dc9061345c565b6113d5868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092018290525060408051602081019091529081529250611af8915050565b505050505050565b33600090815260fb602052604090205460ff16806113fe57506113fe6119c2565b61141a5760405162461bcd60e51b81526004016104dc90613430565b801561142857611102612148565b6111026121bd565b6001600160a01b03851633148061144c575061144c85336103fa565b6114aa5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104dc565b6109558585858585612027565b6097546001600160a01b031633146114e15760405162461bcd60e51b81526004016104dc90613486565b6001600160a01b0381166115465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104dc565b61110281611e87565b33600090815260fb602052604090205460ff168061157057506115706119c2565b61158c5760405162461bcd60e51b81526004016104dc90613430565b60c95460ff16156115af5760405162461bcd60e51b81526004016104dc9061345c565b6106ba838383612237565b61012f6020908152600092835260409092208151808301840180519281529084019290930191909120915280546115f090613295565b80601f016020809104026020016040519081016040528092919081815260200182805461161c90613295565b80156116695780601f1061163e57610100808354040283529160200191611669565b820191906000526020600020905b81548152906001019060200180831161164c57829003601f168201915b505050505081565b600381015460609061169157505060408051602081019091526000815290565b606060005b600384015481101561185457818460030182815481106116b8576116b86134bb565b600091825260208220600390910201908660030184815481106116dd576116dd6134bb565b600091825260209091206002600390920201015460ff16600181111561170557611705613502565b1461171f576040518060200160405280600081525061173a565b604051806040016040528060018152602001601160f91b8152505b86600301848154811061174f5761174f6134bb565b60009182526020822060016003909202010190886003018681548110611777576117776134bb565b600091825260209091206002600390920201015460ff16600181111561179f5761179f613502565b146117b957604051806020016040528060008152506117d4565b604051806040016040528060018152602001601160f91b8152505b60038901546117e590600190613d34565b8610611800576040518060200160405280600081525061181b565b604051806040016040528060018152602001600b60fa1b8152505b60405160200161183096959493929190613d4b565b6040516020818303038152906040529150808061184c906134e7565b915050611696565b5092915050565b606081516000141561187b57505060408051602081019091526000815290565b60006040518060600160405280604081526020016141ac60409139905060006003845160026118aa9190613df8565b6118b49190613e10565b6118bf9060046136f5565b905060006118ce826020613df8565b6001600160401b038111156118e5576118e5612bac565b6040519080825280601f01601f19166020018201604052801561190f576020820181803683370190505b509050818152600183018586518101602084015b8183101561197d5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611923565b60038951066001811461199757600281146119a8576119b4565b613d3d60f01b6001198301526119b4565b603d60f81b6000198301525b509398975050505050505050565b6000336119d76097546001600160a01b031690565b6001600160a01b031614905090565b6001600160a01b038416611a465760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016104dc565b33611a6681600087611a578861233c565b611a608861233c565b87612387565b60008481526065602090815260408083206001600160a01b038916845290915281208054859290611a98908490613df8565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46109558160008787878761241d565b8151835114611b195760405162461bcd60e51b81526004016104dc90613e32565b6001600160a01b038416611b3f5760405162461bcd60e51b81526004016104dc90613e7a565b33611b4e818787878787612387565b60005b8451811015611c37576000858281518110611b6e57611b6e6134bb565b602002602001015190506000858381518110611b8c57611b8c6134bb565b60209081029190910181015160008481526065835260408082206001600160a01b038e168352909352919091205490915081811015611bdd5760405162461bcd60e51b81526004016104dc90613ebf565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611c1c908490613df8565b9250508190555050505080611c30906134e7565b9050611b51565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c87929190613f09565b60405180910390a46113d5818787878787612588565b600081604051602001611cb09190613518565b6040516020818303038152906040528051906020012083604051602001611cd79190613518565b6040516020818303038152906040528051906020012014905092915050565b6001600160a01b038316611d1c5760405162461bcd60e51b81526004016104dc90613f37565b8051825114611d3d5760405162461bcd60e51b81526004016104dc90613e32565b6000339050611d6081856000868660405180602001604052806000815250612387565b60005b8351811015611e28576000848281518110611d8057611d806134bb565b602002602001015190506000848381518110611d9e57611d9e6134bb565b60209081029190910181015160008481526065835260408082206001600160a01b038c168352909352919091205490915081811015611def5760405162461bcd60e51b81526004016104dc90613f7a565b60009283526065602090815260408085206001600160a01b038b1686529091529092209103905580611e20816134e7565b915050611d63565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611e79929190613f09565b60405180910390a450505050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16611ef45760005460ff1615611ef8565b303b155b611f145760405162461bcd60e51b81526004016104dc90613ce6565b600054610100900460ff16158015611f36576000805461ffff19166101011790555b611f3e612652565b6110f06126b7565b816001600160a01b0316836001600160a01b03161415611fba5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104dc565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661204d5760405162461bcd60e51b81526004016104dc90613e7a565b3361205d818787611a578861233c565b60008481526065602090815260408083206001600160a01b038a168452909152902054838110156120a05760405162461bcd60e51b81526004016104dc90613ebf565b60008581526065602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906120df908490613df8565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461213f82888888888861241d565b50505050505050565b60c95460ff161561216b5760405162461bcd60e51b81526004016104dc9061345c565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121a03390565b6040516001600160a01b03909116815260200160405180910390a1565b60c95460ff166122065760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104dc565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336121a0565b6001600160a01b03831661225d5760405162461bcd60e51b81526004016104dc90613f37565b3361228c8185600061226e8761233c565b6122778761233c565b60405180602001604052806000815250612387565b60008381526065602090815260408083206001600160a01b0388168452909152902054828110156122cf5760405162461bcd60e51b81526004016104dc90613f7a565b60008481526065602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612376576123766134bb565b602090810291909101015292915050565b6123958686868686866126fe565b33600090815260fb602052604090205460ff16806123b657506123b66119c2565b6113d55760405162461bcd60e51b815260206004820152603260248201527f5472656173757265467261676d656e743a204f6e6c792061646d696e206f722060448201527137bbb732b91031b0b7103a3930b739b332b960711b60648201526084016104dc565b6001600160a01b0384163b156113d55760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906124619089908990889088908890600401613fbe565b602060405180830381600087803b15801561247b57600080fd5b505af19250505080156124ab575060408051601f3d908101601f191682019092526124a891810190613ff8565b60015b612558576124b7614015565b806308c379a014156124f157506124cc614031565b806124d757506124f3565b8060405162461bcd60e51b81526004016104dc9190612b08565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104dc565b6001600160e01b0319811663f23a6e6160e01b1461213f5760405162461bcd60e51b81526004016104dc906140ba565b6001600160a01b0384163b156113d55760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906125cc9089908990889088908890600401614102565b602060405180830381600087803b1580156125e657600080fd5b505af1925050508015612616575060408051601f3d908101601f1916820190925261261391810190613ff8565b60015b612622576124b7614015565b6001600160e01b0319811663bc197c8160e01b1461213f5760405162461bcd60e51b81526004016104dc906140ba565b600054610100900460ff1661266d5760005460ff1615612671565b303b155b61268d5760405162461bcd60e51b81526004016104dc90613ce6565b600054610100900460ff161580156126af576000805461ffff19166101011790555b6110f0612765565b600054610100900460ff166126de5760405162461bcd60e51b81526004016104dc90614160565b6126f6604051806020016040528060008152506127da565b611089612652565b60c95460ff16156113d55760405162461bcd60e51b815260206004820152602b60248201527f455243313135354879627269643a2043616e6e6f74207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b60648201526084016104dc565b600054610100900460ff166127805760005460ff1615612784565b303b155b6127a05760405162461bcd60e51b81526004016104dc90613ce6565b600054610100900460ff161580156127c2576000805461ffff19166101011790555b6127ca61280a565b6127d2612839565b6110f0612148565b600054610100900460ff166128015760405162461bcd60e51b81526004016104dc90614160565b61110281612868565b600054610100900460ff166128315760405162461bcd60e51b81526004016104dc90614160565b611089612898565b600054610100900460ff166128605760405162461bcd60e51b81526004016104dc90614160565b6110896128c8565b600054610100900460ff1661288f5760405162461bcd60e51b81526004016104dc90614160565b611102816128fb565b600054610100900460ff166128bf5760405162461bcd60e51b81526004016104dc90614160565b61108933611e87565b600054610100900460ff166128ef5760405162461bcd60e51b81526004016104dc90614160565b60c9805460ff19169055565b80516112729060679060208401905b82805461291690613295565b90600052602060002090601f016020900481019282612938576000855561297e565b82601f1061295157805160ff191683800117855561297e565b8280016001018555821561297e579182015b8281111561297e578251825591602001919060010190612963565b5061298a929150612a02565b5090565b82805461299a90613295565b90600052602060002090601f0160209004810192826129bc576000855561297e565b82601f106129d55782800160ff1982351617855561297e565b8280016001018555821561297e579182015b8281111561297e5782358255916020019190600101906129e7565b5b8082111561298a5760008155600101612a03565b80356001600160a01b0381168114612a2e57600080fd5b919050565b60008060408385031215612a4657600080fd5b612a4f83612a17565b946020939093013593505050565b6001600160e01b03198116811461110257600080fd5b600060208284031215612a8557600080fd5b8135612a9081612a5d565b9392505050565b600060208284031215612aa957600080fd5b5035919050565b60005b83811015612acb578181015183820152602001612ab3565b838111156112f25750506000910152565b60008151808452612af4816020860160208601612ab0565b601f01601f19169290920160200192915050565b602081526000612a906020830184612adc565b600080600060608486031215612b3057600080fd5b612b3984612a17565b95602085013595506040909401359392505050565b600060208284031215612b6057600080fd5b612a9082612a17565b606081526000612b7c6060830186612adc565b8281036020840152612b8e8186612adc565b90508281036040840152612ba28185612adc565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612be757612be7612bac565b6040525050565b60006001600160401b03821115612c0757612c07612bac565b5060051b60200190565b600082601f830112612c2257600080fd5b81356020612c2f82612bee565b604051612c3c8282612bc2565b83815260059390931b8501820192828101915086841115612c5c57600080fd5b8286015b84811015612c775780358352918301918301612c60565b509695505050505050565b60006001600160401b03831115612c9b57612c9b612bac565b604051612cb2601f8501601f191660200182612bc2565b809150838152848484011115612cc757600080fd5b83836020830137600060208583010152509392505050565b600082601f830112612cf057600080fd5b612a9083833560208501612c82565b600080600080600060a08688031215612d1757600080fd5b612d2086612a17565b9450612d2e60208701612a17565b935060408601356001600160401b0380821115612d4a57600080fd5b612d5689838a01612c11565b94506060880135915080821115612d6c57600080fd5b612d7889838a01612c11565b93506080880135915080821115612d8e57600080fd5b50612d9b88828901612cdf565b9150509295509295909350565b60008083601f840112612dba57600080fd5b5081356001600160401b03811115612dd157600080fd5b6020830191508360208260051b8501011115612dec57600080fd5b9250929050565b60008060208385031215612e0657600080fd5b82356001600160401b03811115612e1c57600080fd5b612e2885828601612da8565b90969095509350505050565b60008060408385031215612e4757600080fd5b82356001600160401b0380821115612e5e57600080fd5b818501915085601f830112612e7257600080fd5b81356020612e7f82612bee565b604051612e8c8282612bc2565b83815260059390931b8501820192828101915089841115612eac57600080fd5b948201945b83861015612ed157612ec286612a17565b82529482019490820190612eb1565b96505086013592505080821115612ee757600080fd5b50612ef485828601612c11565b9150509250929050565b600081518084526020808501945080840160005b83811015612f2e57815187529582019590820190600101612f12565b509495945050505050565b602081526000612a906020830184612efe565b60008060408385031215612f5f57600080fd5b8235915060208301356001600160401b03811115612f7c57600080fd5b830160808186031215612f8e57600080fd5b809150509250929050565b600080600060608486031215612fae57600080fd5b612fb784612a17565b925060208401356001600160401b0380821115612fd357600080fd5b612fdf87838801612c11565b93506040860135915080821115612ff557600080fd5b5061300286828701612c11565b9150509250925092565b60008060006040848603121561302157600080fd5b8335925060208401356001600160401b038082111561303f57600080fd5b818601915086601f83011261305357600080fd5b81358181111561306257600080fd5b87602082850101111561307457600080fd5b6020830194508093505050509250925092565b80358015158114612a2e57600080fd5b600080604083850312156130aa57600080fd5b6130b383612a17565b91506130c160208401613087565b90509250929050565b600080600080608085870312156130e057600080fd5b6130e985612a17565b93506130f760208601612a17565b93969395505050506040820135916060013590565b6000806000806000806080878903121561312557600080fd5b61312e87612a17565b955061313c60208801612a17565b945060408701356001600160401b038082111561315857600080fd5b6131648a838b01612da8565b9096509450606089013591508082111561317d57600080fd5b5061318a89828a01612da8565b979a9699509497509295939492505050565b6000602082840312156131ae57600080fd5b612a9082613087565b600080604083850312156131ca57600080fd5b6131d383612a17565b91506130c160208401612a17565b600080600080600060a086880312156131f957600080fd5b61320286612a17565b945061321060208701612a17565b9350604086013592506060860135915060808601356001600160401b0381111561323957600080fd5b612d9b88828901612cdf565b6000806040838503121561325857600080fd5b8235915060208301356001600160401b0381111561327557600080fd5b8301601f8101851361328657600080fd5b612ef485823560208401612c82565b600181811c908216806132a957607f821691505b6020821081141561063957634e487b7160e01b600052602260045260246000fd5b600081546132d781613295565b600182811680156132ef57600181146133005761332f565b60ff1984168752828701945061332f565b8560005260208060002060005b858110156133265781548a82015290840190820161330d565b50505082870194505b5050505092915050565b693d913730b6b2911d101160b11b81526000613358600a8301876132ca565b72111610113232b9b1b934b83a34b7b7111d101160691b815261337e60138201876132ca565b6c1116101134b6b0b3b2911d101160991b815290506133a0600d8201866132ca565b71222c202261747472696275746573223a205b60701b815284519091506133ce816012840160208801612ab0565b615d7d60f01b601292909101918201526014019695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161342381601d850160208701612ab0565b91909101601d0192915050565b6020808252601290820152712737ba1030b236b4b71037b91037bbb732b960711b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156134fb576134fb6134d1565b5060010190565b634e487b7160e01b600052602160045260246000fd5b6000825161352a818460208701612ab0565b9190910192915050565b6000808335601e1984360301811261354b57600080fd5b8301803591506001600160401b0382111561356557600080fd5b602001915036819003821315612dec57600080fd5b5b81811015611272576000815560010161357b565b601f8211156106ba57806000526020600020601f840160051c810160208510156135b65750805b610955601f850160051c83018261357a565b600019600383901b1c191660019190911b1790565b6001600160401b038311156135f4576135f4612bac565b613608836136028354613295565b8361358f565b6000601f84116001811461363657600085156136245750838201355b61362e86826135c8565b845550610955565b600083815260209020601f19861690835b828110156136675786850135825560209485019460019092019101613647565b50868210156136845760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000808335601e198436030181126136ad57600080fd5b8301803591506001600160401b038211156136c757600080fd5b6020019150600581901b3603821315612dec57600080fd5b60008235605e1983360301811261352a57600080fd5b600081600019048311821515161561370f5761370f6134d1565b500290565b61371e8154613295565b801561127257601f81116001811461373857505060009055565b600083815260208120613756601f850160051c82016001830161357a565b508381526020812081855555505050565b6002811061110257600080fd5b6000813561055981613767565b6002821061379f57634e487b7160e01b600052602160045260246000fd5b60ff1981541660ff831681178255505050565b6137bc8283613534565b6001600160401b038111156137d3576137d3612bac565b6137e7816137e18554613295565b8561358f565b6000601f82116001811461381557600083156138035750838201355b61380d84826135c8565b86555061386f565b600085815260209020601f19841690835b828110156138465786850135825560209485019460019092019101613826565b50848210156138635760001960f88660031b161c19848701351681555b505060018360011b0185555b505050506138806020830183613534565b61388e8183600186016135dd565b505061127261389f60408401613774565b60028301613781565b680100000000000000008311156138c1576138c1612bac565b805483825580841015613960577f55555555555555555555555555555555555555555555555555555555555555556001818311811615613903576139036134d1565b6003828711821615613917576139176134d1565b600085815260208120909350878202810190828602015b8082101561395a5761393f82613714565b61394a848301613714565b846002830155828201915061392e565b50505050505b5060008181526020812083915b858110156113d55761398861398284876136df565b836137b2565b602092909201916003919091019060010161396d565b6139a88283613534565b6001600160401b038111156139bf576139bf612bac565b6139cd816137e18554613295565b6000601f8211600181146139fb57600083156139e95750838201355b6139f384826135c8565b865550613a55565b600085815260209020601f19841690835b82811015613a2c5786850135825560209485019460019092019101613a0c565b5084821015613a495760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050613a666020830183613534565b613a748183600186016135dd565b5050613a836040830183613534565b613a918183600286016135dd565b5050613aa06060830183613696565b6112f28183600386016138a8565b8183823760009101908152919050565b6000808335601e19843603018112613ad557600080fd5b83016020810192503590506001600160401b03811115613af457600080fd5b803603831315612dec57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008383855260208086019550808560051b8301018460005b87811015613bf357848303601f19018952813536889003605e19018112613b6b57600080fd5b87016060613b798280613abe565b828752613b898388018284613b03565b92505050613b9986830183613abe565b86830388880152613bab838284613b03565b925050506040808301359250613bc083613767565b60028310613bde57634e487b7160e01b600052602160045260246000fd5b94909401529783019790830190600101613b45565b5090979650505050505050565b828152604060208201526000613c168384613abe565b60806040850152613c2b60c085018284613b03565b915050613c3b6020850185613abe565b603f1980868503016060870152613c53848385613b03565b9350613c626040880188613abe565b9350915080868503016080870152613c7b848484613b03565b935060608701359250601e19873603018312613c9657600080fd5b91860191823591506001600160401b03821115613cb257600080fd5b8160051b3603871315613cc457600080fd5b8584030160a0860152613cdb838260208501613b2c565b979650505050505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600082821015613d4657613d466134d1565b500390565b60008751613d5d818460208c01612ab0565b6e3d913a3930b4ba2fba3cb832911d1160891b908301908152613d83600f8201896132ca565b691116113b30b63ab2911d60b11b81528751909150613da981600a840160208b01612ab0565b613db8600a82840101886132ca565b9150508451613dcb818360208901612ab0565b607d60f81b91019081528351613de8816001840160208801612ab0565b0160010198975050505050505050565b60008219821115613e0b57613e0b6134d1565b500190565b600082613e2d57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613f1c6040830185612efe565b8281036020840152613f2e8185612efe565b95945050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613cdb90830184612adc565b60006020828403121561400a57600080fd5b8151612a9081612a5d565b600060033d111561402e5760046000803e5060005160e01c5b90565b600060443d101561403f5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561406e57505050505090565b82850191508151818111156140865750505050505090565b843d87010160208285010111156140a05750505050505090565b6140af60208286010187612bc2565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061412e90830186612efe565b82810360608401526141408186612efe565b905082810360808401526141548185612adc565b98975050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212204fd02fa887fb82c12e8ba8f0263b6551b90000678afcbf5a334d432f8d58a31164736f6c63430008090033

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