Contract 0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x92358824fa13d40e6e32a1758d8d61e059a958dc6a690b833bf08d02891e2d07Get Reward257581072023-02-03 0:19:502 days 13 hrs ago0x96f5676d79fe3be5072c7cd2fffa154a18e8f3b5 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.028148534466 28.002
0x2143c1ec3e9fa8e767cf1a2e6679d6851365980e47fee4637dd5bd1432018df8Withdraw257580962023-02-03 0:19:282 days 13 hrs ago0x96f5676d79fe3be5072c7cd2fffa154a18e8f3b5 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.039305886624 27.252
0x383c0c8886733b55648579451714906a54b00fa4f8237551fe9cf2502ab73994Deposit256872132023-02-01 9:04:534 days 4 hrs ago0xcdec510974a17fcf3156efb104990de7f12cbcfe IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03645762525
0x0095681f71dd2f6d26822da8e78afd3810da667f88bf5267e2ad3dd0911beef5Get Reward255382022023-01-28 21:07:187 days 16 hrs ago0x6b979e8628cdd7576ffc00ef07592580aa935aff IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03165276234 28.4532
0x73488bd3cb2ddeaebcd52673cfa7a65dc180721de190368df08bb4031c99cb6bDeposit255352282023-01-28 19:26:197 days 18 hrs ago0xdf90663d8cdfbc463efa6c8ef85a05671c8b2e73 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.040354388207 27.35225
0x5594bb59fc59fa3ee2203c57c3813c45a8da44f3f0a77e784b733ca98b71d66aDeposit255331722023-01-28 18:16:457 days 19 hrs ago0xcdec510974a17fcf3156efb104990de7f12cbcfe IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03896299827
0x6c57bb7d2cf5a003f36bde0e5c1369070ae39f999f158a357b27b7f2acec5285Deposit255164722023-01-28 8:52:538 days 5 hrs ago0x6b6ec6b9cced4ab253d18dd2f2c55bbd9702e161 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.039469020897 26.717468051
0x1015ad9e5d45203a2e93b0bc3164f0966b37eda24c2372e5f0934bd87c142485Withdraw255142732023-01-28 7:37:338 days 6 hrs ago0xd3b748427360dc0b3bc57934411fde6f0db3745c IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.037590568257 26.8818
0x0e4e5af14dc2fd6780a611dc042058b6e9005116d6c172a83c599dddcd9996f3Deposit255115812023-01-28 6:04:378 days 7 hrs ago0xbf4c796931727fce4b42e8a7f1b284681a0d5a7c IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03927088 26.5
0xf6e4923c47e2952a478e6ef19e478f25702a25ded633e660233515ebfcaafec6Withdraw255000752023-01-27 23:37:238 days 14 hrs ago0xd3b748427360dc0b3bc57934411fde6f0db3745c IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03955221246 27.61075444
0x3ea8644f7a6557ef220ff050f8f113e80fad233664acfb45a369b1f219b0e36cDeposit254931032023-01-27 19:49:278 days 18 hrs ago0xd3b748427360dc0b3bc57934411fde6f0db3745c IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03901480634 26.41
0x32ee0682a5485d23e12ee2358a1cfed9101f2880243bffcc50917201a148f071Get Reward254290502023-01-26 7:30:5610 days 6 hrs ago0xbf4c796931727fce4b42e8a7f1b284681a0d5a7c IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.03216495275 29.365
0xec9d450bda3eeac4d3afa3307faf4d30b916c16d35a816c5d2394dd10ed6607dDeposit254287502023-01-26 7:20:5210 days 6 hrs ago0xbf4c796931727fce4b42e8a7f1b284681a0d5a7c IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.039147761 26.5
0x66bf4d5d9c9a4a476ea988a4014d7002a450d62fe27c6b494ae69c0ccb8c5084Withdraw254001422023-01-25 15:07:0610 days 22 hrs ago0x7822159ee394d14745cde63a706f965fb73c7ac8 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.085834720748 27.2816825
0x23abad2d52a650c2d9b86f94562015f5555484028818509d6139513d9e35e08fWithdraw253093292023-01-23 11:35:4513 days 2 hrs ago0x58d3d0aac31b61471fb38676556569f46b3519d2 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.084730623 26.5
0x8ab6a8da6b498b621526a13c635ea3edec4743c963773223bae157298a975209Deposit251394002023-01-19 11:10:4017 days 2 hrs ago0xdf90663d8cdfbc463efa6c8ef85a05671c8b2e73 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.085747032316 26.72963305
0xa43fd0632d8cbc957d78b4476be475359ffa8a3a7874fcb4f838cf93f757d6faDeposit250055552023-01-16 7:02:0620 days 6 hrs ago0x7822159ee394d14745cde63a706f965fb73c7ac8 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.08842264285 27.425
0x42eea6b84b79237565161d2f1bdc22ca81f4b4b47c3ceda10244aa30d28047a6Withdraw249805792023-01-15 16:53:4920 days 21 hrs ago0x6490077d2da557a239384b685437940adf77c7c4 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.07894325 25
0x82e64ba97a7fcbd7ea66f9b0d60f02d0cb00e216dd83d0d135bcdd1a73bb81cbDeposit249398962023-01-14 17:52:3621 days 20 hrs ago0xc074887d140e276a8b892222f925440eaf3ff40b IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.0390007655 26.5
0x5352b31c8aa8c4542472c1253df52e7df4140061f6c087f7821f2d08a8267f31Deposit248738772023-01-13 5:02:1223 days 8 hrs ago0x1dac32947cd796b4203f69a5a6748e6775d92800 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.0386707345 26.5
0x7ea62051c15aa434747ba20ba97e2fc89d81a52f1a2ca9e8c6458b0c237c2591Deposit248721252023-01-13 4:02:2723 days 9 hrs ago0x1dac32947cd796b4203f69a5a6748e6775d92800 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.040958167925 27.425
0xd8b7ad9c73995705e93f2183ac7e5f0713dadadcb394350ca828300af67506cdDeposit248505732023-01-12 15:55:2123 days 22 hrs ago0x62b2acd1e440ee79fb76bc0bbf882a75ce75451e IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.0386707345 26.5
0x8439a1e9cd4137224bdde1bb9cbcf5d99cbd84fe65b085bd5fefae21afa5ebfbWithdraw248431462023-01-12 11:48:2524 days 2 hrs ago0x9a82aa6edbc473a883b8906bf41084c9c1b760f2 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.084707360776 26.825346
0xe596399ada851a9f9060d03d8a499dc679fe91e2cc70cf4174f34ec0c275eed7Deposit247720992023-01-10 19:39:2825 days 18 hrs ago0x9a82aa6edbc473a883b8906bf41084c9c1b760f2 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.040062929966 26.825346
0x48037130e7dcc28019c39907c9422d1122cea1a6b1e7d96e907c059838ec7142Get Reward247583612023-01-10 11:55:1026 days 2 hrs ago0x90cf2c754e8624c067ce1aceb9be487818626130 IN  0x3bc14c2cbedb1e34e2787eb0aab0c1acfa276ddf0 AVAX0.028339766 26
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PoolHelperV4

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

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

import "SafeERC20.sol";
import "ReentrancyGuard.sol";
import "Ownable.sol";

import "IBaseRewardPool.sol";
import "IMainStaking.sol";
import "IMasterChefVTX.sol";
import "IMasterPlatypus.sol";
import "IWavax.sol";

/// @title Poolhelper
/// @author Vector Team
/// @notice This contract is the main contract that user will intreact with in order to stake stable in Vector protocol
contract PoolHelperV4 is ReentrancyGuard, Ownable {
    using SafeERC20 for IERC20;

    // ADDRESS
    address public immutable depositToken;
    address public immutable stakingToken;
    address public immutable xptp;
    address public immutable masterVtx;
    address public immutable assetToken;
    address public immutable mainStaking;
    address public immutable rewarder;
    address public constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;
    address public compounder;

    // UINT
    uint256 public immutable pid;

    // EVENTS
    event NewDeposit(address indexed user, uint256 amount);
    event NewWithdraw(address indexed user, uint256 amount);
    event ReceivedETH(uint256);

    constructor(
        uint256 _pid,
        address _stakingToken,
        address _depositToken,
        address _assetToken,
        address _mainStaking,
        address _masterVtx,
        address _rewarder,
        address _xptp,
        address _compounder
    ) {
        pid = _pid;
        stakingToken = _stakingToken;
        depositToken = _depositToken;
        mainStaking = _mainStaking;
        masterVtx = _masterVtx;
        rewarder = _rewarder;
        xptp = _xptp;
        assetToken = _assetToken;
        compounder = _compounder;
    }

    receive() external payable {
        emit ReceivedETH(msg.value);
    }

    // ********VIEWS********

    function totalSupply() public view returns (uint256) {
        return IBaseRewardPool(rewarder).totalSupply();
    }

    /// @notice get the amount of reward per token deposited by a user
    /// @param token the token to get the number of rewards
    /// @return the amount of claimable tokens
    function rewardPerToken(address token) public view returns (uint256) {
        return IBaseRewardPool(rewarder).rewardPerToken(token);
    }

    /// @notice get the total amount of shares of a user
    /// @param _address the user
    /// @return the amount of shares
    function balance(address _address) public view returns (uint256) {
        return IBaseRewardPool(rewarder).balanceOf(_address);
    }

    /// @notice get the total amount of stables deposited by a user
    /// @return the amount of stables deposited
    function depositTokenBalance(address _user) public view returns (uint256) {
        return IMainStaking(mainStaking).getDepositTokensForShares(balance(_user), assetToken);
    }

    /// @notice get the total amount of stables deposited by msg.sender
    /// @return the amount of stables deposited
    function depositTokenBalance() public view returns (uint256) {
        return
            IMainStaking(mainStaking).getDepositTokensForShares(balance(msg.sender), depositToken);
    }

    /// @notice get the total amount of rewards for a given token for a user
    /// @param token the address of the token to get the number of rewards for
    /// @return vtxAmount the amount of VTX ready for harvest
    /// @return tokenAmount the amount of token inputted
    function earned(address token) public view returns (uint256 vtxAmount, uint256 tokenAmount) {
        (vtxAmount, , , tokenAmount) = IMasterChefVTX(masterVtx).pendingTokens(
            stakingToken,
            msg.sender,
            token
        );
    }

    /// @notice returns the number of pending PTP of the contract for the given pool
    /// returns pendingTokens the number of pending PTP
    function pendingPTP() external view returns (uint256 pendingTokens) {
        (pendingTokens, , , ) = IMasterPlatypus(IMainStaking(mainStaking).masterPlatypus())
            .pendingTokens(pid, mainStaking);
    }

    // ********MODIFIER********

    modifier _harvest() {
        IMainStaking(mainStaking).multiHarvest(assetToken, false);
        _;
    }

    // ********SETTERS********

    function setCompounder(address _compounder) external onlyOwner {
        require(compounder == address(0));
        compounder = _compounder;
    }

    // ********FUNCTIONS********
    function _approveTokenIfNeeded(
        address token,
        address _to,
        uint256 _amount
    ) private {
        if (IERC20(token).allowance(address(this), _to) < _amount) {
            IERC20(token).approve(_to, type(uint256).max);
        }
    }

    /// @notice harvest pending PTP and get the caller fee
    function harvest() public {
        IMainStaking(mainStaking).multiHarvest(assetToken, true);
        IERC20(xptp).safeTransfer(msg.sender, IERC20(xptp).balanceOf(address(this)));
    }

    /// @notice update the rewards for the caller
    function update() public {
        IBaseRewardPool(rewarder).updateFor(msg.sender);
    }

    /// @notice stake the receipt token in the masterchief of VTX on behalf of the caller
    function _stake(uint256 _amount, address sender) internal {
        IERC20(stakingToken).approve(masterVtx, _amount);
        IMasterChefVTX(masterVtx).depositFor(stakingToken, _amount, sender);
    }

    /// @notice unstake from the masterchief of VTX on behalf of the caller
    function _unstake(uint256 _amount, address sender) internal {
        IMasterChefVTX(masterVtx).withdrawFor(stakingToken, _amount, sender);
    }

    /// @notice deposit stables in mainStaking, autostake in masterchief of VTX
    /// @dev performs a harvest of PTP just before depositing
    /// @param amount the amount of stables to deposit
    function deposit(uint256 amount) external {
        _depositFor(amount, msg.sender);
    }

    /// @notice deposit stables in mainStaking, autostake in masterchief of VTX
    /// @dev performs a harvest of PTP just before depositing
    /// @param amount the amount of stables to deposit
    function depositFor(uint256 amount, address _for) external {
        _depositFor(amount, _for);
    }

    /// @notice deposit stables in mainStaking, autostake in masterchief of VTX
    /// @dev performs a harvest of PTP just before depositing
    /// @param amount the amount of stables to deposit
    function _depositFor(uint256 amount, address _for) internal _harvest {
        uint256 beforeDeposit = IERC20(stakingToken).balanceOf(address(this));
        IMainStaking(mainStaking).depositWithDifferentAsset(
            depositToken,
            assetToken,
            amount,
            msg.sender
        );
        uint256 afterDeposit = IERC20(stakingToken).balanceOf(address(this));
        _stake(afterDeposit - beforeDeposit, _for);
        emit NewDeposit(_for, amount);
    }

    /// @notice stake the receipt token in the masterchief of VTX on behalf of the caller
    function stake(uint256 _amount) external {
        IERC20(stakingToken).safeTransferFrom(msg.sender, address(this), _amount);
        IERC20(stakingToken).approve(masterVtx, _amount);
        IMasterChefVTX(masterVtx).depositFor(stakingToken, _amount, msg.sender);
    }

    /// @notice withdraw stables from mainStaking, auto unstake from masterchief of VTX
    /// @dev performs a harvest of PTP before withdrawing
    /// @param amount the amount of stables to deposit
    function withdraw(uint256 amount, uint256 minAmount) external _harvest {
        _unstake(amount, msg.sender);
        IMainStaking(mainStaking).withdrawWithDifferentAsset(
            depositToken,
            assetToken,
            amount,
            minAmount,
            msg.sender
        );
        emit NewWithdraw(msg.sender, amount);
    }

    /// @notice Harvest VTX and PTP rewards
    function getReward() external _harvest {
        IMasterChefVTX(masterVtx).depositFor(stakingToken, 0, msg.sender);
    }

    /// @notice withdraw stables from mainStaking, auto unstake from masterchief of VTX
    /// @dev performs a harvest of PTP before withdrawing
    /// @param amount the amount of stables to deposit
    function withdrawLP(uint256 amount) external _harvest {
        _unstake(amount, msg.sender);
        IMainStaking(mainStaking).withdrawLP(assetToken, amount, msg.sender);
        emit NewWithdraw(msg.sender, amount);
    }

    // AUTOCOMPOUND UPDATE

    /// @notice Swap all receipt tokens to the autocompounder
    function swapToCompoundFor(address user, uint256 amount) external {
        require(msg.sender == compounder);
        _unstake(amount, user);
        _approveTokenIfNeeded(stakingToken, masterVtx, amount);
        IMasterChefVTX(masterVtx).depositFor(stakingToken, amount, compounder);
    }

    /// @notice Swap all receipt tokens to the autocompounder
    function swapBackToManualFor(address user, uint256 amount) external {
        require(msg.sender == compounder);
        _unstake(amount, msg.sender);
        _approveTokenIfNeeded(stakingToken, masterVtx, amount);
        IMasterChefVTX(masterVtx).depositFor(stakingToken, amount, user);
    }

    // AVAX MANAGEMENT TRANSACTIONS WILL FAIL IF POOLS IS NOT WAVAX

    /// @dev performs a harvest of PTP just before depositing
    function depositAVAXFor(address _for) external payable nonReentrant _harvest {
        _depositAVAXFor(_for);
    }

    /// @dev performs a harvest of PTP just before depositing
    function depositAVAX() external payable nonReentrant _harvest {
        _depositAVAXFor(msg.sender);
    }

    /// @dev performs a harvest of PTP just before depositing
    function _depositAVAXFor(address _for) internal {
        require(depositToken == WAVAX, "Not an avax pool");
        uint256 amount = msg.value;
        _wrap(amount);
        uint256 beforeDeposit = IERC20(stakingToken).balanceOf(address(this));
        _approveTokenIfNeeded(depositToken, mainStaking, amount);
        IMainStaking(mainStaking).depositWithDifferentAsset(
            depositToken,
            assetToken,
            amount,
            address(this)
        );
        uint256 afterDeposit = IERC20(stakingToken).balanceOf(address(this));
        _stake(afterDeposit - beforeDeposit, _for);
        emit NewDeposit(_for, amount);
    }

    /// @notice withdraw stables from mainStaking, auto unstake from masterchief of VTX
    /// @dev performs a harvest of PTP before withdrawing
    /// @param amount the amount of stables to deposit
    function withdrawAVAX(uint256 amount, uint256 minAmount) external nonReentrant _harvest {
        require(depositToken == WAVAX, "Not an avax pool");
        uint256 beforeBalance;
        beforeBalance = IERC20(WAVAX).balanceOf(address(this));
        _unstake(amount, msg.sender);
        IMainStaking(mainStaking).withdrawWithDifferentAsset(
            depositToken,
            assetToken,
            amount,
            minAmount,
            address(this)
        );
        uint256 diffBalance = IERC20(WAVAX).balanceOf(address(this)) - beforeBalance;
        if (diffBalance > 0) {
            _unwrapAndSend(msg.sender, diffBalance);
        }
        emit NewWithdraw(msg.sender, amount);
    }

    function _wrap(uint256 amount) internal {
        IWAVAX(WAVAX).deposit{value: amount}();
    }

    function _unwrap(uint256 amount) internal {
        _approveTokenIfNeeded(WAVAX, WAVAX, amount);
        IWAVAX(WAVAX).withdraw(amount);
    }

    function _wrapAndSend(address _to, uint256 _amount) internal {
        _wrap(_amount);
        IERC20(WAVAX).safeTransfer(_to, _amount);
    }

    function _unwrapAndSend(address _to, uint256 _amount) internal {
        _unwrap(_amount);
        payable(_to).transfer(_amount);
    }
}

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

pragma solidity ^0.8.0;

import "IERC20.sol";
import "Address.sol";

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

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

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

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

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

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

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

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

File 3 of 12 : 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 12 : Address.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 Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 6 of 12 : 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 12 : 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 8 of 12 : IBaseRewardPool.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

interface IBaseRewardPool {
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event RewardAdded(uint256 reward, address indexed token);
    event RewardPaid(address indexed user, uint256 reward, address indexed token);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);

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

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

    function earned(address _account, address _rewardToken) external view returns (uint256);

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

    function getRewardUser() external returns (bool);

    function getStakingToken() external view returns (address);

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

    function mainRewardToken() external view returns (address);

    function operator() external view returns (address);

    function owner() external view returns (address);

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

    function renounceOwnership() external;

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

    function rewardManager() external view returns (address);

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

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

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

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

    function stakingDecimals() external view returns (uint256);

    function stakingToken() external view returns (address);

    function totalSupply() external view returns (uint256);

    function transferOwnership(address newOwner) external;

    function updateFor(address _account) external;

    function userRewardPerTokenPaid(address, address) external view returns (uint256);

    function userRewards(address, address) external view returns (uint256);

    function withdrawFor(
        address _for,
        uint256 _amount,
        bool claim
    ) external returns (bool);
}

File 9 of 12 : IMainStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

interface IMainStaking {
    event AddFee(address to, uint256 value, bool isPTP, bool isAddress);
    event NewDeposit(address indexed user, address indexed token, uint256 amount);
    event NewPtpStaked(uint256 amount);
    event NewWithdraw(address indexed user, address indexed token, uint256 amount);
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event PoolAdded(address tokenAddress);
    event PtpClaimed(uint256 amount);
    event PtpHarvested(uint256 amount, uint256 callerFee);
    event RemoveFee(address to);
    event RewardPaidTo(address to, address rewardToken, uint256 feeAmount);
    event SetFee(address to, uint256 value);

    function CALLER_FEE() external view returns (uint256);

    function MAX_CALLER_FEE() external view returns (uint256);

    function MAX_FEE() external view returns (uint256);

    function WAVAX() external view returns (address);

    function addBonusRewardForAsset(address _asset, address _bonusToken) external;

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

    function assetToBonusRewards(address, uint256) external view returns (address);

    function bribeCallerFee() external view returns (uint256);

    function bribeFeeCollector() external view returns (address);

    function bribeManager() external view returns (address);

    function bribeProtocolFee() external view returns (uint256);

    function claimVePTP() external;

    function computeAPR() external view returns (address);

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

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

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

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

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

    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 getSharesForDepositTokens(uint256 amount, address token)
        external
        view
        returns (uint256);

    function harvest(address token, bool isUser) external;

    function masterPlatypus() external view returns (address);

    function masterVtx() external view returns (address);

    function multiHarvest(address token, bool isUser) external;

    function owner() external view returns (address);

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

    function percentPTPStored() external view returns (uint256);

    function pools(address)
        external
        view
        returns (
            uint256 pid,
            bool isActive,
            address token,
            address lpAddress,
            uint256 sizeLp,
            uint256 size,
            address receiptToken,
            address rewarder,
            address helper
        );

    function ptp() external view returns (address);

    function ptpMigration(uint256[] calldata _pids) external;

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

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

    function removeFee(uint256 index) external;

    function removePool(address token) external;

    function renounceOwnership() external;

    function sendTokenRewards(address _token, address _rewarder) external;

    function setBribeCallerFee(uint256 newValue) external;

    function setBribeFeeCollector(address _collector) external;

    function setBribeManager(address _manager) external;

    function setBribeProtocolFee(uint256 newValue) external;

    function setCallerFee(uint256 value) external;

    function setFee(uint256 index, uint256 value) external;

    function setFeeRecipient(
        uint256 index,
        address _to,
        bool _isPtp,
        bool _isAddress
    ) external;

    function setMasterPlatypus(address _masterPtp) external;

    function setPoolHelper(address token, address _poolhelper) external;

    function setPoolToken(address _token, address pool) external;

    function setSmartConvertor(address _smartConvertor) external;

    function setVoter(address _voter) external;

    function smartConvertor() external view returns (address);

    function stakePTP(uint256 amount) external;

    function stakingStable() external view returns (address);

    function staking_ptp() external view returns (address);

    function storagePTP() external view returns (address);

    function tokenToAvaxPool(address) external view returns (address);

    function tokenToPool(address) external view returns (address);

    function totalFee() external view returns (uint256);

    function transferOwnership(address newOwner) external;

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

    function voter() external view returns (address);

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

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

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

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

File 10 of 12 : IMasterChefVTX.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

interface IMasterChefVTX {
    event Add(uint256 allocPoint, address indexed lpToken, address indexed rewarder);
    event Deposit(address indexed user, address indexed lpToken, uint256 amount);
    event EmergencyWithdraw(address indexed user, address indexed lpToken, uint256 amount);
    event Harvest(address indexed user, address indexed lpToken, uint256 amount);
    event Locked(address indexed user, address indexed lpToken, uint256 amount);
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event Set(
        address indexed lpToken,
        uint256 allocPoint,
        address indexed rewarder,
        address indexed locker,
        bool overwrite
    );
    event Unlocked(address indexed user, address indexed lpToken, uint256 amount);
    event UpdateEmissionRate(address indexed user, uint256 _vtxPerSec);
    event UpdatePool(
        address indexed lpToken,
        uint256 lastRewardTimestamp,
        uint256 lpSupply,
        uint256 accVTXPerShare
    );
    event Withdraw(address indexed user, address indexed lpToken, uint256 amount);

    function PoolManagers(address) external view returns (bool);

    function __MasterChefVTX_init(
        address _vtx,
        uint256 _vtxPerSec,
        uint256 _startTimestamp
    ) external;

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

    function addressToPoolInfo(address)
        external
        view
        returns (
            address lpToken,
            uint256 allocPoint,
            uint256 lastRewardTimestamp,
            uint256 accVTXPerShare,
            address rewarder,
            address helper,
            address locker
        );

    function allowEmergency() external;

    function authorizeForLock(address _address) external;

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

    function deposit(address _lp, uint256 _amount) external;

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

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

    function emergencyWithdraw(address _lp) external;

    function emergencyWithdrawWithReward(address _lp) external;

    function getPoolInfo(address token)
        external
        view
        returns (
            uint256 emission,
            uint256 allocpoint,
            uint256 sizeOfPool,
            uint256 totalPoint
        );

    function isAuthorizedForLock(address) external view returns (bool);

    function massUpdatePools() external;

    function migrateEmergency(
        address _from,
        address _to,
        bool[] calldata onlyDeposit
    ) external;

    function migrateToNewLocker(bool[] calldata onlyDeposit) external;

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

    function owner() external view returns (address);

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

    function poolLength() external view returns (uint256);

    function realEmergencyWithdraw(address _lp) external;

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

    function renounceOwnership() external;

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

    function setPoolHelper(address _lp, address _helper) external;

    function setPoolManagerStatus(address _address, bool _bool) external;

    function setVtxLocker(address newLocker) external;

    function startTimestamp() external view returns (uint256);

    function totalAllocPoint() external view returns (uint256);

    function transferOwnership(address newOwner) external;

    function updateEmissionRate(uint256 _vtxPerSec) external;

    function updatePool(address _lp) external;

    function vtx() external view returns (address);

    function vtxLocker() external view returns (address);

    function vtxPerSec() external view returns (uint256);

    function withdraw(address _lp, uint256 _amount) external;

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

File 11 of 12 : IMasterPlatypus.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;

interface IMasterPlatypus {
    function add(
        uint256 _allocPoint,
        address _lpToken,
        address _rewarder
    ) external;

    function claimablePtp(uint256, address) external view returns (uint256);

    function deposit(uint256 _pid, uint256 _amount) external returns (uint256, uint256);

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

    function dialutingRepartition() external view returns (uint256);

    function emergencyPtpWithdraw() external;

    function emergencyWithdraw(uint256 _pid) external;

    function initialize(
        address _ptp,
        address _vePtp,
        uint256 _ptpPerSec,
        uint256 _dialutingRepartition,
        uint256 _startTimestamp
    ) external;

    function massUpdatePools() external;

    function migrate(uint256[] calldata _pids) external;

    function multiClaim(uint256[] calldata _pids)
        external
        returns (
            uint256,
            uint256[] memory,
            uint256[] memory
        );

    function nonDialutingRepartition() external view returns (uint256);

    function owner() external view returns (address);

    function pause() external;

    function paused() external view returns (bool);

    function pendingTokens(uint256 _pid, address _user)
        external
        view
        returns (
            uint256 pendingPtp,
            address bonusTokenAddress,
            string memory bonusTokenSymbol,
            uint256 pendingBonusToken
        );

    function poolInfo(uint256)
        external
        view
        returns (
            address lpToken,
            uint256 allocPoint,
            uint256 lastRewardTimestamp,
            uint256 accPtpPerShare,
            address rewarder,
            uint256 sumOfFactors,
            uint256 accPtpPerFactorShare
        );

    function poolLength() external view returns (uint256);

    function ptp() external view returns (address);

    function ptpPerSec() external view returns (uint256);

    function renounceOwnership() external;

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

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

    function setNewMasterPlatypus(address _newMasterPlatypus) external;

    function setVePtp(address _newVePtp) external;

    function startTimestamp() external view returns (uint256);

    function totalAllocPoint() external view returns (uint256);

    function transferOwnership(address newOwner) external;

    function unpause() external;

    function updateEmissionRate(uint256 _ptpPerSec) external;

    function updateEmissionRepartition(uint256 _dialutingRepartition) external;

    function updateFactor(address _user, uint256 _newVePtpBalance) external;

    function updatePool(uint256 _pid) external;

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

    function vePtp() external view returns (address);

    function withdraw(uint256 _pid, uint256 _amount) external returns (uint256, uint256);
}

File 12 of 12 : IWavax.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.5.0;

interface IWAVAX {
    function deposit() external payable;

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

    function withdraw(uint256) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address","name":"_depositToken","type":"address"},{"internalType":"address","name":"_assetToken","type":"address"},{"internalType":"address","name":"_mainStaking","type":"address"},{"internalType":"address","name":"_masterVtx","type":"address"},{"internalType":"address","name":"_rewarder","type":"address"},{"internalType":"address","name":"_xptp","type":"address"},{"internalType":"address","name":"_compounder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"ReceivedETH","type":"event"},{"inputs":[],"name":"WAVAX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"assetToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compounder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAVAX","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"}],"name":"depositAVAXFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"_for","type":"address"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"depositTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"vtxAmount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mainStaking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterVtx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingPTP","outputs":[{"internalType":"uint256","name":"pendingTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_compounder","type":"address"}],"name":"setCompounder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapBackToManualFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapToCompoundFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"name":"withdrawAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xptp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101806040523480156200001257600080fd5b50604051620033f3380380620033f3833981016040819052620000359162000124565b60016000556200004533620000b5565b61016098909852606096871b6001600160601b031990811660a05295871b861660805292861b85166101205290851b841660e052841b831661014052831b821660c05290911b1661010052600280546001600160a01b0319166001600160a01b03909216919091179055620001d6565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200011f57600080fd5b919050565b60008060008060008060008060006101208a8c0312156200014457600080fd5b895198506200015660208b0162000107565b97506200016660408b0162000107565b96506200017660608b0162000107565b95506200018660808b0162000107565b94506200019660a08b0162000107565b9350620001a660c08b0162000107565b9250620001b660e08b0162000107565b9150620001c76101008b0162000107565b90509295985092959850929598565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c61016051612f9c620004576000396000818161068f0152611ca70152600081816105e601528181610be7015281816115be01528181611a160152611da1015260008181610315015281816108ad01528181610aa401528181610e4a01528181610eff0152818161113501528181611216015281816112f101528181611522015281816115f9015281816118a101528181611a8d01528181611b5801528181611bf001528181611cd5015281816120f5015281816122620152818161251001526125a90152600081816102c90152818161087d01528181610a6801528181610e1a01528181610ed001528181611106015281816111da015281816112c2015281816114f20152818161166d01528181611a5e01528181611b23015281816120c60152818161222a01526125740152600081816104f40152818161077c01528181610cc201528181610d3801528181610fa50152818161104d015281816110c0015281816117380152818161183001528181611f18015281816128cf01526129c90152600081816103ac0152818161137001526113f40152600081816104720152818161074101528181610ca101528181610d0101528181610f700152818161102c01528181611089015281816116f901528181611767015281816117fb01528181611ee101528181612168015281816122d7015281816124660152818161261c015281816128fe015261299201526000818161059d0152818161090c01528181610a40015281816111b20152818161191501528181612202015281816123ba015281816124ef015261254c0152612f9c6000f3fe60806040526004361061021c5760003560e01c8063a0d065c31161011d578063dcc3e06e116100b0578063e785312c1161007f578063f122977711610064578063f1229777146106b1578063f2fde38b146106d1578063fa2cc3c0146106f157600080fd5b8063e785312c14610668578063f10684541461067d57600080fd5b8063dcc3e06e146105d4578063e00e073214610608578063e3d670d714610628578063e4456ecb1461064857600080fd5b8063a694fc3a116100ec578063a694fc3a1461054b578063b6b55f251461056b578063c89039c51461058b578063cee7b7d2146105bf57600080fd5b8063a0d065c3146104da578063a296454f146104e2578063a2e6204514610516578063a4e7f6761461052b57600080fd5b80633c44e382116101b05780634641257d1161017f57806372f702f31161016457806372f702f31461046057806373b295c2146104945780638da5cb5b146104bc57600080fd5b80634641257d14610436578063715018a61461044b57600080fd5b80633c44e382146103ce5780633d18b912146103e15780634362e816146103f6578063441a3e701461041657600080fd5b806318160ddd116101ec57806318160ddd14610337578063216d14c61461035a57806336efd16f1461037a578063383d78e01461039a57600080fd5b80628cc2621461025b5780630da9525e146102955780631083f761146102b75780631208e15b1461030357600080fd5b36610256576040513481527f7fe3da9f8234611da2fd9f4a5069b8e72d6a5919254646d5a3f2caf93a2fb81a9060200160405180910390a1005b600080fd5b34801561026757600080fd5b5061027b610276366004612cbd565b610711565b604080519283526020830191909152015b60405180910390f35b3480156102a157600080fd5b506102b56102b0366004612e79565b610807565b005b3480156102c357600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161028c565b34801561030f57600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561034357600080fd5b5061034c610be3565b60405190815260200161028c565b34801561036657600080fd5b506102b5610375366004612cf7565b610c7b565b34801561038657600080fd5b506102b5610395366004612d77565b610d9b565b3480156103a657600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b6102b56103dc366004612cbd565b610da9565b3480156103ed57600080fd5b506102b5610eb9565b34801561040257600080fd5b506102b5610411366004612cf7565b611006565b34801561042257600080fd5b506102b5610431366004612e79565b6110ef565b34801561044257600080fd5b506102b56112ab565b34801561045757600080fd5b506102b561141d565b34801561046c57600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a057600080fd5b506102eb73b31f66aa3c1e785363f0875a1b74e27b85fd66c781565b3480156104c857600080fd5b506001546001600160a01b03166102eb565b6102b5611481565b3480156104ee57600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052257600080fd5b506102b5611590565b34801561053757600080fd5b5061034c610546366004612cbd565b6115f5565b34801561055757600080fd5b506102b5610566366004612d45565b6116ec565b34801561057757600080fd5b506102b5610586366004612d45565b611890565b34801561059757600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105cb57600080fd5b5061034c61189d565b3480156105e057600080fd5b506102eb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061457600080fd5b506102b5610623366004612cbd565b611955565b34801561063457600080fd5b5061034c610643366004612cbd565b6119f4565b34801561065457600080fd5b506102b5610663366004612d45565b611a47565b34801561067457600080fd5b5061034c611bec565b34801561068957600080fd5b5061034c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106bd57600080fd5b5061034c6106cc366004612cbd565b611d66565b3480156106dd57600080fd5b506102b56106ec366004612cbd565b611dd2565b3480156106fd57600080fd5b506002546102eb906001600160a01b031681565b6040517fad05e6270000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152336024830152828116604483015260009182917f0000000000000000000000000000000000000000000000000000000000000000169063ad05e6279060640160006040518083038186803b1580156107be57600080fd5b505afa1580156107d2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107fa9190810190612da7565b9296929550919350505050565b6002600054141561085f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260009081556040516387f6492d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201929092527f0000000000000000000000000000000000000000000000000000000000000000909116906387f6492d90604401600060405180830381600087803b1580156108f357600080fd5b505af1158015610907573d6000803e3d6000fd5b5050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031673b31f66aa3c1e785363f0875a1b74e27b85fd66c71490506109985760405162461bcd60e51b815260206004820152601060248201527f4e6f7420616e206176617820706f6f6c000000000000000000000000000000006044820152606401610856565b6040516370a0823160e01b815230600482015260009073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a082319060240160206040518083038186803b1580156109e557600080fd5b505afa1580156109f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1d9190612d5e565b9050610a298333611eb1565b604051631ab21c0760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201859052606482018490523060848301527f00000000000000000000000000000000000000000000000000000000000000001690631ab21c079060a401600060405180830381600087803b158015610ae857600080fd5b505af1158015610afc573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925083915073b31f66aa3c1e785363f0875a1b74e27b85fd66c7906370a082319060240160206040518083038186803b158015610b4f57600080fd5b505afa158015610b63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b879190612d5e565b610b919190612eea565b90508015610ba357610ba33382611f47565b60405184815233907fc0eb7a138362772da4d1d9adfe7f13a30f35b960c48ae439f3afcd4d08e814529060200160405180910390a2505060016000555050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c3e57600080fd5b505afa158015610c52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c769190612d5e565b905090565b6002546001600160a01b03163314610c9257600080fd5b610c9c8183611eb1565b610ce77f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083611f8b565b60025460405163322083db60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905291821660448201527f00000000000000000000000000000000000000000000000000000000000000009091169063c8820f6c906064015b600060405180830381600087803b158015610d7f57600080fd5b505af1158015610d93573d6000803e3d6000fd5b505050505050565b610da582826120af565b5050565b60026000541415610dfc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610856565b600260009081556040516387f6492d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201929092527f0000000000000000000000000000000000000000000000000000000000000000909116906387f6492d90604401600060405180830381600087803b158015610e9057600080fd5b505af1158015610ea4573d6000803e3d6000fd5b50505050610eb1816123b8565b506001600055565b6040516387f6492d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600060248301527f000000000000000000000000000000000000000000000000000000000000000016906387f6492d90604401600060405180830381600087803b158015610f4357600080fd5b505af1158015610f57573d6000803e3d6000fd5b505060405163322083db60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600060248301523360448301527f000000000000000000000000000000000000000000000000000000000000000016925063c8820f6c91506064015b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b50505050565b6002546001600160a01b0316331461101d57600080fd5b6110278133611eb1565b6110727f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083611f8b565b60405163322083db60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820183905283811660448301527f0000000000000000000000000000000000000000000000000000000000000000169063c8820f6c90606401610d65565b6040516387f6492d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600060248301527f000000000000000000000000000000000000000000000000000000000000000016906387f6492d90604401600060405180830381600087803b15801561117957600080fd5b505af115801561118d573d6000803e3d6000fd5b5050505061119b8233611eb1565b604051631ab21c0760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015260448201849052606482018390523360848301527f00000000000000000000000000000000000000000000000000000000000000001690631ab21c079060a401600060405180830381600087803b15801561125a57600080fd5b505af115801561126e573d6000803e3d6000fd5b50506040518481523392507fc0eb7a138362772da4d1d9adfe7f13a30f35b960c48ae439f3afcd4d08e81452915060200160405180910390a25050565b6040516387f6492d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600160248301527f000000000000000000000000000000000000000000000000000000000000000016906387f6492d90604401600060405180830381600087803b15801561133557600080fd5b505af1158015611349573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015261141b92503391506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b1580156113b257600080fd5b505afa1580156113c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ea9190612d5e565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691906126ef565b565b6001546001600160a01b031633146114775760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610856565b61141b6000612798565b600260005414156114d45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610856565b600260009081556040516387f6492d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015260248201929092527f0000000000000000000000000000000000000000000000000000000000000000909116906387f6492d90604401600060405180830381600087803b15801561156857600080fd5b505af115801561157c573d6000803e3d6000fd5b50505050611589336123b8565b6001600055565b6040517f0e0a59680000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630e0a596890602401610fd2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f080608861162f846119f4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60206040518083038186803b1580156116ae57600080fd5b505afa1580156116c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e69190612d5e565b92915050565b6117216001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163330846127f7565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390604401602060405180830381600087803b1580156117ab57600080fd5b505af11580156117bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e39190612d23565b5060405163322083db60e21b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390523360448301527f0000000000000000000000000000000000000000000000000000000000000000169063c8820f6c906064015b600060405180830381600087803b15801561187557600080fd5b505af1158015611889573d6000803e3d6000fd5b5050505050565b61189a81336120af565b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f08060886118d7336119f4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815260048101919091526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016602482015260440160206040518083038186803b158015610c3e57600080fd5b6001546001600160a01b031633146119af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610856565b6002546001600160a01b0316156119c557600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6040516370a0823160e01b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401611696565b6040516387f6492d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600060248301527f000000000000000000000000000000000000000000000000000000000000000016906387f6492d90604401600060405180830381600087803b158015611ad157600080fd5b505af1158015611ae5573d6000803e3d6000fd5b50505050611af38133611eb1565b6040517fe50e63710000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390523360448301527f0000000000000000000000000000000000000000000000000000000000000000169063e50e637190606401600060405180830381600087803b158015611b9c57600080fd5b505af1158015611bb0573d6000803e3d6000fd5b50506040518381523392507fc0eb7a138362772da4d1d9adfe7f13a30f35b960c48ae439f3afcd4d08e81452915060200160405180910390a250565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ed9a55406040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4757600080fd5b505afa158015611c5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7f9190612cda565b6040517fffcd42630000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166024830152919091169063ffcd42639060440160006040518083038186803b158015611d2157600080fd5b505afa158015611d35573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d5d9190810190612da7565b50919392505050565b6040517ff12297770000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063f122977790602401611696565b6001546001600160a01b03163314611e2c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610856565b6001600160a01b038116611ea85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610856565b61189a81612798565b6040517f6766efbe0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905282811660448301527f00000000000000000000000000000000000000000000000000000000000000001690636766efbe90606401610d65565b611f5081612848565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611f86573d6000803e3d6000fd5b505050565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015282919085169063dd62ed3e9060440160206040518083038186803b158015611fee57600080fd5b505afa158015612002573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120269190612d5e565b1015611f865760405163095ea7b360e01b81526001600160a01b038381166004830152600019602483015284169063095ea7b390604401602060405180830381600087803b15801561207757600080fd5b505af115801561208b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110009190612d23565b6040516387f6492d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600060248301527f000000000000000000000000000000000000000000000000000000000000000016906387f6492d90604401600060405180830381600087803b15801561213957600080fd5b505af115801561214d573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b1580156121b357600080fd5b505afa1580156121c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121eb9190612d5e565b60405163cd21798360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018690523360648301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063cd21798390608401600060405180830381600087803b1580156122a857600080fd5b505af11580156122bc573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b15801561232257600080fd5b505afa158015612336573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235a9190612d5e565b905061236f6123698383612eea565b846128b8565b826001600160a01b03167f2cb77763bc1e8490c1a904905c4d74b4269919aca114464f4bb4d911e60de364856040516123aa91815260200190565b60405180910390a250505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031673b31f66aa3c1e785363f0875a1b74e27b85fd66c7146124445760405162461bcd60e51b815260206004820152601060248201527f4e6f7420616e206176617820706f6f6c000000000000000000000000000000006044820152606401610856565b3461244e816129f8565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b1580156124b057600080fd5b505afa1580156124c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124e89190612d5e565b90506125357f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000084611f8b565b60405163cd21798360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301527f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018490523060648301527f0000000000000000000000000000000000000000000000000000000000000000169063cd21798390608401600060405180830381600087803b1580156125ed57600080fd5b505af1158015612601573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a082319060240160206040518083038186803b15801561266757600080fd5b505afa15801561267b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061269f9190612d5e565b90506126b46126ae8383612eea565b856128b8565b836001600160a01b03167f2cb77763bc1e8490c1a904905c4d74b4269919aca114464f4bb4d911e60de364846040516123aa91815260200190565b6040516001600160a01b038316602482015260448101829052611f869084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612a47565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526110009085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612734565b61286773b31f66aa3c1e785363f0875a1b74e27b85fd66c78083611f8b565b6040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810182905273b31f66aa3c1e785363f0875a1b74e27b85fd66c790632e1a7d4d9060240161185b565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390604401602060405180830381600087803b15801561294257600080fd5b505af1158015612956573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061297a9190612d23565b5060405163322083db60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526024820184905282811660448301527f0000000000000000000000000000000000000000000000000000000000000000169063c8820f6c90606401610d65565b73b31f66aa3c1e785363f0875a1b74e27b85fd66c76001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d7f57600080fd5b6000612a9c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612b2c9092919063ffffffff16565b805190915015611f865780806020019051810190612aba9190612d23565b611f865760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610856565b6060612b3b8484600085612b45565b90505b9392505050565b606082471015612bbd5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610856565b843b612c0b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610856565b600080866001600160a01b03168587604051612c279190612e9b565b60006040518083038185875af1925050503d8060008114612c64576040519150601f19603f3d011682016040523d82523d6000602084013e612c69565b606091505b5091509150612c79828286612c84565b979650505050505050565b60608315612c93575081612b3e565b825115612ca35782518084602001fd5b8160405162461bcd60e51b81526004016108569190612eb7565b600060208284031215612ccf57600080fd5b8135612b3e81612f51565b600060208284031215612cec57600080fd5b8151612b3e81612f51565b60008060408385031215612d0a57600080fd5b8235612d1581612f51565b946020939093013593505050565b600060208284031215612d3557600080fd5b81518015158114612b3e57600080fd5b600060208284031215612d5757600080fd5b5035919050565b600060208284031215612d7057600080fd5b5051919050565b60008060408385031215612d8a57600080fd5b823591506020830135612d9c81612f51565b809150509250929050565b60008060008060808587031215612dbd57600080fd5b845193506020850151612dcf81612f51565b604086015190935067ffffffffffffffff80821115612ded57600080fd5b818701915087601f830112612e0157600080fd5b815181811115612e1357612e13612f3b565b604051601f8201601f19908116603f01168101908382118183101715612e3b57612e3b612f3b565b816040528281528a6020848701011115612e5457600080fd5b612e65836020830160208801612f0f565b60609990990151979a969950505050505050565b60008060408385031215612e8c57600080fd5b50508035926020909101359150565b60008251612ead818460208701612f0f565b9190910192915050565b6020815260008251806020840152612ed6816040850160208701612f0f565b601f01601f19169190910160400192915050565b600082821015612f0a57634e487b7160e01b600052601160045260246000fd5b500390565b60005b83811015612f2a578181015183820152602001612f12565b838111156110005750506000910152565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461189a57600080fdfea2646970667358221220b321620443f4e4d6ae6eb77ba943496f86edc67986c6122b7e32b14f9b840a4b64736f6c63430008070033000000000000000000000000000000000000000000000000000000000000001000000000000000000000000042ecb16906851c94d7de3d8fa153f64459b2f09d000000000000000000000000111111111111ed1d73f860f57b2798b683f2d325000000000000000000000000111111111111ed1d73f860f57b2798b683f2d3250000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5000000000000000000000000423d0fe33031aa4456a17b150804aa57fc157d97000000000000000000000000a94679e1a08c944f951775b57c9c2075b15071e5000000000000000000000000060556209e507d30f2167a101bfc6d256ed2f3e1000000000000000000000000e859d1755f9fa62d8959bcab8a6e28f99c1ccadd

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

000000000000000000000000000000000000000000000000000000000000001000000000000000000000000042ecb16906851c94d7de3d8fa153f64459b2f09d000000000000000000000000111111111111ed1d73f860f57b2798b683f2d325000000000000000000000000111111111111ed1d73f860f57b2798b683f2d3250000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5000000000000000000000000423d0fe33031aa4456a17b150804aa57fc157d97000000000000000000000000a94679e1a08c944f951775b57c9c2075b15071e5000000000000000000000000060556209e507d30f2167a101bfc6d256ed2f3e1000000000000000000000000e859d1755f9fa62d8959bcab8a6e28f99c1ccadd

-----Decoded View---------------
Arg [0] : _pid (uint256): 16
Arg [1] : _stakingToken (address): 0x42ecb16906851c94d7de3d8fa153f64459b2f09d
Arg [2] : _depositToken (address): 0x111111111111ed1d73f860f57b2798b683f2d325
Arg [3] : _assetToken (address): 0x111111111111ed1d73f860f57b2798b683f2d325
Arg [4] : _mainStaking (address): 0x8b3d9f0017fa369cd8c164d0cc078bf4ca588ae5
Arg [5] : _masterVtx (address): 0x423d0fe33031aa4456a17b150804aa57fc157d97
Arg [6] : _rewarder (address): 0xa94679e1a08c944f951775b57c9c2075b15071e5
Arg [7] : _xptp (address): 0x060556209e507d30f2167a101bfc6d256ed2f3e1
Arg [8] : _compounder (address): 0xe859d1755f9fa62d8959bcab8a6e28f99c1ccadd

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [1] : 00000000000000000000000042ecb16906851c94d7de3d8fa153f64459b2f09d
Arg [2] : 000000000000000000000000111111111111ed1d73f860f57b2798b683f2d325
Arg [3] : 000000000000000000000000111111111111ed1d73f860f57b2798b683f2d325
Arg [4] : 0000000000000000000000008b3d9f0017fa369cd8c164d0cc078bf4ca588ae5
Arg [5] : 000000000000000000000000423d0fe33031aa4456a17b150804aa57fc157d97
Arg [6] : 000000000000000000000000a94679e1a08c944f951775b57c9c2075b15071e5
Arg [7] : 000000000000000000000000060556209e507d30f2167a101bfc6d256ed2f3e1
Arg [8] : 000000000000000000000000e859d1755f9fa62d8959bcab8a6e28f99c1ccadd


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.