Contract 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd54

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x814c43e367698edaac9d65c509105cfb5309ae4243d24c6d2cb7b1daaadbe3400x60806040113696352022-05-06 23:48:39149 days 18 hrs ago0xb013abd83f0bd173e9f14ce7d6e420ad711483b4 IN  Create: TreasureMetadataStore0 ETH0.009653991374 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0xba261cd8182120909a1b026a986d256f689237b6f53d61e51aef501708e2e721282071592022-10-03 18:12:271 min ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x569116537e588b64df2e9c1965cdcdf5c670893b5d6f0399f190af7d8654aa69282070852022-10-03 18:11:382 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x747c90b5507b829653b2e2301e92874682a4e1c3f53cb758bfa0ac68c1311ac1282069652022-10-03 18:10:393 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x747c90b5507b829653b2e2301e92874682a4e1c3f53cb758bfa0ac68c1311ac1282069652022-10-03 18:10:393 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x747c90b5507b829653b2e2301e92874682a4e1c3f53cb758bfa0ac68c1311ac1282069652022-10-03 18:10:393 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
0x747c90b5507b829653b2e2301e92874682a4e1c3f53cb758bfa0ac68c1311ac1282069652022-10-03 18:10:393 mins ago 0x9b58fc8c7b224ae8479da7e6ed37ca4ac58099a9 0x5bca6b0bf3b75bb6642f6f2df52878ed62e8fd540 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TreasureMetadataStore

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : TreasureMetadataStore.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./TreasureMetadataStoreState.sol";
import "./ITreasureMetadataStore.sol";

contract TreasureMetadataStore is ITreasureMetadataStore, TreasureMetadataStoreState {

    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;

    function initialize() external initializer {
        TreasureMetadataStoreState.__TreasureMetadataStoreState_init();
    }

    function setMetadataForIds(uint256[] calldata _ids, TreasureMetadata[] calldata _metadatas) external override onlyAdminOrOwner {
        require(_ids.length > 0, "No IDs given");
        require(_ids.length == _metadatas.length, "Bad lengths");

        for(uint256 i = 0; i < _ids.length; i++) {
            require(_metadatas[i].tier > 0, "Bad tier");

            TreasureMetadata memory _oldMetadata = treasureIdToMetadata[_ids[i]];
            if(_oldMetadata.tier > 0) {
                tierToTreasureIds[_oldMetadata.tier].remove(_ids[i]);

                if(_oldMetadata.isMintable) {
                    tierToMintableTreasureIds[_oldMetadata.tier].remove(_ids[i]);
                    tierToCategoryToMintableTreasureIds[_oldMetadata.tier][_oldMetadata.category].remove(_ids[i]);
                }
            }

            treasureIdToMetadata[_ids[i]] = _metadatas[i];
            tierToTreasureIds[_metadatas[i].tier].add(_ids[i]);
            if(_metadatas[i].isMintable) {
                tierToMintableTreasureIds[_metadatas[i].tier].add(_ids[i]);
                tierToCategoryToMintableTreasureIds[_metadatas[i].tier][_metadatas[i].category].add(_ids[i]);
            }
        }
    }

    function hasMetadataForTreasureId(uint256 _treasureId) external view override returns(bool) {
        return treasureIdToMetadata[_treasureId].tier != 0;
    }

    function getRandomTreasureForTier(uint8 _tier, uint256 _randomNumber) external view override returns(uint256) {
        uint256[] memory _mintableIds = tierToMintableTreasureIds[_tier].values();
        require(_mintableIds.length > 0, "TreasureMetadataStore: No IDs available for tier");

        uint256 _resultIndex = _randomNumber % _mintableIds.length;
        return _mintableIds[_resultIndex];
    }

    function getAnyRandomTreasureForTier(uint8 _tier, uint256 _randomNumber) external view override returns(uint256) {
        uint256 _numberTreasuresInTier = tierToTreasureIds[_tier].length();
        require(_numberTreasuresInTier > 0, "TreasureMetadataStore: No IDs available for tier");

        return tierToTreasureIds[_tier].at(_randomNumber % _numberTreasuresInTier);
    }

    function getRandomTreasureForTierAndCategory(
        uint8 _tier,
        TreasureCategory _category,
        uint256 _randomNumber)
    external
    view
    override
    returns(uint256)
    {
        uint256[] memory _mintableIds = tierToCategoryToMintableTreasureIds[_tier][_category].values();
        require(_mintableIds.length > 0, "TreasureMetadataStore: No IDs available for tier and category");

        uint256 _resultIndex = _randomNumber % _mintableIds.length;
        return _mintableIds[_resultIndex];
    }

    function getMetadataForTreasureId(uint256 _treasureId) external view override returns(TreasureMetadata memory) {
        TreasureMetadata memory _metadata = treasureIdToMetadata[_treasureId];
        require(_metadata.tier > 0, "No metadata for ID.");
        return _metadata;
    }

}

File 2 of 11 : TreasureMetadataStoreState.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../../shared/AdminableUpgradeable.sol";
import "./ITreasureMetadataStore.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";

abstract contract TreasureMetadataStoreState is AdminableUpgradeable {

    mapping(uint8 => EnumerableSetUpgradeable.UintSet) internal tierToMintableTreasureIds;
    mapping(uint256 => TreasureMetadata) internal treasureIdToMetadata;
    mapping(uint8 => mapping(TreasureCategory => EnumerableSetUpgradeable.UintSet)) internal tierToCategoryToMintableTreasureIds;
    mapping(uint8 => EnumerableSetUpgradeable.UintSet) internal tierToTreasureIds;

    function __TreasureMetadataStoreState_init() internal initializer {
        AdminableUpgradeable.__Adminable_init();
    }
}

File 3 of 11 : ITreasureMetadataStore.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./TreasureMetadataStoreState.sol";

interface ITreasureMetadataStore {
    // Sets the metadata for the given Ids.
    // Admin only.
    function setMetadataForIds(uint256[] calldata _ids, TreasureMetadata[] calldata _metadatas) external;

    // Returns if the given ID has metadata set.
    function hasMetadataForTreasureId(uint256 _treasureId) external view returns(bool);

    // Returns the metadata for the given ID. Reverts if no metadata for the ID is set.
    function getMetadataForTreasureId(uint256 _treasureId) external view returns(TreasureMetadata memory);

    // For the given tier, gets a random MINTABLE treasure id.
    function getRandomTreasureForTier(uint8 _tier, uint256 _randomNumber) external view returns(uint256);

    // For the given tier AND category, gets a random MINTABLE treasure id.
    function getRandomTreasureForTierAndCategory(
        uint8 _tier,
        TreasureCategory _category,
        uint256 _randomNumber)
    external view returns(uint256);

    // For the given tier, gets a random treasure id, MINTABLE OR NOT.
    function getAnyRandomTreasureForTier(uint8 _tier, uint256 _randomNumber) external view returns(uint256);
}

// Do not change. Stored in state.
struct TreasureMetadata {
    TreasureCategory category;
    uint8 tier;
    // Out of 100,000
    uint32 craftingBreakOdds;
    bool isMintable;
    uint256 consumableIdDropWhenBreak;
}

enum TreasureCategory {
    ALCHEMY,
    ARCANA,
    BREWING,
    ENCHANTER,
    LEATHERWORKING,
    SMITHING
}

File 4 of 11 : 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 5 of 11 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 6 of 11 : 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 7 of 11 : 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))));
    }
}

File 8 of 11 : 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 9 of 11 : 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 10 of 11 : 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 11 of 11 : 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;
}

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

Contract ABI

[{"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":"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":"uint8","name":"_tier","type":"uint8"},{"internalType":"uint256","name":"_randomNumber","type":"uint256"}],"name":"getAnyRandomTreasureForTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasureId","type":"uint256"}],"name":"getMetadataForTreasureId","outputs":[{"components":[{"internalType":"enum TreasureCategory","name":"category","type":"uint8"},{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint32","name":"craftingBreakOdds","type":"uint32"},{"internalType":"bool","name":"isMintable","type":"bool"},{"internalType":"uint256","name":"consumableIdDropWhenBreak","type":"uint256"}],"internalType":"struct TreasureMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"uint256","name":"_randomNumber","type":"uint256"}],"name":"getRandomTreasureForTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_tier","type":"uint8"},{"internalType":"enum TreasureCategory","name":"_category","type":"uint8"},{"internalType":"uint256","name":"_randomNumber","type":"uint256"}],"name":"getRandomTreasureForTierAndCategory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasureId","type":"uint256"}],"name":"hasMetadataForTreasureId","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":[],"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":"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":"uint256[]","name":"_ids","type":"uint256[]"},{"components":[{"internalType":"enum TreasureCategory","name":"category","type":"uint8"},{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint32","name":"craftingBreakOdds","type":"uint32"},{"internalType":"bool","name":"isMintable","type":"bool"},{"internalType":"uint256","name":"consumableIdDropWhenBreak","type":"uint256"}],"internalType":"struct TreasureMetadata[]","name":"_metadatas","type":"tuple[]"}],"name":"setMetadataForIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_shouldPause","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611955806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80637498e03f116100a25780639c54df64116100715780639c54df641461021c578063bedb86fb1461022f578063ed4706d414610242578063f2fde38b14610262578063fd1a00ff1461027557600080fd5b80637498e03f146101d35780638129fc1c146101e65780638da5cb5b146101ee578063940a228a1461020957600080fd5b8063580364e0116100de578063580364e01461019a5780635c975abb146101ad57806370480275146101b8578063715018a6146101cb57600080fd5b80631785f53c1461011057806324d7806c14610125578063377e11e0146101665780634e76bac414610179575b600080fd5b61012361011e3660046113ac565b61029f565b005b6101516101333660046113ac565b6001600160a01b031660009081526097602052604090205460ff1690565b60405190151581526020015b60405180910390f35b610123610174366004611421565b6102f3565b61018c610187366004611472565b610394565b60405190815260200161015d565b61018c6101a83660046114ab565b610402565b60655460ff16610151565b6101236101c63660046113ac565b610500565b61012361054e565b61018c6101e1366004611472565b610584565b6101236105f9565b6033546040516001600160a01b03909116815260200161015d565b6101236102173660046114ec565b610673565b61012361022a366004611421565b610b6f565b61012361023d366004611594565b610c0b565b6102556102503660046115b1565b610c83565b60405161015d91906115e0565b6101236102703660046113ac565b610d82565b6101516102833660046115b1565b600090815260cb6020526040902054610100900460ff16151590565b6033546001600160a01b031633146102d25760405162461bcd60e51b81526004016102c990611642565b60405180910390fd5b6001600160a01b03166000908152609760205260409020805460ff19169055565b6033546001600160a01b0316331461031d5760405162461bcd60e51b81526004016102c990611642565b60005b8181101561038f5760006097600085858581811061034057610340611677565b905060200201602081019061035591906113ac565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610387816116a3565b915050610320565b505050565b60ff8216600090815260cd6020526040812081906103b190610e1a565b9050600081116103d35760405162461bcd60e51b81526004016102c9906116be565b6103f86103e0828561170e565b60ff8616600090815260cd6020526040902090610e24565b9150505b92915050565b60ff8316600090815260cc602052604081208190610451908286600581111561042d5761042d6115ca565b600581111561043e5761043e6115ca565b8152602001908152602001600020610e37565b905060008151116104ca5760405162461bcd60e51b815260206004820152603d60248201527f54726561737572654d6574616461746153746f72653a204e6f2049447320617660448201527f61696c61626c6520666f72207469657220616e642063617465676f727900000060648201526084016102c9565b60008151846104d9919061170e565b90508181815181106104ed576104ed611677565b6020026020010151925050509392505050565b6033546001600160a01b0316331461052a5760405162461bcd60e51b81526004016102c990611642565b6001600160a01b03166000908152609760205260409020805460ff19166001179055565b6033546001600160a01b031633146105785760405162461bcd60e51b81526004016102c990611642565b6105826000610e44565b565b60ff8216600090815260ca6020526040812081906105a190610e37565b905060008151116105c45760405162461bcd60e51b81526004016102c9906116be565b60008151846105d3919061170e565b90508181815181106105e7576105e7611677565b60200260200101519250505092915050565b600054610100900460ff166106145760005460ff1615610618565b303b155b6106345760405162461bcd60e51b81526004016102c990611730565b600054610100900460ff16158015610656576000805461ffff19166101011790555b61065e610e96565b8015610670576000805461ff00191690555b50565b3360009081526097602052604090205460ff16806106945750610694610efb565b6106d55760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b60448201526064016102c9565b826107115760405162461bcd60e51b815260206004820152600c60248201526b27379024a2399033b4bb32b760a11b60448201526064016102c9565b82811461074e5760405162461bcd60e51b815260206004820152600b60248201526a426164206c656e6774687360a81b60448201526064016102c9565b60005b83811015610b6857600083838381811061076d5761076d611677565b905060a002016020016020810190610785919061177e565b60ff16116107c05760405162461bcd60e51b81526020600482015260086024820152672130b2103a34b2b960c11b60448201526064016102c9565b600060cb60008787858181106107d8576107d8611677565b602090810292909201358352508101919091526040908101600020815160a081019092528054829060ff166005811115610814576108146115ca565b6005811115610825576108256115ca565b8152815460ff6101008204811660208085019190915263ffffffff62010000840416604085015266010000000000009092048116151560608401526001909301546080909201919091528201519192501615610975576108b286868481811061089057610890611677565b60208581015160ff16600090815260cd82526040902093910201359050610f1f565b50806060015115610975576108f48686848181106108d2576108d2611677565b60208581015160ff16600090815260ca82526040902093910201359050610f1f565b5061097386868481811061090a5761090a611677565b9050602002013560cc6000846020015160ff1660ff168152602001908152602001600020600084600001516005811115610946576109466115ca565b6005811115610957576109576115ca565b8152602001908152602001600020610f1f90919063ffffffff16565b505b83838381811061098757610987611677565b905060a0020160cb60008888868181106109a3576109a3611677565b90506020020135815260200190815260200160002081816109c491906117be565b905050610a2a8686848181106109dc576109dc611677565b9050602002013560cd60008787878181106109f9576109f9611677565b905060a002016020016020810190610a11919061177e565b60ff168152602081019190915260400160002090610f2b565b50838383818110610a3d57610a3d611677565b905060a002016060016020810190610a559190611594565b15610b5557610a8c868684818110610a6f57610a6f611677565b9050602002013560ca60008787878181106109f9576109f9611677565b50610b53868684818110610aa257610aa2611677565b9050602002013560cc6000878787818110610abf57610abf611677565b905060a002016020016020810190610ad7919061177e565b60ff1660ff1681526020019081526020016000206000878787818110610aff57610aff611677565b610b1592602060a090920201908101915061188a565b6005811115610b2657610b266115ca565b6005811115610b3757610b376115ca565b8152602001908152602001600020610f2b90919063ffffffff16565b505b5080610b60816116a3565b915050610751565b5050505050565b6033546001600160a01b03163314610b995760405162461bcd60e51b81526004016102c990611642565b60005b8181101561038f57600160976000858585818110610bbc57610bbc611677565b9050602002016020810190610bd191906113ac565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c03816116a3565b915050610b9c565b3360009081526097602052604090205460ff1680610c2c5750610c2c610efb565b610c6d5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b60448201526064016102c9565b8015610c7b57610670610f37565b610670610fcf565b6040805160a081018252600080825260208201819052918101829052606081018290526080810191909152600082815260cb6020526040808220815160a081019092528054829060ff166005811115610cde57610cde6115ca565b6005811115610cef57610cef6115ca565b8152815460ff6101008204811660208085019190915263ffffffff6201000084041660408501526601000000000000909204811615156060840152600190930154608090920191909152820151919250166103fc5760405162461bcd60e51b815260206004820152601360248201527227379036b2ba30b230ba30903337b91024a21760691b60448201526064016102c9565b6033546001600160a01b03163314610dac5760405162461bcd60e51b81526004016102c990611642565b6001600160a01b038116610e115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102c9565b61067081610e44565b60006103fc825490565b6000610e308383611049565b9392505050565b60606000610e3083611073565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610eb15760005460ff1615610eb5565b303b155b610ed15760405162461bcd60e51b81526004016102c990611730565b600054610100900460ff16158015610ef3576000805461ffff19166101011790555b61065e6110cf565b600033610f106033546001600160a01b031690565b6001600160a01b031614905090565b6000610e308383611134565b6000610e308383611227565b60655460ff1615610f7d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016102c9565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb23390565b6040516001600160a01b03909116815260200160405180910390a1565b60655460ff166110185760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016102c9565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33610fb2565b600082600001828154811061106057611060611677565b9060005260206000200154905092915050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156110c357602002820191906000526020600020905b8154815260200190600101908083116110af575b50505050509050919050565b600054610100900460ff166110ea5760005460ff16156110ee565b303b155b61110a5760405162461bcd60e51b81526004016102c990611730565b600054610100900460ff1615801561112c576000805461ffff19166101011790555b61065e611276565b6000818152600183016020526040812054801561121d5760006111586001836118a7565b855490915060009061116c906001906118a7565b90508181146111d157600086600001828154811061118c5761118c611677565b90600052602060002001549050808760000184815481106111af576111af611677565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806111e2576111e26118be565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506103fc565b60009150506103fc565b600081815260018301602052604081205461126e575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556103fc565b5060006103fc565b600054610100900460ff166112915760005460ff1615611295565b303b155b6112b15760405162461bcd60e51b81526004016102c990611730565b600054610100900460ff161580156112d3576000805461ffff19166101011790555b6112db6112eb565b6112e361131a565b61065e610f37565b600054610100900460ff166113125760405162461bcd60e51b81526004016102c9906118d4565b610582611349565b600054610100900460ff166113415760405162461bcd60e51b81526004016102c9906118d4565b610582611379565b600054610100900460ff166113705760405162461bcd60e51b81526004016102c9906118d4565b61058233610e44565b600054610100900460ff166113a05760405162461bcd60e51b81526004016102c9906118d4565b6065805460ff19169055565b6000602082840312156113be57600080fd5b81356001600160a01b0381168114610e3057600080fd5b60008083601f8401126113e757600080fd5b50813567ffffffffffffffff8111156113ff57600080fd5b6020830191508360208260051b850101111561141a57600080fd5b9250929050565b6000806020838503121561143457600080fd5b823567ffffffffffffffff81111561144b57600080fd5b611457858286016113d5565b90969095509350505050565b60ff8116811461067057600080fd5b6000806040838503121561148557600080fd5b823561149081611463565b946020939093013593505050565b6006811061067057600080fd5b6000806000606084860312156114c057600080fd5b83356114cb81611463565b925060208401356114db8161149e565b929592945050506040919091013590565b6000806000806040858703121561150257600080fd5b843567ffffffffffffffff8082111561151a57600080fd5b611526888389016113d5565b9096509450602087013591508082111561153f57600080fd5b818701915087601f83011261155357600080fd5b81358181111561156257600080fd5b88602060a08302850101111561157757600080fd5b95989497505060200194505050565b801515811461067057600080fd5b6000602082840312156115a657600080fd5b8135610e3081611586565b6000602082840312156115c357600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b815160a08201906006811061160557634e487b7160e01b600052602160045260246000fd5b8083525060ff602084015116602083015263ffffffff60408401511660408301526060830151151560608301526080830151608083015292915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156116b7576116b761168d565b5060010190565b60208082526030908201527f54726561737572654d6574616461746153746f72653a204e6f2049447320617660408201526f30b4b630b13632903337b9103a34b2b960811b606082015260800190565b60008261172b57634e487b7160e01b600052601260045260246000fd5b500690565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60006020828403121561179057600080fd5b8135610e3081611463565b6000813563ffffffff811681146103fc57600080fd5b600081356103fc81611586565b81356117c98161149e565b600681106117e757634e487b7160e01b600052602160045260246000fd5b815460ff821691508160ff198216178355602084013561180681611463565b61ff008160081b168361ffff1984161717845550505061184961182b6040840161179b565b825465ffffffff0000191660109190911b65ffffffff000016178255565b61187c611858606084016117b1565b82805466ff000000000000191691151560301b66ff00000000000016919091179055565b608082013560018201555050565b60006020828403121561189c57600080fd5b8135610e308161149e565b6000828210156118b9576118b961168d565b500390565b634e487b7160e01b600052603160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea26469706673582212200dfb68a542df6b16410f9d3b75785a3013ce1d7c3716d99e7ec234f237e4d67c64736f6c63430008090033

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.