ETH Price: $2,936.38 (-0.75%)

Contract

0x4E1D97a50a999382471F1AB66d290cEcb41a09C7
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MunchadexManager

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 2000 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import "openzeppelin-contracts/contracts/token/ERC721/IERC721.sol";
import "./BaseBlastManager.sol";
import "../interfaces/IMunchNFT.sol";
import "../interfaces/IMunchadexManager.sol";
import "../interfaces/INFTAttributesManager.sol";
import "../interfaces/IAccountManager.sol";

contract MunchadexManager is BaseBlastManager, IMunchadexManager {
    mapping(address => MunchablesCommonLib.Munchadex) munchadex;

    INFTAttributesManager nftAttributesManager;
    address snuggeryManagerAddress;
    IAccountManager accountManager;

    constructor(address _configStorage) {
        __BaseConfigStorage_setConfigStorage(_configStorage);
        _reconfigure();
    }

    function _reconfigure() internal {
        nftAttributesManager = INFTAttributesManager(
            configStorage.getAddress(StorageKey.NFTAttributesManager)
        );
        snuggeryManagerAddress = configStorage.getAddress(
            StorageKey.SnuggeryManager
        );
        accountManager = IAccountManager(
            configStorage.getAddress(StorageKey.AccountManager)
        );

        super.__BaseBlastManager_reconfigure();
    }

    function configUpdated() external override onlyConfigStorage {
        _reconfigure();
    }

    function updateMunchadex(
        address _from,
        address _to,
        uint256 _tokenId
    ) external override onlyConfiguredContract(StorageKey.MunchNFT) {
        if (_from == snuggeryManagerAddress || _to == snuggeryManagerAddress)
            return;

        MunchablesCommonLib.NFTImmutableAttributes
            memory immutableAttributes = nftAttributesManager
                .getImmutableAttributes(_tokenId);
        if (_from != address(0)) {
            MunchablesCommonLib.Munchadex storage fromMunchadex = munchadex[
                _from
            ];
            if (
                --fromMunchadex.unique[
                    keccak256(abi.encodePacked(immutableAttributes.species))
                ] == 0
            ) {
                fromMunchadex.numInRealm[immutableAttributes.realm]--;
                fromMunchadex.numInRarity[immutableAttributes.rarity]--;
                fromMunchadex.numUnique--;
                accountManager.forceHarvest(_from);
            }

            emit MunchadexUpdated(
                _from,
                _tokenId,
                immutableAttributes.realm,
                immutableAttributes.rarity,
                fromMunchadex.numInRealm[immutableAttributes.realm],
                fromMunchadex.numInRarity[immutableAttributes.rarity],
                fromMunchadex.numUnique
            );
        }
        if (_to != address(0)) {
            MunchablesCommonLib.Munchadex storage toMunchadex = munchadex[_to];
            if (
                toMunchadex.unique[
                    keccak256(abi.encodePacked(immutableAttributes.species))
                ]++ == 0
            ) {
                toMunchadex.numInRealm[immutableAttributes.realm]++;
                toMunchadex.numInRarity[immutableAttributes.rarity]++;
                toMunchadex.numUnique++;
                accountManager.forceHarvest(_to);
            }

            emit MunchadexUpdated(
                _to,
                _tokenId,
                immutableAttributes.realm,
                immutableAttributes.rarity,
                toMunchadex.numInRealm[immutableAttributes.realm],
                toMunchadex.numInRarity[immutableAttributes.rarity],
                toMunchadex.numUnique
            );
        }
    }

    function getMunchadexInfo(
        address _player
    )
        external
        view
        override
        returns (
            uint256[] memory numMunchablesPerRealm,
            uint256[] memory numMunchablesPerRarity,
            uint256 numUnique
        )
    {
        MunchablesCommonLib.Munchadex storage playerMunchadex = munchadex[
            _player
        ];
        numMunchablesPerRealm = new uint256[](
            uint256(MunchablesCommonLib.Realm.Invalid)
        );
        numMunchablesPerRarity = new uint256[](
            uint256(MunchablesCommonLib.Rarity.Invalid)
        );

        for (uint256 i; i < uint256(MunchablesCommonLib.Realm.Invalid); i++) {
            numMunchablesPerRealm[i] = playerMunchadex.numInRealm[
                MunchablesCommonLib.Realm(i)
            ];
        }

        for (uint256 i; i < uint256(MunchablesCommonLib.Rarity.Invalid); i++) {
            numMunchablesPerRarity[i] = playerMunchadex.numInRarity[
                MunchablesCommonLib.Rarity(i)
            ];
        }

        numUnique = playerMunchadex.numUnique;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

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

    /**
     * @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);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../interfaces/IConfigStorage.sol";
import "../interfaces/IConfigNotifiable.sol";
import "../config/BaseConfigStorage.sol";
import "../interfaces/IBaseBlastManager.sol";
import "../interfaces/IHoldsGovernorship.sol";
import "../interfaces/IERC20YieldClaimable.sol";
import "../interfaces/IBlast.sol";

abstract contract BaseBlastManager is
    IBaseBlastManager,
    IERC20YieldClaimable,
    BaseConfigStorage
{
    IBlast public blastContract;
    IBlastPoints public blastPointsContract;

    address private _governorConfigured;
    address private _pointsOperatorConfigured;
    bool private _blastClaimableConfigured;

    IERC20 public USDB;
    IERC20 public WETH;

    error InvalidGovernorError();

    function __BaseBlastManager_reconfigure() internal {
        // load config from the config storage contract and configure myself
        address blastAddress = configStorage.getAddress(
            StorageKey.BlastContract
        );
        if (blastAddress != address(blastContract)) {
            blastContract = IBlast(blastAddress);
            if (blastContract.isAuthorized(address(this))) {
                blastContract.configureClaimableGas();
                // fails on cloned networks
                (bool success, ) = blastAddress.call(
                    abi.encodeWithSelector(
                        bytes4(keccak256("configureClaimableYield()"))
                    )
                );
                if (success) {
                    // not on a cloned network and no compiler error!
                }
            }
        }

        address pointsContractAddress = configStorage.getAddress(
            StorageKey.BlastPointsContract
        );
        if (pointsContractAddress != address(blastPointsContract)) {
            blastPointsContract = IBlastPoints(pointsContractAddress);

            address pointsOperator = configStorage.getAddress(
                StorageKey.BlastPointsOperator
            );
            if (_pointsOperatorConfigured == address(0)) {
                // Reassignment must be called from the point operator itself
                blastPointsContract.configurePointsOperator(pointsOperator);
                _pointsOperatorConfigured = pointsOperator;
            }
        }

        address usdbAddress = configStorage.getAddress(StorageKey.USDBContract);
        address wethAddress = configStorage.getAddress(StorageKey.WETHContract);

        if (usdbAddress != address(USDB)) {
            USDB = IERC20(usdbAddress);
            IERC20Rebasing _USDB = IERC20Rebasing(usdbAddress);
            _USDB.configure(YieldMode.CLAIMABLE);
        }

        if (wethAddress != address(WETH)) {
            WETH = IERC20(wethAddress);
            IERC20Rebasing _WETH = IERC20Rebasing(wethAddress);
            _WETH.configure(YieldMode.CLAIMABLE);
        }

        address rewardsManagerAddress = configStorage.getAddress(
            StorageKey.RewardsManager
        );
        if (rewardsManagerAddress != address(0)) {
            setBlastGovernor(rewardsManagerAddress);
        }

        super.__BaseConfigStorage_reconfigure();
    }

    function setBlastGovernor(address _governor) internal {
        if (_governor == address(0)) revert InvalidGovernorError();
        if (address(blastContract) == address(0)) return;
        if (_governorConfigured == address(0)) {
            // if this contract is the governor then it should claim its own yield/gas
            if (_governor != address(this)) {
                // Once this is called the governor will be the only account allowed to configure
                blastContract.configureGovernor(_governor);
            }
        } else {
            IHoldsGovernorship(_governorConfigured).reassignBlastGovernor(
                _governor
            );
        }
        _governorConfigured = _governor;
    }

    function claimERC20Yield(
        address _tokenContract,
        uint256 _amount
    ) external onlyConfiguredContract(StorageKey.RewardsManager) {
        IERC20Rebasing(_tokenContract).claim(
            configStorage.getAddress(StorageKey.RewardsManager),
            _amount
        );
    }

    function getConfiguredGovernor() external view returns (address _governor) {
        _governor = _governorConfigured;
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

interface IMunchNFT {
    /// @notice Get the next token ID
    /// @return The next token ID
    function nextTokenId() external view returns (uint256);

    /// @notice Mint a new, empty token.  Restrict access to only the NFTOverlord
    /// @param _owner The owner of the newly minted NFT
    function mint(address _owner) external returns (uint256 _tokenId);

    /// @notice Update the token URL, restricted to off-chain role
    /// @param _tokenId The token ID to update
    /// @param _tokenURI The new URI, will be an IPFS hash
    function setTokenURI(uint256 _tokenId, string memory _tokenURI) external;

    /// @notice Blacklist an account from transferring tokens
    /// @param _account The account to blacklist
    function blAccount(address _account) external;

    /// @notice Blacklist an token from being transferred
    /// @param _tokenId The token ID to blacklist
    function blToken(uint256 _tokenId) external;

    /// @notice Remove blacklist for an account
    /// @param _account The account to remove from the blacklist
    function removeBlAccount(address _account) external;

    /// @notice Remove blacklist on a token
    /// @param _tokenId The token ID to remove from the blacklist
    function removeBlToken(uint256 _tokenId) external;

    /// @notice Error when a blacklisted account/token tries to transfer
    error ForbiddenTransferError();
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;
import "../libraries/MunchablesCommonLib.sol";

interface IMunchadexManager {
    /// @notice Updates the Munchadex with this transfer data
    /// @param _from The address of the sender
    /// @param _to The address of the receiver
    /// @param _tokenId The ID of the NFT being transferred
    function updateMunchadex(
        address _from,
        address _to,
        uint256 _tokenId
    ) external;

    /// @notice Retrieves the Munchadex data for a specific player
    /// @param _player The address of the player
    function getMunchadexInfo(
        address _player
    )
        external
        view
        returns (
            uint256[] memory numMunchablesPerRealm,
            uint256[] memory numMunchablesPerRarity,
            uint256 numUnique
        );

    // @notice internal munchadex counters updated
    event MunchadexUpdated(
        address indexed _player,
        uint256 _tokenId,
        MunchablesCommonLib.Realm realm,
        MunchablesCommonLib.Rarity rarity,
        uint256 _numInRealm,
        uint256 _numInRarity,
        uint256 _numUnique
    );
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import "../libraries/MunchablesCommonLib.sol";

/// @title Interface for NFT Attributes Manager V1
/// @notice This interface manages the attributes and metadata of NFTs within the Munch ecosystem.
interface INFTAttributesManager {
    /// @notice Called from MunchableManager to initialise a new record
    function createWithImmutable(
        uint256 _tokenId,
        MunchablesCommonLib.NFTImmutableAttributes memory _immutableAttributes
    ) external;

    /// @notice Sets dynamic attributes for a specific NFT, typically called after feeding or interaction events
    /// @param _tokenId The ID of the NFT
    /// @param _attributes Struct of new attributes
    function setAttributes(
        uint256 _tokenId,
        MunchablesCommonLib.NFTAttributes calldata _attributes
    ) external;

    /// @notice Sets game attributes for a specific NFT, typically called after level up
    /// @param _tokenId The ID of the NFT
    /// @param _attributes Array of new game attributes
    function setGameAttributes(
        uint256 _tokenId,
        MunchablesCommonLib.NFTGameAttribute[] calldata _attributes
    ) external;

    /// @notice Retrieves all data associated with an NFT in a single call
    /// @param _tokenId The ID of the NFT
    /// @return _nftData A struct containing all attributes (dynamic, immutable, and game-specific)
    //    function getFullNFTData(
    //        uint256 _tokenId
    //    ) external view returns (NFTFull memory _nftData);

    /// @notice Retrieves dynamic attributes for a specific token
    /// @param _tokenId The ID of the NFT
    /// @return _attributes Struct of the NFT's dynamic attributes
    function getAttributes(
        uint256 _tokenId
    )
        external
        view
        returns (MunchablesCommonLib.NFTAttributes memory _attributes);

    /// @notice Retrieves immutable attributes for a specific token
    /// @param _tokenId The ID of the NFT
    /// @return _immutableAttributes Struct of the NFT's immutable attributes
    function getImmutableAttributes(
        uint256 _tokenId
    )
        external
        view
        returns (
            MunchablesCommonLib.NFTImmutableAttributes
                memory _immutableAttributes
        );

    /// @notice Retrieves game-specific attributes for a specific token
    /// @param _tokenId The ID of the NFT
    /// @param _requestedIndexes Array of GameAttributeIndex to define subset of attributes to include in the result
    /// @return _gameAttributes Struct of the NFT's game attributes
    function getGameAttributes(
        uint256 _tokenId,
        MunchablesCommonLib.GameAttributeIndex[] calldata _requestedIndexes
    )
        external
        view
        returns (MunchablesCommonLib.NFTGameAttribute[] memory _gameAttributes);

    function getGameAttributeDataType(
        uint8 _index
    ) external pure returns (MunchablesCommonLib.GameAttributeType _dataType);

    event CreatedWithImmutable(
        uint256 _tokenId,
        MunchablesCommonLib.NFTImmutableAttributes _immutableAttributes
    );

    /// @notice Event emitted when NFT attributes are updated
    event AttributesUpdated(uint256 indexed _tokenId);

    /// @notice Event emitted when NFT game attributes are updated
    event GameAttributesUpdated(uint256 indexed _tokenId);

    /// @notice Error when the owner of the NFT does not match the expected address
    error IncorrectOwnerError();

    /// @notice Error when the 'from' level specified is invalid
    error InvalidLevelFromError();

    /// @notice Error when the oracle recovering the signature is invalid
    /// @param _recoveredSigner The address of the invalid signer
    error InvalidOracleError(address _recoveredSigner);

    /// @notice Error when a call is made by a non-authorized migration manager
    error NotAuthorizedMigrationManagerError();

    /// @notice When user tries to set attributes when the record hasnt been created
    error NotCreatedError();
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;
import "../libraries/MunchablesCommonLib.sol";

/// @title Interface for the Account Manager
/// @notice This interface manages player accounts including their snuggery, schibbles, chonks, and sub-accounts
interface IAccountManager {
    /// @notice Struct representing a "Squirt", which is a distribution of schnibbles to a player
    struct Squirt {
        address player; // The address of the player receiving schnibbles
        uint256 schnibbles; // The amount of schnibbles being distributed to that player
    }

    /// @notice Struct representing a proposal to spray schnibbles across multiple accounts
    struct SprayProposal {
        uint32 proposedDate; // The date the proposal was made
        Squirt[] squirts; // Array of "Squirt" structs detailing the distribution
    }

    /// @notice Register a new account, create a new Player record, and set snuggery and referrer
    /// @dev This should be the first function called when onboarding a new user
    /// @param _snuggeryRealm The realm of the new snuggery, which cannot be changed later
    /// @param _referrer The account referring this user, use the null address if there is no referrer
    /// @custom:frontend Register a new account
    function register(
        MunchablesCommonLib.Realm _snuggeryRealm,
        address _referrer
    ) external;

    /// @notice Calculate schnibbles to distribute and credit to unfedSchnibbles, set lastHarvestDate
    /// @custom:frontend Harvest schnibbles
    function harvest() external returns (uint256 _harvested);

    /// @notice Used when a user adds to their lock to force claim at the previous locked value
    /// @param _player Address of the player whose harvest to force
    function forceHarvest(address _player) external;

    /// @notice Propose a spray of schnibbles to multiple accounts
    /// @param _players Array of player addresses
    /// @param _schnibbles Array of schnibbles amounts corresponding to each player
    function spraySchnibblesPropose(
        address[] calldata _players,
        uint256[] calldata _schnibbles
    ) external;

    /// @notice Approve a proposed spray of schnibbles
    /// @param _proposer Address of the proposer of the spray
    function execSprayProposal(address _proposer) external;

    /// @notice Remove a proposed spray of schnibbles
    /// @param _proposer Address of the proposer of the spray to remove
    function removeSprayProposal(address _proposer) external;

    /// @notice Add a sub-account for a player
    /// @param _subAccount The sub-account to add
    /// @custom:frontend Use to add a new sub-account
    function addSubAccount(address _subAccount) external;

    /// @notice Remove a previously added sub-account
    /// @param _subAccount The sub-account to remove
    /// @custom:frontend Use to remove an existing sub-account
    function removeSubAccount(address _subAccount) external;

    /// @notice Restricted to the Munchable Manager only
    function updatePlayer(
        address _account,
        MunchablesCommonLib.Player memory _player
    ) external;

    /// @notice Look up the main account associated with a potentially sub-account
    /// @param _maybeSubAccount Account to check
    /// @return _mainAccount Main account associated, or the input if not a sub-account
    function getMainAccount(
        address _maybeSubAccount
    ) external view returns (address _mainAccount);

    /// @notice Get a list of sub-accounts associated with a main account
    /// @param _player Main account to check
    /// @param _start Index to start pagination
    /// @return _subAccounts List of sub-accounts
    /// @return _more Whether there are more sub-accounts beyond the returned list
    /// @custom:frontend Use this to populate a UI for managing sub accounts
    function getSubAccounts(
        address _player,
        uint256 _start
    ) external view returns (address[20] memory _subAccounts, bool _more);

    /// @notice Retrieve player data for a given account
    /// @param _account Account to retrieve data for
    /// @return _mainAccount Main account associated, or the input if not a sub-account
    /// @return _player Player data structure
    /// @custom:frontend Call this straight after log in to get the data about this player.  The account
    ///                  logging in may be a sub account and in this case the _mainAccount parameter
    ///                  will be different from the logged in user.  In this case the UI should show only
    ///                  functions available to a sub-account
    function getPlayer(
        address _account
    )
        external
        view
        returns (
            address _mainAccount,
            MunchablesCommonLib.Player memory _player
        );

    /// @notice Retrieve detailed player and snuggery data
    /// @param _account Address of the player
    /// @return _mainAccount Main account associated
    /// @return _player Player data
    /// @return _snuggery List of snuggery NFTs
    /// @custom:frontend Use this to fetch player and snuggery data
    function getFullPlayerData(
        address _account
    )
        external
        view
        returns (
            address _mainAccount,
            MunchablesCommonLib.Player memory _player,
            MunchablesCommonLib.SnuggeryNFT[] memory _snuggery
        );

    /// @notice Get daily schnibbles that an account is accrueing
    /// @param _player The address of the player
    function getDailySchnibbles(
        address _player
    ) external view returns (uint256 _dailySchnibbles, uint256 _bonus);

    /// @notice Emitted when a player registers for a new account
    /// @param _player The address of the player who registered
    /// @param _snuggeryRealm The realm associated with the new snuggery chosen by the player
    /// @param _referrer The address of the referrer, if any; otherwise, the zero address
    /// @custom:frontend You should only receive this event once and only if you are onboarding a new user
    ///                  safe to ignore if you are in the onboarding process
    event PlayerRegistered(
        address indexed _player,
        MunchablesCommonLib.Realm _snuggeryRealm,
        address _referrer
    );

    /// @notice Emitted when a player's schnibbles are harvested
    /// @param _player The address of the player who harvested schnibbles
    /// @param _harvestedSchnibbles The total amount of schnibbles that were harvested
    /// @custom:frontend Listen for events where _player is your mainAccount and update unfedSchnibbles total
    event Harvested(address indexed _player, uint256 _harvestedSchnibbles);

    /// @notice Emitted when a sub-account is added to a player's account
    /// @param _player The address of the main account to which a sub-account was added
    /// @param _subAccount The address of the sub-account that was added
    /// @custom:frontend If you are managing sub accounts (ie the logged in user is not a subAccount), then use this
    ///                  event to reload your cache of sub accounts
    event SubAccountAdded(address indexed _player, address _subAccount);

    /// @notice Emitted when a sub-account is removed from a player's account
    /// @param _player The address of the main account from which a sub-account was removed
    /// @param _subAccount The address of the sub-account that was removed
    /// @custom:frontend If you are managing sub accounts (ie the logged in user is not a subAccount), then use this
    ///                  event to reload your cache of sub accounts
    event SubAccountRemoved(address indexed _player, address _subAccount);

    /// @notice Emitted when a proposal to spray schnibbles is made
    /// @param _proposer The address of the player who proposed the spray
    /// @param _squirts An array of "Squirt" details defining the proposed schnibble distribution
    /// @custom:admin
    event ProposedScnibblesSpray(address indexed _proposer, Squirt[] _squirts);

    /// @notice Emitted when a schnibble spray is executed for each player
    /// @param _player The player receiving schnibbles
    /// @param _schnibbles The amount of schnibbles received
    event SchnibblesSprayed(address indexed _player, uint256 _schnibbles);

    /// @notice Emitted when a spray proposal is executed
    /// @param _proposer The account which proposed the spray
    event SprayProposalExecuted(address indexed _proposer);

    /// @notice Emitted when a spray proposal is removed
    /// @param _proposer Account that proposed the proposal
    event SprayProposalRemoved(address indexed _proposer);

    // Errors

    /// @notice Error thrown when a player is already registered and attempts to register again
    error PlayerAlreadyRegisteredError();

    /// @notice Error thrown when an action is attempted that requires the player to be registered, but they are not
    error PlayerNotRegisteredError();

    /// @notice Error thrown when the main account of a player is not registered
    error MainAccountNotRegisteredError(address _mainAccount);

    /// @notice Error thrown when there are no pending reveals for a player
    error NoPendingRevealError();

    /// @notice Error thrown when a sub-account is already registered and an attempt is made to register it again
    error SubAccountAlreadyRegisteredError();

    /// @notice Error thrown when a sub-account attempts to register as a main account
    error SubAccountCannotRegisterError();

    /// @notice Error thrown when a spray proposal already exists and another one is attempted
    error ExistingProposalError();

    /// @notice Error thrown when the parameters provided to a function do not match in quantity or type
    error UnMatchedParametersError();

    /// @notice Error thrown when too many entries are attempted to be processed at once
    error TooManyEntriesError();

    /// @notice Error thrown when an expected parameter is empty
    error EmptyParameterError();

    /// @notice Error thrown when a realm is invalid
    error InvalidRealmError();

    /// @notice Error thrown when a sub-account is not registered and is tried to be removed
    error SubAccountNotRegisteredError();

    /// @notice Error thrown when a proposal is attempted to be executed, but none exists
    error EmptyProposalError();

    /// @notice Error thrown when a player attempts to refer themselves
    error SelfReferralError();

    /// @notice Error thrown when the same sprayer gets added twice in a proposal
    error DuplicateSprayerError();

    /// @notice When a user tries to create too many sub accounts (currently 5 max)
    error TooManySubAccountsError();
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @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 IERC165 {
    /**
     * @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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

enum StorageKey {
    Many,
    Paused,
    LockManager,
    AccountManager,
    ClaimManager,
    MigrationManager,
    NFTOverlord,
    SnuggeryManager,
    PrimordialManager,
    MunchadexManager,
    MunchNFT,
    MunchToken,
    RewardsManager,
    YieldDistributor,
    GasFeeDistributor,
    BlastContract,
    BlastPointsContract,
    BlastPointsOperator,
    USDBContract,
    WETHContract,
    RNGProxyContract,
    NFTAttributesManager,
    Treasury,
    OldMunchNFT,
    MaxLockDuration,
    DefaultSnuggerySize,
    MaxSnuggerySize,
    MaxRevealQueue,
    MaxSchnibbleSpray,
    PetTotalSchnibbles,
    NewSlotCost,
    PrimordialsEnabled,
    BonusManager,
    ReferralBonus,
    RealmBonuses,
    RarityBonuses,
    LevelThresholds,
    PrimordialLevelThresholds,
    TotalMunchables,
    MunchablesPerRealm,
    MunchablesPerRarity,
    RaritySetBonuses,
    PointsPerPeriod,
    PointsPerToken,
    SwapEnabled,
    PointsPerMigratedNFT,
    PointsPerUnrevealedNFT,
    MinETHPetBonus,
    MaxETHPetBonus,
    PetBonusMultiplier,
    RealmLookups,
    // Species & Probabilities
    CommonSpecies,
    RareSpecies,
    EpicSpecies,
    LegendarySpecies,
    MythicSpecies,
    CommonPercentage,
    RarePercentage,
    EpicPercentage,
    LegendaryPercentage,
    MythicPercentage,
    MigrationBonus,
    MigrationBonusEndTime,
    MigrationDiscountFactor
}

enum Role {
    Admin,
    Social_1,
    Social_2,
    Social_3,
    Social_4,
    Social_5,
    SocialApproval_1,
    SocialApproval_2,
    SocialApproval_3,
    SocialApproval_4,
    SocialApproval_5,
    PriceFeed_1,
    PriceFeed_2,
    PriceFeed_3,
    PriceFeed_4,
    PriceFeed_5,
    Snapshot,
    NewPeriod,
    ClaimYield,
    Minter,
    NFTOracle
}

enum StorageType {
    Uint,
    SmallUintArray,
    UintArray,
    SmallInt,
    SmallIntArray,
    Bool,
    Address,
    AddressArray,
    Bytes32
}

interface IConfigStorage {
    // Manual notify
    function manualNotify(uint8 _index, uint8 _length) external;

    // Manual notify for a specific contract
    function manualNotifyAddress(address _contract) external;

    // Setters
    function setRole(Role _role, address _contract, address _addr) external;

    function setUniversalRole(Role _role, address _addr) external;

    function setUint(StorageKey _key, uint256 _value, bool _notify) external;

    function setUintArray(
        StorageKey _key,
        uint256[] memory _value,
        bool _notify
    ) external;

    function setSmallUintArray(
        StorageKey _key,
        uint8[] calldata _smallUintArray,
        bool _notify
    ) external;

    function setSmallInt(StorageKey _key, int16 _value, bool _notify) external;

    function setSmallIntArray(
        StorageKey _key,
        int16[] memory _value,
        bool _notify
    ) external;

    function setBool(StorageKey _key, bool _value, bool _notify) external;

    function setAddress(StorageKey _key, address _value, bool _notify) external;

    function setAddresses(
        StorageKey[] memory _keys,
        address[] memory _values,
        bool _notify
    ) external;

    function setAddressArray(
        StorageKey _key,
        address[] memory _value,
        bool _notify
    ) external;

    function setBytes32(StorageKey _key, bytes32 _value, bool _notify) external;

    // Getters
    function getRole(Role _role) external view returns (address);

    function getContractRole(
        Role _role,
        address _contract
    ) external view returns (address);

    function getUniversalRole(Role _role) external view returns (address);

    function getUint(StorageKey _key) external view returns (uint256);

    function getUintArray(
        StorageKey _key
    ) external view returns (uint256[] memory);

    function getSmallUintArray(
        StorageKey _key
    ) external view returns (uint8[] memory _smallUintArray);

    function getSmallInt(StorageKey _key) external view returns (int16);

    function getSmallIntArray(
        StorageKey _key
    ) external view returns (int16[] memory);

    function getBool(StorageKey _key) external view returns (bool);

    function getAddress(StorageKey _key) external view returns (address);

    function getAddressArray(
        StorageKey _key
    ) external view returns (address[] memory);

    function getBytes32(StorageKey _key) external view returns (bytes32);

    // Notification Address Management
    function addNotifiableAddress(address _addr) external;

    function addNotifiableAddresses(address[] memory _addresses) external;

    function removeNotifiableAddress(address _addr) external;

    function getNotifiableAddresses()
        external
        view
        returns (address[] memory _addresses);

    error ArrayTooLongError();
}

File 11 of 17 : IConfigNotifiable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

import "./IConfigStorage.sol";

interface IConfigNotifiable {
    function configUpdated() external;
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import "../interfaces/IConfigStorage.sol";

abstract contract BaseConfigStorage {
    IConfigStorage public configStorage;
    bool _paused;

    modifier onlyConfigStorage() {
        if (msg.sender != address(configStorage)) revert OnlyStorageError();
        _;
    }

    modifier onlyConfiguredContract(StorageKey _key) {
        address configuredContract = configStorage.getAddress(_key);
        if (configuredContract == address(0)) revert UnconfiguredError(_key);
        if (configuredContract != msg.sender) revert UnauthorisedError();
        _;
    }

    modifier onlyConfiguredContract2(StorageKey _key, StorageKey _key2) {
        address configuredContract = configStorage.getAddress(_key);
        address configuredContract2 = configStorage.getAddress(_key2);
        if (
            configuredContract != msg.sender &&
            configuredContract2 != msg.sender
        ) {
            if (configuredContract == address(0))
                revert UnconfiguredError(_key);
            if (configuredContract2 == address(0))
                revert UnconfiguredError(_key2);

            revert UnauthorisedError();
        }
        _;
    }
    modifier onlyOneOfRoles(Role[5] memory roles) {
        for (uint256 i = 0; i < roles.length; i++) {
            if (msg.sender == configStorage.getRole(roles[i])) {
                _;
                return;
            }
        }
        revert InvalidRoleError();
    }

    modifier onlyRole(Role role) {
        if (msg.sender != configStorage.getRole(role))
            revert InvalidRoleError();
        _;
    }

    modifier onlyUniversalRole(Role role) {
        if (msg.sender != configStorage.getUniversalRole(role))
            revert InvalidRoleError();
        _;
    }

    modifier onlyAdmin() {
        if (msg.sender != configStorage.getUniversalRole(Role.Admin))
            revert InvalidRoleError();
        _;
    }

    modifier notPaused() {
        if (_paused) revert ContractsPausedError();
        _;
    }

    error UnconfiguredError(StorageKey _key);
    error UnauthorisedError();
    error OnlyStorageError();
    error InvalidRoleError();
    error ContractsPausedError();

    function configUpdated() external virtual;

    function __BaseConfigStorage_setConfigStorage(
        address _configStorage
    ) internal {
        configStorage = IConfigStorage(_configStorage);
    }

    function __BaseConfigStorage_reconfigure() internal {
        _paused = configStorage.getBool(StorageKey.Paused);
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

interface IBaseBlastManager {
    function getConfiguredGovernor() external view returns (address _governor);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

/// @notice Contracts which implement this interface will be the governor for other contracts and
///         give it up on request from the contract
interface IHoldsGovernorship {
    function reassignBlastGovernor(address _newAddress) external;

    function isGovernorOfContract(
        address _contract
    ) external view returns (bool);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

/// @notice Contracts which implement this interface can be instructed by Rewards Manager to claim their yield for
///         ERC20 tokens and send the yield back to the rewards manager
interface IERC20YieldClaimable {
    function claimERC20Yield(address _tokenContract, uint256 _amount) external;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;

enum YieldMode {
    AUTOMATIC,
    VOID,
    CLAIMABLE
}

enum GasMode {
    VOID,
    CLAIMABLE
}

interface IBlastPoints {
    function configurePointsOperator(address operator) external;
}

interface IERC20Rebasing {
    function configure(YieldMode) external returns (uint256);

    function claim(
        address recipient,
        uint256 amount
    ) external returns (uint256);

    function getClaimableAmount(
        address account
    ) external view returns (uint256);
}

interface IBlast {
    // configure
    function configureContract(
        address contractAddress,
        YieldMode _yield,
        GasMode gasMode,
        address governor
    ) external;

    function configure(
        YieldMode _yield,
        GasMode gasMode,
        address governor
    ) external;

    // base configuration options
    function configureClaimableYield() external;

    function configureClaimableYieldOnBehalf(address contractAddress) external;

    function configureAutomaticYield() external;

    function configureAutomaticYieldOnBehalf(address contractAddress) external;

    function configureVoidYield() external;

    function configureVoidYieldOnBehalf(address contractAddress) external;

    function configureClaimableGas() external;

    function configureClaimableGasOnBehalf(address contractAddress) external;

    function configureVoidGas() external;

    function configureVoidGasOnBehalf(address contractAddress) external;

    function configureGovernor(address _governor) external;

    function configureGovernorOnBehalf(
        address _newGovernor,
        address contractAddress
    ) external;

    // claim yield
    function claimYield(
        address contractAddress,
        address recipientOfYield,
        uint256 amount
    ) external returns (uint256);

    function claimAllYield(
        address contractAddress,
        address recipientOfYield
    ) external returns (uint256);

    // claim gas
    function claimAllGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256);

    function claimGasAtMinClaimRate(
        address contractAddress,
        address recipientOfGas,
        uint256 minClaimRateBips
    ) external returns (uint256);

    function claimMaxGas(
        address contractAddress,
        address recipientOfGas
    ) external returns (uint256);

    function claimGas(
        address contractAddress,
        address recipientOfGas,
        uint256 gasToClaim,
        uint256 gasSecondsToConsume
    ) external returns (uint256);

    // read functions
    function readClaimableYield(
        address contractAddress
    ) external view returns (uint256);

    function readYieldConfiguration(
        address contractAddress
    ) external view returns (uint8);

    function readGasParams(
        address contractAddress
    )
        external
        view
        returns (
            uint256 etherSeconds,
            uint256 etherBalance,
            uint256 lastUpdated,
            GasMode
        );

    /**
     * @notice Checks if the caller is authorized
     * @param contractAddress The address of the contract
     * @return A boolean indicating if the caller is authorized
     */
    function isAuthorized(address contractAddress) external view returns (bool);

    function isGovernor(address contractAddress) external view returns (bool);
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

library MunchablesCommonLib {
    enum Rarity {
        Primordial,
        Common,
        Rare,
        Epic,
        Legendary,
        Mythic,
        Invalid
    }

    enum Realm {
        Everfrost,
        Drench,
        Moltania,
        Arridia,
        Verdentis,
        Invalid
    }

    struct NFTImmutableAttributes {
        Rarity rarity;
        uint16 species;
        Realm realm;
        uint8 generation;
        uint32 hatchedDate;
    }

    struct NFTAttributes {
        uint256 chonks;
        uint16 level;
        uint16 evolution;
        uint256 lastPettedTime;
    }

    struct NFTGameAttribute {
        GameAttributeType dataType;
        bytes value;
    }

    struct Munchadex {
        mapping(Realm => uint256) numInRealm;
        mapping(Rarity => uint256) numInRarity;
        mapping(bytes32 => uint256) unique;
        uint256 numUnique;
    }

    enum GameAttributeIndex {
        Strength,
        Agility,
        Stamina,
        Defence,
        Voracity,
        Cuteness,
        Charisma,
        Trustworthiness,
        Leadership,
        Empathy,
        Intelligence,
        Cunning,
        Creativity,
        Adaptability,
        Wisdom,
        IsOriginal,
        IndexCount // Do not use and keep at the end to detect number of indexes
    }

    enum GameAttributeType {
        NotSet,
        Bool,
        String,
        SmallInt,
        BigUInt,
        Bytes
    }

    struct PrimordialData {
        uint256 chonks;
        uint32 createdDate;
        int8 level;
        bool hatched;
    }

    struct SnuggeryNFT {
        uint256 tokenId;
        uint32 importedDate;
    }

    struct NFTFull {
        uint256 tokenId;
        NFTImmutableAttributes immutableAttributes;
        NFTAttributes attributes;
        NFTGameAttribute[] gameAttributes;
    }

    struct Player {
        uint32 registrationDate;
        uint32 lastPetMunchable;
        uint32 lastHarvestDate;
        Realm snuggeryRealm;
        uint16 maxSnuggerySize;
        uint256 unfedSchnibbles;
        address referrer;
    }

    // Pure Functions

    /// @notice Error when insufficient random data is provided for operations
    error NotEnoughRandomError();

    function calculateRaritySpeciesPercentage(
        bytes memory randomBytes
    ) internal pure returns (uint32, uint32) {
        if (randomBytes.length < 5) revert NotEnoughRandomError();

        uint32 rarityBytes;
        uint8 speciesByte;
        uint32 rarityPercentage;
        uint32 speciesPercent;

        rarityBytes =
            (uint32(uint8(randomBytes[0])) << 24) |
            (uint32(uint8(randomBytes[1])) << 16) |
            (uint32(uint8(randomBytes[2])) << 8) |
            uint32(uint8(randomBytes[3]));
        speciesByte = uint8(randomBytes[4]);

        uint256 rarityPercentageTmp = (uint256(rarityBytes) * 1e6) /
            uint256(4294967295);
        uint256 speciesPercentTmp = (uint256(speciesByte) * 1e6) / uint256(255);
        rarityPercentage = uint32(rarityPercentageTmp);
        speciesPercent = uint32(speciesPercentTmp);

        return (rarityPercentage, speciesPercent);
    }

    function getLevelThresholds(
        uint256[] memory levelThresholds,
        uint256 _chonk
    )
        internal
        pure
        returns (uint16 _currentLevel, uint256 _currentLevelThreshold)
    {
        if (_chonk >= levelThresholds[99]) {
            return (101, levelThresholds[99]);
        }
        if (_chonk < levelThresholds[0]) {
            return (1, 0);
        }

        uint256 low = 0;
        uint256 high = levelThresholds.length;
        uint256 mid = 0;
        uint16 answer = 0;

        while (low < high) {
            mid = (low + high) / 2;
            if (levelThresholds[mid] <= _chonk) {
                low = mid + 1;
            } else {
                answer = uint16(mid);
                high = mid;
            }
        }

        _currentLevel = answer + 1;
        _currentLevelThreshold = levelThresholds[uint256(answer - 1)];
    }
}

Settings
{
  "remappings": [
    "@api3/=node_modules/@api3/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 2000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_configStorage","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ContractsPausedError","type":"error"},{"inputs":[],"name":"InvalidGovernorError","type":"error"},{"inputs":[],"name":"InvalidRoleError","type":"error"},{"inputs":[],"name":"OnlyStorageError","type":"error"},{"inputs":[],"name":"UnauthorisedError","type":"error"},{"inputs":[{"internalType":"enum StorageKey","name":"_key","type":"uint8"}],"name":"UnconfiguredError","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_player","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"enum MunchablesCommonLib.Realm","name":"realm","type":"uint8"},{"indexed":false,"internalType":"enum MunchablesCommonLib.Rarity","name":"rarity","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"_numInRealm","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_numInRarity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_numUnique","type":"uint256"}],"name":"MunchadexUpdated","type":"event"},{"inputs":[],"name":"USDB","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastContract","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blastPointsContract","outputs":[{"internalType":"contract IBlastPoints","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"claimERC20Yield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"configStorage","outputs":[{"internalType":"contract IConfigStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"configUpdated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getConfiguredGovernor","outputs":[{"internalType":"address","name":"_governor","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"getMunchadexInfo","outputs":[{"internalType":"uint256[]","name":"numMunchablesPerRealm","type":"uint256[]"},{"internalType":"uint256[]","name":"numMunchablesPerRarity","type":"uint256[]"},{"internalType":"uint256","name":"numUnique","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"updateMunchadex","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516126a43803806126a483398101604081905261002f91610a37565b600080546001600160a01b0319166001600160a01b038316179055610052610058565b50610b15565b60005460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c559061008990601590600401610a7d565b602060405180830381865afa1580156100a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ca9190610a37565b600880546001600160a01b0319166001600160a01b0392831617905560005460405163bcaa0c5560e01b815291169063bcaa0c559061010e90600790600401610a7d565b602060405180830381865afa15801561012b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014f9190610a37565b600980546001600160a01b0319166001600160a01b0392831617905560005460405163bcaa0c5560e01b815291169063bcaa0c559061019390600390600401610a7d565b602060405180830381865afa1580156101b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d49190610a37565b600a80546001600160a01b0319166001600160a01b03929092169190911790556101fc6101fe565b565b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c559061023090600f90600401610a7d565b602060405180830381865afa15801561024d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102719190610a37565b6001549091506001600160a01b038083169116146103fa57600180546001600160a01b0319166001600160a01b0383169081179091556040516301fd3f7760e71b815230600482015263fe9fbb8090602401602060405180830381865afa1580156102e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103049190610a97565b156103fa57600160009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561035957600080fd5b505af115801561036d573d6000803e3d6000fd5b505060408051600481526024810182526020810180516001600160e01b031663784c3b3d60e11b1790529051600093506001600160a01b03851692506103b39190610ab9565b6000604051808303816000865af19150503d80600081146103f0576040519150601f19603f3d011682016040523d82523d6000602084013e6103f5565b606091505b505050505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c559061042c90601090600401610a7d565b602060405180830381865afa158015610449573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046d9190610a37565b6002549091506001600160a01b038083169116146105a057600280546001600160a01b0319166001600160a01b03838116919091179091556000805460405163bcaa0c5560e01b81529192169063bcaa0c55906104cf90601190600401610a7d565b602060405180830381865afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105109190610a37565b6004549091506001600160a01b031661059e576002546040516336b91f2b60e01b81526001600160a01b038381166004830152909116906336b91f2b90602401600060405180830381600087803b15801561056a57600080fd5b505af115801561057e573d6000803e3d6000fd5b5050600480546001600160a01b0319166001600160a01b03851617905550505b505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c55906105d290601290600401610a7d565b602060405180830381865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106139190610a37565b6000805460405163bcaa0c5560e01b815292935090916001600160a01b039091169063bcaa0c559061064a90601390600401610a7d565b602060405180830381865afa158015610667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068b9190610a37565b6005549091506001600160a01b0383811691161461072c57600580546001600160a01b0319166001600160a01b038416908117909155604051631a33757d60e01b8152839190631a33757d906106e690600290600401610ae8565b6020604051808303816000875af1158015610705573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107299190610afc565b50505b6006546001600160a01b038281169116146107ca57600680546001600160a01b0319166001600160a01b038316908117909155604051631a33757d60e01b8152829190631a33757d9061078490600290600401610ae8565b6020604051808303816000875af11580156107a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c79190610afc565b50505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c55906107fc90600c90600401610a7d565b602060405180830381865afa158015610819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083d9190610a37565b90506001600160a01b038116156108575761085781610866565b61085f6109a7565b5050505050565b6001600160a01b03811661088d576040516305d8ce3d60e01b815260040160405180910390fd5b6001546001600160a01b03166108a05750565b6003546001600160a01b0316610925576001600160a01b038116301461092057600154604051631d70c8d360e31b81526001600160a01b0383811660048301529091169063eb86469890602401600060405180830381600087803b15801561090757600080fd5b505af115801561091b573d6000803e3d6000fd5b505050505b610985565b600354604051633a74bfd760e01b81526001600160a01b03838116600483015290911690633a74bfd790602401600060405180830381600087803b15801561096c57600080fd5b505af1158015610980573d6000803e3d6000fd5b505050505b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600054604051633caab1db60e21b81526001600160a01b039091169063f2aac76c906109d890600190600401610a7d565b602060405180830381865afa1580156109f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a199190610a97565b60008054911515600160a01b0260ff60a01b19909216919091179055565b600060208284031215610a4957600080fd5b81516001600160a01b0381168114610a6057600080fd5b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160408310610a9157610a91610a67565b91905290565b600060208284031215610aa957600080fd5b81518015158114610a6057600080fd5b6000825160005b81811015610ada5760208186018101518583015201610ac0565b506000920191825250919050565b6020810160038310610a9157610a91610a67565b600060208284031215610b0e57600080fd5b5051919050565b611b8080610b246000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638da52e9311610076578063b1ac56e61161005b578063b1ac56e61461016d578063b930b48214610180578063fce14af61461019357600080fd5b80638da52e9314610152578063ad5c46481461015a57600080fd5b80633cdad82c116100a75780633cdad82c14610119578063443b17861461012a5780634b03eeb41461013d57600080fd5b8063074fece6146100c357806331a0edec146100ee575b600080fd5b6100d66100d13660046117e2565b6101a6565b6040516100e593929190611842565b60405180910390f35b600554610101906001600160a01b031681565b6040516001600160a01b0390911681526020016100e5565b6003546001600160a01b0316610101565b600054610101906001600160a01b031681565b61015061014b366004611878565b610305565b005b610150610513565b600654610101906001600160a01b031681565b61015061017b3660046118a4565b610561565b600254610101906001600160a01b031681565b600154610101906001600160a01b031681565b6001600160a01b03811660009081526007602090815260408083208151600580825260c082019093526060948594909390820160a080368337505060408051600680825260e0820190925292965090506020820160c08036833701905050925060005b600581101561027d57816000826005811115610227576102276118e5565b6005811115610238576102386118e5565b6005811115610249576102496118e5565b81526020019081526020016000205485828151811061026a5761026a6118fb565b6020908102919091010152600101610209565b5060005b60068110156102f8578160010160008260068111156102a2576102a26118e5565b60068111156102b3576102b36118e5565b60068111156102c4576102c46118e5565b8152602001908152602001600020548482815181106102e5576102e56118fb565b6020908102919091010152600101610281565b5060030154929491935050565b6000805460405163bcaa0c5560e01b8152600c92916001600160a01b03169063bcaa0c5590610338908590600401611911565b602060405180830381865afa158015610355573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610379919061192b565b90506001600160a01b0381166103c657816040517f92bc2cd00000000000000000000000000000000000000000000000000000000081526004016103bd9190611911565b60405180910390fd5b6001600160a01b0381163314610408576040517f1a48f08400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460405163bcaa0c5560e01b81526001600160a01b038087169263aad3ec969291169063bcaa0c559061044290600c90600401611911565b602060405180830381865afa15801561045f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610483919061192b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303816000875af11580156104e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050c9190611948565b5050505050565b6000546001600160a01b03163314610557576040517fe101028000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61055f610c6c565b565b6000805460405163bcaa0c5560e01b8152600a92916001600160a01b03169063bcaa0c5590610594908590600401611911565b602060405180830381865afa1580156105b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d5919061192b565b90506001600160a01b03811661061957816040517f92bc2cd00000000000000000000000000000000000000000000000000000000081526004016103bd9190611911565b6001600160a01b038116331461065b576040517f1a48f08400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6009546001600160a01b038681169116148061068457506009546001600160a01b038581169116145b61050c576008546040517fd20264ca000000000000000000000000000000000000000000000000000000008152600481018590526000916001600160a01b03169063d20264ca9060240160a060405180830381865afa1580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070f91906119ac565b90506001600160a01b038616156109b9576001600160a01b03861660009081526007602090815260408083208483015191519093600285019390926107819290910160f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016815260020190565b604051602081830303815290604052805190602001208152602001908152602001600020600081546107b290611a64565b91829055506000036108f057806000016000836040015160058111156107da576107da6118e5565b60058111156107eb576107eb6118e5565b8152602001908152602001600020600081548092919061080a90611a64565b91905055508060010160008360000151600681111561082b5761082b6118e5565b600681111561083c5761083c6118e5565b8152602001908152602001600020600081548092919061085b90611a64565b909155505060038101805490600061087283611a64565b9091555050600a546040517f1739cfcd0000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015290911690631739cfcd90602401600060405180830381600087803b1580156108d757600080fd5b505af11580156108eb573d6000803e3d6000fd5b505050505b604082015182516001600160a01b038916917f1539027d089855f019e790295377c5065fee31ed6d9729abd2013546f6eeecc49188919085600083600581111561093c5761093c6118e5565b600581111561094d5761094d6118e5565b81526020019081526020016000205486600101600089600001516006811115610978576109786118e5565b6006811115610989576109896118e5565b81526020019081526020016000205487600301546040516109af96959493929190611a7b565b60405180910390a2505b6001600160a01b03851615610c64576001600160a01b0385166000908152600760209081526040808320848301519151909360028501939092610a299290910160f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016815260020190565b6040516020818303038152906040528051906020012081526020019081526020016000206000815480929190610a5e90611acb565b91905055600003610b9b5780600001600083604001516005811115610a8557610a856118e5565b6005811115610a9657610a966118e5565b81526020019081526020016000206000815480929190610ab590611acb565b919050555080600101600083600001516006811115610ad657610ad66118e5565b6006811115610ae757610ae76118e5565b81526020019081526020016000206000815480929190610b0690611acb565b9091555050600381018054906000610b1d83611acb565b9091555050600a546040517f1739cfcd0000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015290911690631739cfcd90602401600060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b505050505b604082015182516001600160a01b038816917f1539027d089855f019e790295377c5065fee31ed6d9729abd2013546f6eeecc491889190856000836005811115610be757610be76118e5565b6005811115610bf857610bf86118e5565b81526020019081526020016000205486600101600089600001516006811115610c2357610c236118e5565b6006811115610c3457610c346118e5565b8152602001908152602001600020548760030154604051610c5a96959493929190611a7b565b60405180910390a2505b505050505050565b60005460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c5590610c9d90601590600401611911565b602060405180830381865afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde919061192b565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392831617905560005460405163bcaa0c5560e01b815291169063bcaa0c5590610d2f90600790600401611911565b602060405180830381865afa158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d70919061192b565b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392831617905560005460405163bcaa0c5560e01b815291169063bcaa0c5590610dc190600390600401611911565b602060405180830381865afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061192b565b600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039283161790556000805460405163bcaa0c5560e01b815261055f93919091169063bcaa0c5590610e5a90600f90600401611911565b602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b919061192b565b6001549091506001600160a01b03808316911614611078576001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517ffe9fbb8000000000000000000000000000000000000000000000000000000000815230600482015263fe9fbb8090602401602060405180830381865afa158015610f30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f549190611ae5565b1561107857600160009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fa957600080fd5b505af1158015610fbd573d6000803e3d6000fd5b505060408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff098767a000000000000000000000000000000000000000000000000000000001790529051600093506001600160a01b03851692506110319190611b07565b6000604051808303816000865af19150503d806000811461106e576040519150601f19603f3d011682016040523d82523d6000602084013e611073565b606091505b505050505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c55906110aa90601090600401611911565b602060405180830381865afa1580156110c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110eb919061192b565b6002549091506001600160a01b03808316911614611251576002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03838116919091179091556000805460405163bcaa0c5560e01b81529192169063bcaa0c559061115a90601190600401611911565b602060405180830381865afa158015611177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119b919061192b565b6004549091506001600160a01b031661124f576002546040517f36b91f2b0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152909116906336b91f2b90602401600060405180830381600087803b15801561120e57600080fd5b505af1158015611222573d6000803e3d6000fd5b50506004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03851617905550505b505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c559061128390601290600401611911565b602060405180830381865afa1580156112a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c4919061192b565b6000805460405163bcaa0c5560e01b815292935090916001600160a01b039091169063bcaa0c55906112fb90601390600401611911565b602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061192b565b6005549091506001600160a01b03838116911614611403576005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040517f1a33757d000000000000000000000000000000000000000000000000000000008152839190631a33757d906113bd90600290600401611b36565b6020604051808303816000875af11580156113dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114009190611948565b50505b6006546001600160a01b038281169116146114c7576006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f1a33757d000000000000000000000000000000000000000000000000000000008152829190631a33757d9061148190600290600401611b36565b6020604051808303816000875af11580156114a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c49190611948565b50505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c55906114f990600c90600401611911565b602060405180830381865afa158015611516573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153a919061192b565b90506001600160a01b03811615611554576115548161155c565b61050c6116f5565b6001600160a01b03811661159c576040517f05d8ce3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546001600160a01b03166115af5750565b6003546001600160a01b031661164d576001600160a01b0381163014611648576001546040517feb8646980000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301529091169063eb86469890602401600060405180830381600087803b15801561162f57600080fd5b505af1158015611643573d6000803e3d6000fd5b505050505b6116c6565b6003546040517f3a74bfd70000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690633a74bfd790602401600060405180830381600087803b1580156116ad57600080fd5b505af11580156116c1573d6000803e3d6000fd5b505050505b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546040517ff2aac76c0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063f2aac76c9061173f90600190600401611911565b602060405180830381865afa15801561175c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117809190611ae5565b6000805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6001600160a01b03811681146117df57600080fd5b50565b6000602082840312156117f457600080fd5b81356117ff816117ca565b9392505050565b60008151808452602080850194506020840160005b838110156118375781518752958201959082019060010161181b565b509495945050505050565b6060815260006118556060830186611806565b82810360208401526118678186611806565b915050826040830152949350505050565b6000806040838503121561188b57600080fd5b8235611896816117ca565b946020939093013593505050565b6000806000606084860312156118b957600080fd5b83356118c4816117ca565b925060208401356118d4816117ca565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020810160408310611925576119256118e5565b91905290565b60006020828403121561193d57600080fd5b81516117ff816117ca565b60006020828403121561195a57600080fd5b5051919050565b805161ffff8116811461197357600080fd5b919050565b80516006811061197357600080fd5b805160ff8116811461197357600080fd5b805163ffffffff8116811461197357600080fd5b600060a082840312156119be57600080fd5b60405160a0810181811067ffffffffffffffff821117156119ef57634e487b7160e01b600052604160045260246000fd5b604052825160078110611a0157600080fd5b8152611a0f60208401611961565b6020820152611a2060408401611978565b6040820152611a3160608401611987565b6060820152611a4260808401611998565b60808201529392505050565b634e487b7160e01b600052601160045260246000fd5b600081611a7357611a73611a4e565b506000190190565b86815260c0810160068710611a9257611a926118e5565b86602083015260078610611aa857611aa86118e5565b8560408301528460608301528360808301528260a0830152979650505050505050565b60006000198203611ade57611ade611a4e565b5060010190565b600060208284031215611af757600080fd5b815180151581146117ff57600080fd5b6000825160005b81811015611b285760208186018101518583015201611b0e565b506000920191825250919050565b6020810160038310611925576119256118e556fea264697066735822122058da132a7e629917c78fdde6eec48d1cbc251e2b1764d44430908ec88ceb93ee64736f6c63430008190033000000000000000000000000ef173bb4b36525974bf6711357d2c6c12b8001ec

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100be5760003560e01c80638da52e9311610076578063b1ac56e61161005b578063b1ac56e61461016d578063b930b48214610180578063fce14af61461019357600080fd5b80638da52e9314610152578063ad5c46481461015a57600080fd5b80633cdad82c116100a75780633cdad82c14610119578063443b17861461012a5780634b03eeb41461013d57600080fd5b8063074fece6146100c357806331a0edec146100ee575b600080fd5b6100d66100d13660046117e2565b6101a6565b6040516100e593929190611842565b60405180910390f35b600554610101906001600160a01b031681565b6040516001600160a01b0390911681526020016100e5565b6003546001600160a01b0316610101565b600054610101906001600160a01b031681565b61015061014b366004611878565b610305565b005b610150610513565b600654610101906001600160a01b031681565b61015061017b3660046118a4565b610561565b600254610101906001600160a01b031681565b600154610101906001600160a01b031681565b6001600160a01b03811660009081526007602090815260408083208151600580825260c082019093526060948594909390820160a080368337505060408051600680825260e0820190925292965090506020820160c08036833701905050925060005b600581101561027d57816000826005811115610227576102276118e5565b6005811115610238576102386118e5565b6005811115610249576102496118e5565b81526020019081526020016000205485828151811061026a5761026a6118fb565b6020908102919091010152600101610209565b5060005b60068110156102f8578160010160008260068111156102a2576102a26118e5565b60068111156102b3576102b36118e5565b60068111156102c4576102c46118e5565b8152602001908152602001600020548482815181106102e5576102e56118fb565b6020908102919091010152600101610281565b5060030154929491935050565b6000805460405163bcaa0c5560e01b8152600c92916001600160a01b03169063bcaa0c5590610338908590600401611911565b602060405180830381865afa158015610355573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610379919061192b565b90506001600160a01b0381166103c657816040517f92bc2cd00000000000000000000000000000000000000000000000000000000081526004016103bd9190611911565b60405180910390fd5b6001600160a01b0381163314610408576040517f1a48f08400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460405163bcaa0c5560e01b81526001600160a01b038087169263aad3ec969291169063bcaa0c559061044290600c90600401611911565b602060405180830381865afa15801561045f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610483919061192b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303816000875af11580156104e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050c9190611948565b5050505050565b6000546001600160a01b03163314610557576040517fe101028000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61055f610c6c565b565b6000805460405163bcaa0c5560e01b8152600a92916001600160a01b03169063bcaa0c5590610594908590600401611911565b602060405180830381865afa1580156105b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d5919061192b565b90506001600160a01b03811661061957816040517f92bc2cd00000000000000000000000000000000000000000000000000000000081526004016103bd9190611911565b6001600160a01b038116331461065b576040517f1a48f08400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6009546001600160a01b038681169116148061068457506009546001600160a01b038581169116145b61050c576008546040517fd20264ca000000000000000000000000000000000000000000000000000000008152600481018590526000916001600160a01b03169063d20264ca9060240160a060405180830381865afa1580156106eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070f91906119ac565b90506001600160a01b038616156109b9576001600160a01b03861660009081526007602090815260408083208483015191519093600285019390926107819290910160f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016815260020190565b604051602081830303815290604052805190602001208152602001908152602001600020600081546107b290611a64565b91829055506000036108f057806000016000836040015160058111156107da576107da6118e5565b60058111156107eb576107eb6118e5565b8152602001908152602001600020600081548092919061080a90611a64565b91905055508060010160008360000151600681111561082b5761082b6118e5565b600681111561083c5761083c6118e5565b8152602001908152602001600020600081548092919061085b90611a64565b909155505060038101805490600061087283611a64565b9091555050600a546040517f1739cfcd0000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015290911690631739cfcd90602401600060405180830381600087803b1580156108d757600080fd5b505af11580156108eb573d6000803e3d6000fd5b505050505b604082015182516001600160a01b038916917f1539027d089855f019e790295377c5065fee31ed6d9729abd2013546f6eeecc49188919085600083600581111561093c5761093c6118e5565b600581111561094d5761094d6118e5565b81526020019081526020016000205486600101600089600001516006811115610978576109786118e5565b6006811115610989576109896118e5565b81526020019081526020016000205487600301546040516109af96959493929190611a7b565b60405180910390a2505b6001600160a01b03851615610c64576001600160a01b0385166000908152600760209081526040808320848301519151909360028501939092610a299290910160f09190911b7fffff00000000000000000000000000000000000000000000000000000000000016815260020190565b6040516020818303038152906040528051906020012081526020019081526020016000206000815480929190610a5e90611acb565b91905055600003610b9b5780600001600083604001516005811115610a8557610a856118e5565b6005811115610a9657610a966118e5565b81526020019081526020016000206000815480929190610ab590611acb565b919050555080600101600083600001516006811115610ad657610ad66118e5565b6006811115610ae757610ae76118e5565b81526020019081526020016000206000815480929190610b0690611acb565b9091555050600381018054906000610b1d83611acb565b9091555050600a546040517f1739cfcd0000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015290911690631739cfcd90602401600060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b505050505b604082015182516001600160a01b038816917f1539027d089855f019e790295377c5065fee31ed6d9729abd2013546f6eeecc491889190856000836005811115610be757610be76118e5565b6005811115610bf857610bf86118e5565b81526020019081526020016000205486600101600089600001516006811115610c2357610c236118e5565b6006811115610c3457610c346118e5565b8152602001908152602001600020548760030154604051610c5a96959493929190611a7b565b60405180910390a2505b505050505050565b60005460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c5590610c9d90601590600401611911565b602060405180830381865afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde919061192b565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392831617905560005460405163bcaa0c5560e01b815291169063bcaa0c5590610d2f90600790600401611911565b602060405180830381865afa158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d70919061192b565b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392831617905560005460405163bcaa0c5560e01b815291169063bcaa0c5590610dc190600390600401611911565b602060405180830381865afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061192b565b600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039283161790556000805460405163bcaa0c5560e01b815261055f93919091169063bcaa0c5590610e5a90600f90600401611911565b602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b919061192b565b6001549091506001600160a01b03808316911614611078576001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517ffe9fbb8000000000000000000000000000000000000000000000000000000000815230600482015263fe9fbb8090602401602060405180830381865afa158015610f30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f549190611ae5565b1561107857600160009054906101000a90046001600160a01b03166001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fa957600080fd5b505af1158015610fbd573d6000803e3d6000fd5b505060408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167ff098767a000000000000000000000000000000000000000000000000000000001790529051600093506001600160a01b03851692506110319190611b07565b6000604051808303816000865af19150503d806000811461106e576040519150601f19603f3d011682016040523d82523d6000602084013e611073565b606091505b505050505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c55906110aa90601090600401611911565b602060405180830381865afa1580156110c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110eb919061192b565b6002549091506001600160a01b03808316911614611251576002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03838116919091179091556000805460405163bcaa0c5560e01b81529192169063bcaa0c559061115a90601190600401611911565b602060405180830381865afa158015611177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119b919061192b565b6004549091506001600160a01b031661124f576002546040517f36b91f2b0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152909116906336b91f2b90602401600060405180830381600087803b15801561120e57600080fd5b505af1158015611222573d6000803e3d6000fd5b50506004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03851617905550505b505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c559061128390601290600401611911565b602060405180830381865afa1580156112a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112c4919061192b565b6000805460405163bcaa0c5560e01b815292935090916001600160a01b039091169063bcaa0c55906112fb90601390600401611911565b602060405180830381865afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c919061192b565b6005549091506001600160a01b03838116911614611403576005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040517f1a33757d000000000000000000000000000000000000000000000000000000008152839190631a33757d906113bd90600290600401611b36565b6020604051808303816000875af11580156113dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114009190611948565b50505b6006546001600160a01b038281169116146114c7576006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f1a33757d000000000000000000000000000000000000000000000000000000008152829190631a33757d9061148190600290600401611b36565b6020604051808303816000875af11580156114a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c49190611948565b50505b6000805460405163bcaa0c5560e01b81526001600160a01b039091169063bcaa0c55906114f990600c90600401611911565b602060405180830381865afa158015611516573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153a919061192b565b90506001600160a01b03811615611554576115548161155c565b61050c6116f5565b6001600160a01b03811661159c576040517f05d8ce3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546001600160a01b03166115af5750565b6003546001600160a01b031661164d576001600160a01b0381163014611648576001546040517feb8646980000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301529091169063eb86469890602401600060405180830381600087803b15801561162f57600080fd5b505af1158015611643573d6000803e3d6000fd5b505050505b6116c6565b6003546040517f3a74bfd70000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690633a74bfd790602401600060405180830381600087803b1580156116ad57600080fd5b505af11580156116c1573d6000803e3d6000fd5b505050505b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546040517ff2aac76c0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063f2aac76c9061173f90600190600401611911565b602060405180830381865afa15801561175c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117809190611ae5565b6000805491151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6001600160a01b03811681146117df57600080fd5b50565b6000602082840312156117f457600080fd5b81356117ff816117ca565b9392505050565b60008151808452602080850194506020840160005b838110156118375781518752958201959082019060010161181b565b509495945050505050565b6060815260006118556060830186611806565b82810360208401526118678186611806565b915050826040830152949350505050565b6000806040838503121561188b57600080fd5b8235611896816117ca565b946020939093013593505050565b6000806000606084860312156118b957600080fd5b83356118c4816117ca565b925060208401356118d4816117ca565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6020810160408310611925576119256118e5565b91905290565b60006020828403121561193d57600080fd5b81516117ff816117ca565b60006020828403121561195a57600080fd5b5051919050565b805161ffff8116811461197357600080fd5b919050565b80516006811061197357600080fd5b805160ff8116811461197357600080fd5b805163ffffffff8116811461197357600080fd5b600060a082840312156119be57600080fd5b60405160a0810181811067ffffffffffffffff821117156119ef57634e487b7160e01b600052604160045260246000fd5b604052825160078110611a0157600080fd5b8152611a0f60208401611961565b6020820152611a2060408401611978565b6040820152611a3160608401611987565b6060820152611a4260808401611998565b60808201529392505050565b634e487b7160e01b600052601160045260246000fd5b600081611a7357611a73611a4e565b506000190190565b86815260c0810160068710611a9257611a926118e5565b86602083015260078610611aa857611aa86118e5565b8560408301528460608301528360808301528260a0830152979650505050505050565b60006000198203611ade57611ade611a4e565b5060010190565b600060208284031215611af757600080fd5b815180151581146117ff57600080fd5b6000825160005b81811015611b285760208186018101518583015201611b0e565b506000920191825250919050565b6020810160038310611925576119256118e556fea264697066735822122058da132a7e629917c78fdde6eec48d1cbc251e2b1764d44430908ec88ceb93ee64736f6c63430008190033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ef173bb4b36525974bf6711357d2c6c12b8001ec

-----Decoded View---------------
Arg [0] : _configStorage (address): 0xEf173BB4b36525974BF6711357D2c6C12b8001eC

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ef173bb4b36525974bf6711357d2c6c12b8001ec


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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