Contract 0x8f5e05cefb10bdb56a3d495685a425a8652bde14

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x73c1d5df3a48eb5a5eafb2795c51b52d811b52bf3fd21e8901d54234288113d60x6080604077184202022-03-11 2:41:31273 days 16 hrs ago0xb013abd83f0bd173e9f14ce7d6e420ad711483b4 IN  Create: StarlightTemple0 ETH0.010824413603 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x3e3a83a5568e6652d055971662b42dcc6d18a918858238af828aa4119ec82cdd449082862022-12-09 18:01:3545 mins ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x7570583a3e8e83a2f263d9a043a2cafdef6af48854da17aa735436d8c4d75670448043712022-12-09 9:07:429 hrs 39 mins ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xd92ee263dae4610c1bf4b418e188a289dceba7d6135d5ba5bfd4184b63789839447872842022-12-09 7:29:0511 hrs 17 mins ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x8b3d2ed886dab31b3d67602d660e4cde1608d318b54ac16451870253e0f8f06c447869722022-12-09 7:27:2611 hrs 19 mins ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x3f29a140ce97997d9062f49eecf1e3830cf051ec561d28047fe8e75ccb178df4447635472022-12-09 5:02:3913 hrs 44 mins ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x448a4458edfa5aa7355fa6509f6d9047d0d62b5ac255c74a4b6c0047cf906c66447084822022-12-08 22:20:1020 hrs 26 mins ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xa914d2fc61a55ee5e8f7425faf843057ceeb7049984a8f5f182881f64c5fdb6c446578352022-12-08 17:35:021 day 1 hr ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x2b58a000e2bcf42b3e7cec0844f81600d093fd3b0b4178934e1cc2ff7feb0406446098532022-12-08 13:44:551 day 5 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x7ae4097d62bdbe2598554c6dda617f2388d6fba4ea7e26ed86d741e66db25484445546572022-12-08 8:59:561 day 9 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xa484369ca4709d8e5ab14fca208957bc12d245f7b48b3d823c918a34a997d7f0445545152022-12-08 8:59:121 day 9 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x756600ffcac8767a53c870b5d31431be818427bf650d5c2b346222c3de7d76db444609942022-12-07 22:56:201 day 19 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xd187cb241f690e4cca316c66648786ce5b5da48daf39b8d890c5f5ed6dbd351c443928202022-12-07 16:35:312 days 2 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xfe94e4108e91303e9fe5c76e3acf03a6655fb84bfbfa4ef0b94ae376cd642408443360422022-12-07 11:57:552 days 6 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x68012cd0b1457a00bbad3a4c6922e64f91c7df8c7a8c68276b7e636c9aec82bd442580922022-12-07 5:08:522 days 13 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xab6ed14609782b7e22400917a7a317fa5727ecf895e88af7df79b37f402b19b8442221642022-12-07 1:03:102 days 17 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x53208f086b52535a98fffa8fa67ca5ea0a0d53f9de1b6838eba6d72e3e25d029441996472022-12-06 22:33:532 days 20 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x80da84984dd5e330664d650c58cb1c3789596f7e4e2323c2484f19b056561d43441994262022-12-06 22:32:382 days 20 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xb8508e0d23c103a1a523a9a3bf15f7f8e92ae45aa57e35c3a76b82db1566eeb1441991552022-12-06 22:31:012 days 20 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x335cd0ab75077b32077ae718b0fc5bdeaec572916226373a320b441e036b43fb441974032022-12-06 22:20:402 days 20 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xcad7244468c41402b839a5f8a613fcf04d270bba66af52f7276b17eaf51ee417441972252022-12-06 22:19:442 days 20 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x55c1b14cffbaf3f0806a8250e63d4e60c1c8f55badec49bf7baa39cd1206c2dc441305742022-12-06 16:49:473 days 1 hr ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xf3be3fb378a9ecd205d514550fa147661f7a50b752f5d06370033778bd17cfa5441240402022-12-06 16:21:133 days 2 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x79b80e07fab67502e7ad071263915a0dbc3dfda6fccde231ab57abd2c8c5c4a6441114532022-12-06 15:25:263 days 3 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0xb056d2c7f35cf0ff57c50b8b4519428668608db9a8173334bd2f297b471850b1441101772022-12-06 15:19:583 days 3 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
0x9101174b2f8b6bdbee443515aa3ef27c1d1c822b30260ab83973c69d0d86fde7441061832022-12-06 15:02:463 days 3 hrs ago 0x6ac94b1093d34f5c520688840689354c9248365f 0x8f5e05cefb10bdb56a3d495685a425a8652bde140 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StarlightTemple

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 26 : StarlightTemple.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import "./StarlightTempleContracts.sol";

contract StarlightTemple is Initializable, StarlightTempleContracts {

    function initialize() external initializer {
        StarlightTempleContracts.__StarlightTempleContracts_init();
    }

    function setTempleSettings(
        uint8 _maxConstellationRank,
        uint256 _starlightConsumableId,
        uint256[] calldata _currentRankToNeededStarlight,
        uint256[] calldata _currentRankToPrismAmount,
        uint256[] calldata _currentRankToPrismIds)
    external onlyAdminOrOwner
    {
        require(_currentRankToNeededStarlight.length == _maxConstellationRank
            && _maxConstellationRank == _currentRankToPrismAmount.length
            && _maxConstellationRank == _currentRankToPrismIds.length, "Starlight length must match max");
        maxConstellationRank = _maxConstellationRank;
        starlightConsumableId = _starlightConsumableId;
        delete currentRankToNeededStarlight;
        delete currentRankToPrismAmount;
        delete currentRankToPrismId;
        for(uint256 i = 0; i < _currentRankToNeededStarlight.length; i++) {
            currentRankToNeededStarlight.push(_currentRankToNeededStarlight[i]);
            currentRankToPrismAmount.push(_currentRankToPrismAmount[i]);
            currentRankToPrismId.push(_currentRankToPrismIds[i]);
        }
    }

    function setIsIncreasingRankPaused(bool _isIncreasingRankPaused) external onlyAdminOrOwner {
        isIncreasingRankPaused = _isIncreasingRankPaused;
    }

    function increaseRankOfConstellations(
        uint256[] calldata _tokenIds,
        Constellation[] calldata _constellations)
    external
    onlyEOA
    whenNotPaused
    nonZeroLength(_tokenIds)
    {
        require(_tokenIds.length == _constellations.length, "StarlightTemple: Bad array lengths");

        for(uint256 i = 0; i < _tokenIds.length; i++) {
            _increaseRankOfConstellation(_tokenIds[i], _constellations[i]);
        }
    }

    function _increaseRankOfConstellation(
        uint256 _tokenId,
        Constellation _constellation)
    private
    {
        require(starlightConsumableId > 0, "StarlightTemple: Bad starlight ID");
        require(msg.sender == legion.ownerOf(_tokenId), "StarlightTemple: Must be owner");
        require(!isIncreasingRankPaused, "StarlightTemple: Increasing rank is paused");

        LegionMetadata memory _metadata = legionMetadataStore.metadataForLegion(_tokenId);
        require(_metadata.legionGeneration != LegionGeneration.RECRUIT, "Cannot increase recruit rank");

        uint8 _currentRank = _metadata.constellationRanks[uint8(_constellation)];
        require(_currentRank < maxConstellationRank, "Already max constellation rank.");

        legionMetadataStore.increaseConstellationRank(_tokenId, _constellation, _currentRank + 1);

        uint256 _starlightCost = currentRankToNeededStarlight[_currentRank];
        // Will revert if failed. Send to treasury
        consumable.adminSafeTransferFrom(msg.sender, address(treasury), starlightConsumableId, _starlightCost);

        uint256 _prismAmount = currentRankToPrismAmount[_currentRank];
        uint256 _prismId = currentRankToPrismId[_currentRank];

        if(_prismAmount > 0 && _prismId > 0) {
            consumable.adminSafeTransferFrom(msg.sender, address(treasury), _prismId, _prismAmount);
        }
    }

    function maxRankOfConstellations(
        uint256 _tokenId,
        uint8 _numberOfConstellations)
    external
    onlyAdminOrOwner
    whenNotPaused
    {
        uint8 _maxConstellation = numberOfConstellations();
        require(_numberOfConstellations <= _maxConstellation, "Bad number to max");

        for(uint256 i = 0; i < _numberOfConstellations; i++) {
            legionMetadataStore.increaseConstellationRank(_tokenId, Constellation(i), maxConstellationRank);
        }
    }

    function allConstellations() public pure returns(Constellation[6] memory) {
        return [
            Constellation.FIRE,
            Constellation.EARTH,
            Constellation.WIND,
            Constellation.WATER,
            Constellation.LIGHT,
            Constellation.DARK
        ];
    }

    function numberOfConstellations() public pure returns(uint8) {
        return 6;
    }
}

File 2 of 26 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [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 26 : StarlightTempleContracts.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import "./StarlightTempleState.sol";

abstract contract StarlightTempleContracts is Initializable, StarlightTempleState {

    function __StarlightTempleContracts_init() internal initializer {
        StarlightTempleState.__StarlightTempleState_init();
    }

    function setContracts(
        address _randomizerAddress,
        address _legionMetadataStoreAddress,
        address _consumableAddress,
        address _legionAddress,
        address _treasuryAddress)
    external onlyAdminOrOwner
    {
        randomizer = IRandomizer(_randomizerAddress);
        legionMetadataStore = ILegionMetadataStore(_legionMetadataStoreAddress);
        consumable = IConsumable(_consumableAddress);
        legion = ILegion(_legionAddress);
        treasury = ITreasury(_treasuryAddress);
    }

    modifier contractsAreSet() {
        require(address(randomizer) != address(0)
            && address(consumable) != address(0)
            && address(legion) != address(0)
            && address(treasury) != address(0)
            && address(legionMetadataStore) != address(0), "Contracts aren't set");

        _;
    }
}

File 4 of 26 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @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 5 of 26 : StarlightTempleState.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import "../../shared/randomizer/IRandomizer.sol";
import "./IStarlightTemple.sol";
import "../../shared/AdminableUpgradeable.sol";
import "../legionmetadatastore/ILegionMetadataStore.sol";
import "../external/ITreasure.sol";
import "../legion/ILegion.sol";
import "../treasury/ITreasury.sol";
import "../consumable/IConsumable.sol";

abstract contract StarlightTempleState is Initializable, IStarlightTemple, ERC1155HolderUpgradeable, AdminableUpgradeable {

    IRandomizer public randomizer;
    ILegionMetadataStore public legionMetadataStore;
    IConsumable public consumable;
    ILegion public legion;
    ITreasury public treasury;

    uint8 public maxConstellationRank;
    uint256[] public currentRankToNeededStarlight;
    uint256 public starlightConsumableId;

    uint256[] public currentRankToPrismAmount;
    uint256[] public currentRankToPrismId;

    bool public isIncreasingRankPaused;

    function __StarlightTempleState_init() internal initializer {
        AdminableUpgradeable.__Adminable_init();
        ERC1155HolderUpgradeable.__ERC1155Holder_init();

        maxConstellationRank = 7;

        currentRankToNeededStarlight.push(25);
        currentRankToNeededStarlight.push(38);
        currentRankToNeededStarlight.push(56);
        currentRankToNeededStarlight.push(84);
        currentRankToNeededStarlight.push(127);
        currentRankToNeededStarlight.push(190);
        currentRankToNeededStarlight.push(285);

        currentRankToPrismAmount.push(0);
        currentRankToPrismAmount.push(1);
        currentRankToPrismAmount.push(2);
        currentRankToPrismAmount.push(3);
        currentRankToPrismAmount.push(1);
        currentRankToPrismAmount.push(2);
        currentRankToPrismAmount.push(1);

        currentRankToPrismId.push(0);
        currentRankToPrismId.push(1);
        currentRankToPrismId.push(1);
        currentRankToPrismId.push(1);
        currentRankToPrismId.push(2);
        currentRankToPrismId.push(2);
        currentRankToPrismId.push(3);
    }
}

File 6 of 26 : ERC1155HolderUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
contract ERC1155HolderUpgradeable is Initializable, ERC1155ReceiverUpgradeable {
    function __ERC1155Holder_init() internal onlyInitializing {
        __ERC165_init_unchained();
        __ERC1155Receiver_init_unchained();
        __ERC1155Holder_init_unchained();
    }

    function __ERC1155Holder_init_unchained() internal onlyInitializing {
    }
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
    uint256[50] private __gap;
}

File 7 of 26 : IRandomizer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IRandomizer {

    // Sets the number of blocks that must pass between increment the commitId and seeding the random
    // Admin
    function setNumBlocksAfterIncrement(uint8 _numBlocksAfterIncrement) external;

    // Increments the commit id.
    // Admin
    function incrementCommitId() external;

    // Adding the random number needs to be done AFTER incrementing the commit id on a separate transaction. If
    // these are done together, there is a potential vulnerability to front load a commit when the bad actor
    // sees the value of the random number.
    function addRandomForCommit(uint256 _seed) external;

    // Returns a request ID for a random number. This is unique.
    function requestRandomNumber() external returns(uint256);

    // Returns the random number for the given request ID. Will revert
    // if the random is not ready.
    function revealRandomNumber(uint256 _requestId) external view returns(uint256);

    // Returns if the random number for the given request ID is ready or not. Call
    // before calling revealRandomNumber.
    function isRandomReady(uint256 _requestId) external view returns(bool);
}

File 8 of 26 : IStarlightTemple.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStarlightTemple {

    // Increases a specific number of constellations to the max rank
    //
    function maxRankOfConstellations(uint256 _tokenId, uint8 _numberOfConstellations) external;
}

File 9 of 26 : 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 10 of 26 : ILegionMetadataStore.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./LegionMetadataStoreState.sol";

interface ILegionMetadataStore {
    // Sets the intial metadata for a token id.
    // Admin only.
    function setInitialMetadataForLegion(address _owner, uint256 _tokenId, LegionGeneration _generation, LegionClass _class, LegionRarity _rarity, uint256 _oldId) external;

    // Increases the quest level by one. It is up to the calling contract to regulate the max quest level. No validation.
    // Admin only.
    function increaseQuestLevel(uint256 _tokenId) external;

    // Increases the craft level by one. It is up to the calling contract to regulate the max craft level. No validation.
    // Admin only.
    function increaseCraftLevel(uint256 _tokenId) external;

    // Increases the rank of the given constellation to the given number. It is up to the calling contract to regulate the max constellation rank. No validation.
    // Admin only.
    function increaseConstellationRank(uint256 _tokenId, Constellation _constellation, uint8 _to) external;

    // Returns the metadata for the given legion.
    function metadataForLegion(uint256 _tokenId) external view returns(LegionMetadata memory);

    // Returns the tokenUri for the given token.
    function tokenURI(uint256 _tokenId) external view returns(string memory);
}

// As this will likely change in the future, this should not be used to store state, but rather
// as parameters and return values from functions.
struct LegionMetadata {
    LegionGeneration legionGeneration;
    LegionClass legionClass;
    LegionRarity legionRarity;
    uint8 questLevel;
    uint8 craftLevel;
    uint8[6] constellationRanks;
    uint256 oldId;
}

enum Constellation {
    FIRE,
    EARTH,
    WIND,
    WATER,
    LIGHT,
    DARK
}

enum LegionRarity {
    LEGENDARY,
    RARE,
    SPECIAL,
    UNCOMMON,
    COMMON,
    RECRUIT
}

enum LegionClass {
    RECRUIT,
    SIEGE,
    FIGHTER,
    ASSASSIN,
    RANGED,
    SPELLCASTER,
    RIVERMAN,
    NUMERAIRE,
    ALL_CLASS,
    ORIGIN
}

enum LegionGeneration {
    GENESIS,
    AUXILIARY,
    RECRUIT
}

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

interface ITreasure {
    // Transfers the treasure at the given ID of the given amount.
    // Requires that the legions are pre-approved.
    //
    function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _amounts, bytes memory data) external;

    // Transfers the treasure at the given ID of the given amount.
    //
    function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes memory data) external;

    // Admin only.
    //
    function mint(address _account, uint256 _tokenId, uint256 _amount) external;
}

File 12 of 26 : ILegion.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol";

interface ILegion is IERC721MetadataUpgradeable {

    // Mints a legion to the given address. Returns the token ID.
    // Admin only.
    function safeMint(address _to) external returns(uint256);

    // Sets the URI for the given token id. Token must exist.
    // Admin only.
    function setTokenURI(uint256 _tokenId, string calldata _tokenURI) external;

    // Transfers the token to the given address. Does not need approval. _from still must be the owner of the token.
    // Admin only.
    function adminSafeTransferFrom(address _from, address _to, uint256 _tokenId) external;
}

File 13 of 26 : ITreasury.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ITreasury {

    function isBridgeWorldPowered() external view returns(bool);

    function forwardCoinsToMine(uint256 _totalMagicSent) external;
}

File 14 of 26 : IConsumable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

interface IConsumable 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 26 : ERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155ReceiverUpgradeable is Initializable, ERC165Upgradeable, IERC1155ReceiverUpgradeable {
    function __ERC1155Receiver_init() internal onlyInitializing {
        __ERC165_init_unchained();
        __ERC1155Receiver_init_unchained();
    }

    function __ERC1155Receiver_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
        return interfaceId == type(IERC1155ReceiverUpgradeable).interfaceId || super.supportsInterface(interfaceId);
    }
    uint256[50] private __gap;
}

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

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

File 17 of 26 : 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 {
        __ERC165_init_unchained();
    }

    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;
    }
    uint256[50] private __gap;
}

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

File 20 of 26 : 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 {
        __Context_init_unchained();
        __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);
    }
    uint256[49] private __gap;
}

File 21 of 26 : 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 {
        __Context_init_unchained();
        __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());
    }
    uint256[49] private __gap;
}

File 22 of 26 : 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 {
        __Context_init_unchained();
    }

    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;
    }
    uint256[50] private __gap;
}

File 23 of 26 : LegionMetadataStoreState.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

import "../../shared/AdminableUpgradeable.sol";
import "./ILegionMetadataStore.sol";

abstract contract LegionMetadataStoreState is Initializable, AdminableUpgradeable {

    event LegionQuestLevelUp(uint256 indexed _tokenId, uint8 _questLevel);
    event LegionCraftLevelUp(uint256 indexed _tokenId, uint8 _craftLevel);
    event LegionConstellationRankUp(uint256 indexed _tokenId, Constellation indexed _constellation, uint8 _rank);
    event LegionCreated(address indexed _owner, uint256 indexed _tokenId, LegionGeneration _generation, LegionClass _class, LegionRarity _rarity);

    mapping(uint256 => LegionGeneration) internal idToGeneration;
    mapping(uint256 => LegionClass) internal idToClass;
    mapping(uint256 => LegionRarity) internal idToRarity;
    mapping(uint256 => uint256) internal idToOldId;
    mapping(uint256 => uint8) internal idToQuestLevel;
    mapping(uint256 => uint8) internal idToCraftLevel;
    mapping(uint256 => uint8[6]) internal idToConstellationRanks;

    mapping(LegionGeneration => mapping(LegionClass => mapping(LegionRarity => mapping(uint256 => string)))) internal _genToClassToRarityToOldIdToUri;

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

File 24 of 26 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

File 25 of 26 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 26 of 26 : 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;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "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":[],"name":"allConstellations","outputs":[{"internalType":"enum Constellation[6]","name":"","type":"uint8[6]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"consumable","outputs":[{"internalType":"contract IConsumable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentRankToNeededStarlight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentRankToPrismAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"currentRankToPrismId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"enum Constellation[]","name":"_constellations","type":"uint8[]"}],"name":"increaseRankOfConstellations","outputs":[],"stateMutability":"nonpayable","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":"isIncreasingRankPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legion","outputs":[{"internalType":"contract ILegion","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legionMetadataStore","outputs":[{"internalType":"contract ILegionMetadataStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxConstellationRank","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint8","name":"_numberOfConstellations","type":"uint8"}],"name":"maxRankOfConstellations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numberOfConstellations","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"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":[],"name":"randomizer","outputs":[{"internalType":"contract IRandomizer","name":"","type":"address"}],"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":"_randomizerAddress","type":"address"},{"internalType":"address","name":"_legionMetadataStoreAddress","type":"address"},{"internalType":"address","name":"_consumableAddress","type":"address"},{"internalType":"address","name":"_legionAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isIncreasingRankPaused","type":"bool"}],"name":"setIsIncreasingRankPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_shouldPause","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxConstellationRank","type":"uint8"},{"internalType":"uint256","name":"_starlightConsumableId","type":"uint256"},{"internalType":"uint256[]","name":"_currentRankToNeededStarlight","type":"uint256[]"},{"internalType":"uint256[]","name":"_currentRankToPrismAmount","type":"uint256[]"},{"internalType":"uint256[]","name":"_currentRankToPrismIds","type":"uint256[]"}],"name":"setTempleSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"starlightConsumableId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50612349806100206000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80639bcb1fef1161010f578063d7dfe4dd116100a2578063f2fde38b11610071578063f2fde38b14610472578063f63bf8bd14610485578063f746b0e714610498578063f94b2c86146104ab57600080fd5b8063d7dfe4dd14610418578063dd489d9a1461042c578063f10fb5841461043f578063f23a6e611461045357600080fd5b8063bb27b352116100de578063bb27b352146103b8578063bc197c81146103bf578063bedb86fb146103f7578063c1eddf911461040a57600080fd5b80639bcb1fef146103655780639c54df6414610386578063b385781b14610399578063ba175bbe146103a357600080fd5b8063675857eb11610187578063725b69af11610156578063725b69af146103115780638129fc1c146103385780638a7bf804146103405780638da5cb5b1461035457600080fd5b8063675857eb146102cf5780636d75894b146102e357806370480275146102f6578063715018a61461030957600080fd5b80632e60be5b116101c35780632e60be5b14610272578063377e11e0146102855780635c975abb1461029857806361d027b3146102a357600080fd5b806301ffc9a7146101f557806314023c221461021d5780631785f53c1461023257806324d7806c14610245575b600080fd5b6102086102033660046119fb565b6104be565b60405190151581526020015b60405180910390f35b61023061022b366004611a3b565b6104f5565b005b610230610240366004611a80565b610657565b610208610253366004611a80565b6001600160a01b0316600090815261012d602052604090205460ff1690565b610230610280366004611ae9565b6106a3565b610230610293366004611b55565b61083e565b60fb5460ff16610208565b610164546102b7906001600160a01b031681565b6040516001600160a01b039091168152602001610214565b610163546102b7906001600160a01b031681565b6102306102f1366004611b97565b6108e0565b610230610304366004611a80565b610a9f565b610230610aee565b6101645461032690600160a01b900460ff1681565b60405160ff9091168152602001610214565b610230610b24565b610161546102b7906001600160a01b031681565b60c9546001600160a01b03166102b7565b610378610373366004611c4d565b610b9e565b604051908152602001610214565b610230610394366004611b55565b610bc0565b6103786101665481565b6103ab610c5d565b6040516102149190611c9e565b6006610326565b6103de6103cd366004611e37565b63bc197c8160e01b95945050505050565b6040516001600160e01b03199091168152602001610214565b610230610405366004611ee5565b610c9d565b610169546102089060ff1681565b610162546102b7906001600160a01b031681565b61023061043a366004611ee5565b610cf1565b610160546102b7906001600160a01b031681565b6103de610461366004611f07565b63f23a6e6160e01b95945050505050565b610230610480366004611a80565b610d43565b610230610493366004611f70565b610ddb565b6103786104a6366004611c4d565b610e7d565b6103786104b9366004611c4d565b610e8e565b60006001600160e01b03198216630271189760e51b14806104ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b33600090815261012d602052604090205460ff16806105175750610517610e9f565b61053c5760405162461bcd60e51b815260040161053390611fe1565b60405180910390fd5b60fb5460ff161561055f5760405162461bcd60e51b81526004016105339061200d565b600660ff82168110156105a85760405162461bcd60e51b8152602060048201526011602482015270084c2c840dceadac4cae440e8de40dac2f607b1b6044820152606401610533565b60005b8260ff1681101561065157610161546001600160a01b031663439c0ff7858360058111156105db576105db611c66565b6101645460405160e085901b6001600160e01b031916815261060c939291600160a01b900460ff1690600401612037565b600060405180830381600087803b15801561062657600080fd5b505af115801561063a573d6000803e3d6000fd5b50505050808061064990612072565b9150506105ab565b50505050565b60c9546001600160a01b031633146106815760405162461bcd60e51b81526004016105339061208d565b6001600160a01b0316600090815261012d60205260409020805460ff19169055565b3332146106e15760405162461bcd60e51b815260206004820152600c60248201526b4e6f20636f6e74726163747360a01b6044820152606401610533565b60fb5460ff16156107045760405162461bcd60e51b81526004016105339061200d565b8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505082511515915061077790505760405162461bcd60e51b815260206004820152600b60248201526a456d70747920617272617960a81b6044820152606401610533565b8382146107d15760405162461bcd60e51b815260206004820152602260248201527f537461726c6967687454656d706c653a20426164206172726179206c656e6774604482015261687360f01b6064820152608401610533565b60005b84811015610836576108248686838181106107f1576107f16120c2565b9050602002013585858481811061080a5761080a6120c2565b905060200201602081019061081f91906120e5565b610ec3565b8061082e81612072565b9150506107d4565b505050505050565b60c9546001600160a01b031633146108685760405162461bcd60e51b81526004016105339061208d565b60005b818110156108db57600061012d600085858581811061088c5761088c6120c2565b90506020020160208101906108a19190611a80565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806108d381612072565b91505061086b565b505050565b33600090815261012d602052604090205460ff16806109025750610902610e9f565b61091e5760405162461bcd60e51b815260040161053390611fe1565b60ff881685148015610932575060ff881683145b8015610940575060ff881681145b61098c5760405162461bcd60e51b815260206004820152601f60248201527f537461726c69676874206c656e677468206d757374206d61746368206d6178006044820152606401610533565b610164805460ff60a01b1916600160a01b60ff8b16021790556101668790556109b861016560006119a6565b6109c561016760006119a6565b6109d261016860006119a6565b60005b85811015610a94576101658787838181106109f2576109f26120c2565b83546001810185556000948552602094859020919094029290920135919092015550610167858583818110610a2957610a296120c2565b83546001810185556000948552602094859020919094029290920135919092015550610168838383818110610a6057610a606120c2565b8354600181018555600094855260209485902091909402929092013591909201555080610a8c81612072565b9150506109d5565b505050505050505050565b60c9546001600160a01b03163314610ac95760405162461bcd60e51b81526004016105339061208d565b6001600160a01b0316600090815261012d60205260409020805460ff19166001179055565b60c9546001600160a01b03163314610b185760405162461bcd60e51b81526004016105339061208d565b610b2260006113d0565b565b600054610100900460ff16610b3f5760005460ff1615610b43565b303b155b610b5f5760405162461bcd60e51b815260040161053390612102565b600054610100900460ff16158015610b81576000805461ffff19166101011790555b610b89611422565b8015610b9b576000805461ff00191690555b50565b6101678181548110610baf57600080fd5b600091825260209091200154905081565b60c9546001600160a01b03163314610bea5760405162461bcd60e51b81526004016105339061208d565b60005b818110156108db57600161012d6000858585818110610c0e57610c0e6120c2565b9050602002016020810190610c239190611a80565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c5581612072565b915050610bed565b610c656119c4565b6040805160c0810190915280600081526020016001815260200160028152602001600381526020016004815260200160059052919050565b33600090815261012d602052604090205460ff1680610cbf5750610cbf610e9f565b610cdb5760405162461bcd60e51b815260040161053390611fe1565b8015610ce957610b9b611487565b610b9b6114fc565b33600090815261012d602052604090205460ff1680610d135750610d13610e9f565b610d2f5760405162461bcd60e51b815260040161053390611fe1565b610169805460ff1916911515919091179055565b60c9546001600160a01b03163314610d6d5760405162461bcd60e51b81526004016105339061208d565b6001600160a01b038116610dd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610533565b610b9b816113d0565b33600090815261012d602052604090205460ff1680610dfd5750610dfd610e9f565b610e195760405162461bcd60e51b815260040161053390611fe1565b61016080546001600160a01b03199081166001600160a01b0397881617909155610161805482169587169590951790945561016280548516938616939093179092556101638054841691851691909117905561016480549092169216919091179055565b6101658181548110610baf57600080fd5b6101688181548110610baf57600080fd5b600033610eb460c9546001600160a01b031690565b6001600160a01b031614905090565b60006101665411610f205760405162461bcd60e51b815260206004820152602160248201527f537461726c6967687454656d706c653a2042616420737461726c6967687420496044820152601160fa1b6064820152608401610533565b610163546040516331a9108f60e11b8152600481018490526001600160a01b0390911690636352211e9060240160206040518083038186803b158015610f6557600080fd5b505afa158015610f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9d9190612150565b6001600160a01b0316336001600160a01b031614610ffd5760405162461bcd60e51b815260206004820152601e60248201527f537461726c6967687454656d706c653a204d757374206265206f776e657200006044820152606401610533565b6101695460ff16156110645760405162461bcd60e51b815260206004820152602a60248201527f537461726c6967687454656d706c653a20496e6372656173696e672072616e6b604482015269081a5cc81c185d5cd95960b21b6064820152608401610533565b610161546040516378afdef960e11b8152600481018490526000916001600160a01b03169063f15fbdf2906024016101806040518083038186803b1580156110ab57600080fd5b505afa1580156110bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e3919061220e565b90506002815160028111156110fa576110fa611c66565b14156111485760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f7420696e63726561736520726563727569742072616e6b000000006044820152606401610533565b60008160a0015183600581111561116157611161611c66565b60ff1660068110611174576111746120c2565b60200201516101645490915060ff600160a01b9091048116908216106111dc5760405162461bcd60e51b815260206004820152601f60248201527f416c7265616479206d617820636f6e7374656c6c6174696f6e2072616e6b2e006044820152606401610533565b610161546001600160a01b031663439c0ff785856111fb8560016122a3565b6040518463ffffffff1660e01b815260040161121993929190612037565b600060405180830381600087803b15801561123357600080fd5b505af1158015611247573d6000803e3d6000fd5b5050505060006101658260ff1681548110611264576112646120c2565b60009182526020909120015461016254610164546101665460405163a878b95d60e01b81523360048201526001600160a01b039283166024820152604481019190915260648101849052929350169063a878b95d90608401600060405180830381600087803b1580156112d657600080fd5b505af11580156112ea573d6000803e3d6000fd5b5050505060006101678360ff1681548110611307576113076120c2565b9060005260206000200154905060006101688460ff168154811061132d5761132d6120c2565b9060005260206000200154905060008211801561134a5750600081115b156113c757610162546101645460405163a878b95d60e01b81523360048201526001600160a01b039182166024820152604481018490526064810185905291169063a878b95d90608401600060405180830381600087803b1580156113ae57600080fd5b505af11580156113c2573d6000803e3d6000fd5b505050505b50505050505050565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661143d5760005460ff1615611441565b303b155b61145d5760405162461bcd60e51b815260040161053390612102565b600054610100900460ff1615801561147f576000805461ffff19166101011790555b610b89611576565b60fb5460ff16156114aa5760405162461bcd60e51b81526004016105339061200d565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114df3390565b6040516001600160a01b03909116815260200160405180910390a1565b60fb5460ff166115455760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610533565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336114df565b600054610100900460ff166115915760005460ff1615611595565b303b155b6115b15760405162461bcd60e51b815260040161053390612102565b600054610100900460ff161580156115d3576000805461ffff19166101011790555b6115db611795565b6115e36117fa565b610164805460ff60a01b1916600760a01b17905561016580546001818101835560197fd91ca5e44fa96a1732bfaed7fe33fc20ed69a9895cde1f18c7dcabca39d6a78b9283015582548082018455602690830155825480820184556038908301558254808201845560549083015582548082018455607f908301558254808201845560be90830155825480820190935561011d92909101919091556101678054808301825560007f025f925b23c02f7114773957b1a876f2af957c14a29118dc622648c445020dcf918201819055825480850184558201849055825480850184556002908301819055835480860185556003908401819055845480870186558401869055845480870186558401829055845480870190955593909201849055610168805480860182558183527f8077777ae4769de06cbfd1c0b8b1f653b51ec156d91a9aca16a4102f19e03d9e9081019290925580548086018255820185905580548086018255820185905580548086018255820185905580548086018255820183905580548086018255820192909255815493840190915591909101558015610b9b576000805461ff001916905550565b600054610100900460ff166117b05760005460ff16156117b4565b303b155b6117d05760405162461bcd60e51b815260040161053390612102565b600054610100900460ff161580156117f2576000805461ffff19166101011790555b610b89611839565b600054610100900460ff166118215760405162461bcd60e51b8152600401610533906122c8565b6118296118ae565b6118316118ae565b610b226118ae565b600054610100900460ff166118545760005460ff1615611858565b303b155b6118745760405162461bcd60e51b815260040161053390612102565b600054610100900460ff16158015611896576000805461ffff19166101011790555b61189e6118d5565b6118a661190c565b610b89611487565b600054610100900460ff16610b225760405162461bcd60e51b8152600401610533906122c8565b600054610100900460ff166118fc5760405162461bcd60e51b8152600401610533906122c8565b6119046118ae565b610b22611943565b600054610100900460ff166119335760405162461bcd60e51b8152600401610533906122c8565b61193b6118ae565b610b22611973565b600054610100900460ff1661196a5760405162461bcd60e51b8152600401610533906122c8565b610b22336113d0565b600054610100900460ff1661199a5760405162461bcd60e51b8152600401610533906122c8565b60fb805460ff19169055565b5080546000825590600052602060002090810190610b9b91906119e2565b6040518060c001604052806006906020820280368337509192915050565b5b808211156119f757600081556001016119e3565b5090565b600060208284031215611a0d57600080fd5b81356001600160e01b031981168114611a2557600080fd5b9392505050565b60ff81168114610b9b57600080fd5b60008060408385031215611a4e57600080fd5b823591506020830135611a6081611a2c565b809150509250929050565b6001600160a01b0381168114610b9b57600080fd5b600060208284031215611a9257600080fd5b8135611a2581611a6b565b60008083601f840112611aaf57600080fd5b50813567ffffffffffffffff811115611ac757600080fd5b6020830191508360208260051b8501011115611ae257600080fd5b9250929050565b60008060008060408587031215611aff57600080fd5b843567ffffffffffffffff80821115611b1757600080fd5b611b2388838901611a9d565b90965094506020870135915080821115611b3c57600080fd5b50611b4987828801611a9d565b95989497509550505050565b60008060208385031215611b6857600080fd5b823567ffffffffffffffff811115611b7f57600080fd5b611b8b85828601611a9d565b90969095509350505050565b60008060008060008060008060a0898b031215611bb357600080fd5b8835611bbe81611a2c565b975060208901359650604089013567ffffffffffffffff80821115611be257600080fd5b611bee8c838d01611a9d565b909850965060608b0135915080821115611c0757600080fd5b611c138c838d01611a9d565b909650945060808b0135915080821115611c2c57600080fd5b50611c398b828c01611a9d565b999c989b5096995094979396929594505050565b600060208284031215611c5f57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60068110611c9a57634e487b7160e01b600052602160045260246000fd5b9052565b60c08101818360005b6006811015611cce57611cbb838351611c7c565b6020928301929190910190600101611ca7565b50505092915050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715611d1057611d10611cd7565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611d3f57611d3f611cd7565b604052919050565b600082601f830112611d5857600080fd5b8135602067ffffffffffffffff821115611d7457611d74611cd7565b8160051b611d83828201611d16565b9283528481018201928281019087851115611d9d57600080fd5b83870192505b84831015611dbc57823582529183019190830190611da3565b979650505050505050565b600082601f830112611dd857600080fd5b813567ffffffffffffffff811115611df257611df2611cd7565b611e05601f8201601f1916602001611d16565b818152846020838601011115611e1a57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611e4f57600080fd5b8535611e5a81611a6b565b94506020860135611e6a81611a6b565b9350604086013567ffffffffffffffff80821115611e8757600080fd5b611e9389838a01611d47565b94506060880135915080821115611ea957600080fd5b611eb589838a01611d47565b93506080880135915080821115611ecb57600080fd5b50611ed888828901611dc7565b9150509295509295909350565b600060208284031215611ef757600080fd5b81358015158114611a2557600080fd5b600080600080600060a08688031215611f1f57600080fd5b8535611f2a81611a6b565b94506020860135611f3a81611a6b565b93506040860135925060608601359150608086013567ffffffffffffffff811115611f6457600080fd5b611ed888828901611dc7565b600080600080600060a08688031215611f8857600080fd5b8535611f9381611a6b565b94506020860135611fa381611a6b565b93506040860135611fb381611a6b565b92506060860135611fc381611a6b565b91506080860135611fd381611a6b565b809150509295509295909350565b6020808252601290820152712737ba1030b236b4b71037b91037bbb732b960711b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b8381526060810161204b6020830185611c7c565b60ff83166040830152949350505050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156120865761208661205c565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60068110610b9b57600080fd5b6000602082840312156120f757600080fd5b8135611a25816120d8565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60006020828403121561216257600080fd5b8151611a2581611a6b565b8051600a811061217c57600080fd5b919050565b805161217c816120d8565b805161217c81611a2c565b600082601f8301126121a857600080fd5b60405160c0810181811067ffffffffffffffff821117156121cb576121cb611cd7565b6040528060c08401858111156121e057600080fd5b845b818110156122035780516121f581611a2c565b8352602092830192016121e2565b509195945050505050565b6000610180828403121561222157600080fd5b612229611ced565b82516003811061223857600080fd5b81526122466020840161216d565b602082015261225760408401612181565b60408201526122686060840161218c565b60608201526122796080840161218c565b608082015261228b8460a08501612197565b60a0820152610160929092015160c083015250919050565b600060ff821660ff84168060ff038211156122c0576122c061205c565b019392505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220db8b5fb20b644ab86f200156ec33f2afde7a1527585fc8848380c85b9b61857064736f6c63430008090033

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.