ETH Price: $2,725.87 (+12.53%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...167343632023-03-01 14:28:47616 days ago1677680927IN
0xC177B59a...5d55e6E0b
0 ETH0.0009444130.6001677
0x60806040160843222022-11-30 17:34:23707 days ago1669829663IN
 Create: RevenuePathV2
0 ETH0.049664315.85181818

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RevenuePathV2

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 10 : RevenuePathV2.sol
// SPDX-License-Identifier: SPWPL
pragma solidity 0.8.15;

import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/proxy/utils/Initializable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/utils/SafeERC20.sol";
import "openzeppelin-solidity/contracts/security/ReentrancyGuard.sol";
import "@opengsn/contracts/src/ERC2771Recipient.sol";

/*******************************
 * @title Revenue Path V2
 * @notice The revenue path clone instance contract.
 */

interface IReveelMainV2 {
    function getPlatformWallet() external view returns (address);
}

contract RevenuePathV2 is ERC2771Recipient, Ownable, Initializable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    uint32 public constant BASE = 1e7;
    uint8 public constant VERSION = 2;

    //@notice Status to flag if fee is applicable to the revenue paths
    bool private feeRequired;

    //@notice Status to flag if revenue path is immutable. True if immutable
    bool private isImmutable;

    //@notice Fee percentage that will be applicable for additional tiers
    uint32 private platformFee;

    //@notice address of origin factory
    address private mainFactory;

    /** @notice For a given tier & address, the token revenue distribution proportion is returned
     *  @dev Index for tiers starts from 0. i.e, the first tier is marked 0 in the list.
     */
    mapping(uint256 => mapping(address => uint256)) private revenueProportion;

    // @notice Amount of token released for a given wallet [token][wallet]=>[amount]
    mapping(address => mapping(address => uint256)) private released;

    //@notice token tier limits for given token address and tier
    mapping(address => mapping(uint256 => uint256)) private tokenTierLimits;

    mapping(address => uint256) private currentTokenTier;

    // @notice Total token released from the revenue path for a given token address
    mapping(address => uint256) private totalTokenReleased;

    // @notice Total token accounted for the revenue path for a given token address
    mapping(address => uint256) private totalTokenAccounted;

    /**  @notice For a given token & wallet address, the amount of the token that can been withdrawn by the wallet
    [token][wallet]*/
    mapping(address => mapping(address => uint256)) private tokenWithdrawable;

    // @notice Total amount of token distributed for a given tier at that time.
    //[token][tier]-> [distributed amount]
    mapping(address => mapping(uint256 => uint256)) private totalDistributed;

    //@noitce Total fee accumulated by the revenue path and waiting to be collected.
    mapping(address => uint256) private feeAccumulated;

    struct RevenuePath {
        address[] walletList;
    }

    struct PathInfo {
        uint32 platformFee;
        bool isImmutable;
        address factory;
        address forwarder;
    }

    RevenuePath[] private revenueTiers;

    /********************************
     *           EVENTS              *
     ********************************/

    /** @notice Emits when token payment is withdrawn/claimed by a member
     * @param account The wallet for which ETH has been claimed for
     * @param payment The amount of ETH that has been paid out to the wallet
     */
    event PaymentReleased(address indexed account, address indexed token, uint256 indexed payment);

    /** @notice Emits when ERC20 payment is withdrawn/claimed by a member
     * @param token The token address for which withdrawal is made
     * @param account The wallet address to which withdrawal is made
     * @param payment The amount of the given token the wallet has claimed
     */
    event ERC20PaymentReleased(address indexed token, address indexed account, uint256 indexed payment);

    /** @notice Emits when tokens are distributed during withdraw or external distribution call
     *  @param token Address of token for distribution. Zero address for native token like ETH
     *  @param amount The amount of token distributed in wei
     *  @param tier The tier for which the distribution occured
     */
    event TokenDistributed(address indexed token, uint256 indexed amount, uint256 indexed tier);

    /** @notice Emits on receive; mimics ERC20 Transfer
     *  @param from Address that deposited the eth
     *  @param value Amount of ETH deposited
     */
    event DepositETH(address indexed from, uint256 value);

    /**
     *  @notice Emits when fee is distributed
     *  @param token The token address. Address 0 for native gas token like ETH
     *  @param amount The amount of fee deducted
     */
    event FeeDistributed(address indexed token, uint256 indexed amount);

    /**
     *  @notice Emits when fee is released
     *  @param token The token address. Address 0 for native gas token like ETH
     *  @param amount The amount of fee released
     */
    event FeeReleased(address indexed token, uint256 indexed amount);

    /**
     * emits when one or more revenue tiers are added
     *  @param wallets Array of arrays of wallet lists (each array is a tier)
     *  @param distributions Array of arrays of distr %s (each array is a tier)
     */
    event RevenueTierAdded(address[][] wallets, uint256[][] distributions);

    /**
     * emits when one or more revenue tiers wallets/distributions are updated
     *  @param tierNumbers Array tier numbers being updated
     *  @param wallets Array of arrays of wallet lists (each array is a tier)
     *  @param distributions Array of arrays of distr %s (each array is a tier)
     */
    event RevenueTierUpdated(uint256[] tierNumbers, address[][] wallets, uint256[][] distributions);

    /**
     * emits when one revenue tier's limit is updated
     *  @param tier tier number being updated
     *  @param tokenList Array of tokens in that tier
     *  @param newLimits Array of limits for those tokens
     */
    event TierLimitUpdated(uint256 tier, address[] tokenList, uint256[] newLimits);

    /********************************
     *           MODIFIERS          *
     ********************************/
    /** @notice Entrant guard for mutable contract methods
     */
    modifier isMutable() {
        if (isImmutable) {
            revert RevenuePathNotMutable();
        }
        _;
    }

    /********************************
     *           ERRORS          *
     ********************************/

    /** @dev Reverts when passed wallet list and distribution list length is not equal
     * @param walletCount Length of wallet list
     * @param distributionCount Length of distribution list
     */
    error WalletAndDistrbutionCtMismatch(uint256 walletCount, uint256 distributionCount);

    /** @dev Reverts when the member has zero  withdrawal balance available
     */
    error NoDuePayment();

    /** @dev Reverts when immutable path attempts to use mutable methods
     */
    error RevenuePathNotMutable();

    /** @dev Reverts when contract has insufficient token for withdrawal
     * @param contractBalance  The total balance of token available in the contract
     * @param requiredAmount The total amount of token requested for withdrawal
     */
    error InsufficentBalance(uint256 contractBalance, uint256 requiredAmount);

    /**
     *  @dev Reverts when duplicate wallet entry is present during initialize, addition or updates
     */
    error DuplicateWalletEntry();

    /**
     * @dev In case invalid zero address is provided for wallet address
     */
    error ZeroAddressProvided();

    /**
     * @dev Reverts when zero distribution percentage is provided
     */
    error ZeroDistributionProvided();

    /**
     * @dev Reverts when summation of distirbution is not equal to BASE
     */
    error TotalShareNot100();

    /**
     * @dev Reverts when a tier not in existence or added is attempted for update
     */
    error OnlyExistingTiersCanBeUpdated();

    /**
     * @dev Reverts when token already released is greater than the new limit that's being set for the tier.
     */
    error TokenLimitNotValid();

    /**
     *  @dev Reverts when tier limit given is zero in certain cases
     */
    error TierLimitGivenZero();

    /**
     * @dev Reverts when tier limit of a non-existant tier is attempted
     */
    error OnlyExistingTierLimitsCanBeUpdated();

    /**
     * @dev The total numb of tokens and equivalent token limit list count mismatch
     */
    error TokensAndTierLimitMismatch(uint256 tokenCount, uint256 limitListCount);

    /**
     * @dev The total tiers list and limits list length mismatch
     */
    error TotalTierLimitsMismatch(uint256 tiers, uint256 limits);

    /**
     * @dev Reverts when final tier is attempted for updates
     */
    error FinalTierLimitNotUpdatable();

    /********************************
     *           FUNCTIONS           *
     ********************************/

    /**
     * @notice Receive ETH
     */
    receive() external payable {
        emit DepositETH(_msgSender(), msg.value);
    }

    /** @notice Called for a given token to distribute, unallocated tokens to the respective tiers and wallet members
     *  @param token The address of the token
     */
    function distributePendingTokens(address token) public {
        uint256 pendingAmount = getPendingDistributionAmount(token);
        uint256 presentTier;
        uint256 currentTierDistribution;
        uint256 tokenLimit;
        uint256 tokenTotalDistributed;
        uint256 nextTierDistribution;
        while (pendingAmount > 0) {
            presentTier = currentTokenTier[token];
            tokenLimit = tokenTierLimits[token][presentTier];
            tokenTotalDistributed = totalDistributed[token][presentTier];
            if (tokenLimit > 0 && (tokenTotalDistributed + pendingAmount) > tokenLimit) {
                currentTierDistribution = tokenLimit - tokenTotalDistributed;
                nextTierDistribution = pendingAmount - currentTierDistribution;
            } else {
                currentTierDistribution = pendingAmount;
                nextTierDistribution = 0;
            }

            if (currentTierDistribution > 0) {
                address[] memory walletMembers = revenueTiers[presentTier].walletList;
                uint256 totalWallets = walletMembers.length;
                uint256 feeDeduction;
                if (feeRequired && platformFee > 0) {
                    feeDeduction = ((currentTierDistribution * platformFee) / BASE);
                    feeAccumulated[token] += feeDeduction;
                    currentTierDistribution -= feeDeduction;
                    emit FeeDistributed(token, feeDeduction);
                }

                for (uint256 i; i < totalWallets; ) {
                    tokenWithdrawable[token][walletMembers[i]] += ((currentTierDistribution *
                        revenueProportion[presentTier][walletMembers[i]]) / BASE);
                    unchecked {
                        i++;
                    }
                }

                totalTokenAccounted[token] += (currentTierDistribution + feeDeduction);
                totalDistributed[token][presentTier] += (currentTierDistribution + feeDeduction);
                emit TokenDistributed(token, currentTierDistribution, presentTier);
            }
            pendingAmount = nextTierDistribution;
            if (nextTierDistribution > 0) {
                currentTokenTier[token] += 1;
            }
        }
    }

    /** @notice Get the token amount that has not been allocated for in the revenue path
     *  @param token The token address
     */
    function getPendingDistributionAmount(address token) public view returns (uint256) {
        uint256 pathTokenBalance;
        if (token == address(0)) {
            pathTokenBalance = address(this).balance;
        } else {
            pathTokenBalance = IERC20(token).balanceOf(address(this));
        }
        uint256 pendingAmount = (pathTokenBalance + totalTokenReleased[token]) - totalTokenAccounted[token];
        return pendingAmount;
    }

    /** @notice Initializes revenue path
     *  @param _walletList Nested array for wallet list across different tiers
     *  @param _distribution Nested array for distribution percentage across different tiers
     *  @param _tokenList A list of tokens for which limits will be set
     *  @param _limitSequence A nested array of limits for each token
     *  @param pathInfo A property object for the path details
     *  @param _owner Address of path owner
     */
    function initialize(
        address[][] memory _walletList,
        uint256[][] memory _distribution,
        address[] memory _tokenList,
        uint256[][] memory _limitSequence,
        PathInfo memory pathInfo,
        address _owner
    ) external initializer {
        uint256 totalTiers = _walletList.length;
        uint256 totalTokens = _tokenList.length;
        if (totalTiers != _distribution.length) {
            revert WalletAndDistrbutionCtMismatch({
                walletCount: _walletList.length,
                distributionCount: _distribution.length
            });
        }

        if (totalTokens != _limitSequence.length) {
            revert TokensAndTierLimitMismatch({ tokenCount: totalTokens, limitListCount: _limitSequence.length });
        }
        for (uint256 i; i < totalTiers; ) {
            RevenuePath memory tier;

            uint256 walletMembers = _walletList[i].length;

            if (walletMembers != _distribution[i].length) {
                revert WalletAndDistrbutionCtMismatch({
                    walletCount: walletMembers,
                    distributionCount: _distribution[i].length
                });
            }

            tier.walletList = _walletList[i];

            uint256 totalShare;
            for (uint256 j; j < walletMembers; ) {
                address wallet = (_walletList[i])[j];
                if (revenueProportion[i][wallet] > 0) {
                    revert DuplicateWalletEntry();
                }
                if (wallet == address(0)) {
                    revert ZeroAddressProvided();
                }
                if ((_distribution[i])[j] == 0) {
                    revert ZeroDistributionProvided();
                }
                revenueProportion[i][wallet] = (_distribution[i])[j];
                totalShare += (_distribution[i])[j];
                unchecked {
                    j++;
                }
            }
            if (totalShare != BASE) {
                revert TotalShareNot100();
            }
            revenueTiers.push(tier);

            unchecked {
                i++;
            }
        }

        for (uint256 k; k < totalTokens; ) {
            address token = _tokenList[k];
            for (uint256 m; m < totalTiers; ) {
                if ((totalTiers - 1) != _limitSequence[k].length) {
                    revert TotalTierLimitsMismatch({ tiers: totalTiers, limits: _limitSequence[k].length });
                }
                // set tier limits, except for final tier which has no limit
                if (m != totalTiers - 1) {
                    if (_limitSequence[k][m] == 0) {
                        revert TierLimitGivenZero();
                    }
                    tokenTierLimits[token][m] = _limitSequence[k][m];
                }

                unchecked {
                    m++;
                }
            }

            unchecked {
                k++;
            }
        }

        if (revenueTiers.length > 1) {
            feeRequired = true;
        }
        mainFactory = pathInfo.factory;
        platformFee = pathInfo.platformFee;
        isImmutable = pathInfo.isImmutable;
        _transferOwnership(_owner);
        _setTrustedForwarder(pathInfo.forwarder);
    }

    /** @notice Adding new revenue tiers
     *  @param _walletList a nested list of new wallets
     *  @param _distribution a nested list of corresponding distribution
     */
    function addRevenueTiers(address[][] calldata _walletList, uint256[][] calldata _distribution)
        external
        isMutable
        onlyOwner
    {
        if (_walletList.length != _distribution.length) {
            revert WalletAndDistrbutionCtMismatch({
                walletCount: _walletList.length,
                distributionCount: _distribution.length
            });
        }

        uint256 listLength = _walletList.length;
        uint256 nextRevenueTier = revenueTiers.length;

        for (uint256 i; i < listLength; ) {
            uint256 walletMembers = _walletList[i].length;

            if (walletMembers != _distribution[i].length) {
                revert WalletAndDistrbutionCtMismatch({
                    walletCount: walletMembers,
                    distributionCount: _distribution[i].length
                });
            }
            RevenuePath memory tier;
            tier.walletList = _walletList[i];
            uint256 totalShares;
            for (uint256 j; j < walletMembers; ) {
                if (revenueProportion[nextRevenueTier][(_walletList[i])[j]] > 0) {
                    revert DuplicateWalletEntry();
                }

                if ((_walletList[i])[j] == address(0)) {
                    revert ZeroAddressProvided();
                }
                if ((_distribution[i])[j] == 0) {
                    revert ZeroDistributionProvided();
                }

                revenueProportion[nextRevenueTier][(_walletList[i])[j]] = (_distribution[i])[j];
                totalShares += (_distribution[i])[j];
                unchecked {
                    j++;
                }
            }

            if (totalShares != BASE) {
                revert TotalShareNot100();
            }
            revenueTiers.push(tier);
            nextRevenueTier += 1;

            unchecked {
                i++;
            }
        }
        if (!feeRequired) {
            feeRequired = true;
        }
        emit RevenueTierAdded(_walletList, _distribution);
    }

    /** @notice Updating distribution for existing revenue tiers
     *  @param _walletList A nested list of wallet address
     *  @param _distribution A nested list of distribution percentage
     *  @param _tierNumbers A list of tier numbers to be updated
     */
    function updateRevenueTiers(
        address[][] calldata _walletList,
        uint256[][] calldata _distribution,
        uint256[] calldata _tierNumbers
    ) external isMutable onlyOwner {
        uint256 totalUpdates = _tierNumbers.length;
        if (_walletList.length != _distribution.length || _walletList.length != totalUpdates) {
            revert WalletAndDistrbutionCtMismatch({
                walletCount: _walletList.length,
                distributionCount: _distribution.length
            });
        }

        uint256 totalTiers = revenueTiers.length;

        for (uint256 i; i < totalUpdates; ) {
            uint256 totalWallets = _walletList[i].length;
            if (totalWallets != _distribution[i].length) {
                revert WalletAndDistrbutionCtMismatch({
                    walletCount: _walletList[i].length,
                    distributionCount: _distribution[i].length
                });
            }
            uint256 tier = _tierNumbers[i];
            if (tier >= totalTiers) {
                revert OnlyExistingTiersCanBeUpdated();
            }

            address[] memory previousWalletList = revenueTiers[tier].walletList;

            for (uint256 k; k < previousWalletList.length; ) {
                revenueProportion[tier][previousWalletList[k]] = 0;
                unchecked {
                    k++;
                }
            }

            uint256 totalShares;
            address[] memory newWalletList = new address[](totalWallets);
            for (uint256 j; j < totalWallets; ) {
                address wallet = (_walletList[i])[j];
                if (revenueProportion[tier][wallet] > 0) {
                    revert DuplicateWalletEntry();
                }

                if (wallet == address(0)) {
                    revert ZeroAddressProvided();
                }
                if ((_distribution[i])[j] == 0) {
                    revert ZeroDistributionProvided();
                }
                revenueProportion[tier][wallet] = (_distribution[i])[j];
                totalShares += (_distribution[i])[j];
                newWalletList[j] = wallet;

                unchecked {
                    j++;
                }
            }
            revenueTiers[tier].walletList = newWalletList;
            if (totalShares != BASE) {
                revert TotalShareNot100();
            }
            unchecked {
                i++;
            }
        }
        emit RevenueTierUpdated(_tierNumbers, _walletList, _distribution);
    }

    /** @notice Update tier limits for given tokens for an existing tier
     * @param tokenList A list of tokens for which limits will be updated
     * @param newLimits A list of corresponding limits for the tokens
     * @param tier The tier for which limits are being updated
     */
    function updateLimits(
        address[] calldata tokenList,
        uint256[] calldata newLimits,
        uint256 tier
    ) external isMutable onlyOwner {
        uint256 listCount = tokenList.length;
        uint256 totalTiers = revenueTiers.length;

        if (listCount != newLimits.length) {
            revert TokensAndTierLimitMismatch({ tokenCount: listCount, limitListCount: newLimits.length });
        }
        if (tier >= totalTiers) {
            revert OnlyExistingTierLimitsCanBeUpdated();
        }

        if (tier == totalTiers - 1) {
            revert FinalTierLimitNotUpdatable();
        }

        for (uint256 i; i < listCount; ) {
            if (totalDistributed[tokenList[i]][tier] > newLimits[i]) {
                revert TokenLimitNotValid();
            }
            tokenTierLimits[tokenList[i]][tier] = newLimits[i];

            unchecked {
                i++;
            }
        }
        emit TierLimitUpdated(tier, tokenList, newLimits);
    }

    /** @notice Releases distribute token
     * @param token The token address
     * @param account The address of the receiver
     */
    function release(address token, address payable account) external nonReentrant {
        distributePendingTokens(token);
        uint256 payment = tokenWithdrawable[token][account];
        if (payment == 0) {
            revert NoDuePayment();
        }

        released[token][account] += payment;
        totalTokenReleased[token] += payment;
        tokenWithdrawable[token][account] = 0;

        if (token == address(0)) {
            if (feeAccumulated[token] > 0) {
                uint256 value = feeAccumulated[token];
                feeAccumulated[token] = 0;
                totalTokenReleased[token] += value;
                address platformFeeWallet = IReveelMainV2(mainFactory).getPlatformWallet();
                sendValue(payable(platformFeeWallet), value);
                emit FeeReleased(token, value);
            }

            sendValue(account, payment);
            emit PaymentReleased(account, token, payment);
        } else {
            if (feeAccumulated[token] > 0) {
                uint256 value = feeAccumulated[token];
                feeAccumulated[token] = 0;
                totalTokenReleased[token] += value;
                address platformFeeWallet = IReveelMainV2(mainFactory).getPlatformWallet();
                IERC20(token).safeTransfer(platformFeeWallet, value);
                emit FeeReleased(token, value);
            }

            IERC20(token).safeTransfer(account, payment);

            emit ERC20PaymentReleased(token, account, payment);
        }
    }

    /** @notice Get the wallet list for a given revenue tier
     * @param tierNumber the index of the tier for which list needs to be provided.
     */
    function getRevenueTier(uint256 tierNumber) external view returns (address[] memory _walletList) {
        require(tierNumber < revenueTiers.length, "TIER_DOES_NOT_EXIST");
        address[] memory listWallet = revenueTiers[tierNumber].walletList;
        return (listWallet);
    }

    /** @notice Get the totalNumber of revenue tiers in the revenue path
     */
    function getTotalRevenueTiers() external view returns (uint256 total) {
        return revenueTiers.length;
    }

    /** @notice Get the current ongoing tier of revenue path
     * For eth: token address(0) is reserved
     */
    function getCurrentTier(address token) external view returns (uint256 tierNumber) {
        return currentTokenTier[token];
    }

    /** @notice Get the current ongoing tier of revenue path
     */
    function getFeeRequirementStatus() external view returns (bool required) {
        return feeRequired;
    }

    /** @notice Get the token revenue proportion for a given account at a given tier
     *  @param tier The tier to fetch revenue proportions for
     *  @param account The wallet address for which revenue proportion is requested
     */
    function getRevenueProportion(uint256 tier, address account) external view returns (uint256 proportion) {
        return revenueProportion[tier][account];
    }

    /** @notice Get the amount of token distrbuted for a given tier
     *  @param token The token address for which distributed amount is fetched
     *  @param tier The tier for which distributed amount is fetched
     */

    function getTierDistributedAmount(address token, uint256 tier) external view returns (uint256 amount) {
        return totalDistributed[token][tier];
    }

    /** @notice Get the amount of ETH accumulated for fee collection
     */

    function getTotalFeeAccumulated(address token) external view returns (uint256 amount) {
        return feeAccumulated[token];
    }

    /** @notice Get the amount of token released for a given account
     *  @param token the token address for which token released is fetched
     *  @param account the wallet address for whih the token released is fetched
     */

    function getTokenReleased(address token, address account) external view returns (uint256 amount) {
        return released[token][account];
    }

    /** @notice Get the platform fee percentage
     */
    function getPlatformFee() external view returns (uint256) {
        return platformFee;
    }

    /** @notice Get the revenue path Immutability status
     */
    function getImmutabilityStatus() external view returns (bool) {
        return isImmutable;
    }

    /** @notice Get the amount of total eth withdrawn by the account
     */
    function getTokenWithdrawn(address token, address account) external view returns (uint256) {
        return released[token][account];
    }

    function getTokenTierLimits(address token, uint256 tier) external view returns (uint256) {
        return tokenTierLimits[token][tier];
    }

    /** @notice Update the trusted forwarder address
     *  @param forwarder The address of the new forwarder
     *
     */
    function setTrustedForwarder(address forwarder) external onlyOwner {
        _setTrustedForwarder(forwarder);
    }

    /**
     *  @notice Total wallets available in a tier
     *  @param tier The tier for which wallet counts will be fetched
     */
    function getTierWalletCount(uint256 tier) external view returns (uint256) {
        return revenueTiers[tier].walletList.length;
    }

    /**
     * @notice Returns total token released
     * @param token The token for which total released amount is fetched
     */
    function getTotalTokenReleased(address token) external view returns (uint256) {
        return totalTokenReleased[token];
    }

    /**
     * @notice Returns total token accounted for a given token address
     * @param token The token for which total accountd amount is fetched
     */
    function getTotalTokenAccounted(address token) external view returns (uint256) {
        return totalTokenAccounted[token];
    }

    /**
     * @notice Returns withdrawable or claimable token amount for a given wallet in the revenue path
     */
    function getWithdrawableToken(address token, address wallet) external view returns (uint256) {
        return tokenWithdrawable[token][wallet];
    }

    /**
     * @notice Returns the ReveelMainV2 contract address
     */
    function getMainFactory() external view returns (address) {
        return mainFactory;
    }

    /** @notice Transfer handler for ETH
     * @param recipient The address of the receiver
     * @param amount The amount of ETH to be received
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert InsufficentBalance({ contractBalance: address(this).balance, requiredAmount: amount });
        }

        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "ETH_TRANSFER_FAILED");
    }

    function _msgSender() internal view virtual override(Context, ERC2771Recipient) returns (address ret) {
        if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {
            assembly {
                ret := shr(96, calldataload(sub(calldatasize(), 20)))
            }
        } else {
            ret = msg.sender;
        }
    }

    function _msgData() internal view virtual override(Context, ERC2771Recipient) returns (bytes calldata ret) {
        if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {
            return msg.data[0:msg.data.length - 20];
        } else {
            return msg.data;
        }
    }
}

File 2 of 10 : ERC2771Recipient.sol
// SPDX-License-Identifier: MIT
// solhint-disable no-inline-assembly
pragma solidity >=0.6.9;

import "./interfaces/IERC2771Recipient.sol";

/**
 * @title The ERC-2771 Recipient Base Abstract Class - Implementation
 *
 * @notice Note that this contract was called `BaseRelayRecipient` in the previous revision of the GSN.
 *
 * @notice A base contract to be inherited by any contract that want to receive relayed transactions.
 *
 * @notice A subclass must use `_msgSender()` instead of `msg.sender`.
 */
abstract contract ERC2771Recipient is IERC2771Recipient {

    /*
     * Forwarder singleton we accept calls from
     */
    address private _trustedForwarder;

    /**
     * :warning: **Warning** :warning: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder.
     * @notice Method is not a required method to allow Recipients to trust multiple Forwarders. Not recommended yet.
     * @return forwarder The address of the Forwarder contract that is being used.
     */
    function getTrustedForwarder() public virtual view returns (address forwarder){
        return _trustedForwarder;
    }

    function _setTrustedForwarder(address _forwarder) internal {
        _trustedForwarder = _forwarder;
    }

    /// @inheritdoc IERC2771Recipient
    function isTrustedForwarder(address forwarder) public virtual override view returns(bool) {
        return forwarder == _trustedForwarder;
    }

    /// @inheritdoc IERC2771Recipient
    function _msgSender() internal override virtual view returns (address ret) {
        if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {
            // At this point we know that the sender is a trusted forwarder,
            // so we trust that the last bytes of msg.data are the verified sender address.
            // extract sender address from the end of msg.data
            assembly {
                ret := shr(96,calldataload(sub(calldatasize(),20)))
            }
        } else {
            ret = msg.sender;
        }
    }

    /// @inheritdoc IERC2771Recipient
    function _msgData() internal override virtual view returns (bytes calldata ret) {
        if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) {
            return msg.data[0:msg.data.length-20];
        } else {
            return msg.data;
        }
    }
}

File 3 of 10 : IERC2771Recipient.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

/**
 * @title The ERC-2771 Recipient Base Abstract Class - Declarations
 *
 * @notice A contract must implement this interface in order to support relayed transaction.
 *
 * @notice It is recommended that your contract inherits from the ERC2771Recipient contract.
 */
abstract contract IERC2771Recipient {

    /**
     * :warning: **Warning** :warning: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder.
     * @param forwarder The address of the Forwarder contract that is being used.
     * @return isTrustedForwarder `true` if the Forwarder is trusted to forward relayed transactions by this Recipient.
     */
    function isTrustedForwarder(address forwarder) public virtual view returns(bool);

    /**
     * @notice Use this method the contract anywhere instead of msg.sender to support relayed transactions.
     * @return sender The real sender of this call.
     * For a call that came through the Forwarder the real sender is extracted from the last 20 bytes of the `msg.data`.
     * Otherwise simply returns `msg.sender`.
     */
    function _msgSender() internal virtual view returns (address);

    /**
     * @notice Use this method in the contract instead of `msg.data` when difference matters (hashing, signature, etc.)
     * @return data The real `msg.data` of this call.
     * For a call that came through the Forwarder, the real sender address was appended as the last 20 bytes
     * of the `msg.data` - so this method will strip those 20 bytes off.
     * Otherwise (if the call was made directly and not through the forwarder) simply returns `msg.data`.
     */
    function _msgData() internal virtual view returns (bytes calldata);
}

File 4 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

File 5 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/Address.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = _setInitializedVersion(1);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        bool isTopLevelCall = _setInitializedVersion(version);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(version);
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        _setInitializedVersion(type(uint8).max);
    }

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !Address.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

File 6 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

    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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 7 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` 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 amount
    ) external returns (bool);
}

File 8 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 9 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @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
{
  "metadata": {
    "bytecodeHash": "none"
  },
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"DuplicateWalletEntry","type":"error"},{"inputs":[],"name":"FinalTierLimitNotUpdatable","type":"error"},{"inputs":[{"internalType":"uint256","name":"contractBalance","type":"uint256"},{"internalType":"uint256","name":"requiredAmount","type":"uint256"}],"name":"InsufficentBalance","type":"error"},{"inputs":[],"name":"NoDuePayment","type":"error"},{"inputs":[],"name":"OnlyExistingTierLimitsCanBeUpdated","type":"error"},{"inputs":[],"name":"OnlyExistingTiersCanBeUpdated","type":"error"},{"inputs":[],"name":"RevenuePathNotMutable","type":"error"},{"inputs":[],"name":"TierLimitGivenZero","type":"error"},{"inputs":[],"name":"TokenLimitNotValid","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenCount","type":"uint256"},{"internalType":"uint256","name":"limitListCount","type":"uint256"}],"name":"TokensAndTierLimitMismatch","type":"error"},{"inputs":[],"name":"TotalShareNot100","type":"error"},{"inputs":[{"internalType":"uint256","name":"tiers","type":"uint256"},{"internalType":"uint256","name":"limits","type":"uint256"}],"name":"TotalTierLimitsMismatch","type":"error"},{"inputs":[{"internalType":"uint256","name":"walletCount","type":"uint256"},{"internalType":"uint256","name":"distributionCount","type":"uint256"}],"name":"WalletAndDistrbutionCtMismatch","type":"error"},{"inputs":[],"name":"ZeroAddressProvided","type":"error"},{"inputs":[],"name":"ZeroDistributionProvided","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"DepositETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":"account","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[][]","name":"wallets","type":"address[][]"},{"indexed":false,"internalType":"uint256[][]","name":"distributions","type":"uint256[][]"}],"name":"RevenueTierAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"tierNumbers","type":"uint256[]"},{"indexed":false,"internalType":"address[][]","name":"wallets","type":"address[][]"},{"indexed":false,"internalType":"uint256[][]","name":"distributions","type":"uint256[][]"}],"name":"RevenueTierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"tokenList","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"newLimits","type":"uint256[]"}],"name":"TierLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tier","type":"uint256"}],"name":"TokenDistributed","type":"event"},{"inputs":[],"name":"BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[][]","name":"_walletList","type":"address[][]"},{"internalType":"uint256[][]","name":"_distribution","type":"uint256[][]"}],"name":"addRevenueTiers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"distributePendingTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getCurrentTier","outputs":[{"internalType":"uint256","name":"tierNumber","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeRequirementStatus","outputs":[{"internalType":"bool","name":"required","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getImmutabilityStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMainFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getPendingDistributionAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPlatformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"getRevenueProportion","outputs":[{"internalType":"uint256","name":"proportion","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierNumber","type":"uint256"}],"name":"getRevenueTier","outputs":[{"internalType":"address[]","name":"_walletList","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"getTierDistributedAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"getTierWalletCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"getTokenReleased","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"getTokenTierLimits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"getTokenWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTotalFeeAccumulated","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalRevenueTiers","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTotalTokenAccounted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTotalTokenReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"wallet","type":"address"}],"name":"getWithdrawableToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[][]","name":"_walletList","type":"address[][]"},{"internalType":"uint256[][]","name":"_distribution","type":"uint256[][]"},{"internalType":"address[]","name":"_tokenList","type":"address[]"},{"internalType":"uint256[][]","name":"_limitSequence","type":"uint256[][]"},{"components":[{"internalType":"uint32","name":"platformFee","type":"uint32"},{"internalType":"bool","name":"isImmutable","type":"bool"},{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"forwarder","type":"address"}],"internalType":"struct RevenuePathV2.PathInfo","name":"pathInfo","type":"tuple"},{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenList","type":"address[]"},{"internalType":"uint256[]","name":"newLimits","type":"uint256[]"},{"internalType":"uint256","name":"tier","type":"uint256"}],"name":"updateLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[][]","name":"_walletList","type":"address[][]"},{"internalType":"uint256[][]","name":"_distribution","type":"uint256[][]"},{"internalType":"uint256[]","name":"_tierNumbers","type":"uint256[]"}],"name":"updateRevenueTiers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50620000266200002062000031565b62000067565b6001600255620000b9565b6000601436108015906200004f57506000546001600160a01b031633145b1562000062575060131936013560601c90565b503390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6136dc80620000c96000396000f3fe6080604052600436106101e75760003560e01c80638a9a929711610102578063ce1b815f11610095578063f166c9a111610064578063f166c9a1146106eb578063f2fde38b1461070b578063ff5c9c3e1461072b578063ffa1ad741461074b57600080fd5b8063ce1b815f14610654578063da74222814610672578063ddde545e14610692578063ec342ad0146106bf57600080fd5b8063a5def946116100d1578063a5def94614610593578063ba27bb08146105c9578063bf13f867146105e9578063c85483fb1461061157600080fd5b80638a9a9297146105065780638da5cb5b1461051e5780639afeed35146103405780639b8887881461055057600080fd5b80636481131a1161017a578063715018a611610149578063715018a61461048657806374ba81631461049b57806378e8a7d9146104d15780637d28f63a146104e657600080fd5b80636481131a146103c957806365fbd20c1461040f5780636e8acb0c1461042f5780636ea8bc101461046557600080fd5b80635435ea1f116101b65780635435ea1f146102f1578063572b6c051461031157806358ccc354146103405780635f36e8721461038657600080fd5b80631273a5a71461023d57806332bd40da1461026b57806348b75044146102af5780634a58b06a146102d157600080fd5b36610238576101f4610772565b6001600160a01b03167fced5d8bf10823804603bba066e4f53aa6e8f6f4be68bf0114cf7a0e52183e4e93460405161022e91815260200190565b60405180910390a2005b600080fd5b34801561024957600080fd5b50600354610100900460ff165b60405190151581526020015b60405180910390f35b34801561027757600080fd5b506102a1610286366004612c70565b6001600160a01b031660009081526009602052604090205490565b604051908152602001610262565b3480156102bb57600080fd5b506102cf6102ca366004612c8d565b6107a6565b005b3480156102dd57600080fd5b506102cf6102ec366004612d12565b610bdc565b3480156102fd57600080fd5b506102cf61030c36600461305e565b61111a565b34801561031d57600080fd5b5061025661032c366004612c70565b6000546001600160a01b0391821691161490565b34801561034c57600080fd5b506102a161035b366004612c8d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b34801561039257600080fd5b506102a16103a136600461312e565b60009182526004602090815260408084206001600160a01b0393909316845291905290205490565b3480156103d557600080fd5b506102a16103e4366004612c8d565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b34801561041b57600080fd5b506102cf61042a366004613153565b611709565b34801561043b57600080fd5b506102a161044a366004612c70565b6001600160a01b03166000908152600c602052604090205490565b34801561047157600080fd5b5060035462010000900463ffffffff166102a1565b34801561049257600080fd5b506102cf61196f565b3480156104a757600080fd5b506102a16104b6366004612c70565b6001600160a01b031660009081526007602052604090205490565b3480156104dd57600080fd5b50600d546102a1565b3480156104f257600080fd5b506102cf6105013660046131c7565b6119f4565b34801561051257600080fd5b5060035460ff16610256565b34801561052a57600080fd5b506001546001600160a01b03165b6040516001600160a01b039091168152602001610262565b34801561055c57600080fd5b506102a161056b366004613261565b6001600160a01b03919091166000908152600b60209081526040808320938352929052205490565b34801561059f57600080fd5b506102a16105ae366004612c70565b6001600160a01b031660009081526008602052604090205490565b3480156105d557600080fd5b506102a16105e436600461328d565b611f70565b3480156105f557600080fd5b50600354660100000000000090046001600160a01b0316610538565b34801561061d57600080fd5b506102a161062c366004613261565b6001600160a01b03919091166000908152600660209081526040808320938352929052205490565b34801561066057600080fd5b506000546001600160a01b0316610538565b34801561067e57600080fd5b506102cf61068d366004612c70565b611f97565b34801561069e57600080fd5b506106b26106ad36600461328d565b612031565b60405161026291906132a6565b3480156106cb57600080fd5b506106d66298968081565b60405163ffffffff9091168152602001610262565b3480156106f757600080fd5b506102cf610706366004612c70565b612100565b34801561071757600080fd5b506102cf610726366004612c70565b6124c2565b34801561073757600080fd5b506102a1610746366004612c70565b6125c0565b34801561075757600080fd5b50610760600281565b60405160ff9091168152602001610262565b60006014361080159061078f57506000546001600160a01b031633145b156107a1575060131936013560601c90565b503390565b60028054036107fc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002805561080982612100565b6001600160a01b038083166000908152600a60209081526040808320938516835292905290812054908190036108525760405163c00d56a360e01b815260040160405180910390fd5b6001600160a01b03808416600090815260056020908152604080832093861683529290529081208054839290610889908490613309565b90915550506001600160a01b038316600090815260086020526040812080548392906108b6908490613309565b90915550506001600160a01b038084166000818152600a60209081526040808320948716835293905291822091909155610a56576001600160a01b0383166000908152600c602052604090205415610a06576001600160a01b0383166000908152600c6020908152604080832080549084905560089092528220805491928392610941908490613309565b925050819055506000600360069054906101000a90046001600160a01b03166001600160a01b031663d76a09f46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190613321565b90506109cd8183612683565b60405182906001600160a01b038716907f261a2feedbc107b4615e40f21cdbf5be9561a9b3fadd9192cd54d5eeb838647b90600090a350505b610a108282612683565b80836001600160a01b0316836001600160a01b03167f8ac5b3c2902b21b6bbb4d99ec195e28a242cb6a1777804db10b84d91e200642960405160405180910390a4610bd2565b6001600160a01b0383166000908152600c602052604090205415610b7c576001600160a01b0383166000908152600c6020908152604080832080549084905560089092528220805491928392610aad908490613309565b925050819055506000600360069054906101000a90046001600160a01b03166001600160a01b031663d76a09f46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2d9190613321565b9050610b436001600160a01b0386168284612755565b60405182906001600160a01b038716907f261a2feedbc107b4615e40f21cdbf5be9561a9b3fadd9192cd54d5eeb838647b90600090a350505b610b906001600160a01b0384168383612755565b80826001600160a01b0316846001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a60405160405180910390a45b5050600160025550565b600354610100900460ff1615610c055760405163034a9e9360e41b815260040160405180910390fd5b610c0d610772565b6001600160a01b0316610c286001546001600160a01b031690565b6001600160a01b031614610c7e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b828114610ca8576040516361a54c1b60e01b815260048101849052602481018290526044016107f3565b600d54839060005b828110156110bc576000878783818110610ccc57610ccc61333e565b9050602002810190610cde9190613354565b90509050858583818110610cf457610cf461333e565b9050602002810190610d069190613354565b90508114610d565780868684818110610d2157610d2161333e565b9050602002810190610d339190613354565b6040516361a54c1b60e01b815260048101939093526024830152506044016107f3565b604080516020810190915260608152888884818110610d7757610d7761333e565b9050602002810190610d899190613354565b80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250829150505b8381101561102f576000868152600460205260408120818d8d89818110610de857610de861333e565b9050602002810190610dfa9190613354565b85818110610e0a57610e0a61333e565b9050602002016020810190610e1f9190612c70565b6001600160a01b03166001600160a01b03168152602001908152602001600020541115610e5f57604051637d9f758f60e01b815260040160405180910390fd5b60008b8b87818110610e7357610e7361333e565b9050602002810190610e859190613354565b83818110610e9557610e9561333e565b9050602002016020810190610eaa9190612c70565b6001600160a01b031603610ed157604051638474420160e01b815260040160405180910390fd5b888886818110610ee357610ee361333e565b9050602002810190610ef59190613354565b82818110610f0557610f0561333e565b90506020020135600003610f2c5760405163b29483dd60e01b815260040160405180910390fd5b888886818110610f3e57610f3e61333e565b9050602002810190610f509190613354565b82818110610f6057610f6061333e565b905060200201356004600088815260200190815260200160002060008d8d89818110610f8e57610f8e61333e565b9050602002810190610fa09190613354565b85818110610fb057610fb061333e565b9050602002016020810190610fc59190612c70565b6001600160a01b03168152602081019190915260400160002055888886818110610ff157610ff161333e565b90506020028101906110039190613354565b828181106110135761101361333e565b90506020020135826110259190613309565b9150600101610dbf565b50629896808114611053576040516355fe908760e01b815260040160405180910390fd5b600d80546001810182556000919091528251805184927fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5019161109b91839160200190612bd6565b5050506001856110ab9190613309565b94505060019092019150610cb09050565b5060035460ff166110d5576003805460ff191660011790555b7f36e71a6b30e0a2c045ce3ea7f5176692bc8ae5164a28b5707aabe409bb98f7de8686868660405161110a9493929190613519565b60405180910390a1505050505050565b600061112660016127bc565b90508015611142576001805460ff60a81b1916600160a81b1790555b865185518751821461117457885188516040516361a54c1b60e01b8152600481019290925260248201526044016107f3565b855181146111a257855160405163d0352c1360e01b81526107f3918391600401918252602082015260400190565b60005b8281101561147f5760408051602081019091526060815260008b83815181106111d0576111d061333e565b60200260200101515190508a83815181106111ed576111ed61333e565b602002602001015151811461123c57808b848151811061120f5761120f61333e565b6020026020010151516040516361a54c1b60e01b81526004016107f3929190918252602082015260400190565b8b838151811061124e5761124e61333e565b602090810291909101015182526000805b828110156114015760008e868151811061127b5761127b61333e565b602002602001015182815181106112945761129461333e565b60209081029190910181015160008881526004835260408082206001600160a01b03841683529093529190912054909150156112e357604051637d9f758f60e01b815260040160405180910390fd5b6001600160a01b03811661130a57604051638474420160e01b815260040160405180910390fd5b8d868151811061131c5761131c61333e565b602002602001015182815181106113355761133561333e565b602002602001015160000361135d5760405163b29483dd60e01b815260040160405180910390fd5b8d868151811061136f5761136f61333e565b602002602001015182815181106113885761138861333e565b60209081029190910181015160008881526004835260408082206001600160a01b038616835290935291909120558d518e90879081106113ca576113ca61333e565b602002602001015182815181106113e3576113e361333e565b6020026020010151836113f69190613309565b92505060010161125f565b50629896808114611425576040516355fe908760e01b815260040160405180910390fd5b600d80546001810182556000919091528351805185927fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5019161146d91839160200190612bd6565b5050600190940193506111a592505050565b5060005b818110156115f257600088828151811061149f5761149f61333e565b6020026020010151905060005b848110156115e8578883815181106114c6576114c661333e565b6020026020010151516001866114dc9190613540565b1461152157848984815181106114f4576114f461333e565b6020026020010151516040516330a8f16960e21b81526004016107f3929190918252602082015260400190565b61152c600186613540565b81146115e0578883815181106115445761154461333e565b6020026020010151818151811061155d5761155d61333e565b60200260200101516000036115855760405163a860ddd160e01b815260040160405180910390fd5b8883815181106115975761159761333e565b602002602001015181815181106115b0576115b061333e565b6020908102919091018101516001600160a01b038416600090815260068352604080822085835290935291909120555b6001016114ac565b5050600101611483565b50600d546001101561160c576003805460ff191660011790555b6040850151600380548751602089015115156101000261ff001963ffffffff909216620100000265ffffffff0000196001600160a01b03909616660100000000000002959095167fffffffffffff000000000000000000000000000000000000000000000000ffff90931692909217939093179290921691909117905561169284612905565b6060850151600080546001600160a01b0319166001600160a01b0390921691909117905550508015611700576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b50505050505050565b600354610100900460ff16156117325760405163034a9e9360e41b815260040160405180910390fd5b61173a610772565b6001600160a01b03166117556001546001600160a01b031690565b6001600160a01b0316146117ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b600d5484908382146117da5760405163d0352c1360e01b815260048101839052602481018590526044016107f3565b8083106117fa57604051631b391e4b60e21b815260040160405180910390fd5b611805600182613540565b83036118245760405163999daa9360e01b815260040160405180910390fd5b60005b82811015611937578585828181106118415761184161333e565b90506020020135600b60008a8a8581811061185e5761185e61333e565b90506020020160208101906118739190612c70565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008681526020019081526020016000205411156118c457604051632801b92160e11b815260040160405180910390fd5b8585828181106118d6576118d661333e565b90506020020135600660008a8a858181106118f3576118f361333e565b90506020020160208101906119089190612c70565b6001600160a01b0316815260208082019290925260409081016000908120888252909252902055600101611827565b507fc336fcb4b285a5f26926770cc6eb675c5d8eaa208d80f6db7ecb5ab12fcc060383888888886040516116f7959493929190613557565b611977610772565b6001600160a01b03166119926001546001600160a01b031690565b6001600160a01b0316146119e85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b6119f26000612905565b565b600354610100900460ff1615611a1d5760405163034a9e9360e41b815260040160405180910390fd5b611a25610772565b6001600160a01b0316611a406001546001600160a01b031690565b6001600160a01b031614611a965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b808584141580611aa65750858114155b15611ace576040516361a54c1b60e01b815260048101879052602481018590526044016107f3565b600d5460005b82811015611f24576000898983818110611af057611af061333e565b9050602002810190611b029190613354565b90509050878783818110611b1857611b1861333e565b9050602002810190611b2a9190613354565b90508114611b6a57898983818110611b4457611b4461333e565b9050602002810190611b569190613354565b9050888884818110610d2157610d2161333e565b6000868684818110611b7e57611b7e61333e565b905060200201359050838110611ba75760405163a7ea53d360e01b815260040160405180910390fd5b6000600d8281548110611bbc57611bbc61333e565b6000918252602091829020018054604080518285028101850190915281815292830182828015611c1557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bf7575b5050505050905060005b8151811015611c7857600083815260046020526040812083518290859085908110611c4c57611c4c61333e565b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101611c1f565b506000808467ffffffffffffffff811115611c9557611c95612d7e565b604051908082528060200260200182016040528015611cbe578160200160208202803683370190505b50905060005b85811015611eba5760008f8f89818110611ce057611ce061333e565b9050602002810190611cf29190613354565b83818110611d0257611d0261333e565b9050602002016020810190611d179190612c70565b60008781526004602090815260408083206001600160a01b038516845290915290205490915015611d5b57604051637d9f758f60e01b815260040160405180910390fd5b6001600160a01b038116611d8257604051638474420160e01b815260040160405180910390fd5b8d8d89818110611d9457611d9461333e565b9050602002810190611da69190613354565b83818110611db657611db661333e565b90506020020135600003611ddd5760405163b29483dd60e01b815260040160405180910390fd5b8d8d89818110611def57611def61333e565b9050602002810190611e019190613354565b83818110611e1157611e1161333e565b60008981526004602090815260408083206001600160a01b0388168452825290912091029290920135909155508d8d89818110611e5057611e5061333e565b9050602002810190611e629190613354565b83818110611e7257611e7261333e565b9050602002013584611e849190613309565b935080838381518110611e9957611e9961333e565b6001600160a01b039092166020928302919091019091015250600101611cc4565b5080600d8581548110611ecf57611ecf61333e565b906000526020600020016000019080519060200190611eef929190612bd6565b50629896808214611f13576040516355fe908760e01b815260040160405180910390fd5b505060019093019250611ad4915050565b507f795ec1dcdb16681c8a450b99ef20c9f9264e575f6bba51f879c4b22f4b1c579b84848a8a8a8a604051611f5e96959493929190613590565b60405180910390a15050505050505050565b6000600d8281548110611f8557611f8561333e565b60009182526020909120015492915050565b611f9f610772565b6001600160a01b0316611fba6001546001600160a01b031690565b6001600160a01b0316146120105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b600080546001600160a01b0319166001600160a01b03831617905550565b50565b600d5460609082106120855760405162461bcd60e51b815260206004820152601360248201527f544945525f444f45535f4e4f545f45584953540000000000000000000000000060448201526064016107f3565b6000600d838154811061209a5761209a61333e565b60009182526020918290200180546040805182850281018501909152818152928301828280156120f357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116120d5575b5093979650505050505050565b600061210b826125c0565b905060008060008060005b8515611700576001600160a01b03871660008181526007602090815260408083205460068352818420818552835281842054948452600b8352818420818552909252909120549096509093509150821580159061217b5750826121798784613309565b115b1561219d5761218a8284613540565b93506121968487613540565b90506121a4565b5084925060005b8315612485576000600d86815481106121bf576121bf61333e565b600091825260209182902001805460408051828502810185019091528181529283018282801561221857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121fa575b50508351600354949550936000935060ff169150508015612246575060035462010000900463ffffffff1615155b156122ea5760035462989680906122699062010000900463ffffffff16896135d9565b61227391906135f8565b6001600160a01b038b166000908152600c60205260408120805492935083929091906122a0908490613309565b909155506122b090508188613540565b9650808a6001600160a01b03167f6c461460f28af1386f23dc4c0c7f4e2e54f0db320a8edc08803e4b787f6db32560405160405180910390a35b60005b828110156123ce576000898152600460205260408120855162989680929087908590811061231d5761231d61333e565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020548961235191906135d9565b61235b91906135f8565b6001600160a01b038c166000908152600a60205260408120865190919087908590811061238a5761238a61333e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008282546123c19190613309565b90915550506001016122ed565b506123d98188613309565b6001600160a01b038b1660009081526009602052604081208054909190612401908490613309565b9091555061241190508188613309565b6001600160a01b038b166000908152600b602090815260408083208c845290915281208054909190612444908490613309565b9091555050604051889088906001600160a01b038d16907f442151da4f589f7e51fac5b4f285a5e8fc8e105067689027ef065e1e922e193590600090a45050505b94508480156124bd576001600160a01b03871660009081526007602052604081208054600192906124b7908490613309565b90915550505b612116565b6124ca610772565b6001600160a01b03166124e56001546001600160a01b031690565b6001600160a01b03161461253b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b6001600160a01b0381166125b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107f3565b61202e81612905565b6000806001600160a01b0383166125d8575047612643565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa15801561261c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612640919061361a565b90505b6001600160a01b03831660009081526009602090815260408083205460089092528220546126719084613309565b61267b9190613540565b949350505050565b804710156126ad57604051631451ccdf60e31b8152476004820152602481018290526044016107f3565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126fa576040519150601f19603f3d011682016040523d82523d6000602084013e6126ff565b606091505b50509050806127505760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c45440000000000000000000000000060448201526064016107f3565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052612750908490612957565b600154600090600160a81b900460ff161561284e578160ff1660011480156127e35750303b155b6128465760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107f3565b506000919050565b60015460ff808416600160a01b90920416106128c35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107f3565b506001805460ff909216600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90921691909117815590565b919050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006129ac826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a3c9092919063ffffffff16565b80519091501561275057808060200190518101906129ca9190613633565b6127505760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107f3565b6060612a4b8484600085612a55565b90505b9392505050565b606082471015612acd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107f3565b6001600160a01b0385163b612b245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107f3565b600080866001600160a01b03168587604051612b409190613680565b60006040518083038185875af1925050503d8060008114612b7d576040519150601f19603f3d011682016040523d82523d6000602084013e612b82565b606091505b5091509150612b92828286612b9d565b979650505050505050565b60608315612bac575081612a4e565b825115612bbc5782518084602001fd5b8160405162461bcd60e51b81526004016107f3919061369c565b828054828255906000526020600020908101928215612c2b579160200282015b82811115612c2b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612bf6565b50612c37929150612c3b565b5090565b5b80821115612c375760008155600101612c3c565b6001600160a01b038116811461202e57600080fd5b803561290081612c50565b600060208284031215612c8257600080fd5b8135612a4e81612c50565b60008060408385031215612ca057600080fd5b8235612cab81612c50565b91506020830135612cbb81612c50565b809150509250929050565b60008083601f840112612cd857600080fd5b50813567ffffffffffffffff811115612cf057600080fd5b6020830191508360208260051b8501011115612d0b57600080fd5b9250929050565b60008060008060408587031215612d2857600080fd5b843567ffffffffffffffff80821115612d4057600080fd5b612d4c88838901612cc6565b90965094506020870135915080821115612d6557600080fd5b50612d7287828801612cc6565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612dbd57612dbd612d7e565b604052919050565b600067ffffffffffffffff821115612ddf57612ddf612d7e565b5060051b60200190565b600082601f830112612dfa57600080fd5b81356020612e0f612e0a83612dc5565b612d94565b82815260059290921b84018101918181019086841115612e2e57600080fd5b8286015b84811015612e52578035612e4581612c50565b8352918301918301612e32565b509695505050505050565b600082601f830112612e6e57600080fd5b81356020612e7e612e0a83612dc5565b82815260059290921b84018101918181019086841115612e9d57600080fd5b8286015b84811015612e5257803567ffffffffffffffff811115612ec15760008081fd5b612ecf8986838b0101612de9565b845250918301918301612ea1565b600082601f830112612eee57600080fd5b81356020612efe612e0a83612dc5565b828152600592831b8501820192828201919087851115612f1d57600080fd5b8387015b85811015612fb157803567ffffffffffffffff811115612f415760008081fd5b8801603f81018a13612f535760008081fd5b858101356040612f65612e0a83612dc5565b82815291851b8301810191888101908d841115612f825760008081fd5b938201935b83851015612fa057843582529389019390890190612f87565b885250505093850193508401612f21565b5090979650505050505050565b801515811461202e57600080fd5b600060808284031215612fde57600080fd5b6040516080810181811067ffffffffffffffff8211171561300157613001612d7e565b604052905080823563ffffffff8116811461301b57600080fd5b8152602083013561302b81612fbe565b6020820152604083013561303e81612c50565b6040820152606083013561305181612c50565b6060919091015292915050565b600080600080600080610120878903121561307857600080fd5b863567ffffffffffffffff8082111561309057600080fd5b61309c8a838b01612e5d565b975060208901359150808211156130b257600080fd5b6130be8a838b01612edd565b965060408901359150808211156130d457600080fd5b6130e08a838b01612de9565b955060608901359150808211156130f657600080fd5b5061310389828a01612edd565b9350506131138860808901612fcc565b91506131226101008801612c65565b90509295509295509295565b6000806040838503121561314157600080fd5b823591506020830135612cbb81612c50565b60008060008060006060868803121561316b57600080fd5b853567ffffffffffffffff8082111561318357600080fd5b61318f89838a01612cc6565b909750955060208801359150808211156131a857600080fd5b506131b588828901612cc6565b96999598509660400135949350505050565b600080600080600080606087890312156131e057600080fd5b863567ffffffffffffffff808211156131f857600080fd5b6132048a838b01612cc6565b9098509650602089013591508082111561321d57600080fd5b6132298a838b01612cc6565b9096509450604089013591508082111561324257600080fd5b5061324f89828a01612cc6565b979a9699509497509295939492505050565b6000806040838503121561327457600080fd5b823561327f81612c50565b946020939093013593505050565b60006020828403121561329f57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156132e75783516001600160a01b0316835292840192918401916001016132c2565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561331c5761331c6132f3565b500190565b60006020828403121561333357600080fd5b8151612a4e81612c50565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261336b57600080fd5b83018035915067ffffffffffffffff82111561338657600080fd5b6020019150600581901b3603821315612d0b57600080fd5b8183526000602080850194508260005b858110156133dc5781356133c181612c50565b6001600160a01b0316875295820195908201906001016133ae565b509495945050505050565b6000808335601e198436030181126133fe57600080fd5b830160208101925035905067ffffffffffffffff81111561341e57600080fd5b8060051b3603821315612d0b57600080fd5b818352600060208085019450848460051b86018460005b87811015612fb157838303895261345e82886133e7565b61346985828461339e565b9a87019a9450505090840190600101613447565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156134af57600080fd5b8260051b8083602087013760009401602001938452509192915050565b818352600060208085019450848460051b86018460005b87811015612fb15783830389526134fa82886133e7565b61350585828461347d565b9a87019a94505050908401906001016134e3565b60408152600061352d604083018688613430565b8281036020840152612b928185876134cc565b600082821015613552576135526132f3565b500390565b85815260606020820152600061357160608301868861339e565b828103604084015261358481858761347d565b98975050505050505050565b6060815260006135a460608301888a61347d565b82810360208401526135b7818789613430565b905082810360408401526135cc8185876134cc565b9998505050505050505050565b60008160001904831182151516156135f3576135f36132f3565b500290565b60008261361557634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561362c57600080fd5b5051919050565b60006020828403121561364557600080fd5b8151612a4e81612fbe565b60005b8381101561366b578181015183820152602001613653565b8381111561367a576000848401525b50505050565b60008251613692818460208701613650565b9190910192915050565b60208152600082518060208401526136bb816040850160208701613650565b601f01601f1916919091016040019291505056fea164736f6c634300080f000a

Deployed Bytecode

0x6080604052600436106101e75760003560e01c80638a9a929711610102578063ce1b815f11610095578063f166c9a111610064578063f166c9a1146106eb578063f2fde38b1461070b578063ff5c9c3e1461072b578063ffa1ad741461074b57600080fd5b8063ce1b815f14610654578063da74222814610672578063ddde545e14610692578063ec342ad0146106bf57600080fd5b8063a5def946116100d1578063a5def94614610593578063ba27bb08146105c9578063bf13f867146105e9578063c85483fb1461061157600080fd5b80638a9a9297146105065780638da5cb5b1461051e5780639afeed35146103405780639b8887881461055057600080fd5b80636481131a1161017a578063715018a611610149578063715018a61461048657806374ba81631461049b57806378e8a7d9146104d15780637d28f63a146104e657600080fd5b80636481131a146103c957806365fbd20c1461040f5780636e8acb0c1461042f5780636ea8bc101461046557600080fd5b80635435ea1f116101b65780635435ea1f146102f1578063572b6c051461031157806358ccc354146103405780635f36e8721461038657600080fd5b80631273a5a71461023d57806332bd40da1461026b57806348b75044146102af5780634a58b06a146102d157600080fd5b36610238576101f4610772565b6001600160a01b03167fced5d8bf10823804603bba066e4f53aa6e8f6f4be68bf0114cf7a0e52183e4e93460405161022e91815260200190565b60405180910390a2005b600080fd5b34801561024957600080fd5b50600354610100900460ff165b60405190151581526020015b60405180910390f35b34801561027757600080fd5b506102a1610286366004612c70565b6001600160a01b031660009081526009602052604090205490565b604051908152602001610262565b3480156102bb57600080fd5b506102cf6102ca366004612c8d565b6107a6565b005b3480156102dd57600080fd5b506102cf6102ec366004612d12565b610bdc565b3480156102fd57600080fd5b506102cf61030c36600461305e565b61111a565b34801561031d57600080fd5b5061025661032c366004612c70565b6000546001600160a01b0391821691161490565b34801561034c57600080fd5b506102a161035b366004612c8d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b34801561039257600080fd5b506102a16103a136600461312e565b60009182526004602090815260408084206001600160a01b0393909316845291905290205490565b3480156103d557600080fd5b506102a16103e4366004612c8d565b6001600160a01b039182166000908152600a6020908152604080832093909416825291909152205490565b34801561041b57600080fd5b506102cf61042a366004613153565b611709565b34801561043b57600080fd5b506102a161044a366004612c70565b6001600160a01b03166000908152600c602052604090205490565b34801561047157600080fd5b5060035462010000900463ffffffff166102a1565b34801561049257600080fd5b506102cf61196f565b3480156104a757600080fd5b506102a16104b6366004612c70565b6001600160a01b031660009081526007602052604090205490565b3480156104dd57600080fd5b50600d546102a1565b3480156104f257600080fd5b506102cf6105013660046131c7565b6119f4565b34801561051257600080fd5b5060035460ff16610256565b34801561052a57600080fd5b506001546001600160a01b03165b6040516001600160a01b039091168152602001610262565b34801561055c57600080fd5b506102a161056b366004613261565b6001600160a01b03919091166000908152600b60209081526040808320938352929052205490565b34801561059f57600080fd5b506102a16105ae366004612c70565b6001600160a01b031660009081526008602052604090205490565b3480156105d557600080fd5b506102a16105e436600461328d565b611f70565b3480156105f557600080fd5b50600354660100000000000090046001600160a01b0316610538565b34801561061d57600080fd5b506102a161062c366004613261565b6001600160a01b03919091166000908152600660209081526040808320938352929052205490565b34801561066057600080fd5b506000546001600160a01b0316610538565b34801561067e57600080fd5b506102cf61068d366004612c70565b611f97565b34801561069e57600080fd5b506106b26106ad36600461328d565b612031565b60405161026291906132a6565b3480156106cb57600080fd5b506106d66298968081565b60405163ffffffff9091168152602001610262565b3480156106f757600080fd5b506102cf610706366004612c70565b612100565b34801561071757600080fd5b506102cf610726366004612c70565b6124c2565b34801561073757600080fd5b506102a1610746366004612c70565b6125c0565b34801561075757600080fd5b50610760600281565b60405160ff9091168152602001610262565b60006014361080159061078f57506000546001600160a01b031633145b156107a1575060131936013560601c90565b503390565b60028054036107fc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002805561080982612100565b6001600160a01b038083166000908152600a60209081526040808320938516835292905290812054908190036108525760405163c00d56a360e01b815260040160405180910390fd5b6001600160a01b03808416600090815260056020908152604080832093861683529290529081208054839290610889908490613309565b90915550506001600160a01b038316600090815260086020526040812080548392906108b6908490613309565b90915550506001600160a01b038084166000818152600a60209081526040808320948716835293905291822091909155610a56576001600160a01b0383166000908152600c602052604090205415610a06576001600160a01b0383166000908152600c6020908152604080832080549084905560089092528220805491928392610941908490613309565b925050819055506000600360069054906101000a90046001600160a01b03166001600160a01b031663d76a09f46040518163ffffffff1660e01b8152600401602060405180830381865afa15801561099d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c19190613321565b90506109cd8183612683565b60405182906001600160a01b038716907f261a2feedbc107b4615e40f21cdbf5be9561a9b3fadd9192cd54d5eeb838647b90600090a350505b610a108282612683565b80836001600160a01b0316836001600160a01b03167f8ac5b3c2902b21b6bbb4d99ec195e28a242cb6a1777804db10b84d91e200642960405160405180910390a4610bd2565b6001600160a01b0383166000908152600c602052604090205415610b7c576001600160a01b0383166000908152600c6020908152604080832080549084905560089092528220805491928392610aad908490613309565b925050819055506000600360069054906101000a90046001600160a01b03166001600160a01b031663d76a09f46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2d9190613321565b9050610b436001600160a01b0386168284612755565b60405182906001600160a01b038716907f261a2feedbc107b4615e40f21cdbf5be9561a9b3fadd9192cd54d5eeb838647b90600090a350505b610b906001600160a01b0384168383612755565b80826001600160a01b0316846001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a60405160405180910390a45b5050600160025550565b600354610100900460ff1615610c055760405163034a9e9360e41b815260040160405180910390fd5b610c0d610772565b6001600160a01b0316610c286001546001600160a01b031690565b6001600160a01b031614610c7e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b828114610ca8576040516361a54c1b60e01b815260048101849052602481018290526044016107f3565b600d54839060005b828110156110bc576000878783818110610ccc57610ccc61333e565b9050602002810190610cde9190613354565b90509050858583818110610cf457610cf461333e565b9050602002810190610d069190613354565b90508114610d565780868684818110610d2157610d2161333e565b9050602002810190610d339190613354565b6040516361a54c1b60e01b815260048101939093526024830152506044016107f3565b604080516020810190915260608152888884818110610d7757610d7761333e565b9050602002810190610d899190613354565b80806020026020016040519081016040528093929190818152602001838360200280828437600092018290525093855250829150505b8381101561102f576000868152600460205260408120818d8d89818110610de857610de861333e565b9050602002810190610dfa9190613354565b85818110610e0a57610e0a61333e565b9050602002016020810190610e1f9190612c70565b6001600160a01b03166001600160a01b03168152602001908152602001600020541115610e5f57604051637d9f758f60e01b815260040160405180910390fd5b60008b8b87818110610e7357610e7361333e565b9050602002810190610e859190613354565b83818110610e9557610e9561333e565b9050602002016020810190610eaa9190612c70565b6001600160a01b031603610ed157604051638474420160e01b815260040160405180910390fd5b888886818110610ee357610ee361333e565b9050602002810190610ef59190613354565b82818110610f0557610f0561333e565b90506020020135600003610f2c5760405163b29483dd60e01b815260040160405180910390fd5b888886818110610f3e57610f3e61333e565b9050602002810190610f509190613354565b82818110610f6057610f6061333e565b905060200201356004600088815260200190815260200160002060008d8d89818110610f8e57610f8e61333e565b9050602002810190610fa09190613354565b85818110610fb057610fb061333e565b9050602002016020810190610fc59190612c70565b6001600160a01b03168152602081019190915260400160002055888886818110610ff157610ff161333e565b90506020028101906110039190613354565b828181106110135761101361333e565b90506020020135826110259190613309565b9150600101610dbf565b50629896808114611053576040516355fe908760e01b815260040160405180910390fd5b600d80546001810182556000919091528251805184927fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5019161109b91839160200190612bd6565b5050506001856110ab9190613309565b94505060019092019150610cb09050565b5060035460ff166110d5576003805460ff191660011790555b7f36e71a6b30e0a2c045ce3ea7f5176692bc8ae5164a28b5707aabe409bb98f7de8686868660405161110a9493929190613519565b60405180910390a1505050505050565b600061112660016127bc565b90508015611142576001805460ff60a81b1916600160a81b1790555b865185518751821461117457885188516040516361a54c1b60e01b8152600481019290925260248201526044016107f3565b855181146111a257855160405163d0352c1360e01b81526107f3918391600401918252602082015260400190565b60005b8281101561147f5760408051602081019091526060815260008b83815181106111d0576111d061333e565b60200260200101515190508a83815181106111ed576111ed61333e565b602002602001015151811461123c57808b848151811061120f5761120f61333e565b6020026020010151516040516361a54c1b60e01b81526004016107f3929190918252602082015260400190565b8b838151811061124e5761124e61333e565b602090810291909101015182526000805b828110156114015760008e868151811061127b5761127b61333e565b602002602001015182815181106112945761129461333e565b60209081029190910181015160008881526004835260408082206001600160a01b03841683529093529190912054909150156112e357604051637d9f758f60e01b815260040160405180910390fd5b6001600160a01b03811661130a57604051638474420160e01b815260040160405180910390fd5b8d868151811061131c5761131c61333e565b602002602001015182815181106113355761133561333e565b602002602001015160000361135d5760405163b29483dd60e01b815260040160405180910390fd5b8d868151811061136f5761136f61333e565b602002602001015182815181106113885761138861333e565b60209081029190910181015160008881526004835260408082206001600160a01b038616835290935291909120558d518e90879081106113ca576113ca61333e565b602002602001015182815181106113e3576113e361333e565b6020026020010151836113f69190613309565b92505060010161125f565b50629896808114611425576040516355fe908760e01b815260040160405180910390fd5b600d80546001810182556000919091528351805185927fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5019161146d91839160200190612bd6565b5050600190940193506111a592505050565b5060005b818110156115f257600088828151811061149f5761149f61333e565b6020026020010151905060005b848110156115e8578883815181106114c6576114c661333e565b6020026020010151516001866114dc9190613540565b1461152157848984815181106114f4576114f461333e565b6020026020010151516040516330a8f16960e21b81526004016107f3929190918252602082015260400190565b61152c600186613540565b81146115e0578883815181106115445761154461333e565b6020026020010151818151811061155d5761155d61333e565b60200260200101516000036115855760405163a860ddd160e01b815260040160405180910390fd5b8883815181106115975761159761333e565b602002602001015181815181106115b0576115b061333e565b6020908102919091018101516001600160a01b038416600090815260068352604080822085835290935291909120555b6001016114ac565b5050600101611483565b50600d546001101561160c576003805460ff191660011790555b6040850151600380548751602089015115156101000261ff001963ffffffff909216620100000265ffffffff0000196001600160a01b03909616660100000000000002959095167fffffffffffff000000000000000000000000000000000000000000000000ffff90931692909217939093179290921691909117905561169284612905565b6060850151600080546001600160a01b0319166001600160a01b0390921691909117905550508015611700576001805460ff60a81b191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b50505050505050565b600354610100900460ff16156117325760405163034a9e9360e41b815260040160405180910390fd5b61173a610772565b6001600160a01b03166117556001546001600160a01b031690565b6001600160a01b0316146117ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b600d5484908382146117da5760405163d0352c1360e01b815260048101839052602481018590526044016107f3565b8083106117fa57604051631b391e4b60e21b815260040160405180910390fd5b611805600182613540565b83036118245760405163999daa9360e01b815260040160405180910390fd5b60005b82811015611937578585828181106118415761184161333e565b90506020020135600b60008a8a8581811061185e5761185e61333e565b90506020020160208101906118739190612c70565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008681526020019081526020016000205411156118c457604051632801b92160e11b815260040160405180910390fd5b8585828181106118d6576118d661333e565b90506020020135600660008a8a858181106118f3576118f361333e565b90506020020160208101906119089190612c70565b6001600160a01b0316815260208082019290925260409081016000908120888252909252902055600101611827565b507fc336fcb4b285a5f26926770cc6eb675c5d8eaa208d80f6db7ecb5ab12fcc060383888888886040516116f7959493929190613557565b611977610772565b6001600160a01b03166119926001546001600160a01b031690565b6001600160a01b0316146119e85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b6119f26000612905565b565b600354610100900460ff1615611a1d5760405163034a9e9360e41b815260040160405180910390fd5b611a25610772565b6001600160a01b0316611a406001546001600160a01b031690565b6001600160a01b031614611a965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b808584141580611aa65750858114155b15611ace576040516361a54c1b60e01b815260048101879052602481018590526044016107f3565b600d5460005b82811015611f24576000898983818110611af057611af061333e565b9050602002810190611b029190613354565b90509050878783818110611b1857611b1861333e565b9050602002810190611b2a9190613354565b90508114611b6a57898983818110611b4457611b4461333e565b9050602002810190611b569190613354565b9050888884818110610d2157610d2161333e565b6000868684818110611b7e57611b7e61333e565b905060200201359050838110611ba75760405163a7ea53d360e01b815260040160405180910390fd5b6000600d8281548110611bbc57611bbc61333e565b6000918252602091829020018054604080518285028101850190915281815292830182828015611c1557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bf7575b5050505050905060005b8151811015611c7857600083815260046020526040812083518290859085908110611c4c57611c4c61333e565b6020908102919091018101516001600160a01b0316825281019190915260400160002055600101611c1f565b506000808467ffffffffffffffff811115611c9557611c95612d7e565b604051908082528060200260200182016040528015611cbe578160200160208202803683370190505b50905060005b85811015611eba5760008f8f89818110611ce057611ce061333e565b9050602002810190611cf29190613354565b83818110611d0257611d0261333e565b9050602002016020810190611d179190612c70565b60008781526004602090815260408083206001600160a01b038516845290915290205490915015611d5b57604051637d9f758f60e01b815260040160405180910390fd5b6001600160a01b038116611d8257604051638474420160e01b815260040160405180910390fd5b8d8d89818110611d9457611d9461333e565b9050602002810190611da69190613354565b83818110611db657611db661333e565b90506020020135600003611ddd5760405163b29483dd60e01b815260040160405180910390fd5b8d8d89818110611def57611def61333e565b9050602002810190611e019190613354565b83818110611e1157611e1161333e565b60008981526004602090815260408083206001600160a01b0388168452825290912091029290920135909155508d8d89818110611e5057611e5061333e565b9050602002810190611e629190613354565b83818110611e7257611e7261333e565b9050602002013584611e849190613309565b935080838381518110611e9957611e9961333e565b6001600160a01b039092166020928302919091019091015250600101611cc4565b5080600d8581548110611ecf57611ecf61333e565b906000526020600020016000019080519060200190611eef929190612bd6565b50629896808214611f13576040516355fe908760e01b815260040160405180910390fd5b505060019093019250611ad4915050565b507f795ec1dcdb16681c8a450b99ef20c9f9264e575f6bba51f879c4b22f4b1c579b84848a8a8a8a604051611f5e96959493929190613590565b60405180910390a15050505050505050565b6000600d8281548110611f8557611f8561333e565b60009182526020909120015492915050565b611f9f610772565b6001600160a01b0316611fba6001546001600160a01b031690565b6001600160a01b0316146120105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b600080546001600160a01b0319166001600160a01b03831617905550565b50565b600d5460609082106120855760405162461bcd60e51b815260206004820152601360248201527f544945525f444f45535f4e4f545f45584953540000000000000000000000000060448201526064016107f3565b6000600d838154811061209a5761209a61333e565b60009182526020918290200180546040805182850281018501909152818152928301828280156120f357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116120d5575b5093979650505050505050565b600061210b826125c0565b905060008060008060005b8515611700576001600160a01b03871660008181526007602090815260408083205460068352818420818552835281842054948452600b8352818420818552909252909120549096509093509150821580159061217b5750826121798784613309565b115b1561219d5761218a8284613540565b93506121968487613540565b90506121a4565b5084925060005b8315612485576000600d86815481106121bf576121bf61333e565b600091825260209182902001805460408051828502810185019091528181529283018282801561221857602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121fa575b50508351600354949550936000935060ff169150508015612246575060035462010000900463ffffffff1615155b156122ea5760035462989680906122699062010000900463ffffffff16896135d9565b61227391906135f8565b6001600160a01b038b166000908152600c60205260408120805492935083929091906122a0908490613309565b909155506122b090508188613540565b9650808a6001600160a01b03167f6c461460f28af1386f23dc4c0c7f4e2e54f0db320a8edc08803e4b787f6db32560405160405180910390a35b60005b828110156123ce576000898152600460205260408120855162989680929087908590811061231d5761231d61333e565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020548961235191906135d9565b61235b91906135f8565b6001600160a01b038c166000908152600a60205260408120865190919087908590811061238a5761238a61333e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008282546123c19190613309565b90915550506001016122ed565b506123d98188613309565b6001600160a01b038b1660009081526009602052604081208054909190612401908490613309565b9091555061241190508188613309565b6001600160a01b038b166000908152600b602090815260408083208c845290915281208054909190612444908490613309565b9091555050604051889088906001600160a01b038d16907f442151da4f589f7e51fac5b4f285a5e8fc8e105067689027ef065e1e922e193590600090a45050505b94508480156124bd576001600160a01b03871660009081526007602052604081208054600192906124b7908490613309565b90915550505b612116565b6124ca610772565b6001600160a01b03166124e56001546001600160a01b031690565b6001600160a01b03161461253b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107f3565b6001600160a01b0381166125b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107f3565b61202e81612905565b6000806001600160a01b0383166125d8575047612643565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a0823190602401602060405180830381865afa15801561261c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612640919061361a565b90505b6001600160a01b03831660009081526009602090815260408083205460089092528220546126719084613309565b61267b9190613540565b949350505050565b804710156126ad57604051631451ccdf60e31b8152476004820152602481018290526044016107f3565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126fa576040519150601f19603f3d011682016040523d82523d6000602084013e6126ff565b606091505b50509050806127505760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c45440000000000000000000000000060448201526064016107f3565b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052612750908490612957565b600154600090600160a81b900460ff161561284e578160ff1660011480156127e35750303b155b6128465760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107f3565b506000919050565b60015460ff808416600160a01b90920416106128c35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016107f3565b506001805460ff909216600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff90921691909117815590565b919050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006129ac826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a3c9092919063ffffffff16565b80519091501561275057808060200190518101906129ca9190613633565b6127505760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107f3565b6060612a4b8484600085612a55565b90505b9392505050565b606082471015612acd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107f3565b6001600160a01b0385163b612b245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107f3565b600080866001600160a01b03168587604051612b409190613680565b60006040518083038185875af1925050503d8060008114612b7d576040519150601f19603f3d011682016040523d82523d6000602084013e612b82565b606091505b5091509150612b92828286612b9d565b979650505050505050565b60608315612bac575081612a4e565b825115612bbc5782518084602001fd5b8160405162461bcd60e51b81526004016107f3919061369c565b828054828255906000526020600020908101928215612c2b579160200282015b82811115612c2b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612bf6565b50612c37929150612c3b565b5090565b5b80821115612c375760008155600101612c3c565b6001600160a01b038116811461202e57600080fd5b803561290081612c50565b600060208284031215612c8257600080fd5b8135612a4e81612c50565b60008060408385031215612ca057600080fd5b8235612cab81612c50565b91506020830135612cbb81612c50565b809150509250929050565b60008083601f840112612cd857600080fd5b50813567ffffffffffffffff811115612cf057600080fd5b6020830191508360208260051b8501011115612d0b57600080fd5b9250929050565b60008060008060408587031215612d2857600080fd5b843567ffffffffffffffff80821115612d4057600080fd5b612d4c88838901612cc6565b90965094506020870135915080821115612d6557600080fd5b50612d7287828801612cc6565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612dbd57612dbd612d7e565b604052919050565b600067ffffffffffffffff821115612ddf57612ddf612d7e565b5060051b60200190565b600082601f830112612dfa57600080fd5b81356020612e0f612e0a83612dc5565b612d94565b82815260059290921b84018101918181019086841115612e2e57600080fd5b8286015b84811015612e52578035612e4581612c50565b8352918301918301612e32565b509695505050505050565b600082601f830112612e6e57600080fd5b81356020612e7e612e0a83612dc5565b82815260059290921b84018101918181019086841115612e9d57600080fd5b8286015b84811015612e5257803567ffffffffffffffff811115612ec15760008081fd5b612ecf8986838b0101612de9565b845250918301918301612ea1565b600082601f830112612eee57600080fd5b81356020612efe612e0a83612dc5565b828152600592831b8501820192828201919087851115612f1d57600080fd5b8387015b85811015612fb157803567ffffffffffffffff811115612f415760008081fd5b8801603f81018a13612f535760008081fd5b858101356040612f65612e0a83612dc5565b82815291851b8301810191888101908d841115612f825760008081fd5b938201935b83851015612fa057843582529389019390890190612f87565b885250505093850193508401612f21565b5090979650505050505050565b801515811461202e57600080fd5b600060808284031215612fde57600080fd5b6040516080810181811067ffffffffffffffff8211171561300157613001612d7e565b604052905080823563ffffffff8116811461301b57600080fd5b8152602083013561302b81612fbe565b6020820152604083013561303e81612c50565b6040820152606083013561305181612c50565b6060919091015292915050565b600080600080600080610120878903121561307857600080fd5b863567ffffffffffffffff8082111561309057600080fd5b61309c8a838b01612e5d565b975060208901359150808211156130b257600080fd5b6130be8a838b01612edd565b965060408901359150808211156130d457600080fd5b6130e08a838b01612de9565b955060608901359150808211156130f657600080fd5b5061310389828a01612edd565b9350506131138860808901612fcc565b91506131226101008801612c65565b90509295509295509295565b6000806040838503121561314157600080fd5b823591506020830135612cbb81612c50565b60008060008060006060868803121561316b57600080fd5b853567ffffffffffffffff8082111561318357600080fd5b61318f89838a01612cc6565b909750955060208801359150808211156131a857600080fd5b506131b588828901612cc6565b96999598509660400135949350505050565b600080600080600080606087890312156131e057600080fd5b863567ffffffffffffffff808211156131f857600080fd5b6132048a838b01612cc6565b9098509650602089013591508082111561321d57600080fd5b6132298a838b01612cc6565b9096509450604089013591508082111561324257600080fd5b5061324f89828a01612cc6565b979a9699509497509295939492505050565b6000806040838503121561327457600080fd5b823561327f81612c50565b946020939093013593505050565b60006020828403121561329f57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156132e75783516001600160a01b0316835292840192918401916001016132c2565b50909695505050505050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561331c5761331c6132f3565b500190565b60006020828403121561333357600080fd5b8151612a4e81612c50565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261336b57600080fd5b83018035915067ffffffffffffffff82111561338657600080fd5b6020019150600581901b3603821315612d0b57600080fd5b8183526000602080850194508260005b858110156133dc5781356133c181612c50565b6001600160a01b0316875295820195908201906001016133ae565b509495945050505050565b6000808335601e198436030181126133fe57600080fd5b830160208101925035905067ffffffffffffffff81111561341e57600080fd5b8060051b3603821315612d0b57600080fd5b818352600060208085019450848460051b86018460005b87811015612fb157838303895261345e82886133e7565b61346985828461339e565b9a87019a9450505090840190600101613447565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156134af57600080fd5b8260051b8083602087013760009401602001938452509192915050565b818352600060208085019450848460051b86018460005b87811015612fb15783830389526134fa82886133e7565b61350585828461347d565b9a87019a94505050908401906001016134e3565b60408152600061352d604083018688613430565b8281036020840152612b928185876134cc565b600082821015613552576135526132f3565b500390565b85815260606020820152600061357160608301868861339e565b828103604084015261358481858761347d565b98975050505050505050565b6060815260006135a460608301888a61347d565b82810360208401526135b7818789613430565b905082810360408401526135cc8185876134cc565b9998505050505050505050565b60008160001904831182151516156135f3576135f36132f3565b500290565b60008261361557634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561362c57600080fd5b5051919050565b60006020828403121561364557600080fd5b8151612a4e81612fbe565b60005b8381101561366b578181015183820152602001613653565b8381111561367a576000848401525b50505050565b60008251613692818460208701613650565b9190910192915050565b60208152600082518060208401526136bb816040850160208701613650565b601f01601f1916919091016040019291505056fea164736f6c634300080f000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.