Contract 0x732B455a4422d0FA0F9121A2995F0aE2f45b255f

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf67997fc3b51ce4c7f790b386abfe255973dfbf0b779ac04fbc68fb82919a5a30x60806040201799552022-09-23 14:49:215 days 20 hrs ago0xdd5cf30f56c37d3243a23543dc5bd5ee576970e2 IN  Create: PlatypusHelper0 AVAX0.13234201229.7
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PlatypusHelper

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 99 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

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

import "ERC20.sol";
import "Ownable.sol";
import "Initializable.sol";
import "OwnableUpgradeable.sol";
import "IJoePair.sol";
import "IVoter.sol";
import "IMasterChefVTX.sol";
import "IMainStaking.sol";
import "IBoostedMultiRewarder.sol";
import "IMasterPlatypusv4.sol";
import "IJoeFactory.sol";
import "IMasterChefVTX.sol";
import "IBaseRewardPool.sol";
import "AggregatorV3Interface.sol";
import "IAPRHelper.sol";
import "IBalanceHelper.sol";
import "IERC20.sol";

contract PlatypusHelper is Ownable {
    AggregatorV3Interface internal priceFeed;
    uint256 internal constant ACC_TOKEN_PRECISION = 1e15;
    uint256 public constant AvaxUSDDecimals = 8;
    uint256 public constant precision = 8;
    address public constant ptp = 0x22d4002028f537599bE9f666d1c4Fa138522f9c8;
    address public constant xPTP = 0x060556209E507d30f2167a101bFC6D256Ed2f3e1;
    address public constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E;
    address public wavax;
    address public aprHelper;

    uint256 public constant FEE_DENOMINATOR = 10000;

    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 factor;
        uint256 accTokenPerShare;
        uint256 accTokenPerFactorShare;
    }

    struct UserPoolInfo {
        uint256 balance;
        uint256 balanceUSD;
        uint256[] rewards;
        uint256[] rewardsUSD;
        address[] tokenRewards;
        uint256[] harvestable;
        address[] tokenHarvestable;
        uint256[] harvestableUSD;
    }

    struct HelpStack {
        uint256 pid;
        address masterPlatypus;
        address asset;
        address mainStaking;
        address balanceHelper;
        address masterChief;
        address rewarder;
        uint256 sumOfFactors;
        uint256 accPtpPerShare;
        uint256 accPtpPerFactorShare;
        uint256 pendingPtpForLp;
        uint256 dilutingRepartition;
    }

    constructor(address _wavax, address _aprHelper) {
        priceFeed = AggregatorV3Interface(0x0A77230d17318075983913bC2145DB16C7366156);
        wavax = _wavax;
        aprHelper = _aprHelper;
    }

    /**
     * Returns the latest price
     */
    function getAvaxLatestPrice() public view returns (uint256) {
        (, int256 price, , , ) = priceFeed.latestRoundData();
        return uint256(price);
    }

    function getPTPperYear(address lp) public view returns (uint256 ptpPerYearPerToken) {
        uint256 _secondsElapsed = 3600 * 24 * 364;
        address voter = IAPRHelper(aprHelper).voter();
        uint256 _delta = (_secondsElapsed * IVoter(voter).ptpPerSec() * ACC_TOKEN_PRECISION) /
            IVoter(voter).totalWeight();
        ptpPerYearPerToken = (IVoter(voter).weights(lp) * _delta) / ACC_TOKEN_PRECISION;
    }

    function getTVL(address lp) public view returns (uint256 TVLinUSD) {
        address masterPlatypus = IAPRHelper(aprHelper).masterPlatypus();
        address mainStaking = IAPRHelper(aprHelper).mainStaking();
        uint256 _pid = IMasterPlatypusv4(masterPlatypus).getPoolId(lp);
        address token = IAPRHelper(aprHelper).pool2token(lp);
        (uint128 amount128, uint128 factor128, , ) = IMasterPlatypusv4(masterPlatypus).userInfo(
            _pid,
            mainStaking
        );
        uint256 amount = uint256(amount128);
        uint256 factor = uint256(factor128);
        TVLinUSD = (amount * getTokenPricePairedWithAvax(token)) / (10**ERC20(lp).decimals());
        if (TVLinUSD == 0){
            TVLinUSD = (amount * getTokenPricePairedWithStable(token,USDC)) / (10**ERC20(lp).decimals());
        }
    }

    function getLPPrice(address lp) public view returns (uint256 inUSD) {
        (inUSD, ) = getLPPriceAndDecimals(lp);
    }

    function getLPPriceAndDecimals(address lp)
        public
        view
        returns (uint256 inUSD, uint256 tokenDecimals)
    {
        address token = IAPRHelper(aprHelper).pool2token(lp);
        inUSD = getTokenPricePairedWithAvax(token);
        if (inUSD == 0){
            inUSD = getTokenPricePairedWithStable(token,USDC);
        }
        tokenDecimals = ERC20(token).decimals();
    }

    function getLPsPrice(address[] calldata lps) public view returns (uint256[] memory inUSD) {
        uint256 length = lps.length;
        inUSD = new uint256[](length);
        for (uint256 i; i < length; ++i) {
            address token = IAPRHelper(aprHelper).pool2token(lps[i]);
            inUSD[i] = getTokenPricePairedWithAvax(token);
            if (inUSD[i] == 0){
                inUSD[i] = getTokenPricePairedWithStable(token,USDC);
            }
        }
    }

    function getPTPperYearForVector(address lp)
        public
        view
        returns (uint256 pendingBasePtp, uint256 pendingBoostedPtp)
    {
        HelpStack memory helpStack;
        helpStack.masterPlatypus = IAPRHelper(aprHelper).masterPlatypus();
        helpStack.mainStaking = IAPRHelper(aprHelper).mainStaking();
        helpStack.pid = IMasterPlatypusv4(helpStack.masterPlatypus).getPoolId(lp);
        // address masterPlatypus = IAPRHelper(aprHelper).masterPlatypus();
        // address mainStaking = IAPRHelper(aprHelper).mainStaking();
        // uint256 _pid = IMasterPlatypusv4(masterPlatypus).getPoolId(lp);
        (
            address lpToken, // Address of LP token contract.
            ,
            uint256 sumOfFactors128, // 20.18 fixed point. The sum of all non dialuting factors by all of the users in the pool
            uint128 accPtpPerShare128, // 26.12 fixed point. Accumulated PTPs per share, times 1e12.
            uint128 accPtpPerFactorShare128
        ) = IMasterPlatypusv4(helpStack.masterPlatypus).poolInfo(helpStack.pid);
        helpStack.sumOfFactors = uint256(sumOfFactors128);
        helpStack.accPtpPerShare = uint256(accPtpPerShare128);
        helpStack.accPtpPerFactorShare = uint256(accPtpPerFactorShare128);
        helpStack.pendingPtpForLp = getPTPperYear(lp);
        helpStack.dilutingRepartition = IMasterPlatypusv4(helpStack.masterPlatypus)
            .dilutingRepartition();

        // calculate accPtpPerShare and accPtpPerFactorShare

        uint256 lpSupply = IERC20(lpToken).balanceOf(helpStack.masterPlatypus);
        if (lpSupply != 0) {
            helpStack.accPtpPerShare =
                (helpStack.pendingPtpForLp * 1e12 * helpStack.dilutingRepartition) /
                (lpSupply * 1000);
        }
        if (helpStack.sumOfFactors > 0) {
            helpStack.accPtpPerFactorShare =
                (helpStack.pendingPtpForLp * 1e12 * (1000 - helpStack.dilutingRepartition)) /
                (helpStack.sumOfFactors * 1000);
        }

        // get pendingPtp
        UserInfo memory userInfo;
        (uint128 amount128, uint128 factor128, , ) = IMasterPlatypusv4(helpStack.masterPlatypus)
            .userInfo(helpStack.pid, helpStack.mainStaking);
        userInfo.amount = uint256(amount128);
        userInfo.factor = uint256(factor128);
        pendingBasePtp = ((userInfo.amount * helpStack.accPtpPerShare) / 1e12);
        pendingBoostedPtp = ((userInfo.factor * helpStack.accPtpPerFactorShare) / 1e12);
    }

    function getAPRforPTPPoolInPTP(address lp)
        public
        view
        returns (uint256 baseAPR, uint256 boostedAPR)
    {
        (uint256 pendingBasePtp, uint256 pendingBoostedPtp) = getPTPperYearForVector(lp);
        baseAPR = (pendingBasePtp * getTokenPricePairedWithAvax(ptp)) / getTVL(lp) / 10**8;
        boostedAPR = (pendingBoostedPtp * getTokenPricePairedWithAvax(ptp)) / getTVL(lp) / 10**8;
    }

    function getMultipleAPRforPTPPoolsInPTP(address[] calldata lp)
        public
        view
        returns (uint256[] memory baseAPR, uint256[] memory boostedAPR)
    {
        uint256 length = lp.length;
        baseAPR = new uint256[](length);
        boostedAPR = new uint256[](length);
        for (uint256 i; i < length; ++i) {
            (uint256 pendingBasePtp, uint256 pendingBoostedPtp) = getPTPperYearForVector(lp[i]);
            baseAPR[i] =
                (pendingBasePtp * getTokenPricePairedWithAvax(ptp)) /
                getTVL(lp[i]) /
                10**8;
            boostedAPR[i] =
                (pendingBoostedPtp * getTokenPricePairedWithAvax(ptp)) /
                getTVL(lp[i]) /
                10**8;
        }
    }

    function getMultipleAPRforLockerlsInAdditionalReward(
        uint256 feeAmount,
        address[] calldata lps,
        address[] calldata inputRewardTokens
    ) public view returns (uint256[] memory APRs, address[] memory rewardTokens) {
        uint256 length = lps.length;
        APRs = new uint256[](inputRewardTokens.length);
        rewardTokens = new address[](inputRewardTokens.length);
        for (uint256 i; i < length; ++i) {
            (
                uint256[] memory APR,
                address[] memory rewardToken
            ) = getAPRforLockerInAdditionalReward(lps[i], feeAmount);
            for (uint256 j; j < inputRewardTokens.length; ++j) {
                for (uint256 k; k < rewardToken.length; ++k)
                    if (rewardToken[k] == inputRewardTokens[j]) {
                        APRs[j] += APR[k];
                        rewardTokens[j] = rewardToken[k];
                    }
            }
        }
    }

    function getAdditionalRewardsInUSDPerYear(address lp)
        public
        view
        returns (uint256[] memory USDPerYear, address[] memory rewardTokens)
    {
        HelpStack memory helpStack;
        helpStack.masterPlatypus = IAPRHelper(aprHelper).masterPlatypus();
        helpStack.mainStaking = IAPRHelper(aprHelper).mainStaking();
        helpStack.pid = IMasterPlatypusv4(helpStack.masterPlatypus).getPoolId(lp);
        uint256 sumOfFactors = IMasterPlatypusv4(helpStack.masterPlatypus).getSumOfFactors(
            helpStack.pid
        );
        (uint128 amount128, uint128 factor128, , ) = IMasterPlatypusv4(helpStack.masterPlatypus)
            .userInfo(helpStack.pid, helpStack.mainStaking);
        UserInfo memory userInfo;
        userInfo.amount = uint256(amount128);
        userInfo.factor = uint256(factor128);
        (, address rewarder, , , ) = IMasterPlatypusv4(helpStack.masterPlatypus).poolInfo(
            helpStack.pid
        );
        if (rewarder != address(0)) {
            uint256 dilutingRepartition = IBoostedMultiRewarder(rewarder).dilutingRepartition();
            uint256 length = IBoostedMultiRewarder(rewarder).poolLength();
            USDPerYear = new uint256[](length);
            rewardTokens = new address[](length);
            for (uint256 i; i < length; ++i) {
                (address rewardToken, uint96 tokenPerSec, , ) = IBoostedMultiRewarder(rewarder)
                    .poolInfo(i);
                rewardTokens[i] = (rewardToken == address(0)) ? wavax : rewardToken;
                userInfo.accTokenPerShare =
                    (3600 *
                        24 *
                        365 *
                        uint256(tokenPerSec) *
                        dilutingRepartition *
                        ACC_TOKEN_PRECISION) /
                    IERC20(lp).balanceOf(helpStack.masterPlatypus) /
                    1000;
                if (sumOfFactors > 0) {
                    userInfo.accTokenPerFactorShare =
                        (3600 *
                            24 *
                            365 *
                            uint256(tokenPerSec) *
                            ACC_TOKEN_PRECISION *
                            (1000 - dilutingRepartition)) /
                        sumOfFactors /
                        1000;
                }
                USDPerYear[i] += (((userInfo.amount *
                    userInfo.accTokenPerShare +
                    userInfo.accTokenPerFactorShare *
                    userInfo.factor) / ACC_TOKEN_PRECISION) *
                    getTokenPricePairedWithAvax(rewardTokens[i]));
            }
        }
    }

    function getAPRforPTPPoolInAdditionalReward(address lp) public view returns (uint256 APR) {
        (
            uint256[] memory APRs,
            address[] memory tempRewardToken
        ) = getAPRforPTPPoolInAdditionalRewardArray(lp);
        uint256 length = APRs.length;
        for (uint256 i; i < length; ++i) {
            APR += APRs[i];
        }
    }

    function getAPRforPTPPoolInAdditionalRewardArray(address lp)
        public
        view
        returns (uint256[] memory APR, address[] memory rewardToken)
    {
        (
            uint256[] memory USDPerYear,
            address[] memory tempRewardToken
        ) = getAdditionalRewardsInUSDPerYear(lp);
        uint256 length = USDPerYear.length;
        rewardToken = tempRewardToken;
        APR = new uint256[](length);
        for (uint256 i; i < length; ++i) {
            APR[i] = USDPerYear[i] / getTVL(lp) / 10**8;
        }
    }

    function getAPRforLockerInAdditionalReward(address lp, uint256 feeAmount)
        public
        view
        returns (uint256[] memory APR, address[] memory rewardToken)
    {
        (
            uint256[] memory USDPerYear,
            address[] memory tempRewardToken
        ) = getAdditionalRewardsInUSDPerYear(lp);
        uint256 length = USDPerYear.length;
        rewardToken = tempRewardToken;
        APR = new uint256[](length);
        for (uint256 i; i < length; ++i) {
            APR[i] = (USDPerYear[i] * feeAmount) / FEE_DENOMINATOR / getTVLForLocker() / 10**8;
        }
    }

    function getAPRforxPTPInAdditionalReward(address lp, uint256 feeAmount)
        public
        view
        returns (uint256[] memory APR, address[] memory rewardToken)
    {
        (
            uint256[] memory USDPerYear,
            address[] memory tempRewardToken
        ) = getAdditionalRewardsInUSDPerYear(lp);
        uint256 length = USDPerYear.length;
        rewardToken = tempRewardToken;
        APR = new uint256[](length);
        for (uint256 i; i < length; ++i) {
            APR[i] = (USDPerYear[i] * feeAmount) / FEE_DENOMINATOR / getXPTPTVL() / 10**8;
        }
    }

    function getTokenPricePairedWithAvax(address token) public view returns (uint256 tokenPrice) {
        address balanceHelper = IAPRHelper(aprHelper).balanceHelper();
        tokenPrice = IBalanceHelper(balanceHelper).getTokenPricePairedWithAvax(token);
    }

    function getTokenPricePairedWithStable(address token, address stable) public view returns (uint256 tokenPrice) {
        address balanceHelper = IAPRHelper(aprHelper).balanceHelper();
        tokenPrice = IBalanceHelper(balanceHelper).getTokenPricePairedWithStable(token, stable);
    }

    // function getPlatypusFees(uint256 index) public view returns (uint256 feeAmount) {
    //     for (uint256 i; i < index; ++i) {
    //         (, , uint256 value, , , , bool isActive) = IMainStaking(mainStaking).feeInfos(i);
    //         if (isActive) {
    //             feeAmount += value;
    //         }
    //     }
    // }

    function getPTPClaimableRewards(
        address lp,
        address[] calldata inputRewardTokens,
        address user
    )
        public
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory amounts,
            uint256[] memory usdAmounts
        )
    {
        address asset = IAPRHelper(aprHelper).lp2asset(lp);
        address mainStaking = IAPRHelper(aprHelper).mainStaking();
        (, , , , , , , address rewarder, ) = IMainStaking(mainStaking).getPoolInfo(asset);
        uint256 length = inputRewardTokens.length;
        uint256 actualLength;
        for (uint256 i; i < length; ++i) {
            if (IBaseRewardPool(rewarder).isRewardToken(inputRewardTokens[i])) {
                actualLength += 1;
            }
        }
        uint256 index;
        rewardTokens = new address[](actualLength);
        amounts = new uint256[](actualLength);
        usdAmounts = new uint256[](actualLength);
        for (uint256 i; i < length; ++i) {
            if (IBaseRewardPool(rewarder).isRewardToken(inputRewardTokens[i])) {
                rewardTokens[index] = inputRewardTokens[i];
                uint256 amount = IBaseRewardPool(rewarder).earned(user, rewardTokens[index]);
                amounts[index] = amount;
                usdAmounts[index] =
                    (getTokenPricePairedWithAvax(rewardTokens[index]) * amounts[i]) /
                    10**ERC20(rewardTokens[index]).decimals();
                index += 1;
            }
        }
    }

    function getPTPHarvestableRewards(address lp, address user)
        public
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory amounts,
            uint256[] memory usdAmounts
        )
    {
        HelpStack memory helpStack;
        helpStack.asset = IAPRHelper(aprHelper).lp2asset(lp);
        helpStack.masterPlatypus = IAPRHelper(aprHelper).masterPlatypus();
        helpStack.mainStaking = IAPRHelper(aprHelper).mainStaking();
        (, , , , , , , helpStack.rewarder, ) = IMainStaking(helpStack.mainStaking).getPoolInfo(
            helpStack.asset
        );
        rewardTokens = new address[](2);
        amounts = new uint256[](2);
        usdAmounts = new uint256[](2);
        helpStack.pid = IMasterPlatypusv4(helpStack.masterPlatypus).getPoolId(lp);
        (
            uint256 pendingPtp,
            address[] memory bonusTokenAddresses,
            ,
            uint256[] memory pendingBonusTokens
        ) = IMasterPlatypusv4(helpStack.masterPlatypus).pendingTokens(
                helpStack.pid,
                helpStack.mainStaking
            );
        uint256 ratio = (IBaseRewardPool(helpStack.rewarder).balanceOf(user) * 10**precision) /
            IBaseRewardPool(helpStack.rewarder).totalSupply();
        rewardTokens[0] = ptp;
        amounts[0] = (pendingPtp * ratio) / (10**precision);
        usdAmounts[0] =
            (amounts[0] * getTokenPricePairedWithAvax(rewardTokens[0])) /
            10**ERC20(rewardTokens[0]).decimals();
        for (uint256 i; i < bonusTokenAddresses.length; ++i) {
            rewardTokens[i + 1] = bonusTokenAddresses[i];
            amounts[i + 1] = (pendingBonusTokens[i] * ratio) / (10**precision);
            usdAmounts[i + 1] =
                (amounts[i + 1] * getTokenPricePairedWithAvax(rewardTokens[i + 1])) /
                10**ERC20(rewardTokens[i + 1]).decimals();
        }
    }

    function getRatio(
        address numerator,
        address denominator,
        uint256 decimals
    ) public view returns (uint256 ratio) {
        address balanceHelper = IAPRHelper(aprHelper).balanceHelper();
        ratio = IBalanceHelper(balanceHelper).getRatio(numerator, denominator, decimals);
    }

    function getTVLForLocker() public view returns (uint256 lockerTVL) {
        address balanceHelper = IAPRHelper(aprHelper).balanceHelper();
        lockerTVL = IBalanceHelper(balanceHelper).getTVLForLocker();
    }

    function getXPTPAPRForLocker(uint256 feeAmount) public view returns (uint256 APR) {
        uint256 length = IAPRHelper(aprHelper).getLengthPtpPools();
        uint256 amountPTP;
        for (uint256 i; i < length; ++i) {
            (uint256 base, uint256 boosted) = getPTPperYearForVector(
                IAPRHelper(aprHelper).ptpPools(i)
            );
            amountPTP += ((base + boosted) * feeAmount) / FEE_DENOMINATOR;
        }
        uint256 lockerTVL = getTVLForLocker();
        uint256 xPTPUSDValue = (amountPTP *
            getTokenPricePairedWithAvax(ptp) *
            getRatio(xPTP, ptp, 8)) / 10**(ERC20(ptp).decimals());
        APR = (xPTPUSDValue * 100) / lockerTVL;
    }

    function getXPTPTVL() public view returns (uint256 usdValue) {
        address masterChief = IAPRHelper(aprHelper).masterChief();
        (
            uint256 emission,
            uint256 allocpoint,
            uint256 sizeOfPool,
            uint256 totalPoint
        ) = IMasterChefVTX(masterChief).getPoolInfo(xPTP);
        usdValue =
            (sizeOfPool * getTokenPricePairedWithAvax(ptp) * getRatio(xPTP, ptp, 8)) /
            10**(8 + ERC20(xPTP).decimals());
    }

    function getUserInfo(address user, address[] calldata inputRewardTokens)
        public
        view
        returns (UserPoolInfo[] memory usersInfo)
    {
        uint256 length = IAPRHelper(aprHelper).getLengthPtpPools();
        HelpStack memory helpStack;
        helpStack.mainStaking = IAPRHelper(aprHelper).mainStaking();
        usersInfo = new UserPoolInfo[](length);
        for (uint256 i; i < length; ++i) {
            UserPoolInfo memory userInfo;
            address pool = IAPRHelper(aprHelper).ptpPools(i);
            helpStack.asset = IAPRHelper(aprHelper).lp2asset(pool);
            (, , , , , , , address rewarder, ) = IMainStaking(helpStack.mainStaking).getPoolInfo(
                helpStack.asset
            );
            userInfo.balance = IBaseRewardPool(rewarder).balanceOf(user);
            (uint256 price, uint256 decimals) = getLPPriceAndDecimals(pool);
            userInfo.balanceUSD = (userInfo.balance * price) / 10**(decimals);
            (userInfo.tokenRewards, userInfo.rewards, userInfo.rewardsUSD) = getPTPClaimableRewards(
                pool,
                inputRewardTokens,
                user
            );
            (
                userInfo.tokenHarvestable,
                userInfo.harvestable,
                userInfo.harvestableUSD
            ) = getPTPHarvestableRewards(pool, user);
            usersInfo[i] = userInfo;
        }
    }
}

File 2 of 21 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";
import "IERC20Metadata.sol";
import "Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 3 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

File 4 of 21 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

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

pragma solidity ^0.8.0;

import "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 7 of 21 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 21 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "ContextUpgradeable.sol";
import "Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

pragma solidity ^0.8.0;
import "Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

File 11 of 21 : IJoePair.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IJoePair {
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event Transfer(address indexed from, address indexed to, uint256 value);

    function name() external pure returns (string memory);

    function symbol() external pure returns (string memory);

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint256 amount0, uint256 amount1);
    event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint256 amount0In,
        uint256 amount1In,
        uint256 amount0Out,
        uint256 amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to) external returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

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

interface IVoter {
    struct LpTokenInfo {
        uint128 claimable; // 20.18 fixed point. claimable PTP
        uint128 supplyIndex; // 20.18 fixed point. distributed reward per weight
        address gauge;
        bool whitelist;
    }

    // lpToken => weight, equals to sum of votes for a LP token
    function weights(address _lpToken) external view returns (uint256);

    function ptpPerSec() external view returns (uint256);

    function totalWeight() external view returns (uint256);

    function bribes(address _lpToken) external view returns (address);

    function vote(address[] calldata _lpVote, int256[] calldata _deltas)
        external
        returns (uint256[] memory bribeRewards);

    // user address => lpToken => votes
    function votes(address _user, address _lpToken) external view returns (uint256);

    function claimBribes(address[] calldata _lpTokens)
        external
        returns (uint256[] memory bribeRewards);

    function lpTokenLength() external view returns (uint256);

    function getUserVotes(address _user, address _lpToken) external view returns (uint256);

    function pendingBribes(address[] calldata _lpTokens, address _user)
        external
        view
        returns (uint256[] memory bribeRewards);
}

File 13 of 21 : IMasterChefVTX.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IMasterChefVTX {
    function poolLength() external view returns (uint256);

    function setPoolManagerStatus(address _address, bool _bool) external;

    function add(
        uint256 _allocPoint,
        address _lpToken,
        address _rewarder,
        address _helper
    ) external;

    function set(
        address _lp,
        uint256 _allocPoint,
        address _rewarder,
        address _locker,
        bool overwrite
    ) external;

    function vtxLocker() external view returns (address);

    function createRewarder(address _lpToken, address mainRewardToken) external returns (address);

    // View function to see pending VTXs on frontend.
    function getPoolInfo(address token)
        external
        view
        returns (
            uint256 emission,
            uint256 allocpoint,
            uint256 sizeOfPool,
            uint256 totalPoint
        );

    function pendingTokens(
        address _lp,
        address _user,
        address token
    )
        external
        view
        returns (
            uint256 pendingVTX,
            address bonusTokenAddress,
            string memory bonusTokenSymbol,
            uint256 pendingBonusToken
        );

    function rewarderBonusTokenInfo(address _lp)
        external
        view
        returns (address bonusTokenAddress, string memory bonusTokenSymbol);

    function massUpdatePools() external;

    function updatePool(address _lp) external;

    function deposit(address _lp, uint256 _amount) external;

    function depositFor(
        address _lp,
        uint256 _amount,
        address sender
    ) external;

    function lock(
        address _lp,
        uint256 _amount,
        uint256 _index,
        bool force
    ) external;

    function unlock(
        address _lp,
        uint256 _amount,
        uint256 _index
    ) external;

    function multiUnlock(
        address _lp,
        uint256[] calldata _amount,
        uint256[] calldata _index
    ) external;

    function withdraw(address _lp, uint256 _amount) external;

    function withdrawFor(
        address _lp,
        uint256 _amount,
        address _sender
    ) external;

    function multiclaim(address[] memory _lps, address user_address) external;

    function emergencyWithdraw(address _lp, address sender) external;

    function updateEmissionRate(uint256 _vtxPerSec) external;

    function depositInfo(address _lp, address _user) external view returns (uint256 depositAmount);

    function setPoolHelper(address _lp, address _helper) external;

    function authorizeLocker(address _locker) external;

    function lockFor(
        address _lp,
        uint256 _amount,
        uint256 _index,
        address _for,
        bool force
    ) external;

    function vtx() external view returns (address);
}

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

interface IMainStaking {
    function vote(
        address[] calldata _lpVote,
        int256[] calldata _deltas,
        address[] calldata _rewarders,
        address caller
    ) external returns (address[] memory rewardTokens, uint256[] memory feeAmounts);

    function setXPTP(address _xPTP) external;

    function feeInfos(uint256 index)
        external
        view
        returns (
            uint256 max_value,
            uint256 min_value,
            uint256 value,
            address to,
            bool isPTP,
            bool isAddress,
            bool isActive
        );

    function addFee(
        uint256 max,
        uint256 min,
        uint256 value,
        address to,
        bool isPTP,
        bool isAddress
    ) external;

    function setFee(uint256 index, uint256 value) external;

    function setCallerFee(uint256 value) external;

    function deposit(
        address token,
        uint256 amount,
        address sender
    ) external;

    function harvest(address token, bool isUser) external;

    function withdrawLP(
        address token,
        uint256 amount,
        address sender
    ) external;

    function withdraw(
        address token,
        uint256 _amount,
        uint256 _slippage,
        address sender
    ) external;

    function withdrawForOverCoveredToken(
        address token,
        address overCoveredToken,
        uint256 _amount,
        uint256 minAmount,
        address sender
    ) external;

    function withdrawWithDifferentAssetForOverCoveredToken(
        address token,
        address overCoveredToken,
        address asset,
        uint256 _amount,
        uint256 minAmount,
        address sender
    ) external;

    function stakePTP(uint256 amount) external;

    function stakeAllPtp() external;

    function claimVePTP() external;

    function getStakedPtp() external view returns (uint256);

    function getVePtp() external view returns (uint256);

    function unstakePTP() external;

    function pendingPtpForPool(address _token) external view returns (uint256 pendingPtp);

    function masterPlatypus() external view returns (address);

    function getLPTokensForShares(uint256 amount, address token) external view returns (uint256);

    function getSharesForDepositTokens(uint256 amount, address token)
        external
        view
        returns (uint256);

    function getDepositTokensForShares(uint256 amount, address token)
        external
        view
        returns (uint256);

    function registerPool(
        uint256 _pid,
        address _token,
        address _lpAddress,
        address _staking,
        string memory receiptName,
        string memory receiptSymbol,
        uint256 allocpoints
    ) external;

    function getPoolInfo(address _address)
        external
        view
        returns (
            uint256 pid,
            bool isActive,
            address token,
            address lp,
            uint256 sizeLp,
            address receipt,
            uint256 size,
            address rewards_addr,
            address helper
        );

    function removePool(address token) external;

    function depositWithDifferentAsset(
        address token,
        address asset,
        uint256 amount,
        address sender
    ) external;

    function multiHarvest(address token, bool isUser) external;

    function withdrawWithDifferentAsset(
        address token,
        address asset,
        uint256 _amount,
        uint256 minAmount,
        address sender
    ) external;

    function registerPoolWithDifferentAsset(
        uint256 _pid,
        address _token,
        address _lpAddress,
        address _assetToken,
        string memory receiptName,
        string memory receiptSymbol,
        uint256 allocPoints
    ) external;

    function pendingBribeCallerFee(address[] calldata pendingPools)
        external
        view
        returns (address[] memory rewardTokens, uint256[] memory callerFeeAmount);
}

File 15 of 21 : IBoostedMultiRewarder.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "IERC20.sol";

interface IBoostedMultiRewarder {
    function dilutingRepartition() external view returns (uint256);

    struct PoolInfo {
        address rewardToken; // if rewardToken is 0, native token is used as reward token
        uint96 tokenPerSec; // 10.18 fixed point
        uint128 accTokenPerShare; // 26.12 fixed point. Amount of reward token each LP token is worth. Times 1e12
        uint128 accTokenPerFactorShare; // 26.12 fixed point. Accumulated ptp per factor share. Time 1e12
    }

    function poolInfo(uint256 i)
        external
        view
        returns (
            address rewardToken, // Address of LP token contract.
            uint96 tokenPerSec, // How many base allocation points assigned to this pool
            uint128 accTokenPerShare, // Last timestamp that PTPs distribution occurs.
            uint128 accTokenPerFactorShare
        );

    function onPtpReward(
        address _user,
        uint256 _lpAmount,
        uint256 _newLpAmount,
        uint256 _factor,
        uint256 _newFactor
    ) external returns (uint256[] memory rewards);

    function onUpdateFactor(
        address _user,
        uint256 _lpAmount,
        uint256 _factor,
        uint256 _newFactor
    ) external;

    function pendingTokens(
        address _user,
        uint256 _lpAmount,
        uint256 _factor
    ) external view returns (uint256[] memory rewards);

    function rewardToken() external view returns (address token);

    function tokenPerSec() external view returns (uint256);

    function poolLength() external view returns (uint256);
}

File 16 of 21 : IMasterPlatypusv4.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IMasterPlatypusv4 {
    // Info of each user.
    struct UserInfo {
        // 256 bit packed
        uint128 amount; // How many LP tokens the user has provided.
        uint128 factor; // non-dialuting factor = sqrt (lpAmount * vePtp.balanceOf())
        // 256 bit packed
        uint128 rewardDebt; // Reward debt. See explanation below.
        uint128 claimablePtp;
        //
        // We do some fancy math here. Basically, any point in time, the amount of PTPs
        // entitled to a user but is pending to be distributed is:
        //
        //   ((user.amount * pool.accPtpPerShare + user.factor * pool.accPtpPerFactorShare) / 1e12) -
        //        user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accPtpPerShare`, `accPtpPerFactorShare` (and `lastRewardTimestamp`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // Info of each pool.
    struct PoolInfo {
        address lpToken; // Address of LP token contract.
        address rewarder;
        uint128 sumOfFactors; // 20.18 fixed point. The sum of all non dialuting factors by all of the users in the pool
        uint128 accPtpPerShare; // 26.12 fixed point. Accumulated PTPs per share, times 1e12.
        uint128 accPtpPerFactorShare; // 26.12 fixed point. Accumulated ptp per factor share
    }

    function getSumOfFactors(uint256) external view returns (uint256);

    function poolLength() external view returns (uint256);

    function getPoolId(address) external view returns (uint256);

    function massUpdatePools() external;

    function updatePool(uint256 _pid) external;

    function deposit(uint256 _pid, uint256 _amount)
        external
        returns (uint256 reward, uint256[] memory additionalRewards);

    function depositFor(
        uint256 _pid,
        uint256 _amount,
        address _user
    ) external;

    function multiClaim(uint256[] memory _pids)
        external
        returns (
            uint256 reward,
            uint256[] memory amounts,
            uint256[][] memory additionalRewards
        );

    function withdraw(uint256 _pid, uint256 _amount)
        external
        returns (uint256 reward, uint256[] memory additionalRewards);

    function liquidate(
        uint256 _pid,
        address _user,
        uint256 _amount
    ) external;

    function emergencyWithdraw(uint256 _pid) external;

    function updateFactor(address _user, uint256 _newVePtpBalance) external;

    function notifyRewardAmount(address _lpToken, uint256 _amount) external;

    function dilutingRepartition() external view returns (uint256);

    function pendingTokens(uint256 _pid, address _user)
        external
        view
        returns (
            uint256 pendingPtp,
            address[] memory bonusTokenAddresses,
            string[] memory bonusTokenSymbols,
            uint256[] memory pendingBonusTokens
        );

    function userInfo(uint256 _pid, address _address)
        external
        view
        returns (
            uint128 amount,
            uint128 factor,
            uint128 rewardDebt,
            uint128 claimablePtp
        );

    function migrate(uint256[] calldata _pids) external;

    function poolInfo(uint256 i)
        external
        view
        returns (
            address lpToken,
            address rewarder,
            uint128 sumOfFactors,
            uint128 accPtpPerShare,
            uint128 accPtpPerFactorShare
        );
}

File 17 of 21 : IJoeFactory.sol
pragma solidity >=0.5.0;

interface IJoeFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function migrator() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;

    function setMigrator(address) external;
}

File 18 of 21 : IBaseRewardPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IBaseRewardPool {
    struct Reward {
        address rewardToken;
        uint256 rewardPerTokenStored;
        uint256 queuedRewards;
        uint256 historicalRewards;
    }

    function rewards(address token) external view returns (Reward memory rewardInfo);

    function rewards(uint256 i)
        external
        view
        returns (
            address rewardToken,
            uint256 rewardPerTokenStored,
            uint256 queuedRewards,
            uint256 historicalRewards
        );

    function rewardTokens() external view returns (address[] memory);

    // These are for TraderJoe Rewarder
    function rewardToken() external view returns (address);

    function pendingTokens(address user) external view returns (uint256);

    function balance() external view returns (uint256);

    function userInfo(address user)
        external
        view
        returns (
            uint256 amount,
            uint256 rewardDebt,
            uint256 unpaidRewards
        );

    // END
    function getStakingToken() external view returns (address);

    function isRewardToken(address token) external view returns (bool);

    function getReward(address _account) external returns (bool);

    function getReward(address _account, uint256 percentage) external;

    function rewardDecimals(address token) external view returns (uint256);

    function stakingDecimals() external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function rewardPerToken(address token) external view returns (uint256);

    function updateFor(address account) external;

    function earned(address account, address token) external view returns (uint256);

    function stakeFor(address _for, uint256 _amount) external returns (bool);

    function withdrawFor(
        address user,
        uint256 amount,
        bool claim
    ) external;

    function queueNewRewards(uint256 _rewards, address token) external returns (bool);

    function donateRewards(uint256 _amountReward, address _rewardToken) external returns (bool);
}

File 19 of 21 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
    function decimals() external view returns (uint8);

    function description() external view returns (string memory);

    function version() external view returns (uint256);

    // getRoundData and latestRoundData should both raise "No data present"
    // if they do not have data to report, instead of returning unset values
    // which could be misinterpreted as actual reported values.
    function getRoundData(uint80 _roundId)
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );

    function latestRoundData()
        external
        view
        returns (
            uint80 roundId,
            int256 answer,
            uint256 startedAt,
            uint256 updatedAt,
            uint80 answeredInRound
        );
}

File 20 of 21 : IAPRHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IAPRHelper {
    function getPTPperYear(address lp) external view returns (uint256 ptpPerYearPerToken);

    function masterPlatypus() external view returns (address);

    function voter() external view returns (address);

    function mainstakingTJ() external view returns (address);

    function locker() external view returns (address);

    function factory() external view returns (address);

    function mainStaking() external view returns (address);

    function balanceHelper() external view returns (address);

    function masterChief() external view returns (address);

    function vtx() external view returns (address);

    function pool2token(address lp) external view returns (address);

    function lp2asset(address lp) external view returns (address);

    function getLengthTJPools() external view returns (uint256);

    function tjPools(uint256 i) external view returns (address);

    function getLengthPtpPools() external view returns (uint256);

    function ptpPools(uint256 i) external view returns (address);

    function getTVL(address lp) external view returns (uint256 TVLinUSD);

    function getPTPperYearForVector(address lp)
        external
        view
        returns (uint256 pendingBasePtp, uint256 pendingBoostedPtp);

    function getAPRforPTPPoolInPTP(address lp)
        external
        view
        returns (uint256 baseAPR, uint256 boostedAPR);

    function getMultipleAPRforPTPPoolsInPTP(address[] calldata lp)
        external
        view
        returns (uint256[] memory baseAPR, uint256[] memory boostedAPR);

    function getMultipleAPRforPTPPoolsInAdditionalReward(address[] calldata lp)
        external
        view
        returns (uint256[] memory APR);

    function getAPRforPTPPoolInAdditionalReward(address lp) external view returns (uint256 APR);

    function getTokenPricePairedWithAvax(address token) external view returns (uint256 tokenPrice);

    function getPlatypusFees(uint256 index) external view returns (uint256 feeAmount);

    function getPTPClaimableRewards(
        address lp,
        address[] calldata inputRewardTokens,
        address user
    )
        external
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory amounts,
            uint256[] memory usdAmounts
        );

    function getPTPHarvestableRewards(address lp, address user)
        external
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory amounts,
            uint256[] memory usdAmounts
        );

    function getRatio(
        address numerator,
        address denominator,
        uint256 decimals
    ) external view returns (uint256 ratio);

    function leftVotes(uint256[] calldata percentages)
        external
        view
        returns (int256 left, uint256 totalPercentage);

    function votesInBigNumbers(uint256[] calldata percentages)
        external
        view
        returns (uint256[] memory votes, uint256 totalPercentage);

    function getTVLForLocker() external view returns (uint256 lockerTVL);

    function getXPTPAPRForLocker(uint256 feeAmount) external view returns (uint256 APR);

    function getPendingBribes(
        address user,
        address lp,
        address[] calldata inputRewardTokens
    ) external view returns (address[] memory rewardTokens, uint256[] memory amounts);

    function getAllPendingBribes(
        address user,
        address[] calldata lps,
        address[] calldata inputRewardTokens
    ) external view returns (address[] memory allRewardTokens, uint256[] memory totalAmounts);

    function getVTXAPRForLocker() external view returns (uint256 APR);

    function getBribes(address lp) external view returns (uint256 bribesPerYear);

    function getFutureBribes(address lp, uint256 vtxDelta)
        external
        view
        returns (uint256 bribesPerYear);

    function getTVLOfVotedLocker() external view returns (uint256 votedLocker);

    function getAPRforVotingForLVTX(address lp) external view returns (uint256 APR);

    function getAPRPreview(address lp, uint256 vtxDelta) external view returns (uint256 APR);

    function getPendingRewardsFromLocker(address user, address[] calldata inputRewardTokens)
        external
        view
        returns (address[] memory rewardTokens, uint256[] memory amounts);

    // function getVePtpPerVTX() public view returns (uint256 votingPower) {
    //     votingPower = IBribeManager(bribeManager).veptpPerLockedVtx();
    // }

    function getBribesPerAmount(address lp, uint256 vtxAmount)
        external
        view
        returns (uint256 bribesPerYear);
}

File 21 of 21 : IBalanceHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IBalanceHelper {
    function getPTPperYear(address lp) external view returns (uint256 ptpPerYearPerToken);

    function getTVL(address lp) external view returns (uint256 TVLinUSD);

    function getAvaxLatestPrice() external view returns (uint256);

    function getPTPperYearForVector(address lp)
        external
        view
        returns (uint256 pendingBasePtp, uint256 pendingBoostedPtp);

    function getAPRforPTPPoolInPTP(address lp)
        external
        view
        returns (uint256 baseAPR, uint256 boostedAPR);

    function getMultipleAPRforPTPPoolsInPTP(address[] calldata lp)
        external
        view
        returns (uint256[] memory baseAPR, uint256[] memory boostedAPR);

    function getMultipleAPRforPTPPoolsInAdditionalReward(address[] calldata lp)
        external
        view
        returns (uint256[] memory APR);

    function getAPRforPTPPoolInAdditionalReward(address lp) external view returns (uint256 APR);

    function getTokenPricePairedWithAvax(address token) external view returns (uint256 tokenPrice);

    function getTokenPricePairedWithStable(address token, address stable) external view returns (uint256 tokenPrice);

    function getPlatypusFees(uint256 index) external view returns (uint256 feeAmount);

    function getPTPClaimableRewards(
        address lp,
        address[] calldata inputRewardTokens,
        address user
    )
        external
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory amounts,
            uint256[] memory usdAmounts
        );

    function getPTPHarvestableRewards(address lp, address user)
        external
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory amounts,
            uint256[] memory usdAmounts
        );

    function getRatio(
        address numerator,
        address denominator,
        uint256 decimals
    ) external view returns (uint256 ratio);

    function leftVotes(uint256[] calldata percentages)
        external
        view
        returns (int256 left, uint256 totalPercentage);

    function votesInBigNumbers(uint256[] calldata percentages)
        external
        view
        returns (uint256[] memory votes, uint256 totalPercentage);

    function getTVLForLocker() external view returns (uint256 lockerTVL);

    function getXPTPAPRForLocker(uint256 feeAmount) external view returns (uint256 APR);

    function getPendingBribes(
        address user,
        address lp,
        address[] calldata inputRewardTokens
    ) external view returns (address[] memory rewardTokens, uint256[] memory amounts);

    function getAllPendingBribes(
        address user,
        address[] calldata lps,
        address[] calldata inputRewardTokens
    ) external view returns (address[] memory allRewardTokens, uint256[] memory totalAmounts);

    function getVTXAPRForLocker() external view returns (uint256 APR);

    function getBribes(address lp) external view returns (uint256 bribesPerYear);

    function getFutureBribes(address lp, uint256 vtxDelta)
        external
        view
        returns (uint256 bribesPerYear);

    function getTVLOfVotedLocker() external view returns (uint256 votedLocker);

    function getAPRforVotingForLVTX(address lp) external view returns (uint256 APR);

    function getAPRPreview(address lp, uint256 vtxDelta) external view returns (uint256 APR);

    function getPendingRewardsFromLocker(address user, address[] calldata inputRewardTokens)
        external
        view
        returns (address[] memory rewardTokens, uint256[] memory amounts);

    // function getVePtpPerVTX() public view returns (uint256 votingPower) {
    //     votingPower = IBribeManager(bribeManager).veptpPerLockedVtx();
    // }

    function getBribesPerAmount(address lp, uint256 vtxAmount)
        external
        view
        returns (uint256 bribesPerYear);
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 99
  },
  "libraries": {
    "PlatypusHelper.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_wavax","type":"address"},{"internalType":"address","name":"_aprHelper","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"AvaxUSDDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"aprHelper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"getAPRforLockerInAdditionalReward","outputs":[{"internalType":"uint256[]","name":"APR","type":"uint256[]"},{"internalType":"address[]","name":"rewardToken","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getAPRforPTPPoolInAdditionalReward","outputs":[{"internalType":"uint256","name":"APR","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getAPRforPTPPoolInAdditionalRewardArray","outputs":[{"internalType":"uint256[]","name":"APR","type":"uint256[]"},{"internalType":"address[]","name":"rewardToken","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getAPRforPTPPoolInPTP","outputs":[{"internalType":"uint256","name":"baseAPR","type":"uint256"},{"internalType":"uint256","name":"boostedAPR","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"getAPRforxPTPInAdditionalReward","outputs":[{"internalType":"uint256[]","name":"APR","type":"uint256[]"},{"internalType":"address[]","name":"rewardToken","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getAdditionalRewardsInUSDPerYear","outputs":[{"internalType":"uint256[]","name":"USDPerYear","type":"uint256[]"},{"internalType":"address[]","name":"rewardTokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvaxLatestPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getLPPrice","outputs":[{"internalType":"uint256","name":"inUSD","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getLPPriceAndDecimals","outputs":[{"internalType":"uint256","name":"inUSD","type":"uint256"},{"internalType":"uint256","name":"tokenDecimals","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"lps","type":"address[]"}],"name":"getLPsPrice","outputs":[{"internalType":"uint256[]","name":"inUSD","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"address[]","name":"lps","type":"address[]"},{"internalType":"address[]","name":"inputRewardTokens","type":"address[]"}],"name":"getMultipleAPRforLockerlsInAdditionalReward","outputs":[{"internalType":"uint256[]","name":"APRs","type":"uint256[]"},{"internalType":"address[]","name":"rewardTokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"lp","type":"address[]"}],"name":"getMultipleAPRforPTPPoolsInPTP","outputs":[{"internalType":"uint256[]","name":"baseAPR","type":"uint256[]"},{"internalType":"uint256[]","name":"boostedAPR","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"},{"internalType":"address[]","name":"inputRewardTokens","type":"address[]"},{"internalType":"address","name":"user","type":"address"}],"name":"getPTPClaimableRewards","outputs":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"usdAmounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getPTPHarvestableRewards","outputs":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"usdAmounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getPTPperYear","outputs":[{"internalType":"uint256","name":"ptpPerYearPerToken","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getPTPperYearForVector","outputs":[{"internalType":"uint256","name":"pendingBasePtp","type":"uint256"},{"internalType":"uint256","name":"pendingBoostedPtp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"numerator","type":"address"},{"internalType":"address","name":"denominator","type":"address"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"getRatio","outputs":[{"internalType":"uint256","name":"ratio","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"getTVL","outputs":[{"internalType":"uint256","name":"TVLinUSD","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTVLForLocker","outputs":[{"internalType":"uint256","name":"lockerTVL","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenPricePairedWithAvax","outputs":[{"internalType":"uint256","name":"tokenPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"stable","type":"address"}],"name":"getTokenPricePairedWithStable","outputs":[{"internalType":"uint256","name":"tokenPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address[]","name":"inputRewardTokens","type":"address[]"}],"name":"getUserInfo","outputs":[{"components":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"balanceUSD","type":"uint256"},{"internalType":"uint256[]","name":"rewards","type":"uint256[]"},{"internalType":"uint256[]","name":"rewardsUSD","type":"uint256[]"},{"internalType":"address[]","name":"tokenRewards","type":"address[]"},{"internalType":"uint256[]","name":"harvestable","type":"uint256[]"},{"internalType":"address[]","name":"tokenHarvestable","type":"address[]"},{"internalType":"uint256[]","name":"harvestableUSD","type":"uint256[]"}],"internalType":"struct PlatypusHelper.UserPoolInfo[]","name":"usersInfo","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"getXPTPAPRForLocker","outputs":[{"internalType":"uint256","name":"APR","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getXPTPTVL","outputs":[{"internalType":"uint256","name":"usdValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"precision","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ptp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wavax","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xPTP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162004f3138038062004f318339810160408190526200003491620000fd565b6200003f3362000090565b600180546001600160a01b0319908116730a77230d17318075983913bc2145db16c736615617909155600280546001600160a01b039485169083161790556003805492909316911617905562000135565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000f857600080fd5b919050565b600080604083850312156200011157600080fd5b6200011c83620000e0565b91506200012c60208401620000e0565b90509250929050565b614dec80620001456000396000f3fe608060405234801561001057600080fd5b50600436106101d15760003560e01c8063715018a611610105578063b9571c741161009d578063b9571c741461042f578063cca7109c14610442578063d321441814610455578063d3b5dc3b14610468578063d73792a914610470578063d869b55914610479578063e3f666c814610481578063e81d81ba14610468578063f2fde38b1461049457600080fd5b8063715018a61461036c57806389a30271146103765780638da5cb5b1461039157806390ed162d146103a257806392009f6c146103b55780639427d095146103c85780639effd552146103db578063acae465d146103ee578063b1d231c11461040f57600080fd5b806339c2dbbe1161017857806339c2dbbe146102b1578063468eb407146102c45780634b0cfc21146102cc5780634e85f238146102ee5780635b0fe91c1461030157806363710ea61461031457806365a067c81461031c5780636a227916146103445780636af667721461035757600080fd5b80630f40517a146101d6578063117be4c2146101fc578063131edc461461021c5780631963c686146102375780631cc475721461024a57806320b22ebc1461025d5780632998cbb11461027e5780633438043314610291575b600080fd5b6101e96101e4366004614303565b6104a7565b6040519081526020015b60405180910390f35b60025461020f906001600160a01b031681565b6040516101f3919061494e565b61020f73060556209e507d30f2167a101bfc6d256ed2f3e181565b6101e96102453660046143e0565b6108c3565b6101e9610258366004614303565b6109e1565b61027061026b3660046144dc565b610c1a565b6040516101f3929190614aa9565b6101e961028c36600461433d565b610d0e565b6102a461029f36600461456d565b610e24565b6040516101f39190614a96565b60035461020f906001600160a01b031681565b6101e9610fbe565b6102df6102da36600461433d565b6111ef565b6040516101f393929190614962565b6101e96102fc366004614303565b611a48565b6102df61030f366004614475565b611b57565b6101e9612199565b61032f61032a366004614303565b61222d565b604080519283526020830191909152016101f3565b6101e9610352366004614303565b61276b565b61020f600080516020614d9783398151915281565b6103746127cb565b005b61020f73b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e81565b6000546001600160a01b031661020f565b6102706103b0366004614628565b61280a565b6102706103c3366004614303565b612a1b565b6101e96103d63660046145f6565b6131df565b6102706103e9366004614303565b61345d565b6104016103fc36600461456d565b613538565b6040516101f3929190614ace565b61042261041d366004614421565b61370b565b6040516101f3919061499b565b61027061043d3660046144dc565b613b5c565b61032f610450366004614303565b613c45565b61032f610463366004614303565b613ce9565b6101e9600881565b6101e961271081565b6101e9613e1d565b6101e961048f366004614303565b613f1f565b6103746104a2366004614303565b613f31565b600080600360009054906101000a90046001600160a01b03166001600160a01b031663ed9a55406040518163ffffffff1660e01b815260040160206040518083038186803b1580156104f857600080fd5b505afa15801561050c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105309190614320565b90506000600360009054906101000a90046001600160a01b03166001600160a01b0316631208e15b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561058257600080fd5b505afa158015610596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ba9190614320565b90506000826001600160a01b031663caa9a08d866040518263ffffffff1660e01b81526004016105ea919061494e565b60206040518083038186803b15801561060257600080fd5b505afa158015610616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063a919061460f565b600354604051637ad234eb60e11b81529192506000916001600160a01b039091169063f5a469d69061067090899060040161494e565b60206040518083038186803b15801561068857600080fd5b505afa15801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c09190614320565b9050600080856001600160a01b03166393f1a40b85876040518363ffffffff1660e01b81526004016106f3929190614b28565b60806040518083038186803b15801561070b57600080fd5b505afa15801561071f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074391906145c9565b5050915091506000826001600160801b031690506000826001600160801b03169050896001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561079e57600080fd5b505afa1580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d691906148b7565b6107e190600a614c40565b6107ea86611a48565b6107f49084614cee565b6107fe9190614bcf565b9850886108b657896001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561083e57600080fd5b505afa158015610852573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087691906148b7565b61088190600a614c40565b61089f8673b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e610d0e565b6108a99084614cee565b6108b39190614bcf565b98505b5050505050505050919050565b600080600360009054906101000a90046001600160a01b03166001600160a01b031663fa0cb7f36040518163ffffffff1660e01b815260040160206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c9190614320565b604051630cb1e34360e11b81526001600160a01b03878116600483015286811660248301526044820186905291925090821690631963c6869060640160206040518083038186803b1580156109a057600080fd5b505afa1580156109b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d8919061460f565b95945050505050565b6000806301dfe20090506000600360009054906101000a90046001600160a01b03166001600160a01b03166346c96aac6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a3b57600080fd5b505afa158015610a4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a739190614320565b90506000816001600160a01b03166396c82e576040518163ffffffff1660e01b815260040160206040518083038186803b158015610ab057600080fd5b505afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae8919061460f565b66038d7ea4c68000836001600160a01b0316639702d3e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2957600080fd5b505afa158015610b3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b61919061460f565b610b6b9086614cee565b610b759190614cee565b610b7f9190614bcf565b905066038d7ea4c6800081836001600160a01b031663a7cac846886040518263ffffffff1660e01b8152600401610bb6919061494e565b60206040518083038186803b158015610bce57600080fd5b505afa158015610be2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c06919061460f565b610c109190614cee565b6109d89190614bcf565b606080600080610c2986612a1b565b8151909450909250839150806001600160401b03811115610c4c57610c4c614d6b565b604051908082528060200260200182016040528015610c75578160200160208202803683370190505b50945060005b81811015610d03576305f5e100610c90613e1d565b61271089878581518110610ca657610ca6614d55565b6020026020010151610cb89190614cee565b610cc29190614bcf565b610ccc9190614bcf565b610cd69190614bcf565b868281518110610ce857610ce8614d55565b6020908102919091010152610cfc81614d24565b9050610c7b565b505050509250929050565b600080600360009054906101000a90046001600160a01b03166001600160a01b031663fa0cb7f36040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5f57600080fd5b505afa158015610d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d979190614320565b604051632998cbb160e01b81526001600160a01b038681166004830152858116602483015291925090821690632998cbb19060440160206040518083038186803b158015610de457600080fd5b505afa158015610df8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1c919061460f565b949350505050565b606081806001600160401b03811115610e3f57610e3f614d6b565b604051908082528060200260200182016040528015610e68578160200160208202803683370190505b50915060005b81811015610fb6576003546000906001600160a01b031663f5a469d6878785818110610e9c57610e9c614d55565b9050602002016020810190610eb19190614303565b6040518263ffffffff1660e01b8152600401610ecd919061494e565b60206040518083038186803b158015610ee557600080fd5b505afa158015610ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1d9190614320565b9050610f2881611a48565b848381518110610f3a57610f3a614d55565b602002602001018181525050838281518110610f5857610f58614d55565b602002602001015160001415610fa557610f868173b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e610d0e565b848381518110610f9857610f98614d55565b6020026020010181815250505b50610faf81614d24565b9050610e6e565b505092915050565b600080600360009054906101000a90046001600160a01b03166001600160a01b031663e60cec876040518163ffffffff1660e01b815260040160206040518083038186803b15801561100f57600080fd5b505afa158015611023573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110479190614320565b9050600080600080846001600160a01b03166306bfa93873060556209e507d30f2167a101bfc6d256ed2f3e16040518263ffffffff1660e01b815260040161108f919061494e565b60806040518083038186803b1580156110a757600080fd5b505afa1580156110bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110df919061483d565b935093509350935073060556209e507d30f2167a101bfc6d256ed2f3e16001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561113457600080fd5b505afa158015611148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116c91906148b7565b611177906008614baa565b61118290600a614c40565b6111b073060556209e507d30f2167a101bfc6d256ed2f3e1600080516020614d9783398151915260086108c3565b6111c7600080516020614d97833981519152611a48565b6111d19085614cee565b6111db9190614cee565b6111e59190614bcf565b9550505050505090565b60608060606111fc61401c565b600354604051630e253e4760e01b81526001600160a01b0390911690630e253e479061122c90899060040161494e565b60206040518083038186803b15801561124457600080fd5b505afa158015611258573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127c9190614320565b6001600160a01b0390811660408084019190915260035481516303b6695560e61b8152915192169163ed9a554091600480820192602092909190829003018186803b1580156112ca57600080fd5b505afa1580156112de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113029190614320565b6001600160a01b0390811660208084019190915260035460408051631208e15b60e01b815290519190931692631208e15b926004808301939192829003018186803b15801561135057600080fd5b505afa158015611364573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113889190614320565b6001600160a01b031660608201819052604080830151905162d7f52760e31b81526306bfa938916113bb9160040161494e565b6101206040518083038186803b1580156113d457600080fd5b505afa1580156113e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140c919061479a565b506001600160a01b031660c0890152506002955061142b945050505050565b604051908082528060200260200182016040528015611454578160200160208202803683370190505b5060408051600280825260608201835292965091906020830190803683375050604080516002808252606082018352939650929150602083019080368337505050602082015160405163caa9a08d60e01b81529193506001600160a01b03169063caa9a08d906114c890899060040161494e565b60206040518083038186803b1580156114e057600080fd5b505afa1580156114f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611518919061460f565b8082526020820151606083015160405160016232bd9d60e01b03198152600093849384936001600160a01b039091169263ffcd42639261155c929091600401614b28565b60006040518083038186803b15801561157457600080fd5b505afa158015611588573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115b091908101906146a1565b9350509250925060008460c001516001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115f657600080fd5b505afa15801561160a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162e919061460f565b61163a6008600a614c34565b8660c001516001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040161166a919061494e565b60206040518083038186803b15801561168257600080fd5b505afa158015611696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ba919061460f565b6116c49190614cee565b6116ce9190614bcf565b9050600080516020614d97833981519152886000815181106116f2576116f2614d55565b6001600160a01b03909216602092830291909101909101526117166008600a614c34565b6117208286614cee565b61172a9190614bcf565b8760008151811061173d5761173d614d55565b6020026020010181815250508760008151811061175c5761175c614d55565b60200260200101516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561179c57600080fd5b505afa1580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d491906148b7565b6117df90600a614c40565b611802896000815181106117f5576117f5614d55565b6020026020010151611a48565b8860008151811061181557611815614d55565b60200260200101516118279190614cee565b6118319190614bcf565b8660008151811061184457611844614d55565b60200260200101818152505060005b8351811015611a3b5783818151811061186e5761186e614d55565b6020026020010151898260016118849190614b92565b8151811061189457611894614d55565b6001600160a01b03909216602092830291909101909101526118b86008600a614c34565b828483815181106118cb576118cb614d55565b60200260200101516118dd9190614cee565b6118e79190614bcf565b886118f3836001614b92565b8151811061190357611903614d55565b60209081029190910101528861191a826001614b92565b8151811061192a5761192a614d55565b60200260200101516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561196a57600080fd5b505afa15801561197e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a291906148b7565b6119ad90600a614c40565b6119cc8a6119bc846001614b92565b815181106117f5576117f5614d55565b896119d8846001614b92565b815181106119e8576119e8614d55565b60200260200101516119fa9190614cee565b611a049190614bcf565b87611a10836001614b92565b81518110611a2057611a20614d55565b6020908102919091010152611a3481614d24565b9050611853565b5050505050509250925092565b600080600360009054906101000a90046001600160a01b03166001600160a01b031663fa0cb7f36040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9957600080fd5b505afa158015611aad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad19190614320565b6040516309d0be4760e31b81529091506001600160a01b03821690634e85f23890611b0090869060040161494e565b60206040518083038186803b158015611b1857600080fd5b505afa158015611b2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b50919061460f565b9392505050565b600354604051630e253e4760e01b8152606091829182916000916001600160a01b0390911690630e253e4790611b91908b9060040161494e565b60206040518083038186803b158015611ba957600080fd5b505afa158015611bbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be19190614320565b90506000600360009054906101000a90046001600160a01b03166001600160a01b0316631208e15b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c3357600080fd5b505afa158015611c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6b9190614320565b90506000816001600160a01b03166306bfa938846040518263ffffffff1660e01b8152600401611c9b919061494e565b6101206040518083038186803b158015611cb457600080fd5b505afa158015611cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cec919061479a565b5097508e965060009550859450505050505b82811015611dcb57836001600160a01b031663b5fd73f88d8d84818110611d2757611d27614d55565b9050602002016020810190611d3c9190614303565b6040518263ffffffff1660e01b8152600401611d58919061494e565b60206040518083038186803b158015611d7057600080fd5b505afa158015611d84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da891906145ae565b15611dbb57611db8600183614b92565b91505b611dc481614d24565b9050611cfe565b506000816001600160401b03811115611de657611de6614d6b565b604051908082528060200260200182016040528015611e0f578160200160208202803683370190505b509850816001600160401b03811115611e2a57611e2a614d6b565b604051908082528060200260200182016040528015611e53578160200160208202803683370190505b509750816001600160401b03811115611e6e57611e6e614d6b565b604051908082528060200260200182016040528015611e97578160200160208202803683370190505b50965060005b8381101561218857846001600160a01b031663b5fd73f88e8e84818110611ec657611ec6614d55565b9050602002016020810190611edb9190614303565b6040518263ffffffff1660e01b8152600401611ef7919061494e565b60206040518083038186803b158015611f0f57600080fd5b505afa158015611f23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f4791906145ae565b15612178578c8c82818110611f5e57611f5e614d55565b9050602002016020810190611f739190614303565b8a8381518110611f8557611f85614d55565b60200260200101906001600160a01b031690816001600160a01b0316815250506000856001600160a01b031663211dc32d8d8d8681518110611fc957611fc9614d55565b60200260200101516040518363ffffffff1660e01b81526004016120039291906001600160a01b0392831681529116602082015260400190565b60206040518083038186803b15801561201b57600080fd5b505afa15801561202f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612053919061460f565b9050808a848151811061206857612068614d55565b6020026020010181815250508a838151811061208657612086614d55565b60200260200101516001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156120c657600080fd5b505afa1580156120da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fe91906148b7565b61210990600a614c40565b8a838151811061211b5761211b614d55565b60200260200101516121388d86815181106117f5576117f5614d55565b6121429190614cee565b61214c9190614bcf565b89848151811061215e5761215e614d55565b6020908102919091010152612174600184614b92565b9250505b61218181614d24565b9050611e9d565b505050505050509450945094915050565b600080600160009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156121ea57600080fd5b505afa1580156121fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122229190614873565b509195945050505050565b60008061223861401c565b600360009054906101000a90046001600160a01b03166001600160a01b031663ed9a55406040518163ffffffff1660e01b815260040160206040518083038186803b15801561228657600080fd5b505afa15801561229a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122be9190614320565b6001600160a01b0390811660208084019190915260035460408051631208e15b60e01b815290519190931692631208e15b926004808301939192829003018186803b15801561230c57600080fd5b505afa158015612320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123449190614320565b6001600160a01b039081166060830152602082015160405163caa9a08d60e01b815291169063caa9a08d9061237d90879060040161494e565b60206040518083038186803b15801561239557600080fd5b505afa1580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cd919061460f565b8082526020820151604051631526fe2760e01b815260048101929092526000918291829182916001600160a01b031690631526fe279060240160a06040518083038186803b15801561241e57600080fd5b505afa158015612432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124569190614376565b6001600160801b0392831660e08b018190528383166101008c01529281166101208b015293975090955093509091506124909050886109e1565b8561014001818152505084602001516001600160a01b031663f57347a86040518163ffffffff1660e01b815260040160206040518083038186803b1580156124d757600080fd5b505afa1580156124eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250f919061460f565b61016086015260208501516040516370a0823160e01b81526000916001600160a01b038716916370a08231916125479160040161494e565b60206040518083038186803b15801561255f57600080fd5b505afa158015612573573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612597919061460f565b905080156125e1576125ab816103e8614cee565b6101608701516101408801516125c69064e8d4a51000614cee565b6125d09190614cee565b6125da9190614bcf565b6101008701525b60e08601511561263e5760e08601516125fc906103e8614cee565b61016087015161260e906103e8614d0d565b6101408801516126239064e8d4a51000614cee565b61262d9190614cee565b6126379190614bcf565b6101208701525b6126696040518060800160405280600081526020016000815260200160008152602001600081525090565b60008088602001516001600160a01b03166393f1a40b8a600001518b606001516040518363ffffffff1660e01b81526004016126a6929190614b28565b60806040518083038186803b1580156126be57600080fd5b505afa1580156126d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f691906145c9565b50506001600160801b0380831680875290821660208701526101008c015192945090925064e8d4a510009161272a91614cee565b6127349190614bcf565b9a5064e8d4a5100089610120015184602001516127519190614cee565b61275b9190614bcf565b9950505050505050505050915091565b60008060006127798461345d565b8151919350915060005b818110156127c25783818151811061279d5761279d614d55565b6020026020010151856127b09190614b92565b94506127bb81614d24565b9050612783565b50505050919050565b6000546001600160a01b031633146127fe5760405162461bcd60e51b81526004016127f590614af3565b60405180910390fd5b6128086000613fcc565b565b60608084836001600160401b0381111561282657612826614d6b565b60405190808252806020026020018201604052801561284f578160200160208202803683370190505b509250836001600160401b0381111561286a5761286a614d6b565b604051908082528060200260200182016040528015612893578160200160208202803683370190505b50915060005b81811015612a0f576000806128d48a8a858181106128b9576128b9614d55565b90506020020160208101906128ce9190614303565b8c610c1a565b9150915060005b878110156129fb5760005b82518110156129ea5789898381811061290157612901614d55565b90506020020160208101906129169190614303565b6001600160a01b031683828151811061293157612931614d55565b60200260200101516001600160a01b031614156129da5783818151811061295a5761295a614d55565b602002602001015188838151811061297457612974614d55565b602002602001018181516129889190614b92565b905250825183908290811061299f5761299f614d55565b60200260200101518783815181106129b9576129b9614d55565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6129e381614d24565b90506128e6565b506129f481614d24565b90506128db565b50505080612a0890614d24565b9050612899565b50509550959350505050565b606080612a2661401c565b600360009054906101000a90046001600160a01b03166001600160a01b031663ed9a55406040518163ffffffff1660e01b815260040160206040518083038186803b158015612a7457600080fd5b505afa158015612a88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aac9190614320565b6001600160a01b0390811660208084019190915260035460408051631208e15b60e01b815290519190931692631208e15b926004808301939192829003018186803b158015612afa57600080fd5b505afa158015612b0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b329190614320565b6001600160a01b039081166060830152602082015160405163caa9a08d60e01b815291169063caa9a08d90612b6b90879060040161494e565b60206040518083038186803b158015612b8357600080fd5b505afa158015612b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bbb919061460f565b8082526020820151604051630bb46c4760e31b815260048101929092526000916001600160a01b0390911690635da362389060240160206040518083038186803b158015612c0857600080fd5b505afa158015612c1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c40919061460f565b6020830151835160608501516040516393f1a40b60e01b815293945060009384936001600160a01b0316926393f1a40b92612c7d92600401614b28565b60806040518083038186803b158015612c9557600080fd5b505afa158015612ca9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ccd91906145c9565b505091509150612cfe6040518060800160405280600081526020016000815260200160008152602001600081525090565b6001600160801b03838116825282166020808301919091528501518551604051631526fe2760e01b815260048101919091526000916001600160a01b031690631526fe279060240160a06040518083038186803b158015612d5e57600080fd5b505afa158015612d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d969190614376565b5091935050506001600160a01b0382161590506131d4576000816001600160a01b031663f57347a86040518163ffffffff1660e01b815260040160206040518083038186803b158015612de857600080fd5b505afa158015612dfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e20919061460f565b90506000826001600160a01b031663081e3eda6040518163ffffffff1660e01b815260040160206040518083038186803b158015612e5d57600080fd5b505afa158015612e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e95919061460f565b9050806001600160401b03811115612eaf57612eaf614d6b565b604051908082528060200260200182016040528015612ed8578160200160208202803683370190505b509950806001600160401b03811115612ef357612ef3614d6b565b604051908082528060200260200182016040528015612f1c578160200160208202803683370190505b50985060005b818110156131d057604051631526fe2760e01b81526004810182905260009081906001600160a01b03871690631526fe279060240160806040518083038186803b158015612f6f57600080fd5b505afa158015612f83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fa79190614508565b509193509150506001600160a01b03821615612fc35781612fd0565b6002546001600160a01b03165b8c8481518110612fe257612fe2614d55565b60200260200101906001600160a01b031690816001600160a01b0316815250506103e88e6001600160a01b03166370a082318d602001516040518263ffffffff1660e01b8152600401613035919061494e565b60206040518083038186803b15801561304d57600080fd5b505afa158015613061573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613085919061460f565b66038d7ea4c68000876130a56001600160601b0386166301e13380614cee565b6130af9190614cee565b6130b99190614cee565b6130c39190614bcf565b6130cd9190614bcf565b60408801528915613133576103e88a6130e68783614d0d565b66038d7ea4c680006131056001600160601b0386166301e13380614cee565b61310f9190614cee565b6131199190614cee565b6131239190614bcf565b61312d9190614bcf565b60608801525b6131488c84815181106117f5576117f5614d55565b66038d7ea4c68000886020015189606001516131649190614cee565b60408a01518a516131759190614cee565b61317f9190614b92565b6131899190614bcf565b6131939190614cee565b8d84815181106131a5576131a5614d55565b602002602001018181516131b99190614b92565b9052506131c99150829050614d24565b9050612f22565b5050505b505050505050915091565b600080600360009054906101000a90046001600160a01b03166001600160a01b0316630ae0f9806040518163ffffffff1660e01b815260040160206040518083038186803b15801561323057600080fd5b505afa158015613244573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613268919061460f565b90506000805b8281101561333f5760035460405163a794c7eb60e01b81526004810183905260009182916132f9916001600160a01b03169063a794c7eb9060240160206040518083038186803b1580156132c157600080fd5b505afa1580156132d5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032a9190614320565b90925090506127108761330c8385614b92565b6133169190614cee565b6133209190614bcf565b61332a9085614b92565b935050508061333890614d24565b905061326e565b50600061334a613e1d565b90506000600080516020614d978339815191526001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561339557600080fd5b505afa1580156133a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133cd91906148b7565b6133d890600a614c40565b61340673060556209e507d30f2167a101bfc6d256ed2f3e1600080516020614d9783398151915260086108c3565b61341d600080516020614d97833981519152611a48565b6134279086614cee565b6134319190614cee565b61343b9190614bcf565b905081613449826064614cee565b6134539190614bcf565b9695505050505050565b60608060008061346c85612a1b565b8151909450909250839150806001600160401b0381111561348f5761348f614d6b565b6040519080825280602002602001820160405280156134b8578160200160208202803683370190505b50945060005b8181101561352f576305f5e1006134d4886104a7565b8583815181106134e6576134e6614d55565b60200260200101516134f89190614bcf565b6135029190614bcf565b86828151811061351457613514614d55565b602090810291909101015261352881614d24565b90506134be565b50505050915091565b60608082806001600160401b0381111561355457613554614d6b565b60405190808252806020026020018201604052801561357d578160200160208202803683370190505b509250806001600160401b0381111561359857613598614d6b565b6040519080825280602002602001820160405280156135c1578160200160208202803683370190505b50915060005b81811015613702576000806135fc8888858181106135e7576135e7614d55565b905060200201602081019061032a9190614303565b915091506305f5e10061362f89898681811061361a5761361a614d55565b90506020020160208101906101e49190614303565b613646600080516020614d97833981519152611a48565b6136509085614cee565b61365a9190614bcf565b6136649190614bcf565b86848151811061367657613676614d55565b6020026020010181815250506305f5e10061369c89898681811061361a5761361a614d55565b6136b3600080516020614d97833981519152611a48565b6136bd9084614cee565b6136c79190614bcf565b6136d19190614bcf565b8584815181106136e3576136e3614d55565b6020026020010181815250505050806136fb90614d24565b90506135c7565b50509250929050565b60606000600360009054906101000a90046001600160a01b03166001600160a01b0316630ae0f9806040518163ffffffff1660e01b815260040160206040518083038186803b15801561375d57600080fd5b505afa158015613771573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613795919061460f565b905061379f61401c565b600360009054906101000a90046001600160a01b03166001600160a01b0316631208e15b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156137ed57600080fd5b505afa158015613801573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138259190614320565b6001600160a01b03166060820152816001600160401b0381111561384b5761384b614d6b565b60405190808252806020026020018201604052801561388457816020015b6138716140b3565b8152602001906001900390816138695790505b50925060005b82811015613b525761389a6140b3565b60035460405163a794c7eb60e01b8152600481018490526000916001600160a01b03169063a794c7eb9060240160206040518083038186803b1580156138df57600080fd5b505afa1580156138f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139179190614320565b600354604051630e253e4760e01b81529192506001600160a01b031690630e253e479061394890849060040161494e565b60206040518083038186803b15801561396057600080fd5b505afa158015613974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139989190614320565b6001600160a01b0390811660408087018290526060870151905162d7f52760e31b815260009391909116916306bfa938916139d6919060040161494e565b6101206040518083038186803b1580156139ef57600080fd5b505afa158015613a03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a27919061479a565b50975050505050505050806001600160a01b03166370a082318b6040518263ffffffff1660e01b8152600401613a5d919061494e565b60206040518083038186803b158015613a7557600080fd5b505afa158015613a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613aad919061460f565b8352600080613abb84613ce9565b9092509050613acb81600a614c34565b8551613ad8908490614cee565b613ae29190614bcf565b6020860152613af3848c8c8f611b57565b606088015260408701526080860152613b0c848d6111ef565b60e088015260a087015260c0860152885185908a9088908110613b3157613b31614d55565b6020026020010181905250505050505080613b4b90614d24565b905061388a565b5050509392505050565b606080600080613b6b86612a1b565b8151909450909250839150806001600160401b03811115613b8e57613b8e614d6b565b604051908082528060200260200182016040528015613bb7578160200160208202803683370190505b50945060005b81811015610d03576305f5e100613bd2610fbe565b61271089878581518110613be857613be8614d55565b6020026020010151613bfa9190614cee565b613c049190614bcf565b613c0e9190614bcf565b613c189190614bcf565b868281518110613c2a57613c2a614d55565b6020908102919091010152613c3e81614d24565b9050613bbd565b600080600080613c548561222d565b915091506305f5e100613c66866104a7565b613c7d600080516020614d97833981519152611a48565b613c879085614cee565b613c919190614bcf565b613c9b9190614bcf565b93506305f5e100613cab866104a7565b613cc2600080516020614d97833981519152611a48565b613ccc9084614cee565b613cd69190614bcf565b613ce09190614bcf565b92505050915091565b600354604051637ad234eb60e11b8152600091829182916001600160a01b03169063f5a469d690613d1e90879060040161494e565b60206040518083038186803b158015613d3657600080fd5b505afa158015613d4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d6e9190614320565b9050613d7981611a48565b925082613da157613d9e8173b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e610d0e565b92505b806001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015613dda57600080fd5b505afa158015613dee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e1291906148b7565b60ff16915050915091565b600080600360009054906101000a90046001600160a01b03166001600160a01b031663fa0cb7f36040518163ffffffff1660e01b815260040160206040518083038186803b158015613e6e57600080fd5b505afa158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190614320565b9050806001600160a01b031663d869b5596040518163ffffffff1660e01b815260040160206040518083038186803b158015613ee157600080fd5b505afa158015613ef5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f19919061460f565b91505090565b6000613f2a82613ce9565b5092915050565b6000546001600160a01b03163314613f5b5760405162461bcd60e51b81526004016127f590614af3565b6001600160a01b038116613fc05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016127f5565b613fc981613fcc565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040518061018001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081525090565b60405180610100016040528060008152602001600081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b60008083601f84011261410a57600080fd5b5081356001600160401b0381111561412157600080fd5b6020830191508360208260051b850101111561413c57600080fd5b9250929050565b6000601f838184011261415557600080fd5b8251602061416a61416583614b6f565b614b3f565b80838252828201915082870188848660051b8a0101111561418a57600080fd5b60005b858110156142425781516001600160401b03808211156141ac57600080fd5b818b0191508b603f8301126141c057600080fd5b86820151818111156141d4576141d4614d6b565b6141e5818b01601f19168901614b3f565b915080825260408d818386010111156141fd57600080fd5b60005b8281101561421b578481018201518482018b01528901614200565b8281111561422c5760008a84860101525b505050855250928401929084019060010161418d565b509098975050505050505050565b600082601f83011261426157600080fd5b8151602061427161416583614b6f565b80838252828201915082860187848660051b890101111561429157600080fd5b60005b858110156142b057815184529284019290840190600101614294565b5090979650505050505050565b805180151581146142cd57600080fd5b919050565b80516001600160801b03811681146142cd57600080fd5b805169ffffffffffffffffffff811681146142cd57600080fd5b60006020828403121561431557600080fd5b8135611b5081614d81565b60006020828403121561433257600080fd5b8151611b5081614d81565b6000806040838503121561435057600080fd5b823561435b81614d81565b9150602083013561436b81614d81565b809150509250929050565b600080600080600060a0868803121561438e57600080fd5b855161439981614d81565b60208701519095506143aa81614d81565b93506143b8604087016142d2565b92506143c6606087016142d2565b91506143d4608087016142d2565b90509295509295909350565b6000806000606084860312156143f557600080fd5b833561440081614d81565b9250602084013561441081614d81565b929592945050506040919091013590565b60008060006040848603121561443657600080fd5b833561444181614d81565b925060208401356001600160401b0381111561445c57600080fd5b614468868287016140f8565b9497909650939450505050565b6000806000806060858703121561448b57600080fd5b843561449681614d81565b935060208501356001600160401b038111156144b157600080fd5b6144bd878288016140f8565b90945092505060408501356144d181614d81565b939692955090935050565b600080604083850312156144ef57600080fd5b82356144fa81614d81565b946020939093013593505050565b6000806000806080858703121561451e57600080fd5b845161452981614d81565b60208601519094506001600160601b038116811461454657600080fd5b9250614554604086016142d2565b9150614562606086016142d2565b905092959194509250565b6000806020838503121561458057600080fd5b82356001600160401b0381111561459657600080fd5b6145a2858286016140f8565b90969095509350505050565b6000602082840312156145c057600080fd5b611b50826142bd565b600080600080608085870312156145df57600080fd5b6145e8856142d2565b9350614546602086016142d2565b60006020828403121561460857600080fd5b5035919050565b60006020828403121561462157600080fd5b5051919050565b60008060008060006060868803121561464057600080fd5b8535945060208601356001600160401b038082111561465e57600080fd5b61466a89838a016140f8565b9096509450604088013591508082111561468357600080fd5b50614690888289016140f8565b969995985093965092949392505050565b600080600080608085870312156146b757600080fd5b845193506020808601516001600160401b03808211156146d657600080fd5b818801915088601f8301126146ea57600080fd5b81516146f861416582614b6f565b8082825285820191508585018c878560051b880101111561471857600080fd5b600095505b8386101561474457805161473081614d81565b83526001959095019491860191860161471d565b5060408b0151909850945050508083111561475e57600080fd5b61476a89848a01614143565b9450606088015192508083111561478057600080fd5b505061478e87828801614250565b91505092959194509250565b60008060008060008060008060006101208a8c0312156147b957600080fd5b895198506147c960208b016142bd565b975060408a01516147d981614d81565b60608b01519097506147ea81614d81565b60808b015160a08c0151919750955061480281614d81565b60c08b015160e08c0151919550935061481a81614d81565b6101008b015190925061482c81614d81565b809150509295985092959850929598565b6000806000806080858703121561485357600080fd5b505082516020840151604085015160609095015191969095509092509050565b600080600080600060a0868803121561488b57600080fd5b614894866142e9565b94506020860151935060408601519250606086015191506143d4608087016142e9565b6000602082840312156148c957600080fd5b815160ff81168114611b5057600080fd5b600081518084526020808501945080840160005b838110156149135781516001600160a01b0316875295820195908201906001016148ee565b509495945050505050565b600081518084526020808501945080840160005b8381101561491357815187529582019590820190600101614932565b6001600160a01b0391909116815260200190565b60608152600061497560608301866148da565b8281036020840152614987818661491e565b90508281036040840152613453818561491e565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561424257603f1989840301855281516101008151855288820151898601528782015181898701526149f98287018261491e565b91505060608083015186830382880152614a13838261491e565b9250505060808083015186830382880152614a2e83826148da565b9250505060a08083015186830382880152614a49838261491e565b9250505060c08083015186830382880152614a6483826148da565b9250505060e08083015192508582038187015250614a82818361491e565b9689019694505050908601906001016149c2565b602081526000611b50602083018461491e565b604081526000614abc604083018561491e565b82810360208401526109d881856148da565b604081526000614ae1604083018561491e565b82810360208401526109d8818561491e565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b9182526001600160a01b0316602082015260400190565b604051601f8201601f191681016001600160401b0381118282101715614b6757614b67614d6b565b604052919050565b60006001600160401b03821115614b8857614b88614d6b565b5060051b60200190565b60008219821115614ba557614ba5614d3f565b500190565b600060ff821660ff84168060ff03821115614bc757614bc7614d3f565b019392505050565b600082614bec57634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115614c2c578160001904821115614c1257614c12614d3f565b80851615614c1f57918102915b93841c9390800290614bf6565b509250929050565b6000611b508383614c4b565b6000611b5060ff8416835b600082614c5a57506001614ce8565b81614c6757506000614ce8565b8160018114614c7d5760028114614c8757614ca3565b6001915050614ce8565b60ff841115614c9857614c98614d3f565b50506001821b614ce8565b5060208310610133831016604e8410600b8410161715614cc6575081810a614ce8565b614cd08383614bf1565b8060001904821115614ce457614ce4614d3f565b0290505b92915050565b6000816000190483118215151615614d0857614d08614d3f565b500290565b600082821015614d1f57614d1f614d3f565b500390565b6000600019821415614d3857614d38614d3f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114613fc957600080fdfe00000000000000000000000022d4002028f537599be9f666d1c4fa138522f9c8a2646970667358221220f4ff6c1068a0c0f9274b34e933a8b013276a47635d58f1014821ba089a584d1564736f6c63430008070033000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7000000000000000000000000d303b4cbf706650eb1a8b73683065ada3f9d306a

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

000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7000000000000000000000000d303b4cbf706650eb1a8b73683065ada3f9d306a

-----Decoded View---------------
Arg [0] : _wavax (address): 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7
Arg [1] : _aprHelper (address): 0xd303b4cbf706650eb1a8b73683065ada3f9d306a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
Arg [1] : 000000000000000000000000d303b4cbf706650eb1a8b73683065ada3f9d306a


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.