MON Price: $0.020105 (-5.50%)

Contract

0xCB11282E5797E036C98D321b276Cb162cde845E5

Overview

MON Balance

Monad Chain LogoMonad Chain LogoMonad Chain Logo0 MON

MON Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

3 Token Transfers found.

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MusicSubscriptionV4

Compiler Version
v0.8.30+commit.73712a01

Optimization Enabled:
Yes with 1 runs

Other Settings:
prague EvmVersion
File 1 of 5 : MusicSubscriptionV4.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

interface IEmpowerToursNFT {
    enum NFTType { MUSIC, ART }
    function getMasterType(uint256 tokenId) external view returns (NFTType);
    function artistMasterCount(address artist) external view returns (uint256);
    function masterTokens(uint256 tokenId) external view returns (
        uint256 artistFid,
        address originalArtist,
        string memory tokenURI,
        string memory collectorTokenURI,
        uint256 price,
        uint256 collectorPrice,
        uint256 totalSold,
        uint256 activeLicenses,
        uint256 maxCollectorEditions,
        uint256 collectorsMinted,
        bool active,
        NFTType nftType,
        uint96 royaltyPercentage
    );
}

/**
 * @title MusicSubscriptionV4
 * @notice Platform-wide music streaming subscription with flexible tiers
 *
 * @dev V4 Changes from V3:
 * - Added DAO timelock support for flagAccount/unflagAccount (future governance)
 * - Added platformOperator role for registering authorized subscribers
 * - Added authorized subscribers mapping for delegated subscriptions via User Safes
 * - Added emergency pause functionality
 *
 * Features:
 * - Multiple subscription tiers: Daily, Weekly, Monthly, Yearly
 * - Play-count based artist payouts (proportional distribution)
 * - Anti-bot protection (no TOURS staking required)
 * - Community governance for flagging bots (DAO can override in future)
 *
 * Revenue Model:
 * - Users pay WMON based on tier → Access to ALL music
 * - Monthly pool distributed to artists by play count %
 * - Artist payout = (Artist plays / Total plays) × Revenue pool
 */
contract MusicSubscriptionV4 is Ownable, ReentrancyGuard {

    // ============================================
    // Subscription Tiers
    // ============================================
    enum SubscriptionTier { DAILY, WEEKLY, MONTHLY, YEARLY }

    IERC20 public wmonToken;
    IERC20 public toursToken;
    IEmpowerToursNFT public nftContract;

    address public treasury;
    address public oracle;

    // ============================================
    // V4: Authorization State
    // ============================================
    mapping(address => bool) public authorizedSubscribers;  // V4: For delegated subscriptions via User Safes
    address public platformOperator;                         // V4: Can register User Safes
    address public daoTimelock;                              // V4: DAO Timelock for governance
    bool public paused;                                      // V4: Emergency pause

    // ============================================
    // Pricing (in WMON)
    // ============================================
    uint256 public constant DAILY_PRICE = 15 ether;
    uint256 public constant WEEKLY_PRICE = 75 ether;
    uint256 public constant MONTHLY_PRICE = 300 ether;
    uint256 public constant YEARLY_PRICE = 3000 ether;

    // Distribution Model: 10% Treasury, 20% Reserve, 70% Artist Pool
    uint256 public constant TREASURY_PERCENTAGE = 10;
    uint256 public constant RESERVE_PERCENTAGE = 20;
    uint256 public constant ARTIST_POOL_PERCENTAGE = 70;

    uint256 public totalReserve;

    // TOURS rewards for eligible artists
    uint256 public minMasterCount = 10;
    uint256 public minLifetimePlays = 100;
    uint256 public monthlyToursReward = 1 ether;

    // ============================================
    // Play Validation Limits
    // ============================================
    uint256 public constant MIN_PLAY_DURATION = 30;
    uint256 public constant REPLAY_COOLDOWN = 5 minutes;
    uint256 public constant MAX_PLAYS_PER_USER_PER_DAY = 500;
    uint256 public constant MAX_PLAYS_PER_SONG_PER_USER_PER_DAY = 100;

    // ============================================
    // Subscription State
    // ============================================
    struct Subscription {
        uint256 userFid;
        uint256 expiry;
        bool active;
        uint256 totalPlays;
        uint256 flagVotes;
        SubscriptionTier lastTier;
    }

    mapping(address => Subscription) public subscriptions;
    mapping(uint256 => address) public fidToAddress;
    uint256 public totalActiveSubscribers;

    // ============================================
    // Play Tracking
    // ============================================
    struct PlayRecord {
        uint256 timestamp;
        uint256 duration;
    }

    mapping(address => mapping(uint256 => PlayRecord)) public lastPlayTime;
    mapping(address => mapping(uint256 => uint256)) public dailyPlayCount;
    mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public dailySongPlayCount;

    // ============================================
    // Monthly Distribution State
    // ============================================
    struct MonthlyStats {
        uint256 totalRevenue;
        uint256 totalPlays;
        uint256 distributedAmount;
        bool finalized;
    }

    mapping(uint256 => MonthlyStats) public monthlyStats;
    mapping(uint256 => mapping(address => uint256)) public artistMonthlyPlays;
    mapping(uint256 => mapping(address => uint256)) public artistMonthlyPayouts;
    mapping(address => mapping(uint256 => bool)) public artistClaimedMonth;
    mapping(address => uint256) public artistLifetimePlays;
    mapping(uint256 => mapping(address => bool)) public artistToursClaimedMonth;

    uint256 public currentMonth;

    // ============================================
    // Bot Detection
    // ============================================
    mapping(address => bool) public flaggedAccounts;
    mapping(address => string) public flagReason;
    uint256 public constant VOTES_TO_FLAG = 50;

    // ============================================
    // Events
    // ============================================
    event Subscribed(address indexed user, uint256 indexed userFid, SubscriptionTier tier, uint256 expiry, uint256 paidAmount);
    event SubscriptionRenewed(address indexed user, uint256 newExpiry);
    event PlayRecorded(address indexed user, uint256 indexed masterTokenId, uint256 duration, uint256 timestamp);
    event MonthlyDistributionFinalized(uint256 indexed monthId, uint256 totalRevenue, uint256 totalPlays, uint256 artistPool);
    event ArtistPayout(uint256 indexed monthId, address indexed artist, uint256 amount, uint256 playCount);
    event ArtistToursReward(uint256 indexed monthId, address indexed artist, uint256 toursAmount);
    event ReserveAdded(uint256 indexed monthId, uint256 amount, uint256 totalReserve);
    event ReserveWithdrawnToDAO(address indexed dao, uint256 amount);
    event AccountFlagged(address indexed user, string reason);
    event AccountUnflagged(address indexed user);
    event VoteToFlag(address indexed voter, address indexed target, uint256 totalVotes);

    // V4 Events
    event PlatformOperatorUpdated(address indexed operator);
    event UserSafeRegisteredAsSubscriber(address indexed userSafe);
    event AuthorizedSubscriberUpdated(address indexed subscriber, bool authorized);
    event DAOTimelockUpdated(address indexed oldTimelock, address indexed newTimelock);
    event Paused(address indexed by);
    event Unpaused(address indexed by);

    // ============================================
    // Modifiers
    // ============================================

    modifier whenNotPaused() {
        require(!paused, "Contract is paused");
        _;
    }

    modifier onlyOwnerOrDAO() {
        require(
            msg.sender == owner() || msg.sender == daoTimelock,
            "Only owner or DAO"
        );
        _;
    }

    constructor(
        address _wmonToken,
        address _toursToken,
        address _nftContract,
        address _treasury,
        address _oracle
    ) Ownable(msg.sender) {
        require(_wmonToken != address(0), "Invalid WMON token");
        require(_toursToken != address(0), "Invalid TOURS token");
        require(_nftContract != address(0), "Invalid NFT contract");
        require(_treasury != address(0), "Invalid treasury");
        require(_oracle != address(0), "Invalid oracle");

        wmonToken = IERC20(_wmonToken);
        toursToken = IERC20(_toursToken);
        nftContract = IEmpowerToursNFT(_nftContract);
        treasury = _treasury;
        oracle = _oracle;

        currentMonth = block.timestamp / 30 days;
    }

    // ============================================
    // V4: Authorization Management
    // ============================================

    /**
     * @notice Set platform operator (can register User Safes)
     */
    function setPlatformOperator(address operator) external onlyOwner {
        platformOperator = operator;
        emit PlatformOperatorUpdated(operator);
    }

    /**
     * @notice Platform operator can register User Safes as authorized subscribers
     */
    function registerUserSafeAsSubscriber(address userSafe) external {
        require(msg.sender == platformOperator, "Only platform operator");
        authorizedSubscribers[userSafe] = true;
        emit UserSafeRegisteredAsSubscriber(userSafe);
    }

    /**
     * @notice Owner can directly set authorized subscriber status
     */
    function setAuthorizedSubscriber(address subscriber, bool authorized) external onlyOwnerOrDAO {
        authorizedSubscribers[subscriber] = authorized;
        emit AuthorizedSubscriberUpdated(subscriber, authorized);
    }

    /**
     * @notice Set DAO timelock for future governance
     */
    function setDAOTimelock(address _daoTimelock) external onlyOwner {
        address oldTimelock = daoTimelock;
        daoTimelock = _daoTimelock;
        emit DAOTimelockUpdated(oldTimelock, _daoTimelock);
    }

    /**
     * @notice Pause contract (emergency only)
     */
    function pause() external onlyOwnerOrDAO {
        paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @notice Unpause contract
     */
    function unpause() external onlyOwnerOrDAO {
        paused = false;
        emit Unpaused(msg.sender);
    }

    // ============================================
    // Subscription Management
    // ============================================

    function subscribe(SubscriptionTier tier, uint256 userFid) external nonReentrant whenNotPaused {
        require(userFid > 0, "Invalid FID");
        Subscription storage sub = subscriptions[msg.sender];

        uint256 cost = getTierPrice(tier);
        uint256 duration = getTierDuration(tier);

        require(
            wmonToken.transferFrom(msg.sender, address(this), cost),
            "Payment failed"
        );

        if (sub.expiry < block.timestamp) {
            sub.expiry = block.timestamp + duration;
            sub.userFid = userFid;
            fidToAddress[userFid] = msg.sender;
            totalActiveSubscribers++;
        } else {
            sub.expiry += duration;
        }

        sub.active = true;
        sub.lastTier = tier;

        uint256 monthId = block.timestamp / 30 days;
        monthlyStats[monthId].totalRevenue += cost;

        emit Subscribed(msg.sender, userFid, tier, sub.expiry, cost);
    }

    function subscribeFor(address user, uint256 userFid, SubscriptionTier tier) external nonReentrant whenNotPaused {
        require(user != address(0), "Invalid user");
        require(userFid > 0, "Invalid FID");

        Subscription storage sub = subscriptions[user];

        uint256 cost = getTierPrice(tier);
        uint256 duration = getTierDuration(tier);

        require(
            wmonToken.transferFrom(msg.sender, address(this), cost),
            "Payment failed"
        );

        if (sub.expiry < block.timestamp) {
            sub.expiry = block.timestamp + duration;
            sub.userFid = userFid;
            fidToAddress[userFid] = user;
            totalActiveSubscribers++;
        } else {
            sub.expiry += duration;
        }

        sub.active = true;
        sub.lastTier = tier;

        uint256 monthId = block.timestamp / 30 days;
        monthlyStats[monthId].totalRevenue += cost;

        emit Subscribed(user, userFid, tier, sub.expiry, cost);
    }

    function getTierPrice(SubscriptionTier tier) public pure returns (uint256) {
        if (tier == SubscriptionTier.DAILY) return DAILY_PRICE;
        if (tier == SubscriptionTier.WEEKLY) return WEEKLY_PRICE;
        if (tier == SubscriptionTier.MONTHLY) return MONTHLY_PRICE;
        if (tier == SubscriptionTier.YEARLY) return YEARLY_PRICE;
        revert("Invalid tier");
    }

    function getTierDuration(SubscriptionTier tier) public pure returns (uint256) {
        if (tier == SubscriptionTier.DAILY) return 1 days;
        if (tier == SubscriptionTier.WEEKLY) return 7 days;
        if (tier == SubscriptionTier.MONTHLY) return 30 days;
        if (tier == SubscriptionTier.YEARLY) return 365 days;
        revert("Invalid tier");
    }

    // ============================================
    // Play Validation
    // ============================================

    function recordPlay(
        address user,
        uint256 masterTokenId,
        uint256 duration
    ) external whenNotPaused {
        require(msg.sender == oracle, "Only oracle can record plays");

        Subscription storage sub = subscriptions[user];
        require(sub.active && sub.expiry >= block.timestamp, "Invalid subscription");
        require(!flaggedAccounts[user], "Account flagged");

        IEmpowerToursNFT.NFTType nftType = nftContract.getMasterType(masterTokenId);
        require(nftType == IEmpowerToursNFT.NFTType.MUSIC, "Not a music NFT");

        require(duration >= MIN_PLAY_DURATION, "Play too short");

        uint256 currentDay = block.timestamp / 1 days;
        PlayRecord storage lastPlay = lastPlayTime[user][masterTokenId];

        require(
            block.timestamp - lastPlay.timestamp >= REPLAY_COOLDOWN,
            "Replay too soon"
        );

        require(
            dailyPlayCount[user][currentDay] < MAX_PLAYS_PER_USER_PER_DAY,
            "Daily play limit exceeded"
        );
        require(
            dailySongPlayCount[user][currentDay][masterTokenId] < MAX_PLAYS_PER_SONG_PER_USER_PER_DAY,
            "Song play limit exceeded"
        );

        lastPlay.timestamp = block.timestamp;
        lastPlay.duration = duration;
        dailyPlayCount[user][currentDay]++;
        dailySongPlayCount[user][currentDay][masterTokenId]++;
        sub.totalPlays++;

        uint256 monthId = block.timestamp / 30 days;
        monthlyStats[monthId].totalPlays++;

        (, address artist,,,,,,,,,,, ) = nftContract.masterTokens(masterTokenId);
        artistMonthlyPlays[monthId][artist]++;
        artistLifetimePlays[artist]++;

        emit PlayRecorded(user, masterTokenId, duration, block.timestamp);
    }

    // ============================================
    // Monthly Distribution
    // ============================================

    function finalizeMonthlyDistribution(uint256 monthId) external onlyOwner {
        require(monthId < (block.timestamp / 30 days), "Month not ended yet");

        MonthlyStats storage stats = monthlyStats[monthId];
        require(!stats.finalized, "Already finalized");
        require(stats.totalRevenue > 0, "No revenue this month");
        require(stats.totalPlays > 0, "No plays this month");

        uint256 treasuryAmount = (stats.totalRevenue * TREASURY_PERCENTAGE) / 100;
        uint256 reserveAmount = (stats.totalRevenue * RESERVE_PERCENTAGE) / 100;
        uint256 artistPool = stats.totalRevenue - treasuryAmount - reserveAmount;

        require(wmonToken.transfer(treasury, treasuryAmount), "Treasury transfer failed");

        totalReserve += reserveAmount;
        emit ReserveAdded(monthId, reserveAmount, totalReserve);

        stats.distributedAmount = artistPool;
        stats.finalized = true;

        emit MonthlyDistributionFinalized(monthId, stats.totalRevenue, stats.totalPlays, artistPool);
    }

    function claimArtistPayout(uint256 monthId) external nonReentrant {
        require(monthlyStats[monthId].finalized, "Month not finalized");
        require(!artistClaimedMonth[msg.sender][monthId], "Already claimed");

        uint256 playCount = artistMonthlyPlays[monthId][msg.sender];
        require(playCount > 0, "No plays this month");

        MonthlyStats storage stats = monthlyStats[monthId];

        uint256 payout = (playCount * stats.distributedAmount) / stats.totalPlays;

        artistMonthlyPayouts[monthId][msg.sender] = payout;
        artistClaimedMonth[msg.sender][monthId] = true;

        require(wmonToken.transfer(msg.sender, payout), "Payout transfer failed");

        emit ArtistPayout(monthId, msg.sender, payout, playCount);
    }

    function batchClaimArtistPayouts(uint256[] calldata monthIds) external nonReentrant {
        uint256 totalPayout = 0;

        for (uint256 i = 0; i < monthIds.length; i++) {
            uint256 monthId = monthIds[i];

            if (!monthlyStats[monthId].finalized) continue;
            if (artistClaimedMonth[msg.sender][monthId]) continue;

            uint256 playCount = artistMonthlyPlays[monthId][msg.sender];
            if (playCount == 0) continue;

            MonthlyStats storage stats = monthlyStats[monthId];
            uint256 payout = (playCount * stats.distributedAmount) / stats.totalPlays;

            artistMonthlyPayouts[monthId][msg.sender] = payout;
            artistClaimedMonth[msg.sender][monthId] = true;
            totalPayout += payout;

            emit ArtistPayout(monthId, msg.sender, payout, playCount);
        }

        require(totalPayout > 0, "No payouts available");
        require(wmonToken.transfer(msg.sender, totalPayout), "Payout transfer failed");
    }

    // ============================================
    // Bot Detection (V4: DAO can flag/unflag)
    // ============================================

    /**
     * @notice Flag an account as suspicious (V4: owner or DAO)
     */
    function flagAccount(address user, string calldata reason) external onlyOwnerOrDAO {
        flaggedAccounts[user] = true;
        flagReason[user] = reason;
        subscriptions[user].active = false;
        emit AccountFlagged(user, reason);
    }

    /**
     * @notice Unflag an account (V4: owner or DAO)
     */
    function unflagAccount(address user) external onlyOwnerOrDAO {
        flaggedAccounts[user] = false;
        delete flagReason[user];
        subscriptions[user].flagVotes = 0;

        if (subscriptions[user].expiry >= block.timestamp) {
            subscriptions[user].active = true;
        }

        emit AccountUnflagged(user);
    }

    /**
     * @notice Vote to flag a suspicious account (subscribers only)
     */
    function voteToFlag(address suspiciousAccount) external whenNotPaused {
        Subscription storage voterSub = subscriptions[msg.sender];
        require(voterSub.active && voterSub.expiry >= block.timestamp, "Must be active subscriber");
        require(msg.sender != suspiciousAccount, "Cannot vote for yourself");

        Subscription storage targetSub = subscriptions[suspiciousAccount];
        require(targetSub.active, "Target not subscribed");

        targetSub.flagVotes++;

        emit VoteToFlag(msg.sender, suspiciousAccount, targetSub.flagVotes);

        if (targetSub.flagVotes >= VOTES_TO_FLAG) {
            flaggedAccounts[suspiciousAccount] = true;
            flagReason[suspiciousAccount] = "Community voted";
            targetSub.active = false;

            emit AccountFlagged(suspiciousAccount, "Community voted");
        }
    }

    function clearVotes(address user) external onlyOwnerOrDAO {
        subscriptions[user].flagVotes = 0;
    }

    // ============================================
    // View Functions
    // ============================================

    function hasActiveSubscription(address user) external view returns (bool) {
        Subscription memory sub = subscriptions[user];
        return sub.active && sub.expiry >= block.timestamp && !flaggedAccounts[user];
    }

    function getSubscriptionInfo(address user) external view returns (
        uint256 userFid,
        uint256 expiry,
        bool active,
        uint256 totalPlays,
        uint256 flagVotes,
        SubscriptionTier lastTier,
        bool isFlagged
    ) {
        Subscription memory sub = subscriptions[user];
        return (
            sub.userFid,
            sub.expiry,
            sub.active,
            sub.totalPlays,
            sub.flagVotes,
            sub.lastTier,
            flaggedAccounts[user]
        );
    }

    function getSubscriptionByFid(uint256 fid) external view returns (
        address user,
        uint256 expiry,
        bool active,
        uint256 totalPlays,
        SubscriptionTier lastTier
    ) {
        address userAddr = fidToAddress[fid];
        Subscription memory sub = subscriptions[userAddr];
        return (
            userAddr,
            sub.expiry,
            sub.active,
            sub.totalPlays,
            sub.lastTier
        );
    }

    function getArtistMonthlyStats(address artist, uint256 monthId) external view returns (
        uint256 playCount,
        uint256 payout,
        bool claimed
    ) {
        return (
            artistMonthlyPlays[monthId][artist],
            artistMonthlyPayouts[monthId][artist],
            artistClaimedMonth[artist][monthId]
        );
    }

    function getUserDailyPlays(address user) external view returns (uint256) {
        uint256 currentDay = block.timestamp / 1 days;
        return dailyPlayCount[user][currentDay];
    }

    function getCurrentMonthStats() external view returns (
        uint256 monthId,
        uint256 totalRevenue,
        uint256 totalPlays,
        bool finalized
    ) {
        monthId = block.timestamp / 30 days;
        MonthlyStats memory stats = monthlyStats[monthId];
        return (monthId, stats.totalRevenue, stats.totalPlays, stats.finalized);
    }

    // ============================================
    // TOURS Rewards
    // ============================================

    function isArtistEligible(address artist) public view returns (
        bool eligible,
        uint256 masterCount,
        uint256 lifetimePlays
    ) {
        masterCount = nftContract.artistMasterCount(artist);
        lifetimePlays = artistLifetimePlays[artist];
        eligible = masterCount >= minMasterCount && lifetimePlays >= minLifetimePlays;
    }

    function claimToursReward(uint256 monthId) external nonReentrant {
        require(monthlyStats[monthId].finalized, "Month not finalized");
        require(!artistToursClaimedMonth[monthId][msg.sender], "TOURS already claimed");
        require(artistMonthlyPlays[monthId][msg.sender] > 0, "No plays this month");

        (bool eligible,,) = isArtistEligible(msg.sender);
        require(eligible, "Not eligible for TOURS reward");

        artistToursClaimedMonth[monthId][msg.sender] = true;

        require(toursToken.transfer(msg.sender, monthlyToursReward), "TOURS transfer failed");

        emit ArtistToursReward(monthId, msg.sender, monthlyToursReward);
    }

    function batchClaimToursRewards(uint256[] calldata monthIds) external nonReentrant {
        (bool eligible,,) = isArtistEligible(msg.sender);
        require(eligible, "Not eligible for TOURS reward");

        uint256 totalTours = 0;

        for (uint256 i = 0; i < monthIds.length; i++) {
            uint256 monthId = monthIds[i];

            if (!monthlyStats[monthId].finalized) continue;
            if (artistToursClaimedMonth[monthId][msg.sender]) continue;
            if (artistMonthlyPlays[monthId][msg.sender] == 0) continue;

            artistToursClaimedMonth[monthId][msg.sender] = true;
            totalTours += monthlyToursReward;

            emit ArtistToursReward(monthId, msg.sender, monthlyToursReward);
        }

        require(totalTours > 0, "No TOURS rewards available");
        require(toursToken.transfer(msg.sender, totalTours), "TOURS transfer failed");
    }

    // ============================================
    // Reserve & DAO Functions
    // ============================================

    function withdrawReserveToDAO(address dao, uint256 amount) external onlyOwnerOrDAO {
        require(dao != address(0), "Invalid DAO address");

        uint256 withdrawAmount = amount == 0 ? totalReserve : amount;
        require(withdrawAmount <= totalReserve, "Insufficient reserve");

        totalReserve -= withdrawAmount;
        require(wmonToken.transfer(dao, withdrawAmount), "Reserve transfer failed");

        emit ReserveWithdrawnToDAO(dao, withdrawAmount);
    }

    function getReserveBalance() external view returns (uint256) {
        return totalReserve;
    }

    // ============================================
    // Admin Functions
    // ============================================

    function setOracle(address newOracle) external onlyOwner {
        require(newOracle != address(0), "Invalid oracle");
        oracle = newOracle;
    }

    function setTreasury(address newTreasury) external onlyOwner {
        require(newTreasury != address(0), "Invalid treasury");
        treasury = newTreasury;
    }

    function setEligibilityRequirements(
        uint256 _minMasterCount,
        uint256 _minLifetimePlays,
        uint256 _monthlyToursReward
    ) external onlyOwnerOrDAO {
        minMasterCount = _minMasterCount;
        minLifetimePlays = _minLifetimePlays;
        monthlyToursReward = _monthlyToursReward;
    }

    function emergencyWithdraw(address token, uint256 amount) external onlyOwner {
        require(IERC20(token).transfer(owner(), amount), "Emergency withdraw failed");
    }
}

// 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
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.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.
 *
 * The initial owner is set to the address provided by the deployer. 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 Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

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

pragma solidity ^0.8.20;

/**
 * @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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_wmonToken","type":"address"},{"internalType":"address","name":"_toursToken","type":"address"},{"internalType":"address","name":"_nftContract","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"AccountFlagged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"AccountUnflagged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"monthId","type":"uint256"},{"indexed":true,"internalType":"address","name":"artist","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"playCount","type":"uint256"}],"name":"ArtistPayout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"monthId","type":"uint256"},{"indexed":true,"internalType":"address","name":"artist","type":"address"},{"indexed":false,"internalType":"uint256","name":"toursAmount","type":"uint256"}],"name":"ArtistToursReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"subscriber","type":"address"},{"indexed":false,"internalType":"bool","name":"authorized","type":"bool"}],"name":"AuthorizedSubscriberUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"DAOTimelockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"monthId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalRevenue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalPlays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"artistPool","type":"uint256"}],"name":"MonthlyDistributionFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"PlatformOperatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"masterTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PlayRecorded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"monthId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalReserve","type":"uint256"}],"name":"ReserveAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"dao","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReserveWithdrawnToDAO","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"userFid","type":"uint256"},{"indexed":false,"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"tier","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"expiry","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paidAmount","type":"uint256"}],"name":"Subscribed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"newExpiry","type":"uint256"}],"name":"SubscriptionRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userSafe","type":"address"}],"name":"UserSafeRegisteredAsSubscriber","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalVotes","type":"uint256"}],"name":"VoteToFlag","type":"event"},{"inputs":[],"name":"ARTIST_POOL_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAILY_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PLAYS_PER_SONG_PER_USER_PER_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PLAYS_PER_USER_PER_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_PLAY_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MONTHLY_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REPLAY_COOLDOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESERVE_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VOTES_TO_FLAG","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WEEKLY_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"YEARLY_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"artistClaimedMonth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"artistLifetimePlays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"artistMonthlyPayouts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"artistMonthlyPlays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"artistToursClaimedMonth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedSubscribers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"monthIds","type":"uint256[]"}],"name":"batchClaimArtistPayouts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"monthIds","type":"uint256[]"}],"name":"batchClaimToursRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"monthId","type":"uint256"}],"name":"claimArtistPayout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"monthId","type":"uint256"}],"name":"claimToursReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"clearVotes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentMonth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dailyPlayCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"dailySongPlayCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoTimelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"fidToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"monthId","type":"uint256"}],"name":"finalizeMonthlyDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"string","name":"reason","type":"string"}],"name":"flagAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"flagReason","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"flaggedAccounts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"artist","type":"address"},{"internalType":"uint256","name":"monthId","type":"uint256"}],"name":"getArtistMonthlyStats","outputs":[{"internalType":"uint256","name":"playCount","type":"uint256"},{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentMonthStats","outputs":[{"internalType":"uint256","name":"monthId","type":"uint256"},{"internalType":"uint256","name":"totalRevenue","type":"uint256"},{"internalType":"uint256","name":"totalPlays","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserveBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fid","type":"uint256"}],"name":"getSubscriptionByFid","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"totalPlays","type":"uint256"},{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"lastTier","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getSubscriptionInfo","outputs":[{"internalType":"uint256","name":"userFid","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"totalPlays","type":"uint256"},{"internalType":"uint256","name":"flagVotes","type":"uint256"},{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"lastTier","type":"uint8"},{"internalType":"bool","name":"isFlagged","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"tier","type":"uint8"}],"name":"getTierDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"tier","type":"uint8"}],"name":"getTierPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserDailyPlays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"hasActiveSubscription","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"artist","type":"address"}],"name":"isArtistEligible","outputs":[{"internalType":"bool","name":"eligible","type":"bool"},{"internalType":"uint256","name":"masterCount","type":"uint256"},{"internalType":"uint256","name":"lifetimePlays","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastPlayTime","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLifetimePlays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minMasterCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"monthlyStats","outputs":[{"internalType":"uint256","name":"totalRevenue","type":"uint256"},{"internalType":"uint256","name":"totalPlays","type":"uint256"},{"internalType":"uint256","name":"distributedAmount","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"monthlyToursReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftContract","outputs":[{"internalType":"contract IEmpowerToursNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"masterTokenId","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"recordPlay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"userSafe","type":"address"}],"name":"registerUserSafeAsSubscriber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subscriber","type":"address"},{"internalType":"bool","name":"authorized","type":"bool"}],"name":"setAuthorizedSubscriber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_daoTimelock","type":"address"}],"name":"setDAOTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minMasterCount","type":"uint256"},{"internalType":"uint256","name":"_minLifetimePlays","type":"uint256"},{"internalType":"uint256","name":"_monthlyToursReward","type":"uint256"}],"name":"setEligibilityRequirements","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"setPlatformOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"tier","type":"uint8"},{"internalType":"uint256","name":"userFid","type":"uint256"}],"name":"subscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"userFid","type":"uint256"},{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"tier","type":"uint8"}],"name":"subscribeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"subscriptions","outputs":[{"internalType":"uint256","name":"userFid","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"totalPlays","type":"uint256"},{"internalType":"uint256","name":"flagVotes","type":"uint256"},{"internalType":"enum MusicSubscriptionV4.SubscriptionTier","name":"lastTier","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalActiveSubscribers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toursToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"unflagAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"suspiciousAccount","type":"address"}],"name":"voteToFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"dao","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawReserveToDAO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wmonToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080346102dd57601f613b3738819003918201601f19168301916001600160401b038311848410176102e15780849260a0946040528339810103126102dd57610047816102f5565b90610054602082016102f5565b90610061604082016102f5565b6100796080610072606085016102f5565b93016102f5565b9233156102ca575f8054336001600160a01b0319821681178355604051979290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055600a600b556064600c55670de0b6b3a7640000600d556001600160a01b031694851561029357506001600160a01b031690811561024e576001600160a01b0316918215610209576001600160a01b03169283156101d1576001600160a01b031693841561019b5760018060a01b0319600254161760025560018060a01b0319600354161760035560018060a01b0319600454161760045560018060a01b0319600554161760055560018060a01b0319600654161760065562278d004204601a5560405161382d908161030a8239f35b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c6964206f7261636c6560901b6044820152606490fd5b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420747265617375727960801b6044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527f496e76616c6964204e465420636f6e74726163740000000000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601360248201527f496e76616c696420544f55525320746f6b656e000000000000000000000000006044820152606490fd5b62461bcd60e51b815260206004820152601260248201527124b73b30b634b2102ba6a7a7103a37b5b2b760711b6044820152606490fd5b631e4fbdf760e01b5f525f60045260245ffd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036102dd5756fe6080806040526004361015610012575f80fd5b5f3560e01c90816305d2e7ee1461301e5750806308744e7414612ff65780630fcbd2b914612fdb5780631618b9de14612fbe578063173b31d814612fa357806328bfb48814612db65780632935561214612cf95780632a96b68d14612c065780632bca43bf14612b735780632bdc1459146126305780632c272456146125015780632d83990d146123445780632da27228146123275780633a04bc0c1461218f5780633a1e50b3146121735780633df116b0146121565780633f4ba83a146120e15780633f50ec7d146120be57806345f42493146120a357806347fa387e14611e675780634b56102914611e265780634c68df6714610bb457806350ada72814611e045780635586402d14611ddc57806358ef9d2114611dc15780635997124b14611d995780635b6feb0e14611d7d5780635c975abb14611d585780635e07e87714611d2857806361d027b314611d0057806368897e2f14611cc35780636930bcbd14611b2d5780636bb582da14611ac45780636c4907e314611a5e578063715018a614611a1a578063717c95731461185457806374792153146118395780637adbf973146117bd5780637d1998a7146117795780637d7108c7146117415780637dc0d1d0146117195780638125d6dd146116e1578063834424af1461168b5780638456cb5914611610578063854c74fb14611405578063862a4d47146113e857806387bba1e9146113825780638da5cb5b1461135b5780638fb456d7146113385780639397e6591461114c57806395c14eb31461113157806395ccea671461103f5780639a2666b814610ff65780639aaf28c814610fc45780639f809c8f14610fa1578063a20e4b2614610f5a578063b081304f14610eaa578063b128fe5614610e27578063b1d9adfd14610ddf578063b2a3d25614610d9b578063b78fadfb14610d57578063b85962e314610d2f578063bccd649014610ce2578063bebe4a5714610c1a578063c76b2a1b14610bd1578063cb765c1d14610bb4578063d08610fc14610b8c578063d41c713814610b6f578063d56d229d14610b47578063ebbb360214610aa2578063f046395a14610a23578063f0f44260146109a5578063f27eedc014610785578063f2fde38b14610713578063f5c4d714146104575763f804bb0e14610360575f80fd5b34610453576020366003190112610453576001600160a01b03610381613057565b16805f52600e60205260405f206040519061039b8261311a565b805482526001810154916020810192835260ff600283015416916040820192151583526003810154946060830195865260ff60056004840154936080860194855201541691600483101561043f5760e096848460a06104369701525196519551151590519151925f52601b60205260ff60405f20541695604051978852602088015260408701526060860152608085015260a08401906130d5565b151560c0820152f35b634e487b7160e01b5f52602160045260245ffd5b5f80fd5b3461045357602036600319011261045357600435610473613711565b62278d0042048110156106d857805f52601460205260405f20600381019060ff82541661069f57805480156106625760018201906104b3825415156133ba565b600a8102818104600a0361064e5760649004926014820282810460140361064e5760206104f286946104ed606461052695049889926132b2565b6132b2565b9360018060a01b036002541660018060a01b03600554165f60405180968195829463a9059cbb60e01b845260048401613211565b03925af1908115610643575f91610609575b50156105c9577fdfafe75f8a8dcaff4d9db3c7e0f5edba714a95f857cf60ec95bdd283fe8e34d294867f43fdb96d3d0465ffe29e7fe7c2af349beb96a55c5aafaeae168394d7dc889dbe604087610593606099600a546131f7565b80600a5582519182526020820152a2826002830155600160ff1982541617905554915460405192835260208301526040820152a2005b60405162461bcd60e51b8152602060048201526018602482015277151c99585cdd5c9e481d1c985b9cd9995c8819985a5b195960421b6044820152606490fd5b90506020813d60201161063b575b8161062460209383613135565b810103126104535761063590613204565b87610538565b3d9150610617565b6040513d5f823e3d90fd5b634e487b7160e01b5f52601160045260245ffd5b60405162461bcd60e51b815260206004820152601560248201527409cde40e4caeccadceaca40e8d0d2e640dadedce8d605b1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e48199a5b985b1a5e9959607a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526013602482015272135bdb9d1a081b9bdd08195b991959081e595d606a1b6044820152606490fd5b346104535760203660031901126104535761072c613057565b610734613711565b6001600160a01b03168015610772575f80546001600160a01b03198116831782556001600160a01b0316905f5160206137985f395f51905f529080a3005b631e4fbdf760e01b5f525f60045260245ffd5b346104535760603660031901126104535761079e613057565b60243590604435906004821015610453576107b76136f1565b6107c960ff60095460a01c1615613271565b6001600160a01b0316908115610971576107e48315156133fc565b815f52600e60205260405f20906107fa816134f1565b906108048161356a565b6002546040516323b872dd60e01b81529194919060209082906001600160a01b0316815f816108388a303360048501613436565b03925af1908115610643575f91610914575b50936108cf8360056108fb9461086d5f5160206137d85f395f51905f5299613458565b600181018054909542821015610904576108889150426131f7565b85558a81555f8b8152600f6020526040902080546001600160a01b0319168b1790556010546108b6906132bf565b6010555b60028101805460ff1916600117905501613495565b62278d0042045f52601460205260405f206108eb8582546131f7565b90555492604051938493846134ad565b0390a360018055005b61090d916131f7565b85556108ba565b9490506020853d602011610969575b8161093060209383613135565b81010312610453576108cf8360056108fb9461086d61095c5f5160206137d85f395f51905f529a613204565b959950509450505061084a565b3d9150610923565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b6044820152606490fd5b34610453576020366003190112610453576109be613057565b6109c6613711565b6001600160a01b031680156109eb57600580546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420747265617375727960801b6044820152606490fd5b34610453576020366003190112610453576001600160a01b03610a44613057565b165f52600e60205260c060405f20610aa081549160018101549060ff60028201541660038201549060ff6005600485015494015416936040519687526020870152151560408601526060850152608084015260a08301906130d5565bf35b3461045357604036600319011261045357610abb613057565b602435908115158092036104535760207f8c6cd25384e713704ec2a60ea0e6c23cc444e6fd302dfc94470adfae186e3a1f9160018060a01b035f541633148015610b33575b610b0990613322565b60018060a01b031692835f526007825260405f2060ff1981541660ff8316179055604051908152a2005b506009546001600160a01b03163314610b00565b34610453575f366003190112610453576004546040516001600160a01b039091168152602090f35b34610453575f366003190112610453576020600b54604051908152f35b34610453575f366003190112610453576002546040516001600160a01b039091168152602090f35b34610453575f366003190112610453576020600a54604051908152f35b34610453576040366003190112610453576001600160a01b03610bf2613057565b165f52601760205260405f206024355f52602052602060ff60405f2054166040519015158152f35b34610453576020366003190112610453576001600160a01b03610c3b613057565b16805f52600e60205260405f2060405190610c558261311a565b805482526001810154916020810192835260ff60058160028501541693604084019415158552600381015460608501526004810154608085015201541690600482101561043f5760a001525115159081610cd6575b5080610cbe575b6020906040519015158152f35b505f52601b602052602060ff60405f20541615610cb1565b90505142111582610caa565b34610453576040366003190112610453576001600160a01b03610d03613057565b165f52601160205260405f206024355f526020526040805f206001815491015482519182526020820152f35b34610453575f366003190112610453576009546040516001600160a01b039091168152602090f35b3461045357604036600319011261045357610d7061306d565b6004355f52601660205260405f209060018060a01b03165f52602052602060405f2054604051908152f35b34610453576040366003190112610453576001600160a01b03610dbc613057565b165f52601260205260405f206024355f52602052602060405f2054604051908152f35b34610453576020366003190112610453576004355f52601460205260405f208054610e2360018301549260ff60036002830154920154169060405194859485613158565b0390f35b34610453576040366003190112610453576060610e42613057565b6024355f8181526015602090815260408083206001600160a01b0390951680845294825280832054848452601683528184209584529482528083205460178352818420948452938252918290205482519485529084019290925260ff91909116151590820152f35b3461045357602036600319011261045357610ec3613057565b6008546001600160a01b03163303610f1c576001600160a01b03165f818152600760205260408120805460ff191660011790557f312c88b49d88ba64507dff9c1b70eba4420d5e32287279dd459df90a4843c7b39080a2005b60405162461bcd60e51b815260206004820152601660248201527527b7363c90383630ba3337b9369037b832b930ba37b960511b6044820152606490fd5b34610453576020366003190112610453576001600160a01b03610f7b613057565b165f52601260205260405f206201518042045f52602052602060405f2054604051908152f35b34610453575f366003190112610453576020604051681043561a88293000008152f35b34610453576020366003190112610453576004355f52600f602052602060018060a01b0360405f205416604051908152f35b346104535760403660031901126104535761100f61306d565b6004355f52601960205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b34610453576040366003190112610453575f602061109361105e613057565b611066613711565b835460405163a9059cbb60e01b81529485938492839190602435906001600160a01b031660048401613211565b03926001600160a01b03165af1908115610643575f916110f7575b50156110b657005b60405162461bcd60e51b8152602060048201526019602482015278115b595c99d95b98de481dda5d1a191c985dc819985a5b1959603a1b6044820152606490fd5b90506020813d602011611129575b8161111260209383613135565b810103126104535761112390613204565b816110ae565b3d9150611105565b34610453575f36600319011261045357602060405160648152f35b3461045357604036600319011261045357611165613057565b6024359060018060a01b035f541633148015611324575b61118590613322565b6001600160a01b0381169182156112e957806112e35750600a54905b600a54908183116112a757826020916111bd826111e9956132b2565b600a5560018060a01b0360025416905f60405180968195829463a9059cbb60e01b845260048401613211565b03925af1908115610643575f9161126d575b501561122e5760207f6fc8f9272152231cd59da0a4d8ff4ab244657bd4c9b10c86323a6789e1eb39d091604051908152a2005b60405162461bcd60e51b815260206004820152601760248201527614995cd95c9d99481d1c985b9cd9995c8819985a5b1959604a1b6044820152606490fd5b90506020813d60201161129f575b8161128860209383613135565b810103126104535761129990613204565b836111fb565b3d915061127b565b60405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e74207265736572766560601b6044820152606490fd5b906111a1565b60405162461bcd60e51b8152602060048201526013602482015272496e76616c69642044414f206164647265737360681b6044820152606490fd5b506009546001600160a01b0316331461117c565b34610453575f36600319011261045357602060405168a2a15d09519be000008152f35b34610453575f366003190112610453575f546040516001600160a01b039091168152602090f35b346104535760203660031901126104535761139b613057565b6113a3613711565b600880546001600160a01b0319166001600160a01b039290921691821790557febf8531fbf2a66acb463b407c92fc778a155bd05f6cf3193b5bc39ea2608e3a35f80a2005b34610453575f366003190112610453576020601a54604051908152f35b346104535760403660031901126104535761141e613057565b6024356001600160401b0381116104535736602382011215610453576004810135916001600160401b038311610453573660248484010111610453575f546001600160a01b0316331480156115fc575b61147790613322565b60018060a01b031690815f52601b60205260405f20600160ff19825416179055815f52601c60205260405f20926114ae84546130e2565b601f81116115c1575b505f93601f82116001146115455791816024936040935f5160206137785f395f51905f5296975f91611538575b508260011b905f198460031b1c19161790555b855f52600e6020526002835f200160ff1981541690558083519485936020855282602086015201848401375f828201840152601f01601f19168101030190a2005b86915084010135886114e4565b601f198216815f5260205f20905f5b8181106115a657509183915f5160206137785f395f51905f529697604095602497951061158b575b5050600182811b0190556114f7565b84018601355f19600385901b60f8161c19169055878061157c565b85880160240135835560209788019760019093019201611554565b6115ec90855f5260205f20601f840160051c810191602085106115f2575b601f0160051c0190613362565b846114b7565b90915081906115df565b506009546001600160a01b0316331461146e565b34610453575f366003190112610453575f546001600160a01b031633148015611677575b61163d90613322565b6009805460ff60a01b1916600160a01b179055337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2005b506009546001600160a01b03163314611634565b34610453576060366003190112610453575f546001600160a01b0316331480156116cd575b6116b990613322565b600435600b55602435600c55604435600d55005b506009546001600160a01b031633146116b0565b346104535760203660031901126104535760606117046116ff613057565b613659565b90604051921515835260208301526040820152f35b34610453575f366003190112610453576006546040516001600160a01b039091168152602090f35b34610453576020366003190112610453576001600160a01b03611762613057565b165f526018602052602060405f2054604051908152f35b346104535760403660031901126104535761179261306d565b6004355f52601560205260405f209060018060a01b03165f52602052602060405f2054604051908152f35b34610453576020366003190112610453576117d6613057565b6117de613711565b6001600160a01b0316801561180357600680546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c6964206f7261636c6560901b6044820152606490fd5b34610453575f36600319011261045357602060405160148152f35b346104535761186236613083565b9061186b6136f1565b61187e61187733613659565b50506135c9565b5f913390835b81811061195f5784801561191d5760206118c25f9260018060a01b03600354169060405194858094819363a9059cbb60e01b83523360048401613211565b03925af18015610643575f906118e2575b6118dc90613615565b60018055005b506020813d602011611915575b816118fc60209383613135565b81010312610453576119106118dc91613204565b6118d3565b3d91506118ef565b60405162461bcd60e51b815260206004820152601a6024820152794e6f20544f555253207265776172647320617661696c61626c6560301b6044820152606490fd5b61196a8183866131a2565b3594855f52601460205260ff600360405f2001541615611a1057855f52601960205260405f20845f5260205260ff60405f205416611a1057855f52601560205260405f20845f5260205260405f205415611a105790600191865f52601960205260405f20855f5260205260405f208360ff198254161790556119ef600d5480926131f7565b966040519182525f5160206137585f395f51905f5260203393a35b01611884565b9450600190611a0a565b34610453575f36600319011261045357611a32613711565b5f80546001600160a01b0319811682556001600160a01b03165f5160206137985f395f51905f528280a3005b3461045357602036600319011261045357611a77613057565b5f546001600160a01b031633148015611ab0575b611a9490613322565b6001600160a01b03165f908152600e6020526040812060040155005b506009546001600160a01b03163314611a8b565b3461045357602036600319011261045357611add613057565b611ae5613711565b600980546001600160a01b039283166001600160a01b0319821681179092559091167fad99ec16ff9b9004b2ddbacc44c5139d53cc9b33f00257772bd5101bc69bd5325f80a3005b3461045357602036600319011261045357600435611b496136f1565b805f526014602052611b6460ff600360405f20015416613378565b5f81815260196020908152604080832033845290915290205460ff16611c86575f818152601560209081526040808320338452909152902054611ba89015156133ba565b611bb461187733613659565b5f81815260196020908152604080832033808552908352818420805460ff19166001179055600354600d54925163a9059cbb60e01b81529485936001600160a01b03929092169284928391611c0d919060048401613211565b03925af18015610643575f90611c4b575b611c289150613615565b600d54906040519182525f5160206137585f395f51905f5260203393a360018055005b506020813d602011611c7e575b81611c6560209383613135565b8101031261045357611c79611c2891613204565b611c1e565b3d9150611c58565b60405162461bcd60e51b81526020600482015260156024820152741513d55494c8185b1c9958591e4818db185a5b5959605a1b6044820152606490fd5b34610453576020366003190112610453576001600160a01b03611ce4613057565b165f526007602052602060ff60405f2054166040519015158152f35b34610453575f366003190112610453576005546040516001600160a01b039091168152602090f35b3461045357602036600319011261045357600435600481101561045357611d5060209161356a565b604051908152f35b34610453575f36600319011261045357602060ff60095460a01c166040519015158152f35b34610453575f36600319011261045357602060405161012c8152f35b34610453575f366003190112610453576003546040516001600160a01b039091168152602090f35b34610453575f36600319011261045357602060405160328152f35b3461045357602036600319011261045357600435600481101561045357611d506020916134f1565b34610453575f36600319011261045357602060405167d02ab486cedc00008152f35b3461045357611e3436613178565b9160018060a01b03165f52601360205260405f20905f5260205260405f20905f52602052602060405f2054604051908152f35b3461045357602036600319011261045357611e80613057565b611e9260ff60095460a01c1615613271565b335f52600e60205260405f2060ff6002820154169081612094575b5015612053576001600160a01b031633811461201357805f52600e60205260405f20600281019060ff82541615611fd657600460329101611eee81546132bf565b809155836040518281527f289539b06240a886d700145b820c8461a9ebae74a8eab0d9bc2a97bd2754e0a660203392a31015611f2657005b815f52601b60205260405f20600160ff19825416179055815f52601c60205260405f20611f5381546130e2565b601f8111611fb6575b50601e6e10dbdb5b5d5b9a5d1e481d9bdd1959608a1b01905560ff1981541690555f5160206137785f395f51905f52606060405160208152600f60208201526e10dbdb5b5d5b9a5d1e481d9bdd1959608a1b6040820152a2005b611fd090825f52601f60205f20910160051c810190613362565b83611f5c565b60405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd081cdd589cd8dc9a589959605a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601860248201527721b0b73737ba103b37ba32903337b9103cb7bab939b2b63360411b6044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527826bab9ba1031329030b1ba34bb329039bab139b1b934b132b960391b6044820152606490fd5b60019150015442111582611ead565b34610453575f366003190112610453576020604051601e8152f35b34610453575f366003190112610453576020604051680410d586a20a4c00008152f35b34610453575f366003190112610453575f546001600160a01b031633148015612142575b61210e90613322565b6009805460ff60a01b19169055337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2005b506009546001600160a01b03163314612105565b34610453575f366003190112610453576020601054604051908152f35b34610453575f3660031901126104535760206040516101f48152f35b3461045357604036600319011261045357600435600481101561045357602435906121b86136f1565b6121ca60ff60095460a01c1615613271565b6121d58215156133fc565b335f52600e60205260405f206121ea826134f1565b6121f38361356a565b6002546040516323b872dd60e01b81529060209082906001600160a01b0316815f8161222489303360048501613436565b03925af180156106435785915f916122cf575b509060055f5160206137d85f395f51905f529561225661229f94613458565b600181018054909542821015610904576122719150426131f7565b85558881555f898152600f6020526040902080546001600160a01b031916331790556010546108b6906132bf565b62278d0042045f52601460205260405f206122bb8382546131f7565b9055546108fb6040519283923396846134ad565b9150506020813d60201161231f575b816122eb60209383613135565b81010312610453578460055f5160206137d85f395f51905f529561225661231461229f95613204565b939450509550612237565b3d91506122de565b34610453575f366003190112610453576020600d54604051908152f35b34610453576020366003190112610453576004356123606136f1565b805f52601460205261237b60ff600360405f20015416613378565b335f52601760205260405f20815f5260205260ff60405f2054166124ca575f818152601560209081526040808320338452909152902054906123be8215156133ba565b805f5260146020526123e660405f2060016123dd6002830154866131c6565b910154906131d9565b5f82815260166020908152604080832033808552908352818420859055601783528184208685528352818420805460ff19166001179055600254915163a9059cbb60e01b81529496949384926001600160a01b0316918391908290612450908b9060048401613211565b03925af18015610643575f9061248f575b61246b915061322c565b60405192835260208301525f5160206137385f395f51905f5260403393a360018055005b506020813d6020116124c2575b816124a960209383613135565b81010312610453576124bd61246b91613204565b612461565b3d915061249c565b60405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606490fd5b346104535760203660031901126104535761251a613057565b5f546001600160a01b03163314801561261c575b61253790613322565b6001600160a01b03165f818152601b60209081526040808320805460ff19169055601c9091529020805461256a906130e2565b90816125d9575b50505f818152600e602052604081206004810191909155600101544211156125ba575b7fcff4acea33dd64305f2312e4c3ab1eb07c587bc71c924b609c4aac3c60cb981a5f80a2005b805f52600e602052600260405f2001600160ff19825416179055612594565b81601f5f93116001146125f05750555b8180612571565b8183526020832061260c91601f0160051c810190600101613362565b80825281602081209155556125e9565b506009546001600160a01b0316331461252e565b346104535761263e36613178565b909161265260ff60095460a01c1615613271565b6006546001600160a01b03163303612b2f576001600160a01b03165f818152600e60205260409020600281015491929160ff1680612b21575b15612ae557825f52601b60205260ff60405f205416612aae5760048054604051633003257760e21b8152918201869052602090829060249082906001600160a01b03165afa908115610643575f91612a73575b50600281101561043f57612a3c57601e8210612a065762015180420490835f52601160205260405f20855f5260205260405f209161012c6127208454426132b2565b106129cf57845f52601260205260405f20815f526020526101f460405f2054101561298e57845f52601360205260405f20815f5260205260405f20865f52602052606460405f2054101561294e578360016003944281550155845f52601260205260405f20815f5260205260405f2061279981546132bf565b9055845f52601360205260405f20905f5260205260405f20855f5260205260405f206127c581546132bf565b9055016127d281546132bf565b9055602462278d004204805f526014602052600160405f20016127f581546132bf565b90555f60018060a01b036004541660405193848092621b49e560e41b82528960048301525afa918215610643575f92612894575b50916040915f5160206137b85f395f51905f52935f526015602052825f2060018060a01b0382165f52602052825f2061286281546132bf565b90556001600160a01b03165f90815260186020528290208054612884906132bf565b90558151908152426020820152a3005b9150913d805f843e6128a68184613135565b8201916101a081840312610453576020810151926001600160a01b03841684036104535760408201516001600160401b03811161045357816128e99184016132cd565b506060820151906001600160401b038211610453576129099183016132cd565b506129176101408201613204565b50600261016082015110156104535761018001516001600160601b0381160361045357915f5160206137b85f395f51905f52612829565b60405162461bcd60e51b815260206004820152601860248201527714dbdb99c81c1b185e481b1a5b5a5d08195e18d95959195960421b6044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527811185a5b1e481c1b185e481b1a5b5a5d08195e18d959591959603a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e2932b83630bc903a37b79039b7b7b760891b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d141b185e481d1bdbc81cda1bdc9d60921b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e139bdd0818481b5d5cda58c8139195608a1b6044820152606490fd5b90506020813d602011612aa6575b81612a8e60209383613135565b810103126104535751600281101561045357856126de565b3d9150612a81565b60405162461bcd60e51b815260206004820152600f60248201526e1058d8dbdd5b9d08199b1859d9d959608a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21039bab139b1b934b83a34b7b760611b6044820152606490fd5b50600181015442111561268b565b60405162461bcd60e51b815260206004820152601c60248201527b4f6e6c79206f7261636c652063616e207265636f726420706c61797360201b6044820152606490fd5b34610453575f3660031901126104535762278d0042045f818152601460205260409081902090519190608083016001600160401b03811184821017612bf257610e239160609160405280549485815260ff6003600184015493846020850152600281015460408501520154161515928391015260405194859485613158565b634e487b7160e01b5f52604160045260245ffd5b34610453576020366003190112610453576001600160a01b03612c27613057565b165f52601c60205260405f206040515f825492612c43846130e2565b9081845260208401946001811690815f14612cdc5750600114612c9c575b84604085612c7181870382613135565b8151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b5f90815260208120939250905b808210612cc257509091508101602001612c7182612c61565b919260018160209254838588010152019101909291612ca9565b60ff191686525050151560051b82016020019050612c7182612c61565b34610453576020366003190112610453576004355f52600f60205260018060a01b0360405f205416805f52600e60205260405f2090604051612d3a8161311a565b825481526001830154926020820193845260ff60028201541660408301901515815260ff6005600384015493606086019485526004810154608087015201541691600483101561043f5760a0958387610aa0960152519151151590519160405195865260208601526040850152606084015260808301906130d5565b3461045357612dc436613083565b90612dcd6136f1565b5f913390835b818110612ea257848015612e66576020612e115f9260018060a01b03600254169060405194858094819363a9059cbb60e01b83523360048401613211565b03925af18015610643575f90612e2b575b6118dc9061322c565b506020813d602011612e5e575b81612e4560209383613135565b8101031261045357612e596118dc91613204565b612e22565b3d9150612e38565b60405162461bcd60e51b81526020600482015260146024820152734e6f207061796f75747320617661696c61626c6560601b6044820152606490fd5b612ead8183866131a2565b3594855f52601460205260ff600360405f2001541615612f9957335f52601760205260405f20865f5260205260ff60405f205416612f9957855f52601560205260405f20845f5260205260405f2054958615612f8e579081600193925f526014602052612f68612f2960405f20866123dd60028301548d6131c6565b8093835f52601660205260405f20895f526020528160405f2055335f52601760205260405f20845f5260205260405f208760ff198254161790556131f7565b9760405192835260208301525f5160206137385f395f51905f5260403393a35b01612dd3565b509450600190612f88565b9450600190612f88565b34610453575f366003190112610453576020604051600a8152f35b34610453575f366003190112610453576020600c54604051908152f35b34610453575f36600319011261045357602060405160468152f35b34610453575f366003190112610453576008546040516001600160a01b039091168152602090f35b34610453576020366003190112610453576020906001600160a01b03613042613057565b165f52601b825260ff60405f20541615158152f35b600435906001600160a01b038216820361045357565b602435906001600160a01b038216820361045357565b906020600319830112610453576004356001600160401b0381116104535782602382011215610453576004810135926001600160401b0384116104535760248460051b83010111610453576024019190565b90600482101561043f5752565b90600182811c92168015613110575b60208310146130fc57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916130f1565b60c081019081106001600160401b03821117612bf257604052565b601f909101601f19168101906001600160401b03821190821017612bf257604052565b926060929594919560808501968552602085015260408401521515910152565b6060906003190112610453576004356001600160a01b038116810361045357906024359060443590565b91908110156131b25760051b0190565b634e487b7160e01b5f52603260045260245ffd5b8181029291811591840414171561064e57565b81156131e3570490565b634e487b7160e01b5f52601260045260245ffd5b9190820180921161064e57565b5190811515820361045357565b6001600160a01b039091168152602081019190915260400190565b1561323357565b60405162461bcd60e51b815260206004820152601660248201527514185e5bdd5d081d1c985b9cd9995c8819985a5b195960521b6044820152606490fd5b1561327857565b60405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b6044820152606490fd5b9190820391821161064e57565b5f19811461064e5760010190565b81601f82011215610453578051906001600160401b038211612bf25760405192613301601f8401601f191660200185613135565b8284526020838301011161045357815f9260208093018386015e8301015290565b1561332957565b60405162461bcd60e51b81526020600482015260116024820152704f6e6c79206f776e6572206f722044414f60781b6044820152606490fd5b81811061336d575050565b5f8155600101613362565b1561337f57565b60405162461bcd60e51b8152602060048201526013602482015272135bdb9d1a081b9bdd08199a5b985b1a5e9959606a1b6044820152606490fd5b156133c157565b60405162461bcd60e51b815260206004820152601360248201527209cde40e0d8c2f2e640e8d0d2e640dadedce8d606b1b6044820152606490fd5b1561340357565b60405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a590811925160aa1b6044820152606490fd5b6001600160a01b03918216815291166020820152604081019190915260600190565b1561345f57565b60405162461bcd60e51b815260206004820152600e60248201526d14185e5b595b9d0819985a5b195960921b6044820152606490fd5b90600481101561043f5760ff80198354169116179055565b6040919493926134c18260608101976130d5565b60208201520152565b60609060208152600c60208201526b24b73b30b634b2103a34b2b960a11b60408201520190565b600481101561043f57801561355d576001811461354f5760028114613541576003146135345760405162461bcd60e51b815280613530600482016134ca565b0390fd5b68a2a15d09519be0000090565b50681043561a882930000090565b50680410d586a20a4c000090565b5067d02ab486cedc000090565b600481101561043f5780156135c157600181146135b957600281146135b1576003146135a95760405162461bcd60e51b815280613530600482016134ca565b6301e1338090565b5062278d0090565b5062093a8090565b506201518090565b156135d057565b60405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656c696769626c6520666f7220544f555253207265776172640000006044820152606490fd5b1561361c57565b60405162461bcd60e51b81526020600482015260156024820152741513d55494c81d1c985b9cd9995c8819985a5b1959605a1b6044820152606490fd5b60048054604051630890832160e21b81526001600160a01b03938416928101839052919260209183916024918391165afa908115610643575f916136bf575b5080915f52601860205260405f205490600b541115806136b55792565b50600c5481101592565b90506020813d6020116136e9575b816136da60209383613135565b8101031261045357515f613698565b3d91506136cd565b600260015414613702576002600155565b633ee5aeb560e01b5f5260045ffd5b5f546001600160a01b0316330361372457565b63118cdaa760e01b5f523360045260245ffdfec87a86dc38776dc1e0d14fc84368bce0e0226d01c69b89b18004397fd9a0886a224d8c15e2fc3f2f270c947fbff297db78e4a9355931ae0bfc298f1818493b084368ed9f2172998033159d787a8ed9a00ce0e12d528fdd7a205c31444e246cbb8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f39503129ba19bf173751c70fcadbac7d2d5d8af082e69b1be2de2d385cd1f4abccf673085928ae8da1e9975e5a6f63d58aa3ea09b0261b11189171d396d1577a2646970667358221220cfd2fdb9874684d3bd976e2aa721d5708c801a5b7856c707abca402d92c87a3b64736f6c634300081e00330000000000000000000000003bd359c1119da7da1d913d1c4d2b7c461115433a00000000000000000000000045b76a127167fd7fc7ed264ad490144300ecfcbf000000000000000000000000b9b3acf33439360b55d12429301e946f34f3b73f000000000000000000000000b5ff3ed7ab53a4dda6c9887e0a0039c5f1e801070000000000000000000000008df64bacf6b70f7787f8d14429b258b3ff958ec1

Deployed Bytecode

0x6080806040526004361015610012575f80fd5b5f3560e01c90816305d2e7ee1461301e5750806308744e7414612ff65780630fcbd2b914612fdb5780631618b9de14612fbe578063173b31d814612fa357806328bfb48814612db65780632935561214612cf95780632a96b68d14612c065780632bca43bf14612b735780632bdc1459146126305780632c272456146125015780632d83990d146123445780632da27228146123275780633a04bc0c1461218f5780633a1e50b3146121735780633df116b0146121565780633f4ba83a146120e15780633f50ec7d146120be57806345f42493146120a357806347fa387e14611e675780634b56102914611e265780634c68df6714610bb457806350ada72814611e045780635586402d14611ddc57806358ef9d2114611dc15780635997124b14611d995780635b6feb0e14611d7d5780635c975abb14611d585780635e07e87714611d2857806361d027b314611d0057806368897e2f14611cc35780636930bcbd14611b2d5780636bb582da14611ac45780636c4907e314611a5e578063715018a614611a1a578063717c95731461185457806374792153146118395780637adbf973146117bd5780637d1998a7146117795780637d7108c7146117415780637dc0d1d0146117195780638125d6dd146116e1578063834424af1461168b5780638456cb5914611610578063854c74fb14611405578063862a4d47146113e857806387bba1e9146113825780638da5cb5b1461135b5780638fb456d7146113385780639397e6591461114c57806395c14eb31461113157806395ccea671461103f5780639a2666b814610ff65780639aaf28c814610fc45780639f809c8f14610fa1578063a20e4b2614610f5a578063b081304f14610eaa578063b128fe5614610e27578063b1d9adfd14610ddf578063b2a3d25614610d9b578063b78fadfb14610d57578063b85962e314610d2f578063bccd649014610ce2578063bebe4a5714610c1a578063c76b2a1b14610bd1578063cb765c1d14610bb4578063d08610fc14610b8c578063d41c713814610b6f578063d56d229d14610b47578063ebbb360214610aa2578063f046395a14610a23578063f0f44260146109a5578063f27eedc014610785578063f2fde38b14610713578063f5c4d714146104575763f804bb0e14610360575f80fd5b34610453576020366003190112610453576001600160a01b03610381613057565b16805f52600e60205260405f206040519061039b8261311a565b805482526001810154916020810192835260ff600283015416916040820192151583526003810154946060830195865260ff60056004840154936080860194855201541691600483101561043f5760e096848460a06104369701525196519551151590519151925f52601b60205260ff60405f20541695604051978852602088015260408701526060860152608085015260a08401906130d5565b151560c0820152f35b634e487b7160e01b5f52602160045260245ffd5b5f80fd5b3461045357602036600319011261045357600435610473613711565b62278d0042048110156106d857805f52601460205260405f20600381019060ff82541661069f57805480156106625760018201906104b3825415156133ba565b600a8102818104600a0361064e5760649004926014820282810460140361064e5760206104f286946104ed606461052695049889926132b2565b6132b2565b9360018060a01b036002541660018060a01b03600554165f60405180968195829463a9059cbb60e01b845260048401613211565b03925af1908115610643575f91610609575b50156105c9577fdfafe75f8a8dcaff4d9db3c7e0f5edba714a95f857cf60ec95bdd283fe8e34d294867f43fdb96d3d0465ffe29e7fe7c2af349beb96a55c5aafaeae168394d7dc889dbe604087610593606099600a546131f7565b80600a5582519182526020820152a2826002830155600160ff1982541617905554915460405192835260208301526040820152a2005b60405162461bcd60e51b8152602060048201526018602482015277151c99585cdd5c9e481d1c985b9cd9995c8819985a5b195960421b6044820152606490fd5b90506020813d60201161063b575b8161062460209383613135565b810103126104535761063590613204565b87610538565b3d9150610617565b6040513d5f823e3d90fd5b634e487b7160e01b5f52601160045260245ffd5b60405162461bcd60e51b815260206004820152601560248201527409cde40e4caeccadceaca40e8d0d2e640dadedce8d605b1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526011602482015270105b1c9958591e48199a5b985b1a5e9959607a1b6044820152606490fd5b60405162461bcd60e51b8152602060048201526013602482015272135bdb9d1a081b9bdd08195b991959081e595d606a1b6044820152606490fd5b346104535760203660031901126104535761072c613057565b610734613711565b6001600160a01b03168015610772575f80546001600160a01b03198116831782556001600160a01b0316905f5160206137985f395f51905f529080a3005b631e4fbdf760e01b5f525f60045260245ffd5b346104535760603660031901126104535761079e613057565b60243590604435906004821015610453576107b76136f1565b6107c960ff60095460a01c1615613271565b6001600160a01b0316908115610971576107e48315156133fc565b815f52600e60205260405f20906107fa816134f1565b906108048161356a565b6002546040516323b872dd60e01b81529194919060209082906001600160a01b0316815f816108388a303360048501613436565b03925af1908115610643575f91610914575b50936108cf8360056108fb9461086d5f5160206137d85f395f51905f5299613458565b600181018054909542821015610904576108889150426131f7565b85558a81555f8b8152600f6020526040902080546001600160a01b0319168b1790556010546108b6906132bf565b6010555b60028101805460ff1916600117905501613495565b62278d0042045f52601460205260405f206108eb8582546131f7565b90555492604051938493846134ad565b0390a360018055005b61090d916131f7565b85556108ba565b9490506020853d602011610969575b8161093060209383613135565b81010312610453576108cf8360056108fb9461086d61095c5f5160206137d85f395f51905f529a613204565b959950509450505061084a565b3d9150610923565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103ab9b2b960a11b6044820152606490fd5b34610453576020366003190112610453576109be613057565b6109c6613711565b6001600160a01b031680156109eb57600580546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420747265617375727960801b6044820152606490fd5b34610453576020366003190112610453576001600160a01b03610a44613057565b165f52600e60205260c060405f20610aa081549160018101549060ff60028201541660038201549060ff6005600485015494015416936040519687526020870152151560408601526060850152608084015260a08301906130d5565bf35b3461045357604036600319011261045357610abb613057565b602435908115158092036104535760207f8c6cd25384e713704ec2a60ea0e6c23cc444e6fd302dfc94470adfae186e3a1f9160018060a01b035f541633148015610b33575b610b0990613322565b60018060a01b031692835f526007825260405f2060ff1981541660ff8316179055604051908152a2005b506009546001600160a01b03163314610b00565b34610453575f366003190112610453576004546040516001600160a01b039091168152602090f35b34610453575f366003190112610453576020600b54604051908152f35b34610453575f366003190112610453576002546040516001600160a01b039091168152602090f35b34610453575f366003190112610453576020600a54604051908152f35b34610453576040366003190112610453576001600160a01b03610bf2613057565b165f52601760205260405f206024355f52602052602060ff60405f2054166040519015158152f35b34610453576020366003190112610453576001600160a01b03610c3b613057565b16805f52600e60205260405f2060405190610c558261311a565b805482526001810154916020810192835260ff60058160028501541693604084019415158552600381015460608501526004810154608085015201541690600482101561043f5760a001525115159081610cd6575b5080610cbe575b6020906040519015158152f35b505f52601b602052602060ff60405f20541615610cb1565b90505142111582610caa565b34610453576040366003190112610453576001600160a01b03610d03613057565b165f52601160205260405f206024355f526020526040805f206001815491015482519182526020820152f35b34610453575f366003190112610453576009546040516001600160a01b039091168152602090f35b3461045357604036600319011261045357610d7061306d565b6004355f52601660205260405f209060018060a01b03165f52602052602060405f2054604051908152f35b34610453576040366003190112610453576001600160a01b03610dbc613057565b165f52601260205260405f206024355f52602052602060405f2054604051908152f35b34610453576020366003190112610453576004355f52601460205260405f208054610e2360018301549260ff60036002830154920154169060405194859485613158565b0390f35b34610453576040366003190112610453576060610e42613057565b6024355f8181526015602090815260408083206001600160a01b0390951680845294825280832054848452601683528184209584529482528083205460178352818420948452938252918290205482519485529084019290925260ff91909116151590820152f35b3461045357602036600319011261045357610ec3613057565b6008546001600160a01b03163303610f1c576001600160a01b03165f818152600760205260408120805460ff191660011790557f312c88b49d88ba64507dff9c1b70eba4420d5e32287279dd459df90a4843c7b39080a2005b60405162461bcd60e51b815260206004820152601660248201527527b7363c90383630ba3337b9369037b832b930ba37b960511b6044820152606490fd5b34610453576020366003190112610453576001600160a01b03610f7b613057565b165f52601260205260405f206201518042045f52602052602060405f2054604051908152f35b34610453575f366003190112610453576020604051681043561a88293000008152f35b34610453576020366003190112610453576004355f52600f602052602060018060a01b0360405f205416604051908152f35b346104535760403660031901126104535761100f61306d565b6004355f52601960205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b34610453576040366003190112610453575f602061109361105e613057565b611066613711565b835460405163a9059cbb60e01b81529485938492839190602435906001600160a01b031660048401613211565b03926001600160a01b03165af1908115610643575f916110f7575b50156110b657005b60405162461bcd60e51b8152602060048201526019602482015278115b595c99d95b98de481dda5d1a191c985dc819985a5b1959603a1b6044820152606490fd5b90506020813d602011611129575b8161111260209383613135565b810103126104535761112390613204565b816110ae565b3d9150611105565b34610453575f36600319011261045357602060405160648152f35b3461045357604036600319011261045357611165613057565b6024359060018060a01b035f541633148015611324575b61118590613322565b6001600160a01b0381169182156112e957806112e35750600a54905b600a54908183116112a757826020916111bd826111e9956132b2565b600a5560018060a01b0360025416905f60405180968195829463a9059cbb60e01b845260048401613211565b03925af1908115610643575f9161126d575b501561122e5760207f6fc8f9272152231cd59da0a4d8ff4ab244657bd4c9b10c86323a6789e1eb39d091604051908152a2005b60405162461bcd60e51b815260206004820152601760248201527614995cd95c9d99481d1c985b9cd9995c8819985a5b1959604a1b6044820152606490fd5b90506020813d60201161129f575b8161128860209383613135565b810103126104535761129990613204565b836111fb565b3d915061127b565b60405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e74207265736572766560601b6044820152606490fd5b906111a1565b60405162461bcd60e51b8152602060048201526013602482015272496e76616c69642044414f206164647265737360681b6044820152606490fd5b506009546001600160a01b0316331461117c565b34610453575f36600319011261045357602060405168a2a15d09519be000008152f35b34610453575f366003190112610453575f546040516001600160a01b039091168152602090f35b346104535760203660031901126104535761139b613057565b6113a3613711565b600880546001600160a01b0319166001600160a01b039290921691821790557febf8531fbf2a66acb463b407c92fc778a155bd05f6cf3193b5bc39ea2608e3a35f80a2005b34610453575f366003190112610453576020601a54604051908152f35b346104535760403660031901126104535761141e613057565b6024356001600160401b0381116104535736602382011215610453576004810135916001600160401b038311610453573660248484010111610453575f546001600160a01b0316331480156115fc575b61147790613322565b60018060a01b031690815f52601b60205260405f20600160ff19825416179055815f52601c60205260405f20926114ae84546130e2565b601f81116115c1575b505f93601f82116001146115455791816024936040935f5160206137785f395f51905f5296975f91611538575b508260011b905f198460031b1c19161790555b855f52600e6020526002835f200160ff1981541690558083519485936020855282602086015201848401375f828201840152601f01601f19168101030190a2005b86915084010135886114e4565b601f198216815f5260205f20905f5b8181106115a657509183915f5160206137785f395f51905f529697604095602497951061158b575b5050600182811b0190556114f7565b84018601355f19600385901b60f8161c19169055878061157c565b85880160240135835560209788019760019093019201611554565b6115ec90855f5260205f20601f840160051c810191602085106115f2575b601f0160051c0190613362565b846114b7565b90915081906115df565b506009546001600160a01b0316331461146e565b34610453575f366003190112610453575f546001600160a01b031633148015611677575b61163d90613322565b6009805460ff60a01b1916600160a01b179055337f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585f80a2005b506009546001600160a01b03163314611634565b34610453576060366003190112610453575f546001600160a01b0316331480156116cd575b6116b990613322565b600435600b55602435600c55604435600d55005b506009546001600160a01b031633146116b0565b346104535760203660031901126104535760606117046116ff613057565b613659565b90604051921515835260208301526040820152f35b34610453575f366003190112610453576006546040516001600160a01b039091168152602090f35b34610453576020366003190112610453576001600160a01b03611762613057565b165f526018602052602060405f2054604051908152f35b346104535760403660031901126104535761179261306d565b6004355f52601560205260405f209060018060a01b03165f52602052602060405f2054604051908152f35b34610453576020366003190112610453576117d6613057565b6117de613711565b6001600160a01b0316801561180357600680546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c6964206f7261636c6560901b6044820152606490fd5b34610453575f36600319011261045357602060405160148152f35b346104535761186236613083565b9061186b6136f1565b61187e61187733613659565b50506135c9565b5f913390835b81811061195f5784801561191d5760206118c25f9260018060a01b03600354169060405194858094819363a9059cbb60e01b83523360048401613211565b03925af18015610643575f906118e2575b6118dc90613615565b60018055005b506020813d602011611915575b816118fc60209383613135565b81010312610453576119106118dc91613204565b6118d3565b3d91506118ef565b60405162461bcd60e51b815260206004820152601a6024820152794e6f20544f555253207265776172647320617661696c61626c6560301b6044820152606490fd5b61196a8183866131a2565b3594855f52601460205260ff600360405f2001541615611a1057855f52601960205260405f20845f5260205260ff60405f205416611a1057855f52601560205260405f20845f5260205260405f205415611a105790600191865f52601960205260405f20855f5260205260405f208360ff198254161790556119ef600d5480926131f7565b966040519182525f5160206137585f395f51905f5260203393a35b01611884565b9450600190611a0a565b34610453575f36600319011261045357611a32613711565b5f80546001600160a01b0319811682556001600160a01b03165f5160206137985f395f51905f528280a3005b3461045357602036600319011261045357611a77613057565b5f546001600160a01b031633148015611ab0575b611a9490613322565b6001600160a01b03165f908152600e6020526040812060040155005b506009546001600160a01b03163314611a8b565b3461045357602036600319011261045357611add613057565b611ae5613711565b600980546001600160a01b039283166001600160a01b0319821681179092559091167fad99ec16ff9b9004b2ddbacc44c5139d53cc9b33f00257772bd5101bc69bd5325f80a3005b3461045357602036600319011261045357600435611b496136f1565b805f526014602052611b6460ff600360405f20015416613378565b5f81815260196020908152604080832033845290915290205460ff16611c86575f818152601560209081526040808320338452909152902054611ba89015156133ba565b611bb461187733613659565b5f81815260196020908152604080832033808552908352818420805460ff19166001179055600354600d54925163a9059cbb60e01b81529485936001600160a01b03929092169284928391611c0d919060048401613211565b03925af18015610643575f90611c4b575b611c289150613615565b600d54906040519182525f5160206137585f395f51905f5260203393a360018055005b506020813d602011611c7e575b81611c6560209383613135565b8101031261045357611c79611c2891613204565b611c1e565b3d9150611c58565b60405162461bcd60e51b81526020600482015260156024820152741513d55494c8185b1c9958591e4818db185a5b5959605a1b6044820152606490fd5b34610453576020366003190112610453576001600160a01b03611ce4613057565b165f526007602052602060ff60405f2054166040519015158152f35b34610453575f366003190112610453576005546040516001600160a01b039091168152602090f35b3461045357602036600319011261045357600435600481101561045357611d5060209161356a565b604051908152f35b34610453575f36600319011261045357602060ff60095460a01c166040519015158152f35b34610453575f36600319011261045357602060405161012c8152f35b34610453575f366003190112610453576003546040516001600160a01b039091168152602090f35b34610453575f36600319011261045357602060405160328152f35b3461045357602036600319011261045357600435600481101561045357611d506020916134f1565b34610453575f36600319011261045357602060405167d02ab486cedc00008152f35b3461045357611e3436613178565b9160018060a01b03165f52601360205260405f20905f5260205260405f20905f52602052602060405f2054604051908152f35b3461045357602036600319011261045357611e80613057565b611e9260ff60095460a01c1615613271565b335f52600e60205260405f2060ff6002820154169081612094575b5015612053576001600160a01b031633811461201357805f52600e60205260405f20600281019060ff82541615611fd657600460329101611eee81546132bf565b809155836040518281527f289539b06240a886d700145b820c8461a9ebae74a8eab0d9bc2a97bd2754e0a660203392a31015611f2657005b815f52601b60205260405f20600160ff19825416179055815f52601c60205260405f20611f5381546130e2565b601f8111611fb6575b50601e6e10dbdb5b5d5b9a5d1e481d9bdd1959608a1b01905560ff1981541690555f5160206137785f395f51905f52606060405160208152600f60208201526e10dbdb5b5d5b9a5d1e481d9bdd1959608a1b6040820152a2005b611fd090825f52601f60205f20910160051c810190613362565b83611f5c565b60405162461bcd60e51b815260206004820152601560248201527415185c99d95d081b9bdd081cdd589cd8dc9a589959605a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601860248201527721b0b73737ba103b37ba32903337b9103cb7bab939b2b63360411b6044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527826bab9ba1031329030b1ba34bb329039bab139b1b934b132b960391b6044820152606490fd5b60019150015442111582611ead565b34610453575f366003190112610453576020604051601e8152f35b34610453575f366003190112610453576020604051680410d586a20a4c00008152f35b34610453575f366003190112610453575f546001600160a01b031633148015612142575b61210e90613322565b6009805460ff60a01b19169055337f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5f80a2005b506009546001600160a01b03163314612105565b34610453575f366003190112610453576020601054604051908152f35b34610453575f3660031901126104535760206040516101f48152f35b3461045357604036600319011261045357600435600481101561045357602435906121b86136f1565b6121ca60ff60095460a01c1615613271565b6121d58215156133fc565b335f52600e60205260405f206121ea826134f1565b6121f38361356a565b6002546040516323b872dd60e01b81529060209082906001600160a01b0316815f8161222489303360048501613436565b03925af180156106435785915f916122cf575b509060055f5160206137d85f395f51905f529561225661229f94613458565b600181018054909542821015610904576122719150426131f7565b85558881555f898152600f6020526040902080546001600160a01b031916331790556010546108b6906132bf565b62278d0042045f52601460205260405f206122bb8382546131f7565b9055546108fb6040519283923396846134ad565b9150506020813d60201161231f575b816122eb60209383613135565b81010312610453578460055f5160206137d85f395f51905f529561225661231461229f95613204565b939450509550612237565b3d91506122de565b34610453575f366003190112610453576020600d54604051908152f35b34610453576020366003190112610453576004356123606136f1565b805f52601460205261237b60ff600360405f20015416613378565b335f52601760205260405f20815f5260205260ff60405f2054166124ca575f818152601560209081526040808320338452909152902054906123be8215156133ba565b805f5260146020526123e660405f2060016123dd6002830154866131c6565b910154906131d9565b5f82815260166020908152604080832033808552908352818420859055601783528184208685528352818420805460ff19166001179055600254915163a9059cbb60e01b81529496949384926001600160a01b0316918391908290612450908b9060048401613211565b03925af18015610643575f9061248f575b61246b915061322c565b60405192835260208301525f5160206137385f395f51905f5260403393a360018055005b506020813d6020116124c2575b816124a960209383613135565b81010312610453576124bd61246b91613204565b612461565b3d915061249c565b60405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606490fd5b346104535760203660031901126104535761251a613057565b5f546001600160a01b03163314801561261c575b61253790613322565b6001600160a01b03165f818152601b60209081526040808320805460ff19169055601c9091529020805461256a906130e2565b90816125d9575b50505f818152600e602052604081206004810191909155600101544211156125ba575b7fcff4acea33dd64305f2312e4c3ab1eb07c587bc71c924b609c4aac3c60cb981a5f80a2005b805f52600e602052600260405f2001600160ff19825416179055612594565b81601f5f93116001146125f05750555b8180612571565b8183526020832061260c91601f0160051c810190600101613362565b80825281602081209155556125e9565b506009546001600160a01b0316331461252e565b346104535761263e36613178565b909161265260ff60095460a01c1615613271565b6006546001600160a01b03163303612b2f576001600160a01b03165f818152600e60205260409020600281015491929160ff1680612b21575b15612ae557825f52601b60205260ff60405f205416612aae5760048054604051633003257760e21b8152918201869052602090829060249082906001600160a01b03165afa908115610643575f91612a73575b50600281101561043f57612a3c57601e8210612a065762015180420490835f52601160205260405f20855f5260205260405f209161012c6127208454426132b2565b106129cf57845f52601260205260405f20815f526020526101f460405f2054101561298e57845f52601360205260405f20815f5260205260405f20865f52602052606460405f2054101561294e578360016003944281550155845f52601260205260405f20815f5260205260405f2061279981546132bf565b9055845f52601360205260405f20905f5260205260405f20855f5260205260405f206127c581546132bf565b9055016127d281546132bf565b9055602462278d004204805f526014602052600160405f20016127f581546132bf565b90555f60018060a01b036004541660405193848092621b49e560e41b82528960048301525afa918215610643575f92612894575b50916040915f5160206137b85f395f51905f52935f526015602052825f2060018060a01b0382165f52602052825f2061286281546132bf565b90556001600160a01b03165f90815260186020528290208054612884906132bf565b90558151908152426020820152a3005b9150913d805f843e6128a68184613135565b8201916101a081840312610453576020810151926001600160a01b03841684036104535760408201516001600160401b03811161045357816128e99184016132cd565b506060820151906001600160401b038211610453576129099183016132cd565b506129176101408201613204565b50600261016082015110156104535761018001516001600160601b0381160361045357915f5160206137b85f395f51905f52612829565b60405162461bcd60e51b815260206004820152601860248201527714dbdb99c81c1b185e481b1a5b5a5d08195e18d95959195960421b6044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527811185a5b1e481c1b185e481b1a5b5a5d08195e18d959591959603a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e2932b83630bc903a37b79039b7b7b760891b6044820152606490fd5b60405162461bcd60e51b815260206004820152600e60248201526d141b185e481d1bdbc81cda1bdc9d60921b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e139bdd0818481b5d5cda58c8139195608a1b6044820152606490fd5b90506020813d602011612aa6575b81612a8e60209383613135565b810103126104535751600281101561045357856126de565b3d9150612a81565b60405162461bcd60e51b815260206004820152600f60248201526e1058d8dbdd5b9d08199b1859d9d959608a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21039bab139b1b934b83a34b7b760611b6044820152606490fd5b50600181015442111561268b565b60405162461bcd60e51b815260206004820152601c60248201527b4f6e6c79206f7261636c652063616e207265636f726420706c61797360201b6044820152606490fd5b34610453575f3660031901126104535762278d0042045f818152601460205260409081902090519190608083016001600160401b03811184821017612bf257610e239160609160405280549485815260ff6003600184015493846020850152600281015460408501520154161515928391015260405194859485613158565b634e487b7160e01b5f52604160045260245ffd5b34610453576020366003190112610453576001600160a01b03612c27613057565b165f52601c60205260405f206040515f825492612c43846130e2565b9081845260208401946001811690815f14612cdc5750600114612c9c575b84604085612c7181870382613135565b8151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b5f90815260208120939250905b808210612cc257509091508101602001612c7182612c61565b919260018160209254838588010152019101909291612ca9565b60ff191686525050151560051b82016020019050612c7182612c61565b34610453576020366003190112610453576004355f52600f60205260018060a01b0360405f205416805f52600e60205260405f2090604051612d3a8161311a565b825481526001830154926020820193845260ff60028201541660408301901515815260ff6005600384015493606086019485526004810154608087015201541691600483101561043f5760a0958387610aa0960152519151151590519160405195865260208601526040850152606084015260808301906130d5565b3461045357612dc436613083565b90612dcd6136f1565b5f913390835b818110612ea257848015612e66576020612e115f9260018060a01b03600254169060405194858094819363a9059cbb60e01b83523360048401613211565b03925af18015610643575f90612e2b575b6118dc9061322c565b506020813d602011612e5e575b81612e4560209383613135565b8101031261045357612e596118dc91613204565b612e22565b3d9150612e38565b60405162461bcd60e51b81526020600482015260146024820152734e6f207061796f75747320617661696c61626c6560601b6044820152606490fd5b612ead8183866131a2565b3594855f52601460205260ff600360405f2001541615612f9957335f52601760205260405f20865f5260205260ff60405f205416612f9957855f52601560205260405f20845f5260205260405f2054958615612f8e579081600193925f526014602052612f68612f2960405f20866123dd60028301548d6131c6565b8093835f52601660205260405f20895f526020528160405f2055335f52601760205260405f20845f5260205260405f208760ff198254161790556131f7565b9760405192835260208301525f5160206137385f395f51905f5260403393a35b01612dd3565b509450600190612f88565b9450600190612f88565b34610453575f366003190112610453576020604051600a8152f35b34610453575f366003190112610453576020600c54604051908152f35b34610453575f36600319011261045357602060405160468152f35b34610453575f366003190112610453576008546040516001600160a01b039091168152602090f35b34610453576020366003190112610453576020906001600160a01b03613042613057565b165f52601b825260ff60405f20541615158152f35b600435906001600160a01b038216820361045357565b602435906001600160a01b038216820361045357565b906020600319830112610453576004356001600160401b0381116104535782602382011215610453576004810135926001600160401b0384116104535760248460051b83010111610453576024019190565b90600482101561043f5752565b90600182811c92168015613110575b60208310146130fc57565b634e487b7160e01b5f52602260045260245ffd5b91607f16916130f1565b60c081019081106001600160401b03821117612bf257604052565b601f909101601f19168101906001600160401b03821190821017612bf257604052565b926060929594919560808501968552602085015260408401521515910152565b6060906003190112610453576004356001600160a01b038116810361045357906024359060443590565b91908110156131b25760051b0190565b634e487b7160e01b5f52603260045260245ffd5b8181029291811591840414171561064e57565b81156131e3570490565b634e487b7160e01b5f52601260045260245ffd5b9190820180921161064e57565b5190811515820361045357565b6001600160a01b039091168152602081019190915260400190565b1561323357565b60405162461bcd60e51b815260206004820152601660248201527514185e5bdd5d081d1c985b9cd9995c8819985a5b195960521b6044820152606490fd5b1561327857565b60405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b6044820152606490fd5b9190820391821161064e57565b5f19811461064e5760010190565b81601f82011215610453578051906001600160401b038211612bf25760405192613301601f8401601f191660200185613135565b8284526020838301011161045357815f9260208093018386015e8301015290565b1561332957565b60405162461bcd60e51b81526020600482015260116024820152704f6e6c79206f776e6572206f722044414f60781b6044820152606490fd5b81811061336d575050565b5f8155600101613362565b1561337f57565b60405162461bcd60e51b8152602060048201526013602482015272135bdb9d1a081b9bdd08199a5b985b1a5e9959606a1b6044820152606490fd5b156133c157565b60405162461bcd60e51b815260206004820152601360248201527209cde40e0d8c2f2e640e8d0d2e640dadedce8d606b1b6044820152606490fd5b1561340357565b60405162461bcd60e51b815260206004820152600b60248201526a125b9d985b1a590811925160aa1b6044820152606490fd5b6001600160a01b03918216815291166020820152604081019190915260600190565b1561345f57565b60405162461bcd60e51b815260206004820152600e60248201526d14185e5b595b9d0819985a5b195960921b6044820152606490fd5b90600481101561043f5760ff80198354169116179055565b6040919493926134c18260608101976130d5565b60208201520152565b60609060208152600c60208201526b24b73b30b634b2103a34b2b960a11b60408201520190565b600481101561043f57801561355d576001811461354f5760028114613541576003146135345760405162461bcd60e51b815280613530600482016134ca565b0390fd5b68a2a15d09519be0000090565b50681043561a882930000090565b50680410d586a20a4c000090565b5067d02ab486cedc000090565b600481101561043f5780156135c157600181146135b957600281146135b1576003146135a95760405162461bcd60e51b815280613530600482016134ca565b6301e1338090565b5062278d0090565b5062093a8090565b506201518090565b156135d057565b60405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656c696769626c6520666f7220544f555253207265776172640000006044820152606490fd5b1561361c57565b60405162461bcd60e51b81526020600482015260156024820152741513d55494c81d1c985b9cd9995c8819985a5b1959605a1b6044820152606490fd5b60048054604051630890832160e21b81526001600160a01b03938416928101839052919260209183916024918391165afa908115610643575f916136bf575b5080915f52601860205260405f205490600b541115806136b55792565b50600c5481101592565b90506020813d6020116136e9575b816136da60209383613135565b8101031261045357515f613698565b3d91506136cd565b600260015414613702576002600155565b633ee5aeb560e01b5f5260045ffd5b5f546001600160a01b0316330361372457565b63118cdaa760e01b5f523360045260245ffdfec87a86dc38776dc1e0d14fc84368bce0e0226d01c69b89b18004397fd9a0886a224d8c15e2fc3f2f270c947fbff297db78e4a9355931ae0bfc298f1818493b084368ed9f2172998033159d787a8ed9a00ce0e12d528fdd7a205c31444e246cbb8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0f39503129ba19bf173751c70fcadbac7d2d5d8af082e69b1be2de2d385cd1f4abccf673085928ae8da1e9975e5a6f63d58aa3ea09b0261b11189171d396d1577a2646970667358221220cfd2fdb9874684d3bd976e2aa721d5708c801a5b7856c707abca402d92c87a3b64736f6c634300081e0033

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

0000000000000000000000003bd359c1119da7da1d913d1c4d2b7c461115433a00000000000000000000000045b76a127167fd7fc7ed264ad490144300ecfcbf000000000000000000000000b9b3acf33439360b55d12429301e946f34f3b73f000000000000000000000000b5ff3ed7ab53a4dda6c9887e0a0039c5f1e801070000000000000000000000008df64bacf6b70f7787f8d14429b258b3ff958ec1

-----Decoded View---------------
Arg [0] : _wmonToken (address): 0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A
Arg [1] : _toursToken (address): 0x45b76a127167fD7FC7Ed264ad490144300eCfcBF
Arg [2] : _nftContract (address): 0xB9B3acf33439360B55d12429301E946f34f3B73F
Arg [3] : _treasury (address): 0xb5FF3Ed7Ab53A4DDA6C9887e0a0039C5f1E80107
Arg [4] : _oracle (address): 0x8dF64bACf6b70F7787f8d14429b258B3fF958ec1

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000003bd359c1119da7da1d913d1c4d2b7c461115433a
Arg [1] : 00000000000000000000000045b76a127167fd7fc7ed264ad490144300ecfcbf
Arg [2] : 000000000000000000000000b9b3acf33439360b55d12429301e946f34f3b73f
Arg [3] : 000000000000000000000000b5ff3ed7ab53a4dda6c9887e0a0039c5f1e80107
Arg [4] : 0000000000000000000000008df64bacf6b70f7787f8d14429b258b3ff958ec1


Block Transaction 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

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.