Contract 0xbD28F88d35772757f6a6F952867aBe3E12522e9F

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x5fca1e2143105142f10e859cacd9d8878af2185404a137b767b8118fe03f9bc7Withdraw113367552021-09-29 12:52:4416 days 8 hrs ago0x352c64fd7981fc2832d25152b2e3470a3003e5e4 IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003349095
0x7401eac064bd92a85640e52ae21ed035332b70441db3b7bd97940f38473faedbDeposit113200802021-09-28 22:51:0616 days 22 hrs ago0x352c64fd7981fc2832d25152b2e3470a3003e5e4 IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003707125
0xf561a15d3c653636f63b0bc80c6c29b9d33a653114d06b7baee36e4b3109704cWithdraw107530342021-09-09 3:25:3536 days 18 hrs ago0x9f70a23f288dcc75327e1896f7b29d7f59670aed IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.004108914
0x1d48c9dfab333914cb93ecddabff4108e76c0ab7873bce4433fabaa0ad730171Withdraw106976542021-09-07 4:33:3538 days 16 hrs ago0xa1614a887e4a5fac965806aac03c92fc4ad232b4 IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003424155
0x1c06785929ed5fab1e7b08d48bce18a66a2bcd671d6bba832f361969fd0e564dWithdraw105549932021-09-02 4:46:4543 days 16 hrs ago0x953533d6d085c503f6ec78a66cb2f454d090faed IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003363735
0x6b84901cab03f2df575dcdabdcc39bb3bf6a5b002cac3383a6807cf59178ec16Deposit105548322021-09-02 4:38:0343 days 16 hrs ago0x953533d6d085c503f6ec78a66cb2f454d090faed IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003632185
0x8af13c486ab4fb937a9c33c39c7e0c55f03c1ea345e1360ddc95119dbf00335bDeposit105536242021-09-02 3:37:3643 days 17 hrs ago0xa1614a887e4a5fac965806aac03c92fc4ad232b4 IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003632185
0x78c330eeef1c859a0569c9e9738ffe488be3fc38eafb640ae14529f245bfc438Deposit104220222021-08-28 12:33:3848 days 8 hrs ago0x164767126f2570a427e3c2f34da27003f8394a40 IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003632005
0xd97cb68fe0c03a41cca01d9d43f7e7f0dfef531305ef4b16f002a5dac427da7cDeposit104168732021-08-28 8:11:1648 days 13 hrs ago0xb5842f3101ff9f4e3049bf5af6d560ffeb803fbe IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003706945
0x7bee934dbccf795067d2f6633fd1c3ed4c1c5575ec1032d8e583a4439ca3d534Deposit102710722021-08-23 5:14:5453 days 16 hrs ago0x45b426fc8db36a0d3e522f9a6d27cd060d0d8b08 IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003707125
0x8becd3bf9b09b7451ab3ee294e302406d864e83e1977c2cd4d42993d83d73095Deposit101874192021-08-20 7:05:0256 days 14 hrs ago0x9f70a23f288dcc75327e1896f7b29d7f59670aed IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.004498626
0x95a70e7b27cc0a2345294dc77ed7761b04a62f593a14295148c281ebfd42e18aWithdraw101415712021-08-18 16:37:4758 days 4 hrs ago0x835dd88b8f99de3eb3030a2824c225b56df7d42f IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.00315348
0x6e097e24487ccd335357b5d0d1ec831ebadae669fd920cb210964bfaa82fc8a7Deposit101415542021-08-18 16:36:5658 days 4 hrs ago0x835dd88b8f99de3eb3030a2824c225b56df7d42f IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003673795
0x310281fbf371ffe7b155625ca185c31f04b2952fd6c8402ee64a1ed3073b1541Withdraw101415282021-08-18 16:35:3858 days 4 hrs ago0x835dd88b8f99de3eb3030a2824c225b56df7d42f IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.00315336
0x0c3c140eaa6ebf0cb41ae4be64e7bb611c386dc5c6f96908a4fae763531b14ebDeposit101412672021-08-18 16:22:3558 days 5 hrs ago0x835dd88b8f99de3eb3030a2824c225b56df7d42f IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.003673675
0x0a9b05694114d9488a65609565f5ec2d4aa5985c2f5c232e59c9884849ef647bWithdraw101410602021-08-18 16:12:1158 days 5 hrs ago0x835dd88b8f99de3eb3030a2824c225b56df7d42f IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.00307848
0x276c9b63a51d5b38e4c8e45f92a598e76c78224851f44f8c706d9d978894a3d9Deposit101323922021-08-18 8:58:1858 days 12 hrs ago0x835dd88b8f99de3eb3030a2824c225b56df7d42f IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.00405187
0x565f78318b8cacb8334dff198edd75917348a4cfd269b3bb9854357a052094ffRevoke Role101307012021-08-18 7:33:4558 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000168468
0x866e6a75e51f2769a0b6043842ab1d65509048e52335caad4961d80a4949197dRevoke Role101306982021-08-18 7:33:3658 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000168468
0x400822aaef58d4b28ae92c211e004c3db9e854ae2f0eee8131be7761705afce5Grant Role101306942021-08-18 7:33:2458 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000445128
0xa7be98482d3213a954e15f2ad1a4761cefce8c0d9b4036358aba8be7051272bcGrant Role101306912021-08-18 7:33:1558 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000445128
0xc3d60890a997f3b92b74c075cfdb1991b53c557568ede044cbaae33ca2c7a221Set Exit Auto Sw...101306792021-08-18 7:32:3958 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000192312
0x37b220b607c731295cfa18241795c316b14c5f56c303ed9395970074b5d18b02Set Entry Auto S...101306762021-08-18 7:32:3058 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000281952
0x50b6c17bffb314268bf370279ebc5edf8aef1aeefb9b3b9308bb9513237101a1Add Target Vault101306732021-08-18 7:32:2158 days 13 hrs agoFeeder Finance: Deployer IN  0xbd28f88d35772757f6a6f952867abe3e12522e9f0 BNB0.000851364
0xbb2116672ff849e23b86e0aab0108f6727098bf95d98caa4abe0b603bbeea5f20x60806040101306542021-08-18 7:31:2158 days 13 hrs agoFeeder Finance: Deployer IN  Contract Creation0 BNB0.032227854
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeedVaultBase

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : FeedVaultBase.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.8.0;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./FeedVault.sol";

contract FeedVaultBase is FeedVault {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    /**
     * @dev Constructor
     */
    constructor(
        IERC20 _token,
        address payable _entryFeesCollector,
        address payable _exitFeesCollector,
        address _swapRouterAddress
    ) {
        token = IERC20(_token);

        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(ADMIN_ROLE, msg.sender);
        _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE);
        _setupRole(MANAGER_ROLE, msg.sender);
        _setRoleAdmin(MANAGER_ROLE, ADMIN_ROLE);

        entryFeesCollector = _entryFeesCollector;
        exitFeesCollector = _exitFeesCollector;
        swapRouterAddress = _swapRouterAddress;
        entryFeesToTokenPath = [address(token), wBNB, entrySwapToken];
        exitFeesToTokenPath = [address(token), wBNB, exitSwapToken];
    }
}

File 2 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 3 of 14 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

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

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

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

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

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

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

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

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

File 4 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 14 : FeedVault.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.8.0;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "../interfaces/targetVaults/ITargetVault.sol";
import "../interfaces/IPancakeRouter02.sol";

abstract contract FeedVault is AccessControl, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");

    /**
     * @dev Token accepted by Vault
     */
    IERC20 public token;

    /**
     * @dev Array for Vaults
     */
    struct VaultInfo {
        bool enabled;
        address targetVault;
        uint256 allocPoint;
    }
    VaultInfo[] public vaultInfo;

    /**
     * @dev Array for Users
     */
    struct UserInfo {
        uint256 shares;
        uint256 depositedAt;
    }

    /**
     * @dev Total Shares issued
     */
    uint256 public totalShares;

    /**
     * @dev Total allocation points. Must be the sum of all allocation points in all pools.
     */
    uint256 public totalAllocPoint = 0;

    /**
     * @dev Wrapped BNB
     */
    address public constant wBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;

    /**
     * @dev Swap token address
     */
    address public entrySwapToken = 0x67d66e8Ec1Fd25d98B3Ccd3B19B7dc4b4b7fC493;
    address public exitSwapToken = 0x67d66e8Ec1Fd25d98B3Ccd3B19B7dc4b4b7fC493;

    /**
     * @dev Fees basis points
     */
    uint256 public entryFeesBP = 10;
    uint256 public exitFeesBP = 10;

    /**
     * @dev Maximum Fees Basis points
     */
    uint256 public constant MAXIMUM_ENTRY_FEES_BP = 50;
    uint256 public constant MAXIMUM_EXIT_FEES_BP = 50;

    /**
     * @dev Auto Swap Fees options
     */
    bool public autoSwapEntryFees = false;
    bool public autoSwapExitFees = false;

    /**
     * @dev Auto Swap Fees Token and Path
     */
    address[] public entryFeesToTokenPath;
    address[] public exitFeesToTokenPath;

    /**
     * @dev FeesCollector addresses
     */
    address public entryFeesCollector;
    address public exitFeesCollector;

    /**
     * @dev Slippage factor default at 5% tolerance
     */
    uint256 public slippageFactor = 950;

    /**
     * @dev Maximum slippage factor */
    uint256 public constant slippageFactorMax = 995;

    /**
     * @dev Swap Router Address
     */
    address public swapRouterAddress;

    /**
     * @dev Boolean, that if true, disables the target vault
     */
    bool private _vaultDisabled = false;

    /**
     * @dev Mapping, list of users
     */
    mapping(address => UserInfo) public userInfo;

    /**
     * @dev Mapping, list of vaults
     */
    mapping(address => bool) public vaultExistence;

    /**
     * @dev Mapping, target vault ID by address
     */
    mapping(address => uint256) public vaultIdForTargetVaultAddress;

    /**
     * @dev Emitted when vault is enabled
     */
    event VaultEnabled();

    /**
     * @dev Emitted when vault is disabled
     */
    event VaultDisabled();

    /**
     * @dev Emitted when fees collected
     */
    event FeesCollected(bool isEntryFees, address indexed feesCollector, address indexed token, uint256 _amount);

    /**
     * @dev Emitted when entry fees basis points changed
     */
    event EntryFeesBPChanged(uint256 _feesBP);

    /**
     * @dev Emitted when exit fees basis points changed
     */
    event ExitFeesBPChanged(uint256 _feesBP);

    /**
     * @dev Emitted when fees collector address changed
     */
    event EntryFeesCollectorChanged(address _feesCollector);
    event ExitFeesCollectorChanged(address _feesCollector);

    /**
     * @dev Emitted when entry and exit swap token address changed
     */
    event EntrySwapTokenChanged(address _entrySwapToken);
    event ExitSwapTokenChanged(address _exitSwapToken);

    /**
     * @dev Emitted when swap router address changed
     */
    event SwapRouterChanged(address _router);

    /**
     * @dev Emitted when auto swap settings for entry or exit fees changed
     */
    event AutoSwapEntryFees(bool _status);
    event AutoSwapExitFees(bool _status);

    /**
     * @dev Emitted when user deposited to vault
     */
    event Deposited(address indexed from, uint256 _amount);

    /**
     * @dev Emitted when withdraw from vault
     */
    event Withdrawed(address indexed to, uint256 _amount);

    /**
     * @dev Emitted when slippage factor changed
     */
    event SlippageFactorChanged(uint256 _slippageFactor);

    /**
     * @dev Throws if vault is disabled
     */
    modifier isEnabled() {
        require(!_vaultDisabled, "FeedVault: vault is disabled");
        _;
    }

    /**
     * @dev Throws if caller does not has role
     */
    modifier onlyRole(bytes32 _role) {
        require(hasRole(_role, msg.sender), "FeedVault: Caller has no role");
        _;
    }

    /**
     * @dev Thorws if has no vault
     */
    modifier hasVaults() {
        require(vaultInfo.length > 0, "FeedVault: No target vault");
        _;
    }

    /**
     * @dev Throws if duplicated target vault
     */
    modifier nonDuplicated(address _targetVault) {
        require(!vaultExistence[_targetVault], "FeedVault: Duplicated vault");
        _;
    }

    /**
     * @dev Throws if vault does not exists
     */
    modifier vaultExistsById(uint256 _vid) {
        require(_vid < vaultInfo.length, "FeedVault: Vault does not exists");
        _;
    }

    /**
     * @dev Enable vault for upgrade or security purposes
     */
    function enableVault() public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_vaultDisabled, "FeedVault(enableVault): Vault is already enabled");
        _vaultDisabled = false;

        emit VaultEnabled();
    }

    /**
     * @dev Disable vault for upgrade or security purposes
     */
    function disableVault() public onlyRole(ADMIN_ROLE) nonReentrant {
        require(!_vaultDisabled, "FeedVault(disableVault): Vault is already disabled");
        _vaultDisabled = true;

        emit VaultDisabled();
    }

    /**
     * @dev Balance of token in FeedVault
     */
    function availableTokenBalance() public view virtual returns (uint256) {
        return token.balanceOf(address(this));
    }

    /**
     * @dev Balance of token in TargetVaults
     */
    function depositedBalance() public view virtual returns (uint256) {
        uint256 length = vaultInfo.length;
        uint256 _balance = 0;
        for (uint256 i = 0; i < length; i++) {
            uint256 _balanceOf =
                ITargetVault(vaultInfo[i].targetVault).vaultBalance().mul(vaultInfo[i].allocPoint).div(totalAllocPoint);
            _balance = _balance.add(_balanceOf);
        }
        return _balance;
    }

    /**
     * @dev Balance of token in TargetVaults
     */
    function depositedTokenBalance(bool _cachedPrice) public view virtual returns (uint256) {
        uint256 length = vaultInfo.length;
        uint256 _balance = 0;
        for (uint256 i = 0; i < length; i++) {
            if (vaultInfo[i].enabled) {
                uint256 _balanceOfToken = 0;
                if (!_cachedPrice) {
                    _balanceOfToken = ITargetVault(vaultInfo[i].targetVault).balanceOfToken();
                } else {
                    _balanceOfToken = ITargetVault(vaultInfo[i].targetVault)
                        .vaultBalance()
                        .mul(ITargetVault(vaultInfo[i].targetVault).cachedPricePerShare())
                        .div(1e18);
                }
                _balance = _balance.add(_balanceOfToken);
            }
        }
        return _balance;
    }

    /**
     * @dev Total balance of token in FeedVault and TargetVaults combined
     */
    function tokenBalance() public view virtual returns (uint256) {
        return availableTokenBalance().add(depositedTokenBalance(false));
    }

    /**
     * @dev Add target vault
     */
    function addTargetVault(address _targetVault, uint256 _allocPoint)
        public
        virtual
        onlyRole(ADMIN_ROLE)
        nonDuplicated(_targetVault)
        nonReentrant
    {
        require(_targetVault != address(0), "FeedVault(addTargetVault): Target vault cannot be zero address");
        require(
            address(ITargetVault(_targetVault).token()) == address(token),
            "FeedVault(addTargetVault): Target vault token is not the same"
        );
        require(
            ITargetVault(_targetVault).vaultToken() == address(token),
            "FeedVault(addTargetVault): Target vault strategy token is not the same"
        );
        require(
            ITargetVault(_targetVault).feedVault() == address(this),
            "FeedVault(addTargetVault): Target vault feed vault target is not this vault"
        );
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        vaultExistence[_targetVault] = true;
        vaultInfo.push(VaultInfo({enabled: true, targetVault: _targetVault, allocPoint: _allocPoint}));
        vaultIdForTargetVaultAddress[_targetVault] = vaultInfo.length - 1;
    }

    /**
     * @dev Update target vault
     */
    function setTargetVault(uint256 _vid, uint256 _allocPoint) public onlyRole(MANAGER_ROLE) {
        totalAllocPoint = totalAllocPoint.sub(vaultInfo[_vid].allocPoint).add(_allocPoint);
        vaultInfo[_vid].allocPoint = _allocPoint;
    }

    /**
     * @dev Toggle enable status of target vault
     */
    function toggleTargetVault(uint256 _vid, bool _status) public onlyRole(ADMIN_ROLE) nonReentrant {
        vaultInfo[_vid].enabled = _status;
    }

    /**
     * @dev Update multiple target vaults alloc point
     */
    function setAllocPoints(uint256[] memory _allocPoints) public onlyRole(MANAGER_ROLE) nonReentrant {
        require(_allocPoints.length == vaultInfo.length, "FeedVault(setAllocPoints): number of vaults is incorrect");
        uint256 length = vaultInfo.length;
        for (uint256 i = 0; i < length; i++) {
            setTargetVault(i, _allocPoints[i]);
        }
    }

    /**
     * @dev Deposit Fund to FeedVault
     */
    function deposit(uint256 _amount) public virtual isEnabled hasVaults nonReentrant {
        // Collect Target Vaults Profit Shares
        uint256 length = vaultInfo.length;
        for (uint256 i = 0; i < length; i++) {
            if (vaultInfo[i].enabled && ITargetVault(vaultInfo[i].targetVault).balanceOfToken() > 0)
                ITargetVault(vaultInfo[i].targetVault).collectFees();
        }

        uint256 _beforeDepositBalance = depositedTokenBalance(false);

        // Transfer Token from Depositor to Vault
        token.safeTransferFrom(address(msg.sender), address(this), _amount);

        // Collect Entry Fees
        _collectEntryFees(_amount);

        // Allocate to vaults in order to get new vaults balance
        _allocate();

        // Get Pool Balance after deposited
        uint256 _afterDepositBalance = depositedTokenBalance(false);

        // Additional check for deflationary tokens
        uint256 _balance = 0;
        if (_afterDepositBalance >= _beforeDepositBalance) {
            _balance = _afterDepositBalance.sub(_beforeDepositBalance);
        }

        if (_balance > 0) {
            uint256 shares = 0;
            if (totalShares == 0) {
                shares = _balance;
            } else {
                shares = (_balance.mul(totalShares)).div(_beforeDepositBalance);
            }
            UserInfo storage user = userInfo[address(msg.sender)];
            totalShares = totalShares.add(shares);
            user.shares = user.shares.add(shares);
            user.depositedAt = block.number;
        }

        emit Deposited(address(msg.sender), _balance);
    }

    /**
     * @dev Collect Entry Fees
     */
    function _collectEntryFees(uint256 _amount) internal virtual {
        // Collect Entry Fees
        uint256 _entryFees = _amount.mul(entryFeesBP).div(10000);
        if (_entryFees > 0) {
            if (autoSwapEntryFees) {
                uint256 buyBackBefore = IERC20(entrySwapToken).balanceOf(address(this));
                uint256[] memory amounts = IPancakeRouter02(swapRouterAddress).getAmountsOut(_entryFees, entryFeesToTokenPath);
                uint256 amountOut = amounts[amounts.length.sub(1)];
                IERC20(token).safeIncreaseAllowance(swapRouterAddress, _entryFees);
                IPancakeRouter02(swapRouterAddress).swapExactTokensForTokensSupportingFeeOnTransferTokens(
                    _entryFees,
                    amountOut.mul(slippageFactor).div(1000),
                    entryFeesToTokenPath,
                    address(this),
                    block.timestamp + 120
                );
                uint256 buyBackAfter = IERC20(entrySwapToken).balanceOf(address(this));
                uint256 buyBackAmount = buyBackAfter.sub(buyBackBefore);
                IERC20(entrySwapToken).safeTransfer(entryFeesCollector, buyBackAmount);

                emit FeesCollected(true, address(entryFeesCollector), address(entrySwapToken), _entryFees);
            } else {
                IERC20(token).safeTransfer(entryFeesCollector, _entryFees);

                emit FeesCollected(true, address(entryFeesCollector), address(token), _entryFees);
            }
        }
    }

    /**
     * @dev Deposit all sender's fund to FeedVault
     */
    function depositAll() public virtual isEnabled hasVaults {
        deposit(token.balanceOf(msg.sender));
    }

    /**
     * @dev Withdraw fund from FeedVault
     */
    function withdraw(uint256 _shares) public virtual isEnabled hasVaults nonReentrant {
        UserInfo storage user = userInfo[address(msg.sender)];
        require(user.depositedAt != block.number, "FeedVault(withdraw): withdraw cannot be the same block as deposit");

        // Collect Target Vaults Profit Shares
        uint256 length = vaultInfo.length;
        for (uint256 i = 0; i < length; i++) {
            if (vaultInfo[i].enabled && ITargetVault(vaultInfo[i].targetVault).balanceOfToken() > 0)
                ITargetVault(vaultInfo[i].targetVault).collectFees();
        }
        uint256 _tokenInShares = tokenBalance().mul(_shares).div(totalShares);
        uint256 _tokenInVault = token.balanceOf(address(this));
        totalShares = totalShares.sub(_shares);
        user.shares = user.shares.sub(_shares);

        uint256 _tokenAmount = 0;

        if (_tokenInVault >= _tokenInShares) {
            _tokenAmount = _tokenInShares;
        } else {
            uint256 length = vaultInfo.length;
            uint256 remaining = _tokenInShares.sub(_tokenInVault);
            uint256 depositedToken = depositedTokenBalance(false);
            for (uint256 i = 0; i < length; i++) {
                if (vaultInfo[i].enabled) {
                    uint256 _before = token.balanceOf(address(this));
                    uint256 _withdrawVaultAmount =
                        (ITargetVault(vaultInfo[i].targetVault).balanceOf()).mul(remaining).div(depositedToken);
                    _withdrawFromVault(i, _withdrawVaultAmount);
                    uint256 _after = token.balanceOf(address(this));
                    _tokenAmount = _tokenAmount.add(_after.sub(_before));
                }
            }
            _tokenAmount += _tokenInVault;

            if (_tokenAmount > _tokenInShares) {
                _tokenAmount = _tokenInShares;
            }
        }

        // Collect Exit Fees
        _tokenAmount = _collectExitFees(_tokenAmount);

        token.safeTransfer(msg.sender, _tokenAmount);

        emit Withdrawed(address(msg.sender), _tokenAmount);
    }

    /**
     * @dev Collect Exit Fees
     */
    function _collectExitFees(uint256 _amount) internal virtual returns (uint256) {
        uint256 _tokenAmount = _amount;
        uint256 _exitFees = _tokenAmount.mul(exitFeesBP).div(10000);
        if (_exitFees > 0) {
            if (autoSwapExitFees) {
                uint256 buyBackBefore = IERC20(exitSwapToken).balanceOf(address(this));
                uint256[] memory amounts = IPancakeRouter02(swapRouterAddress).getAmountsOut(_exitFees, exitFeesToTokenPath);
                uint256 amountOut = amounts[amounts.length.sub(1)];
                IERC20(token).safeIncreaseAllowance(swapRouterAddress, _exitFees);
                IPancakeRouter02(swapRouterAddress).swapExactTokensForTokensSupportingFeeOnTransferTokens(
                    _exitFees,
                    amountOut.mul(slippageFactor).div(1000),
                    exitFeesToTokenPath,
                    address(this),
                    block.timestamp + 120
                );
                uint256 buyBackAfter = IERC20(exitSwapToken).balanceOf(address(this));
                uint256 buyBackAmount = buyBackAfter.sub(buyBackBefore);
                IERC20(exitSwapToken).safeTransfer(exitFeesCollector, buyBackAmount);

                emit FeesCollected(false, address(exitFeesCollector), address(exitSwapToken), _exitFees);
            } else {
                IERC20(token).safeTransfer(exitFeesCollector, _exitFees);

                emit FeesCollected(false, address(exitFeesCollector), address(token), _exitFees);
            }
            _tokenAmount = _tokenAmount.sub(_exitFees);
        }

        return _tokenAmount;
    }

    /**
     * @dev Deposit from FeedVault to TargetVault
     */
    function _depositToVault(uint256 _vid, uint256 _amount) internal virtual {
        uint256 _balance = IERC20(token).balanceOf(address(this));
        if (_balance < _amount) {
            _amount = _balance;
        }
        if (_amount > 0) {
            token.safeTransfer(vaultInfo[_vid].targetVault, _amount);
            ITargetVault(vaultInfo[_vid].targetVault).deposit();
        }
    }

    /**
     * @dev Deposit from FeedVault to TargetVault by Manager
     */
    function depositToVault(uint256 _vid, uint256 _amount) public virtual vaultExistsById(_vid) onlyRole(MANAGER_ROLE) nonReentrant {
        _depositToVault(_vid, _amount);
    }

    /**
     * @dev Withdraw from TargetVault to FeedVault
     */
    function _withdrawFromVault(uint256 _vid, uint256 _amount) internal virtual {
        ITargetVault(vaultInfo[_vid].targetVault).withdraw(_amount);
    }

    /**
     * @dev Withdraw from TargetVault to FeedVault by Manager
     */
    function withdrawFromVault(uint256 _vid, uint256 _amount)
        public
        virtual
        vaultExistsById(_vid)
        onlyRole(MANAGER_ROLE)
        nonReentrant
    {
        if (_amount > 0) {
            _withdrawFromVault(_vid, _amount);
        }
    }

    /**
     * @dev Allocate balance to all TargetVaults
     */
    function _allocate() internal virtual isEnabled {
        // Get available balance in vault
        uint256 _balance = availableTokenBalance();

        if (_balance > 0) {
            uint256 length = vaultInfo.length;
            for (uint256 i = 0; i < length; i++) {
                if (vaultInfo[i].enabled) {
                    uint256 _amount = _balance.mul(vaultInfo[i].allocPoint).div(totalAllocPoint);
                    _depositToVault(i, _amount);
                }
            }
        }
    }

    /**
     * @dev Allocate balance to all TargetVaults by Manager
     */
    function allocate() public virtual onlyRole(MANAGER_ROLE) nonReentrant {
        _allocate();
    }

    /**
     * @dev Get vault length
     */
    function vaultLength() public view returns (uint256) {
        return vaultInfo.length;
    }

    /**
     * @dev Get Vault ID by Token
     */
    function getTargetVaultIdForStrategy(address _targetVault) external view returns (uint256) {
        require(vaultExistence[_targetVault], "FeedVault: Token does not exists in any vault");
        return vaultIdForTargetVaultAddress[_targetVault];
    }

    /**
     * @dev Reallocate based on allocation point
     */
    function reallocate() public onlyRole(MANAGER_ROLE) isEnabled hasVaults nonReentrant {
        uint256 _balance = depositedTokenBalance(false);
        uint256 length = vaultInfo.length;
        for (uint256 i = 0; i < length; i++) {
            if (vaultInfo[i].enabled) {
                uint256 _tvBalance = ITargetVault(vaultInfo[i].targetVault).balanceOfToken();
                uint256 _expectedBalance = _balance.mul(vaultInfo[i].allocPoint).div(totalAllocPoint);
                uint256 _amount = 0;
                if (_tvBalance > _expectedBalance) {
                    if (vaultInfo[i].allocPoint == 0) {
                        _amount = ITargetVault(vaultInfo[i].targetVault).balanceOf();
                    } else {
                        _amount = _tvBalance.sub(_expectedBalance).mul(1e18).div(
                            ITargetVault(vaultInfo[i].targetVault).targetPricePerShare()
                        );
                    }
                    _withdrawFromVault(i, _amount);
                }
            }
        }

        uint256 _totalBalance = tokenBalance();
        for (uint256 i = 0; i < length; i++) {
            if (vaultInfo[i].enabled) {
                uint256 _tvBalance = ITargetVault(vaultInfo[i].targetVault).balanceOfToken();
                uint256 _expectedBalance = _totalBalance.mul(vaultInfo[i].allocPoint).div(totalAllocPoint);
                if (_tvBalance < _expectedBalance) {
                    uint256 _diffBalance = _expectedBalance.sub(_tvBalance);
                    if (availableTokenBalance() < _diffBalance) {
                        _depositToVault(i, availableTokenBalance());
                    } else {
                        _depositToVault(i, _diffBalance);
                    }
                }
            }
        }
    }

    /**
     * @dev Set entry fees collector address
     */
    function setEntryFeesCollector(address _feesCollector) public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_feesCollector != address(0), "TargetVault(setEntryFeesCollector): entry fees collector cannot be zero address");

        entryFeesCollector = _feesCollector;

        emit EntryFeesCollectorChanged(entryFeesCollector);
    }

    /**
     * @dev Set exit fees collector address
     */
    function setExitFeesCollector(address _feesCollector) public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_feesCollector != address(0), "TargetVault(setExitFeesCollector): exit fees collector cannot be zero address");

        exitFeesCollector = _feesCollector;

        emit ExitFeesCollectorChanged(exitFeesCollector);
    }

    /**
     * @dev Set entry fees basis points
     */
    function setEntryFeesBP(uint256 _feesBP) public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_feesBP <= MAXIMUM_ENTRY_FEES_BP, "TargetVault(setFees): entry fees basis points exceeds threshold");

        entryFeesBP = _feesBP;

        emit EntryFeesBPChanged(entryFeesBP);
    }

    /**
     * @dev Set exit fees basis points
     */
    function setExitFeesBP(uint256 _feesBP) public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_feesBP <= MAXIMUM_EXIT_FEES_BP, "FeedVault(setFees): entry fees basis points exceeds threshold");

        exitFeesBP = _feesBP;

        emit ExitFeesBPChanged(exitFeesBP);
    }

    /**
     * @dev Set swap router address
     */
    function setSwapRouterAddress(address _router) public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_router != address(0), "FeedVault(setSwapRouterAddress): swap router cannot be zero address");

        swapRouterAddress = _router;

        emit SwapRouterChanged(swapRouterAddress);
    }

    /**
     * @dev Set entry swap token address
     */
    function setEntrySwapToken(address _entrySwapToken) public virtual onlyRole(ADMIN_ROLE) nonReentrant {
        require(_entrySwapToken != address(0), "FeedVault(setEntrySwapToken): entry swap token cannot be zero address");

        entrySwapToken = _entrySwapToken;

        entryFeesToTokenPath = [address(token), wBNB, entrySwapToken];

        emit EntrySwapTokenChanged(entrySwapToken);
    }

    /**
     * @dev Set exit swap token address
     */
    function setExitSwapToken(address _exitSwapToken) public virtual onlyRole(ADMIN_ROLE) nonReentrant {
        require(_exitSwapToken != address(0), "FeedVault(setExitSwapToken): entry swap token cannot be zero address");

        exitSwapToken = _exitSwapToken;

        exitFeesToTokenPath = [address(token), wBNB, exitSwapToken];

        emit ExitSwapTokenChanged(exitSwapToken);
    }

    /**
     * @dev Set auto buy back entry fees on and off
     */
    function setEntryAutoSwap(bool _status) public onlyRole(ADMIN_ROLE) nonReentrant {
        autoSwapEntryFees = _status;

        emit AutoSwapEntryFees(autoSwapEntryFees);
    }

    /**
     * @dev Set auto buy back exit fees on and off
     */
    function setExitAutoSwap(bool _status) public onlyRole(ADMIN_ROLE) nonReentrant {
        autoSwapExitFees = _status;

        emit AutoSwapExitFees(autoSwapExitFees);
    }

    /**
     * @dev Set slippage factor
     */
    function setSlippageFactor(uint256 _slippageFactor) public onlyRole(ADMIN_ROLE) nonReentrant {
        require(_slippageFactor <= slippageFactorMax, "TargetVault(setSlippageFactor): slippageFactor too high");
        slippageFactor = _slippageFactor;

        emit SlippageFactorChanged(slippageFactor);
    }
}

File 6 of 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 7 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 8 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <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;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 14 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 10 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        _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 make 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 11 of 14 : ITargetVault.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ITargetVault {
    function token() external view returns (IERC20);

    function feedVault() external view returns (address);

    function vaultToken() external view returns (address);

    function cachedPricePerShare() external view returns (uint256);

    function balanceOf() external view returns (uint256);

    function availableBalance() external view returns (uint256);

    function targetPricePerShare() external view returns (uint256);

    function balanceOfToken() external view returns (uint256);

    function vaultBalance() external view returns (uint256);

    function deposit() external;

    function withdraw(uint256 _amount) external;

    function collectFees() external;

    function retireTargetVault() external;
}

File 12 of 14 : IPancakeRouter02.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

import "./IPancakeRouter01.sol";

interface IPancakeRouter02 is IPancakeRouter01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 13 of 14 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 14 of 14 : IPancakeRouter01.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.8.0;

interface IPancakeRouter01 {
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address payable","name":"_entryFeesCollector","type":"address"},{"internalType":"address payable","name":"_exitFeesCollector","type":"address"},{"internalType":"address","name":"_swapRouterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"AutoSwapEntryFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"AutoSwapExitFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_feesBP","type":"uint256"}],"name":"EntryFeesBPChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_feesCollector","type":"address"}],"name":"EntryFeesCollectorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_entrySwapToken","type":"address"}],"name":"EntrySwapTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_feesBP","type":"uint256"}],"name":"ExitFeesBPChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_feesCollector","type":"address"}],"name":"ExitFeesCollectorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_exitSwapToken","type":"address"}],"name":"ExitSwapTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEntryFees","type":"bool"},{"indexed":true,"internalType":"address","name":"feesCollector","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"FeesCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_slippageFactor","type":"uint256"}],"name":"SlippageFactorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_router","type":"address"}],"name":"SwapRouterChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"VaultDisabled","type":"event"},{"anonymous":false,"inputs":[],"name":"VaultEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdrawed","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_ENTRY_FEES_BP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_EXIT_FEES_BP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_targetVault","type":"address"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"addTargetVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoSwapEntryFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"autoSwapExitFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositToVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_cachedPrice","type":"bool"}],"name":"depositedTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entryFeesBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entryFeesCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"entryFeesToTokenPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entrySwapToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitFeesBP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitFeesCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"exitFeesToTokenPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitSwapToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_targetVault","type":"address"}],"name":"getTargetVaultIdForStrategy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reallocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"}],"name":"setAllocPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setEntryAutoSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feesBP","type":"uint256"}],"name":"setEntryFeesBP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feesCollector","type":"address"}],"name":"setEntryFeesCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_entrySwapToken","type":"address"}],"name":"setEntrySwapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setExitAutoSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feesBP","type":"uint256"}],"name":"setExitFeesBP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feesCollector","type":"address"}],"name":"setExitFeesCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_exitSwapToken","type":"address"}],"name":"setExitSwapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_slippageFactor","type":"uint256"}],"name":"setSlippageFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setSwapRouterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"setTargetVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slippageFactorMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapRouterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vid","type":"uint256"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"toggleTargetVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"depositedAt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultIdForTargetVaultAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vaultInfo","outputs":[{"internalType":"bool","name":"enabled","type":"bool"},{"internalType":"address","name":"targetVault","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wBNB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFromVault","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600555600680547367d66e8ec1fd25d98b3ccd3b19b7dc4b4b7fc4936001600160a01b03199182168117909255600780549091169091179055600a60088190556009819055805461ffff191690556103b6600f556010805460ff60a01b191690553480156200007457600080fd5b506040516200590c3803806200590c833981810160405260808110156200009a57600080fd5b5080516020820151604083015160609093015160018055600280546001600160a01b0319166001600160a01b03851617905591929091620000dd60003362000233565b620000f8600080516020620058ec8339815191523362000233565b62000113600080516020620058ec8339815191528062000243565b6200012e600080516020620058cc8339815191523362000233565b62000158600080516020620058cc833981519152600080516020620058ec83398151915262000243565b600d80546001600160a01b038086166001600160a01b031992831617909255600e8054858416908316179055601080548484169216919091179055604080516060810182526002548316815273bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c602082015260065490921690820152620001d890600b90600362000399565b50604080516060810182526002546001600160a01b03908116825273bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c602083015260075416918101919091526200022890600c90600362000399565b50505050506200041a565b6200023f828262000295565b5050565b600082815260208190526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526020829052604090912060020155565b600082815260208181526040909120620002ba9183906200394a6200030e821b17901c565b156200023f57620002ca6200032e565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000325836001600160a01b03841662000332565b90505b92915050565b3390565b600062000340838362000381565b620003785750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000328565b50600062000328565b60009081526001919091016020526040902054151590565b828054828255906000526020600020908101928215620003f1579160200282015b82811115620003f157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620003ba565b50620003ff92915062000403565b5090565b5b80821115620003ff576000815560010162000404565b6154a2806200042a6000396000f3fe608060405234801561001057600080fd5b50600436106103b95760003560e01c80638b7f6a80116101f4578063be1c0db51161011a578063de5f6268116100ad578063efc363e51161007c578063efc363e5146109ea578063fc0c546a14610a10578063fe78e5ca14610a18578063ffbd3b1f14610a20576103b9565b8063de5f626814610996578063e5acb42b1461099e578063e8e0aef6146109bd578063ec87621c146109e2576103b9565b8063cafa086b116100e9578063cafa086b14610952578063d02eb3f41461095a578063d547741f14610962578063d73886fe1461098e576103b9565b8063be1c0db5146108e1578063c177327414610907578063c49d6ce41461092d578063ca15c87314610935576103b9565b80639e1a4d1911610192578063abaa991611610161578063abaa991614610896578063b6b55f251461089e578063bb9fb40b146108bb578063bd3d06df146107eb576103b9565b80639e1a4d19146107db578063a217fddf146107e3578063a5367b75146107eb578063a851806c146107f3576103b9565b806390fcdb36116101ce57806390fcdb361461074657806391d148541461074e578063929060d81461078e57806398084db7146107d3576103b9565b80638b7f6a80146106e95780638c1548ad146107065780639010d07c14610723576103b9565b80632f2ff15d116102e4578063621b77891161027757806375b238fc1161024657806375b238fc146106785780637cb0d50814610680578063864c199c146106a6578063872daa36146106cc576103b9565b8063621b7789146105fb578063700959b614610603578063709748181461062957806372845a751461064c576103b9565b806344bfc6bf116102b357806344bfc6bf146105a6578063498c7b65146105ae57806351bb99f8146105b65780635249961b146105d5576103b9565b80632f2ff15d1461052757806336568abe146105535780633a98ef391461057f5780633e2d7f7f14610587576103b9565b806317caf6f11161035c5780632a6649931161032b5780632a664993146104dd5780632b68772c146104fa5780632d17218b146105025780632e1a7d4d1461050a576103b9565b806317caf6f1146104715780631959a0021461047957806321ad88d8146104b8578063248a9ca3146104c0576103b9565b80630af07558116103985780630af07558146104365780630b2a88351461043e57806314cd30831461044657806316f19bb114610469576103b9565b80624677e8146103be5780630550473d146103e35780630ac84d8a146103fd575b600080fd5b6103e1600480360360408110156103d457600080fd5b5080359060200135610a28565b005b6103eb610b37565b60408051918252519081900360200190f35b61041a6004803603602081101561041357600080fd5b5035610b3d565b604080516001600160a01b039092168252519081900360200190f35b6103e1610b64565b61041a610c93565b6103e16004803603604081101561045c57600080fd5b5080359060200135610ca2565b6103eb610d65565b6103eb610d6b565b61049f6004803603602081101561048f57600080fd5b50356001600160a01b0316610d71565b6040805192835260208301919091528051918290030190f35b6103e1610d8a565b6103eb600480360360208110156104d657600080fd5b5035610eb2565b6103e1600480360360208110156104f357600080fd5b5035610ec7565b6103eb610fea565b6103eb610ff0565b6103e16004803603602081101561052057600080fd5b5035610ff6565b6103e16004803603604081101561053d57600080fd5b50803590602001356001600160a01b03166115fa565b6103e16004803603604081101561056957600080fd5b50803590602001356001600160a01b0316611666565b6103eb6116c7565b6103eb6004803603602081101561059d57600080fd5b503515156116cd565b6103eb6118d9565b61041a61193f565b6103e1600480360360208110156105cc57600080fd5b5035151561194e565b6103e1600480360360208110156105eb57600080fd5b50356001600160a01b0316611a50565b6103eb611b97565b6103e16004803603602081101561061957600080fd5b50356001600160a01b0316611c13565b6103e16004803603604081101561063f57600080fd5b5080359060200135611d5a565b6103e16004803603604081101561066257600080fd5b506001600160a01b038135169060200135611e65565b6103eb6122da565b6103e16004803603602081101561069657600080fd5b50356001600160a01b03166122ec565b6103e1600480360360208110156106bc57600080fd5b50356001600160a01b031661247e565b61041a600480360360208110156106e257600080fd5b5035612610565b6103e1600480360360208110156106ff57600080fd5b503561261d565b6103e16004803603602081101561071c57600080fd5b5035612740565b61041a6004803603604081101561073957600080fd5b5080359060200135612864565b61041a612885565b61077a6004803603604081101561076457600080fd5b50803590602001356001600160a01b0316612894565b604080519115158252519081900360200190f35b6107ab600480360360208110156107a457600080fd5b50356128ac565b6040805193151584526001600160a01b03909216602084015282820152519081900360600190f35b6103e16128ea565b6103eb612e54565b6103eb612e70565b6103eb612e75565b6103e16004803603602081101561080957600080fd5b81019060208101813564010000000081111561082457600080fd5b82018360208201111561083657600080fd5b8035906020019184602083028401116401000000008311171561085857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612e7a945050505050565b6103e1612f91565b6103e1600480360360208110156108b457600080fd5b5035613043565b6103eb600480360360208110156108d157600080fd5b50356001600160a01b0316613398565b61077a600480360360208110156108f757600080fd5b50356001600160a01b031661340b565b6103eb6004803603602081101561091d57600080fd5b50356001600160a01b0316613420565b61077a613432565b6103eb6004803603602081101561094b57600080fd5b5035613440565b61077a613457565b61041a613460565b6103e16004803603604081101561097857600080fd5b50803590602001356001600160a01b0316613478565b61041a6134d1565b6103e16134e0565b6103e1600480360360208110156109b457600080fd5b503515156135fd565b6103e1600480360360408110156109d357600080fd5b508035906020013515156136f1565b6103eb6137cd565b6103e160048036036020811015610a0057600080fd5b50356001600160a01b03166137df565b61041a613926565b61041a613935565b6103eb613944565b60035482908110610a80576040805162461bcd60e51b815260206004820181905260248201527f466565645661756c743a205661756c7420646f6573206e6f7420657869737473604482015290519081900360640190fd5b6000805160206151fb833981519152610a998133612894565b610ad8576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415610b1e576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b6002600155610b2d848461395f565b5050600180555050565b6103e381565b600b8181548110610b4a57fe5b6000918252602090912001546001600160a01b0316905081565b600080516020615384833981519152610b7d8133612894565b610bbc576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415610c02576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b6002600155601054600160a01b900460ff1615610c505760405162461bcd60e51b8152600401808060200182810382526032815260200180614fdd6032913960400191505060405180910390fd5b6010805460ff60a01b1916600160a01b1790556040517fd9b5f2043d0bf9eff96f43914de1de53fac509c424f8a70d9348b1c889ede47790600090a15060018055565b6007546001600160a01b031681565b6000805160206151fb833981519152610cbb8133612894565b610cfa576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b610d3782610d3160038681548110610d0e57fe5b906000526020600020906002020160010154600554613aaf90919063ffffffff16565b90613b0c565b6005819055508160038481548110610d4b57fe5b906000526020600020906002020160010181905550505050565b60085481565b60055481565b6011602052600090815260409020805460019091015482565b600080516020615384833981519152610da38133612894565b610de2576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415610e28576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b6002600155601054600160a01b900460ff16610e755760405162461bcd60e51b815260040180806020018281038252603081526020018061500f6030913960400191505060405180910390fd5b6010805460ff60a01b191690556040517f8eaa3251e7fc5bb98a6b86bcd8850a884c17f00a0a7b9cfb6d58d98882e2815790600090a15060018055565b60009081526020819052604090206002015490565b600080516020615384833981519152610ee08133612894565b610f1f576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415610f65576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556032821115610faa5760405162461bcd60e51b815260040180806020018281038252603f815260200180614e9f603f913960400191505060405180910390fd5b60088290556040805183815290517f38513f56d06662d667ce256d332fed02f01371f29d9d028f48ed5b472c7419b99181900360200190a1505060018055565b60035490565b60095481565b601054600160a01b900460ff1615611043576040805162461bcd60e51b815260206004820152601c602482015260008051602061503f833981519152604482015290519081900360640190fd5b600354611094576040805162461bcd60e51b815260206004820152601a6024820152791199595915985d5b1d0e88139bc81d185c99d95d081d985d5b1d60321b604482015290519081900360640190fd5b600260015414156110da576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001908155336000908152601160205260409020908101544314156111325760405162461bcd60e51b81526004018080602001828103825260418152602001806152806041913960600191505060405180910390fd5b60035460005b81811015611294576003818154811061114d57fe5b600091825260209091206002909102015460ff168015611202575060006003828154811061117757fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b0316636b0f1c816040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d457600080fd5b505afa1580156111e8573d6000803e3d6000fd5b505050506040513d60208110156111fe57600080fd5b5051115b1561128c576003818154811061121457fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663c87965726040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561127357600080fd5b505af1158015611287573d6000803e3d6000fd5b505050505b600101611138565b5060006112b56004546112af866112a9612e54565b90613b66565b90613bbf565b600254604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561130657600080fd5b505afa15801561131a573d6000803e3d6000fd5b505050506040513d602081101561133057600080fd5b50516004549091506113429086613aaf565b60045583546113519086613aaf565b84556000828210611363575081611595565b60035460006113728585613aaf565b9050600061138060006116cd565b905060005b83811015611580576003818154811061139a57fe5b600091825260209091206002909102015460ff161561157857600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156113fe57600080fd5b505afa158015611412573d6000803e3d6000fd5b505050506040513d602081101561142857600080fd5b5051600380549192506000916114d99186916112af9189918890811061144a57fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663722713f76040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a757600080fd5b505afa1580156114bb573d6000803e3d6000fd5b505050506040513d60208110156114d157600080fd5b505190613b66565b90506114e58382613c26565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561153057600080fd5b505afa158015611544573d6000803e3d6000fd5b505050506040513d602081101561155a57600080fd5b5051905061157261156b8285613aaf565b8990613b0c565b97505050505b600101611385565b509284019285841115611591578593505b5050505b61159e81613ca8565b6002549091506115b8906001600160a01b03163383614169565b60408051828152905133917f6cca423c6ffc06e62a0acc433965e074b11c28479b0449250ce3ff65ac9e39fe919081900360200190a250506001805550505050565b60008281526020819052604090206002015461161d906116186141bb565b612894565b6116585760405162461bcd60e51b815260040180806020018281038252602f815260200180614ede602f913960400191505060405180910390fd5b61166282826141bf565b5050565b61166e6141bb565b6001600160a01b0316816001600160a01b0316146116bd5760405162461bcd60e51b815260040180806020018281038252602f81526020018061543e602f913960400191505060405180910390fd5b6116628282614228565b60045481565b60035460009081805b828110156118d157600381815481106116eb57fe5b600091825260209091206002909102015460ff16156118c9576000856117a8576003828154811061171857fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b0316636b0f1c816040518163ffffffff1660e01b815260040160206040518083038186803b15801561177557600080fd5b505afa158015611789573d6000803e3d6000fd5b505050506040513d602081101561179f57600080fd5b505190506118bb565b6118b8670de0b6b3a76400006112af600385815481106117c457fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663048829806040518163ffffffff1660e01b815260040160206040518083038186803b15801561182157600080fd5b505afa158015611835573d6000803e3d6000fd5b505050506040513d602081101561184b57600080fd5b5051600380548790811061185b57fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b0316630bf6cc086040518163ffffffff1660e01b815260040160206040518083038186803b1580156114a757600080fd5b90505b6118c58382613b0c565b9250505b6001016116d6565b509392505050565b60035460009081805b828110156119385760006119216005546112af6003858154811061190257fe5b9060005260206000209060020201600101546003868154811061185b57fe5b905061192d8382613b0c565b9250506001016118e2565b5091505090565b600e546001600160a01b031681565b6000805160206153848339815191526119678133612894565b6119a6576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b600260015414156119ec576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b6002600155600a805483151561010090810261ff00199092169190911791829055604080519190920460ff161515815290517f4e87b8c54656d7c3f58dbeb46a627c6b558d9ee488aaaaf6bf419e757a4d864d9181900360200190a1505060018055565b600080516020615384833981519152611a698133612894565b611aa8576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415611aee576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556001600160a01b038216611b385760405162461bcd60e51b81526004018080602001828103825260438152602001806153fb6043913960600191505060405180910390fd5b601080546001600160a01b0319166001600160a01b03848116919091179182905560408051929091168252517f449a1bd1377b6ad637113368e2e67a7ff6920f8700956c81906a2485fed27909916020908290030190a1505060018055565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015611be257600080fd5b505afa158015611bf6573d6000803e3d6000fd5b505050506040513d6020811015611c0c57600080fd5b5051905090565b600080516020615384833981519152611c2c8133612894565b611c6b576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415611cb1576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556001600160a01b038216611cfb5760405162461bcd60e51b815260040180806020018281038252604f815260200180615102604f913960600191505060405180910390fd5b600d80546001600160a01b0319166001600160a01b03848116919091179182905560408051929091168252517fed9f75e91bdc992b7118fbe3ccf2ee8230e2575969b48a2402cd5fe7246e1e96916020908290030190a1505060018055565b60035482908110611db2576040805162461bcd60e51b815260206004820181905260248201527f466565645661756c743a205661756c7420646f6573206e6f7420657869737473604482015290519081900360640190fd5b6000805160206151fb833981519152611dcb8133612894565b611e0a576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415611e50576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001558215610b2d57610b2d8484613c26565b600080516020615384833981519152611e7e8133612894565b611ebd576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6001600160a01b038316600090815260126020526040902054839060ff1615611f2d576040805162461bcd60e51b815260206004820152601b60248201527f466565645661756c743a204475706c696361746564207661756c740000000000604482015290519081900360640190fd5b60026001541415611f73576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556001600160a01b038416611fbd5760405162461bcd60e51b815260040180806020018281038252603e8152602001806152c1603e913960400191505060405180910390fd5b60025460408051637e062a3560e11b815290516001600160a01b039283169287169163fc0c546a916004808301926020929190829003018186803b15801561200457600080fd5b505afa158015612018573d6000803e3d6000fd5b505050506040513d602081101561202e57600080fd5b50516001600160a01b0316146120755760405162461bcd60e51b815260040180806020018281038252603d8152602001806151be603d913960400191505060405180910390fd5b6002546040805163703bafd560e01b815290516001600160a01b039283169287169163703bafd5916004808301926020929190829003018186803b1580156120bc57600080fd5b505afa1580156120d0573d6000803e3d6000fd5b505050506040513d60208110156120e657600080fd5b50516001600160a01b03161461212d5760405162461bcd60e51b815260040180806020018281038252604681526020018061505f6046913960600191505060405180910390fd5b306001600160a01b0316846001600160a01b031663508cfff66040518163ffffffff1660e01b815260040160206040518083038186803b15801561217057600080fd5b505afa158015612184573d6000803e3d6000fd5b505050506040513d602081101561219a57600080fd5b50516001600160a01b0316146121e15760405162461bcd60e51b815260040180806020018281038252604b815260200180614f2d604b913960600191505060405180910390fd5b6005546121ee9084613b0c565b60055550506001600160a01b0391821660008181526012602090815260408083208054600160ff199182168117909255825160608101845282815280850187815281850198895260038054808601825581895292517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b6002909402938401805493519390951690151517610100600160a81b03191661010092909b16919091029990991790915595517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c9096019590955594549282526013905292909220600019929092019091558055565b60008051602061538483398151915281565b6000805160206153848339815191526123058133612894565b612344576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6002600154141561238a576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556001600160a01b0382166123d45760405162461bcd60e51b815260040180806020018281038252604481526020018061521b6044913960600191505060405180910390fd5b600780546001600160a01b0319166001600160a01b038481169190911791829055604080516060810182526002548316815273bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c6020820152929091169082015261243690600c906003614de2565b50600754604080516001600160a01b039092168252517f5ad2b44c825d53dfd7b1ca00e4cb03fdfd7f47e11072bc2ea3f576f4c97338bf9181900360200190a1505060018055565b6000805160206153848339815191526124978133612894565b6124d6576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6002600154141561251c576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556001600160a01b0382166125665760405162461bcd60e51b8152600401808060200182810382526045815260200180614f986045913960600191505060405180910390fd5b600680546001600160a01b0319166001600160a01b038481169190911791829055604080516060810182526002548316815273bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c602082015292909116908201526125c890600b906003614de2565b50600654604080516001600160a01b039092168252517fdfe579447f21f2c4e9f4ce7743e70e2a191e0234c83a5665b55dda21056dc25f9181900360200190a1505060018055565b600c8181548110610b4a57fe5b6000805160206153848339815191526126368133612894565b612675576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b600260015414156126bb576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b600260015560328211156127005760405162461bcd60e51b815260040180806020018281038252603d815260200180615181603d913960400191505060405180910390fd5b60098290556040805183815290517f3d2fe976eadb09bdc566cb76c2b61638dfb432c7cc4562a03b30586e348993309181900360200190a1505060018055565b6000805160206153848339815191526127598133612894565b612798576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b600260015414156127de576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556103e38211156128245760405162461bcd60e51b81526004018080602001828103825260378152602001806150cb6037913960400191505060405180910390fd5b600f8290556040805183815290517f7c0b78784b74c7a5d45aaffe8949cf9eda9e2a2bf0b5c48519c4829e563228a49181900360200190a1505060018055565b600082815260208190526040812061287c9083614291565b90505b92915050565b6010546001600160a01b031681565b600082815260208190526040812061287c908361429d565b600381815481106128b957fe5b60009182526020909120600290910201805460019091015460ff821692506101009091046001600160a01b03169083565b6000805160206151fb8339815191526129038133612894565b612942576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b601054600160a01b900460ff161561298f576040805162461bcd60e51b815260206004820152601c602482015260008051602061503f833981519152604482015290519081900360640190fd5b6003546129e0576040805162461bcd60e51b815260206004820152601a6024820152791199595915985d5b1d0e88139bc81d185c99d95d081d985d5b1d60321b604482015290519081900360640190fd5b60026001541415612a26576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556000612a36816116cd565b60035490915060005b81811015612cde5760038181548110612a5457fe5b600091825260209091206002909102015460ff1615612cd657600060038281548110612a7c57fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b0316636b0f1c816040518163ffffffff1660e01b815260040160206040518083038186803b158015612ad957600080fd5b505afa158015612aed573d6000803e3d6000fd5b505050506040513d6020811015612b0357600080fd5b505160055460038054929350600092612b4692916112af9187908110612b2557fe5b90600052602060002090600202016001015488613b6690919063ffffffff16565b9050600081831115612cd25760038481548110612b5f57fe5b90600052602060002090600202016001015460001415612c165760038481548110612b8657fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663722713f76040518163ffffffff1660e01b815260040160206040518083038186803b158015612be357600080fd5b505afa158015612bf7573d6000803e3d6000fd5b505050506040513d6020811015612c0d57600080fd5b50519050612cc8565b612cc560038581548110612c2657fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663af1a4c5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c8357600080fd5b505afa158015612c97573d6000803e3d6000fd5b505050506040513d6020811015612cad57600080fd5b50516112af670de0b6b3a76400006112a98787613aaf565b90505b612cd28482613c26565b5050505b600101612a3f565b506000612ce9612e54565b905060005b82811015612e495760038181548110612d0357fe5b600091825260209091206002909102015460ff1615612e4157600060038281548110612d2b57fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b0316636b0f1c816040518163ffffffff1660e01b815260040160206040518083038186803b158015612d8857600080fd5b505afa158015612d9c573d6000803e3d6000fd5b505050506040513d6020811015612db257600080fd5b505160055460038054929350600092612df592916112af9187908110612dd457fe5b90600052602060002090600202016001015487613b6690919063ffffffff16565b905080821015612e3e576000612e0b8284613aaf565b905080612e16611b97565b1015612e3257612e2d84612e28611b97565b61395f565b612e3c565b612e3c848261395f565b505b50505b600101612cee565b505060018055505050565b6000612e6b612e6360006116cd565b610d31611b97565b905090565b600081565b603281565b6000805160206151fb833981519152612e938133612894565b612ed2576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b60026001541415612f18576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b6002600155600354825114612f5e5760405162461bcd60e51b81526004018080602001828103825260388152602001806152ff6038913960400191505060405180910390fd5b60035460005b81811015610b2d57612f8981858381518110612f7c57fe5b6020026020010151610ca2565b600101612f64565b6000805160206151fb833981519152612faa8133612894565b612fe9576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6002600154141561302f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b600260015561303c6142b2565b5060018055565b601054600160a01b900460ff1615613090576040805162461bcd60e51b815260206004820152601c602482015260008051602061503f833981519152604482015290519081900360640190fd5b6003546130e1576040805162461bcd60e51b815260206004820152601a6024820152791199595915985d5b1d0e88139bc81d185c99d95d081d985d5b1d60321b604482015290519081900360640190fd5b60026001541415613127576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b600260015560035460005b8181101561328e576003818154811061314757fe5b600091825260209091206002909102015460ff1680156131fc575060006003828154811061317157fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b0316636b0f1c816040518163ffffffff1660e01b815260040160206040518083038186803b1580156131ce57600080fd5b505afa1580156131e2573d6000803e3d6000fd5b505050506040513d60208110156131f857600080fd5b5051115b15613286576003818154811061320e57fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663c87965726040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561326d57600080fd5b505af1158015613281573d6000803e3d6000fd5b505050505b600101613132565b50600061329b60006116cd565b6002549091506132b6906001600160a01b0316333086614376565b6132bf836143d6565b6132c76142b2565b60006132d360006116cd565b905060008282106132eb576132e88284613aaf565b90505b801561335757600060045460001415613305575080613321565b61331e846112af60045485613b6690919063ffffffff16565b90505b33600090815260116020526040902060045461333d9083613b0c565b600455805461334c9083613b0c565b815543600190910155505b60408051828152905133917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4919081900360200190a2505060018055505050565b6001600160a01b03811660009081526012602052604081205460ff166133ef5760405162461bcd60e51b815260040180806020018281038252602d8152602001806153ce602d913960400191505060405180910390fd5b506001600160a01b031660009081526013602052604090205490565b60126020526000908152604090205460ff1681565b60136020526000908152604090205481565b600a54610100900460ff1681565b600081815260208190526040812061287f9061487b565b600a5460ff1681565b73bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c81565b600082815260208190526040902060020154613496906116186141bb565b6116bd5760405162461bcd60e51b81526004018080602001828103825260308152602001806151516030913960400191505060405180910390fd5b600d546001600160a01b031681565b601054600160a01b900460ff161561352d576040805162461bcd60e51b815260206004820152601c602482015260008051602061503f833981519152604482015290519081900360640190fd5b60035461357e576040805162461bcd60e51b815260206004820152601a6024820152791199595915985d5b1d0e88139bc81d185c99d95d081d985d5b1d60321b604482015290519081900360640190fd5b600254604080516370a0823160e01b815233600482015290516135fb926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156135ca57600080fd5b505afa1580156135de573d6000803e3d6000fd5b505050506040513d60208110156135f457600080fd5b5051613043565b565b6000805160206153848339815191526136168133612894565b613655576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6002600154141561369b576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b6002600155600a805460ff191683151517908190556040805160ff90921615158252517f6d3ad049914c2d4eb7dcc36dae159166c9d5b5c4cd481d269b2f7c0f1158e4a2916020908290030190a1505060018055565b60008051602061538483398151915261370a8133612894565b613749576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6002600154141561378f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b600260018190555081600384815481106137a557fe5b60009182526020909120600290910201805460ff191691151591909117905550506001805550565b6000805160206151fb83398151915281565b6000805160206153848339815191526137f88133612894565b613837576040805162461bcd60e51b815260206004820152601d6024820152600080516020614f78833981519152604482015290519081900360640190fd5b6002600154141561387d576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f0d833981519152604482015290519081900360640190fd5b60026001556001600160a01b0382166138c75760405162461bcd60e51b815260040180806020018281038252604d815260200180615337604d913960600191505060405180910390fd5b600e80546001600160a01b0319166001600160a01b03848116919091179182905560408051929091168252517f50d820c8274fe1cf135aea2f21097a0d3aff16185cf6d8a557e3b01ad909ab19916020908290030190a1505060018055565b6002546001600160a01b031681565b6006546001600160a01b031681565b600f5481565b600061287c836001600160a01b038416614886565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156139aa57600080fd5b505afa1580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b50519050818110156139e4578091505b8115613aaa57613a25600384815481106139fa57fe5b600091825260209091206002918202015490546001600160a01b039081169161010090041684614169565b60038381548110613a3257fe5b906000526020600020906002020160000160019054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015613a9157600080fd5b505af1158015613aa5573d6000803e3d6000fd5b505050505b505050565b600082821115613b06576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561287c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082613b755750600061287f565b82820282848281613b8257fe5b041461287c5760405162461bcd60e51b815260040180806020018281038252602181526020018061525f6021913960400191505060405180910390fd5b6000808211613c15576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381613c1e57fe5b049392505050565b60038281548110613c3357fe5b600091825260208220600291909102015460408051632e1a7d4d60e01b81526004810185905290516101009092046001600160a01b031692632e1a7d4d9260248084019382900301818387803b158015613c8c57600080fd5b505af1158015613ca0573d6000803e3d6000fd5b505050505050565b6000808290506000613ccb6127106112af60095485613b6690919063ffffffff16565b9050801561416257600a54610100900460ff16156140f757600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015613d2e57600080fd5b505afa158015613d42573d6000803e3d6000fd5b505050506040513d6020811015613d5857600080fd5b50516010546040805163d06ca61f60e01b81526004810186815260248201928352600c8054604484018190529596506060956001600160a01b039095169463d06ca61f948994929392909160649091019084908015613de057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613dc2575b5050935050505060006040518083038186803b158015613dff57600080fd5b505afa158015613e13573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015613e3c57600080fd5b8101908080516040519392919084640100000000821115613e5c57600080fd5b908301906020820185811115613e7157600080fd5b8251866020820283011164010000000082111715613e8e57600080fd5b82525081516020918201928201910280838360005b83811015613ebb578181015183820152602001613ea3565b505050509050016040525050509050600081613ee260018451613aaf90919063ffffffff16565b81518110613eec57fe5b6020908102919091010151601054600254919250613f17916001600160a01b039081169116866148d0565b601054600f546001600160a01b0390911690635c11d795908690613f44906103e8906112af908790613b66565b600c30426078016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b031681526020018381526020018281038252858181548152602001915080548015613fca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613fac575b50509650505050505050600060405180830381600087803b158015613fee57600080fd5b505af1158015614002573d6000803e3d6000fd5b5050600754604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b15801561405357600080fd5b505afa158015614067573d6000803e3d6000fd5b505050506040513d602081101561407d57600080fd5b50519050600061408d8286613aaf565b600e546007549192506140ad916001600160a01b03908116911683614169565b600754600e546040805160008152602081018a905281516001600160a01b039485169490931692600080516020614e5d833981519152929181900390910190a35050505050614155565b600e54600254614114916001600160a01b03918216911683614169565b600254600e5460408051600081526020810185905281516001600160a01b039485169490931692600080516020614e5d833981519152929181900390910190a35b61415f8282613aaf565b91505b5092915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052613aaa9084906149b7565b3390565b60008281526020819052604090206141d7908261394a565b15611662576141e46141bb565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020819052604090206142409082614a68565b156116625761424d6141bb565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061287c8383614a7d565b600061287c836001600160a01b038416614ae1565b601054600160a01b900460ff16156142ff576040805162461bcd60e51b815260206004820152601c602482015260008051602061503f833981519152604482015290519081900360640190fd5b6000614309611b97565b905080156143735760035460005b81811015613aaa576003818154811061432c57fe5b600091825260209091206002909102015460ff161561436b57600061435d6005546112af60038581548110612dd457fe5b9050614369828261395f565b505b600101614317565b50565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526143d09085906149b7565b50505050565b60006143f36127106112af60085485613b6690919063ffffffff16565b9050801561166257600a5460ff161561481a57600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561445157600080fd5b505afa158015614465573d6000803e3d6000fd5b505050506040513d602081101561447b57600080fd5b50516010546040805163d06ca61f60e01b81526004810186815260248201928352600b8054604484018190529596506060956001600160a01b039095169463d06ca61f94899492939290916064909101908490801561450357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116144e5575b5050935050505060006040518083038186803b15801561452257600080fd5b505afa158015614536573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561455f57600080fd5b810190808051604051939291908464010000000082111561457f57600080fd5b90830190602082018581111561459457600080fd5b82518660208202830111640100000000821117156145b157600080fd5b82525081516020918201928201910280838360005b838110156145de5781810151838201526020016145c6565b50505050905001604052505050905060008161460560018451613aaf90919063ffffffff16565b8151811061460f57fe5b602090810291909101015160105460025491925061463a916001600160a01b039081169116866148d0565b601054600f546001600160a01b0390911690635c11d795908690614667906103e8906112af908790613b66565b600b30426078016040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b0316815260200183815260200182810382528581815481526020019150805480156146ed57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116146cf575b50509650505050505050600060405180830381600087803b15801561471157600080fd5b505af1158015614725573d6000803e3d6000fd5b5050600654604080516370a0823160e01b81523060048201529051600094506001600160a01b0390921692506370a08231916024808301926020929190829003018186803b15801561477657600080fd5b505afa15801561478a573d6000803e3d6000fd5b505050506040513d60208110156147a057600080fd5b5051905060006147b08286613aaf565b600d546006549192506147d0916001600160a01b03908116911683614169565b600654600d546040805160018152602081018a905281516001600160a01b039485169490931692600080516020614e5d833981519152929181900390910190a35050505050611662565b600d54600254614837916001600160a01b03918216911683614169565b600254600d5460408051600181526020810185905281516001600160a01b039485169490931692600080516020614e5d833981519152929181900390910190a35050565b600061287f82614af9565b60006148928383614ae1565b6148c85750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561287f565b50600061287f565b600061496682856001600160a01b031663dd62ed3e30876040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561493457600080fd5b505afa158015614948573d6000803e3d6000fd5b505050506040513d602081101561495e57600080fd5b505190613b0c565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790529091506143d09085905b6060614a0c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614afd9092919063ffffffff16565b805190915015613aaa57808060200190516020811015614a2b57600080fd5b5051613aaa5760405162461bcd60e51b815260040180806020018281038252602a8152602001806153a4602a913960400191505060405180910390fd5b600061287c836001600160a01b038416614b16565b81546000908210614abf5760405162461bcd60e51b8152600401808060200182810382526022815260200180614e7d6022913960400191505060405180910390fd5b826000018281548110614ace57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b6060614b0c8484600085614bdc565b90505b9392505050565b60008181526001830160205260408120548015614bd25783546000198083019190810190600090879083908110614b4957fe5b9060005260206000200154905080876000018481548110614b6657fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080614b9657fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061287f565b600091505061287f565b606082471015614c1d5760405162461bcd60e51b81526004018080602001828103825260268152602001806150a56026913960400191505060405180910390fd5b614c2685614d38565b614c77576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310614cb65780518252601f199092019160209182019101614c97565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614d18576040519150601f19603f3d011682016040523d82523d6000602084013e614d1d565b606091505b5091509150614d2d828286614d3e565b979650505050505050565b3b151590565b60608315614d4d575081614b0f565b825115614d5d5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614da7578181015183820152602001614d8f565b50505050905090810190601f168015614dd45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b828054828255906000526020600020908101928215614e37579160200282015b82811115614e3757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614e02565b50614e43929150614e47565b5090565b5b80821115614e435760008155600101614e4856feaad7631698e5d5543338d1926cf4860a6ade1fcdf1f3d6ffd09555dee988b0f6456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64735461726765745661756c742873657446656573293a20656e747279206665657320626173697320706f696e74732065786365656473207468726573686f6c64416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e745265656e7472616e637947756172643a207265656e7472616e742063616c6c00466565645661756c74286164645461726765745661756c74293a20546172676574207661756c742066656564207661756c7420746172676574206973206e6f742074686973207661756c74466565645661756c743a2043616c6c657220686173206e6f20726f6c65000000466565645661756c7428736574456e74727953776170546f6b656e293a20656e747279207377617020746f6b656e2063616e6e6f74206265207a65726f2061646472657373466565645661756c742864697361626c655661756c74293a205661756c7420697320616c72656164792064697361626c6564466565645661756c7428656e61626c655661756c74293a205661756c7420697320616c726561647920656e61626c6564466565645661756c743a207661756c742069732064697361626c656400000000466565645661756c74286164645461726765745661756c74293a20546172676574207661756c7420737472617465677920746f6b656e206973206e6f74207468652073616d65416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5461726765745661756c7428736574536c697070616765466163746f72293a20736c697070616765466163746f7220746f6f20686967685461726765745661756c7428736574456e74727946656573436f6c6c6563746f72293a20656e747279206665657320636f6c6c6563746f722063616e6e6f74206265207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65466565645661756c742873657446656573293a20656e747279206665657320626173697320706f696e74732065786365656473207468726573686f6c64466565645661756c74286164645461726765745661756c74293a20546172676574207661756c7420746f6b656e206973206e6f74207468652073616d65241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08466565645661756c74287365744578697453776170546f6b656e293a20656e747279207377617020746f6b656e2063616e6e6f74206265207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77466565645661756c74287769746864726177293a2077697468647261772063616e6e6f74206265207468652073616d6520626c6f636b206173206465706f736974466565645661756c74286164645461726765745661756c74293a20546172676574207661756c742063616e6e6f74206265207a65726f2061646472657373466565645661756c7428736574416c6c6f63506f696e7473293a206e756d626572206f66207661756c747320697320696e636f72726563745461726765745661756c74287365744578697446656573436f6c6c6563746f72293a2065786974206665657320636f6c6c6563746f722063616e6e6f74206265207a65726f2061646472657373a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217755361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564466565645661756c743a20546f6b656e20646f6573206e6f742065786973747320696e20616e79207661756c74466565645661756c742873657453776170526f7574657241646472657373293a207377617020726f757465722063616e6e6f74206265207a65726f2061646472657373416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220c0b52b33b1cef7144ebc0ca4206e6230b810b639fd658bdfd7bfe012ed2a0df964736f6c63430007030033241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177500000000000000000000000095a1199eba84ac5f19546519e287d43d2f0e1b4100000000000000000000000038eeaeb206e5c465d810fc2db5a5431679126a2c000000000000000000000000f3db5f82c98bda41d9b63bb29d97286850d4fe7400000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e

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

00000000000000000000000095a1199eba84ac5f19546519e287d43d2f0e1b4100000000000000000000000038eeaeb206e5c465d810fc2db5a5431679126a2c000000000000000000000000f3db5f82c98bda41d9b63bb29d97286850d4fe7400000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e

-----Decoded View---------------
Arg [0] : _token (address): 0x95a1199eba84ac5f19546519e287d43d2f0e1b41
Arg [1] : _entryFeesCollector (address): 0x38eeaeb206e5c465d810fc2db5a5431679126a2c
Arg [2] : _exitFeesCollector (address): 0xf3db5f82c98bda41d9b63bb29d97286850d4fe74
Arg [3] : _swapRouterAddress (address): 0x10ed43c718714eb63d5aa57b78b54704e256024e

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000095a1199eba84ac5f19546519e287d43d2f0e1b41
Arg [1] : 00000000000000000000000038eeaeb206e5c465d810fc2db5a5431679126a2c
Arg [2] : 000000000000000000000000f3db5f82c98bda41d9b63bb29d97286850d4fe74
Arg [3] : 00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e


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