Contract 0xdb776ed0968e22a37bf58980727b0bf0e988ed9b

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc6443e47d202cfefca2c65d4150e4f23ac6ef80c9faa9735573bab13db186278Harvest216872372021-11-22 22:53:418 days 4 hrs ago0x856b63349fb6c818ea7cd7305483ae0ef6956f6c IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01855605
0xda4cd5ec9787aa21304b5cb19e557eac9d528ba65c00d88ddfc335af3763b53dHarvest213261022021-11-13 15:16:3217 days 12 hrs ago0xa4aaeaf6a1b05d784b3819633adec419684e2fdb IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01920273
0xa8bb695ebf191003ab75641650b2d90f2b7e8e76d5767b86376853f406a6fe4aHarvest212343072021-11-11 5:02:1019 days 22 hrs ago0x856b63349fb6c818ea7cd7305483ae0ef6956f6c IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01888593
0x4be947ff20301812f09e75fde9f54ee9d3bbd5a0a567482c05eac4ff4b8fc84cHarvest212278272021-11-11 0:48:5820 days 2 hrs ago0x66d39479d5ff3f0476a6c2ab37863c5ae4f08be0 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01920273
0x9e4fd6da27c3d03456c2fd4dd9a7f68809787f81c22420fae17811e46cceab5cHarvest208690552021-11-01 19:32:5229 days 7 hrs ago0x6fb651cdd003a7eba1998e9c77d9ee0eca102e86 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01888593
0x009964cb71b62d0922bb953cc2779ca8daa5f1a4f1f72d4f708f745be58dc5a4Harvest206746482021-10-27 17:18:3534 days 10 hrs ago0xe22cf3b117367893341f3798d10ace9b7fa57ebd IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01920273
0x1f6e44441d537d709b2e29b5e644212caa36e35ffbac5abdc6dd552986cc0065Harvest206656062021-10-27 11:13:5534 days 16 hrs ago0x0f28ddd210184b8fc1862a01826191d9986dafab IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.03147655
0x8e0b3d5e5279e3cb332e94c7e1aa3c66c7cb65bf1318242210ab472467512df9Harvest205929072021-10-25 10:56:2736 days 16 hrs ago0x6fb651cdd003a7eba1998e9c77d9ee0eca102e86 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01888593
0xb49a589fb34eacf2ecd6ac5bb5aec3daf91bd21d2199a3aabf31126f17c6db82Harvest205360552021-10-23 21:14:4938 days 6 hrs ago0x856b63349fb6c818ea7cd7305483ae0ef6956f6c IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.019206
0xcd6d91dbbf6b8e635170ed4ad488d2fd963724851365154bf8a5cd629b968005Harvest205355472021-10-23 20:55:1338 days 6 hrs ago0x856b63349fb6c818ea7cd7305483ae0ef6956f6c IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01888593
0x2e27e420aca9eaac62bf2d82c1692b7a4bd07a42102268aaed111871f1cdf834Harvest199215792021-10-06 22:03:2055 days 5 hrs ago0x856b63349fb6c818ea7cd7305483ae0ef6956f6c IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01889247
0xf2fe05a08f12e6d0089d723b126555ef308d27da6cb9afcdd969fc76b1d4c040Harvest196016122021-09-28 6:23:2563 days 21 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.006402
0x7b791a2aa33437e69cbf7b906e1d3940d37ca143c6c01da0d53cccbdd321c639Harvest194870322021-09-25 6:01:2366 days 21 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0x8712bef61736b0808de3c7a502543ee7acb330dc2b6a2cde9425eb5c22fa2ac7Harvest194753162021-09-24 22:56:0167 days 4 hrs ago0x126a2fbba0973c6770cc7d79886afe9945d4e8b1 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0x60f1c921551897681802cf24add490846ee421f36f01f5c793a7ec8e3e767e0bHarvest194155942021-09-23 9:33:2968 days 17 hrs ago0x0f28ddd210184b8fc1862a01826191d9986dafab IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00629893
0x1ea74de76838b33a83628670d5036e74b46ea1258203e14c82d57f13e3858b5aHarvest194125992021-09-23 7:32:5368 days 19 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0xa772211ce95a4c701d9675e5d9d773690e9de0a53421540ef911ac63e970f2e8Harvest193032622021-09-20 7:17:1071 days 20 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0x4ac2d08c3c575989bdd68bc4298e47dd4071a87486485dc1e566aedc73fa7c4eHarvest192316002021-09-18 7:30:4773 days 19 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0xc39433e8fbff8a001a295fd38f3be39480cfcfa0e0415fcd19780d33343a893eHarvest192279902021-09-18 4:49:4873 days 22 hrs ago0x4c7fd55834f50d40537f0ad4aff75287f4c6fb10 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00629749
0xa63d22461df49f832833c8b89eb2e157b4a52806f01d32cf446c5fcfac939300Harvest192139262021-09-17 18:53:4374 days 8 hrs ago0x1957307f74ef847cbdcbcfd503b870da4f4a24b6 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.03841854
0x83809a5a93bd4e4698f09ee099cc20753ade2eed677eb020a316eeb2c1cc8c01Harvest191587832021-09-16 4:10:0475 days 23 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0x2bdd22ce8fc83d0ecc68fef68ca09e82f45c0ed5f391bee94ebd32cd7d52f74aHarvest191528452021-09-16 0:06:3576 days 3 hrs ago0x53ea05084c67f7ab7427f503cd61ca7475998e8a IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0xb16035190fc4b74ae76e29cc586ab69f09eedb1ef01e00924eb1d77ef45912a9Harvest191513232021-09-15 23:04:3076 days 4 hrs ago0x53ea05084c67f7ab7427f503cd61ca7475998e8a IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0x021c37fc6759a3a29b5b95214a49270918502c288561bffe07ab0e51a3e77caeHarvest190763632021-09-13 23:05:4078 days 4 hrs ago0x4d4f726d6b59f3b809b48d5ceb89b2a9ae0e0129 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.00640309
0x32b3c4d5c4ca0c5e94c47b389d1cac7e8f1f9bc084cf0f3b5e922d9e35337fa0Harvest190622702021-09-13 13:49:2378 days 13 hrs ago0x02b79df8c38f29f39888557c0a89917fd99ddf77 IN  0xdb776ed0968e22a37bf58980727b0bf0e988ed9b0 MATIC0.01920927
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x96831013e4ccfb7b46de38db603f1380e8bb8edf52dc74b530c89180af85154d180172222021-08-15 18:12:16107 days 9 hrs ago 0x00f845817da5b699a65bb75caaeea83edc0b1027  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xFbf2B9e6464d8587184c198eeef5377568E433dA

Contract Name:
DinoChefStrategyCommunity

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-08-02
*/

pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
// SPDX-License-Identifier: UNLICENSED


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


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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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


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


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



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


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



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


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

interface IStrategy {
    //Returns the token sent to the fee dist contract, which is used to calculate the amount of ADDY to mint when claiming rewards
    function getFeeDistToken() external view returns (address);

    function lastHarvestTime() external view returns (uint256);

    function rewards() external view returns (address);

    function want() external view returns (address);

    function deposit() external;

    function withdrawForSwap(uint256) external returns (uint256);

    function withdraw(uint256) external;

    function balanceOf() external view returns (uint256);

    function getHarvestable() external view returns (uint256);

    function harvest() external;

    function setJar(address _jar) external;
}
interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}
interface IUniswapRouterV2 {
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

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

    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 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);

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

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


abstract contract BaseStrategy is IStrategy, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    uint256 public override lastHarvestTime = 0;

    // Tokens
    address public override want; //The LP token, Harvest calls this "rewardToken"
    address public constant weth = 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619; //weth for Matic
    address internal harvestedToken; //The token we harvest. If the reward pool emits multiple tokens, they should be converted to a single token.

    // Contracts
    address public override rewards; //The staking rewards/MasterChef contract
    address public strategist; //The address the performance fee is sent to
    address public multiHarvest; //The multi harvest contract
    address public jar; //The vault/jar contract

    // Dex
    address public currentRouter = 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff; //Quickswap router

    constructor(
        address _want,
        address _strategist,
        address _harvestedToken,
        address _currentRouter,
        address _rewards
    ) public {
        require(_want != address(0));
        require(_strategist != address(0));
        require(_harvestedToken != address(0));
        require(_currentRouter != address(0));
        require(_rewards != address(0));

        want = _want;
        strategist = _strategist;
        harvestedToken = _harvestedToken;
        currentRouter = _currentRouter;
        rewards = _rewards;
    }
    
    // **** Modifiers **** //
    
    //prevent unauthorized smart contracts from calling harvest()
    modifier onlyHumanOrWhitelisted { 
        require(msg.sender == tx.origin || msg.sender == owner() || msg.sender == multiHarvest, "not authorized");
        _;
    }

    // **** Views **** //

    function balanceOfWant() public view returns (uint256) {
        return IERC20(want).balanceOf(address(this));
    }

    function balanceOfPool() public virtual view returns (uint256);

    function balanceOf() public override view returns (uint256) {
        return balanceOfWant().add(balanceOfPool());
    }

    // **** Setters **** //

    function setJar(address _jar) external override onlyOwner {
        require(jar == address(0), "jar already set");
        require(_jar != address(0));
        jar = _jar;
        emit SetJar(_jar);
    }

    function setMultiHarvest(address _address) external onlyOwner {
        require(_address != address(0));
        multiHarvest = _address;
    }

    // **** State mutations **** //
    function deposit() public override virtual;

    // Withdraw partial funds, normally used with a jar withdrawal
    function withdraw(uint256 _amount) external override {
        require(msg.sender == jar, "!jar");
        uint256 _balance = IERC20(want).balanceOf(address(this));
        if (_balance < _amount) {
            _amount = _withdrawSome(_amount.sub(_balance));
            _amount = _amount.add(_balance);
        }

        IERC20(want).safeTransfer(jar, _amount);
    }

    // Withdraw funds, used to swap between strategies
    // Not utilized right now, but could be used for i.e. multi stablecoin strategies
    function withdrawForSwap(uint256 _amount)
        external override
        returns (uint256 balance)
    {
        require(msg.sender == jar, "!jar");
        _withdrawSome(_amount);

        balance = IERC20(want).balanceOf(address(this));

        IERC20(want).safeTransfer(jar, balance);
    }

    function _withdrawSome(uint256 _amount) internal virtual returns (uint256);

    function harvest() public override virtual;

    // **** Internal functions ****

    //Performs a swap through the current router, assuming infinite approval for the token was already given
    function _swapUniswapWithPathPreapproved(
        address[] memory path,
        uint256 _amount,
        address _router
    ) internal {
        require(path[1] != address(0));

        IUniswapRouterV2(_router).swapExactTokensForTokens(
            _amount,
            0,
            path,
            address(this),
            now.add(60)
        );
    }

    function _swapUniswapWithPathPreapproved(
        address[] memory path,
        uint256 _amount
    ) internal {
        _swapUniswapWithPathPreapproved(path, _amount, currentRouter);
    }

    //Legacy swap functions left in to not break compatibility with older strategy contracts
    function _swapUniswapWithPath(
        address[] memory path,
        uint256 _amount,
        address _router
    ) internal {
        require(path[1] != address(0));

        // Swap with uniswap
        IERC20(path[0]).safeApprove(_router, 0);
        IERC20(path[0]).safeApprove(_router, _amount);

        IUniswapRouterV2(_router).swapExactTokensForTokens(
            _amount,
            0,
            path,
            address(this),
            now.add(60)
        );
    }

    function _swapUniswapWithPath(
        address[] memory path,
        uint256 _amount
    ) internal {
        _swapUniswapWithPath(path, _amount, currentRouter);
    }

    function _swapUniswapWithPathForFeeOnTransferTokens(
        address[] memory path,
        uint256 _amount,
        address _router
    ) internal {
        require(path[1] != address(0));

        // Swap with uniswap
        IERC20(path[0]).safeApprove(_router, 0);
        IERC20(path[0]).safeApprove(_router, _amount);

        IUniswapRouterV2(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens(
            _amount,
            0,
            path,
            address(this),
            now.add(60)
        );
    }

    function _swapUniswapWithPathForFeeOnTransferTokens(
        address[] memory path,
        uint256 _amount
    ) internal {
        _swapUniswapWithPathForFeeOnTransferTokens(path, _amount, currentRouter);
    }

    function _distributePerformanceFeesAndDeposit() internal {
        uint256 _want = IERC20(want).balanceOf(address(this));

        if (_want > 0) {
            deposit();
        }
        lastHarvestTime = now;
    }

    // **** Events **** //
    event SetJar(address indexed jar);
}
interface IMasterChef {
    function deposit(uint256 _pid, uint256 _amount) external;
    function deposit(uint256 _pid, uint256 _amount, address _referrer) external;
    function withdraw(uint256 _pid, uint256 _amount) external;
    function emergencyWithdraw(uint256 _pid) external;
    function exit(uint256 _pid) external;

    function poolInfo(uint256 _pid) external view returns(uint128, uint64, uint64);
    function userInfo(uint256 _pid, address _user) external view returns(uint256, uint256);
    function balanceOf(uint256 _pid, address _user) external view returns (uint256);
    function lpToken(uint256 _pid) external view returns (address);

    //function depends on implementation of master chef
    function earned(uint256 _pid, address _user) external view returns (uint256);
    function pendingReward(uint256 _pid, address _user) external view returns (uint256);

    function totalSupply(uint256 _pid) external view returns (uint256);
}

// Base contract for MasterChef/SakeMaster/etc rewards contract interfaces

abstract contract BaseStrategyMasterChef is BaseStrategy {

    uint256 public poolId;

    constructor(
        address _rewards,
        address _want,
        address _strategist,
        uint256 _poolId,
        address _harvestedToken,
        address _currentRouter
    )
        public
        BaseStrategy(_want, _strategist, _harvestedToken, _currentRouter, _rewards)
    {
        poolId = _poolId;
    }

    // **** Getters ****
    function balanceOfPool() public override view returns (uint256) {
        (uint256 amount, ) = IMasterChef(rewards).userInfo(poolId, address(this));
        return amount;
        //return IMasterChef(rewards).balanceOf(poolId, address(this));
    }

    // **** Setters ****

    /*function deposit() public override {
        uint256 _want = IERC20(want).balanceOf(address(this));
        if (_want > 0) {
            IERC20(want).safeApprove(rewards, 0);
            IERC20(want).safeApprove(rewards, _want);
            //IMasterChef(rewards).deposit(poolId, _want);
            IMasterChef(rewards).deposit(poolId, _want, 0xB29Cd9C87a624B940335d6d5e1D4aADf7D95bEeC);
        }
    }*/

    function _withdrawSome(uint256 _amount)
        internal
        override
        returns (uint256)
    {
        IMasterChef(rewards).withdraw(poolId, _amount);
        return _amount;
    }
    
    /* **** Other Mutative functions **** */

    function _getReward() internal {
        IMasterChef(rewards).withdraw(poolId, 0);
        //Usually different for other pools based on IMasterChef
        //IMasterChef(rewards).claim(poolId);
    }

    // **** Admin functions ****

    function salvage(address token) public onlyOwner {
        require(token != want && token != harvestedToken, "cannot salvage");

        uint256 _token = IERC20(token).balanceOf(address(this));
        if (_token > 0) {
            IERC20(token).safeTransfer(msg.sender, _token);
        }
    }

    function emergencyWithdraw() public onlyOwner {
        IMasterChef(rewards).emergencyWithdraw(poolId);

        uint256 _want = IERC20(want).balanceOf(address(this));
        if (_want > 0) {
            IERC20(want).safeTransfer(jar, _want);
        }
    }
}

interface IERCFund {
    function feeShareEnabled() external view returns (bool);

    function depositToFeeDistributor(address token, uint256 amount) external;

    function notifyFeeDistribution(address token) external;

    function getFee() external view returns (uint256);

    function recover(address token) external;
}

//A Jar is a contract that users deposit funds into.
//Jar contracts are paired with a strategy contract that interacts with the pool being farmed.
interface IJar {
    function token() external view returns (IERC20);

    function getRatio() external view returns (uint256);

    function balance() external view returns (uint256);

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

    function depositAll() external;

    function deposit(uint256) external;

    //function depositFor(address user, uint256 amount) external;

    function withdrawAll() external;

    //function withdraw(uint256) external;

    //function earn() external;

    function strategy() external view returns (address);

    //function decimals() external view returns (uint8);

    //function getLastTimeRestaked(address _address) external view returns (uint256);

    //function notifyReward(address _reward, uint256 _amount) external;

    //function getPendingReward(address _user) external view returns (uint256);
}

//Vaults are jars that emit ADDY rewards.
interface IVault is IJar {

    function getBoost(address _user) external view returns (uint256);

    function getPendingReward(address _user) external view returns (uint256);

    function getLastDepositTime(address _user) external view returns (uint256);

    function getTokensStaked(address _user) external view returns (uint256);

    function totalShares() external view returns (uint256);

    function getRewardMultiplier() external view returns (uint256);   

    function rewardAllocation() external view returns (uint256);   

    function totalPendingReward() external view returns (uint256);   

    function withdrawPenaltyTime() external view returns (uint256);  

    function withdrawPenalty() external view returns (uint256);   
    
    function increaseRewardAllocation(uint256 _newReward) external;

    function setWithdrawPenaltyTime(uint256 _withdrawPenaltyTime) external;

    function setWithdrawPenalty(uint256 _withdrawPenalty) external;

    function setRewardMultiplier(uint256 _rewardMultiplier) external;
}

//A normal vault is a vault where the strategy contract notifies the vault contract about the profit it generated when harvesting. 
interface IGenericVault is IVault {
    
    //Strategy calls notifyReward to let the vault know that it earned a certain amount of profit (the performance fee) for gov token stakers
    function notifyReward(address _reward, uint256 _amount) external;
}

//Handles Dino's "community" vaults
contract DinoChefStrategyCommunity is BaseStrategyMasterChef {

    uint256 public constant keepMax = 10000;

    //Tokens
    address public tokenA;
    address public tokenB;
    address WMATIC = 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270;
    address USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174;
    address DINO = 0xAa9654BECca45B5BDFA5ac646c939C62b527D394;

    address public QUICKSWAP_ROUTER = 0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff;
    address public SUSHI_ROUTER = 0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506;

    address ERC_FUND = 0x01fE07ce760DA7a025e4Cf3f950aE236F8e62120;
    address MASTER_CHEF = 0x1948abC5400Aa1d72223882958Da3bec643fb4E5;


    // Uniswap swap paths
    address[] public reward_a_path;
    address[] public a_b_path;
    address[] public reward_matic_path;

    constructor(
        address _want,
        address _tokenA,
        address _tokenB,
        uint256 _poolId,
        address _router
    )
        public
        BaseStrategyMasterChef(
            MASTER_CHEF,
            _want,
            ERC_FUND,
            _poolId,
            DINO,
            _router
        )
    {
        multiHarvest = 0x3355743Db830Ed30FF4089DB8b18DEeb683F8546;

        tokenA = _tokenA;
        tokenB = _tokenB;

        if(tokenA == USDC) {
            reward_a_path = new address[](2);
            reward_a_path[0] = DINO;
            reward_a_path[1] = USDC;
        }
        else {
            reward_a_path = new address[](3);
            reward_a_path[0] = DINO;
            reward_a_path[1] = USDC;
            reward_a_path[2] = _tokenA;
        }

        a_b_path = new address[](2);
        a_b_path[0] = _tokenA;
        a_b_path[1] = _tokenB;

        reward_matic_path = new address[](3);
        reward_matic_path[0] = DINO;
        reward_matic_path[1] = USDC;
        reward_matic_path[2] = WMATIC;

        IERC20(_want).safeApprove(MASTER_CHEF, uint256(-1));
    }

    function getHarvestable() external override view returns (uint256) {
        return 0; //the multicall contract doesn't call it anyway
    }

    function getFeeDistToken() public override view returns (address) {
        return WMATIC;
    }

    // **** State Mutations ****

    function swapRewardToWmaticAndDistributeFee(uint256 feeAmount) internal {
        if(feeAmount > 0) {
            _swapUniswapWithPath(reward_matic_path, feeAmount, SUSHI_ROUTER);
            uint256 _maticFee = IERC20(WMATIC).balanceOf(address(this));
            _notifyJar(_maticFee);
            IERC20(WMATIC).safeTransfer(strategist, _maticFee);
        }
    }

    function harvest() public override onlyHumanOrWhitelisted nonReentrant {
        //Transfer WMATIC that may already be in the contract to the fee dist fund
        uint256 matic_bal = IERC20(WMATIC).balanceOf(address(this));
        if(matic_bal > 0) {
            IERC20(WMATIC).safeTransfer(strategist, matic_bal);
        }

        //Calculate the amount of tokens harvested and distribute fee
        uint256 balance_before = IERC20(harvestedToken).balanceOf(address(this));
        _getReward();
        uint256 amountHarvested = IERC20(harvestedToken).balanceOf(address(this)).sub(balance_before);
        if (amountHarvested > 0) {
            uint256 feeAmount = amountHarvested.mul(IERCFund(strategist).getFee()).div(keepMax);
            swapRewardToWmaticAndDistributeFee(feeAmount);
        }

        //Swap remaining harvested tokens for tokenA if the harvested token isn't tokenA
        if(harvestedToken != tokenA) {
            uint256 remainingHarvested = IERC20(harvestedToken).balanceOf(address(this));
            if (remainingHarvested > 0) {
                _swapUniswapWithPath(reward_a_path, remainingHarvested, SUSHI_ROUTER);
            }
        }

        //Swap 1/2 of tokenA for tokenB
        uint256 _balanceA = IERC20(tokenA).balanceOf(address(this));
        if (_balanceA > 0) {
            _swapUniswapWithPath(a_b_path, _balanceA.div(2));
        }

        //Add liquidity
        uint256 aBalance = IERC20(tokenA).balanceOf(address(this));
        uint256 bBalance = IERC20(tokenB).balanceOf(address(this));
        if (aBalance > 0 && bBalance > 0) {
            IERC20(tokenA).safeApprove(currentRouter, 0);
            IERC20(tokenA).safeApprove(currentRouter, aBalance);
            IERC20(tokenB).safeApprove(currentRouter, 0);
            IERC20(tokenB).safeApprove(currentRouter, bBalance);

            IUniswapRouterV2(currentRouter).addLiquidity(
                tokenA, tokenB,
                aBalance, bBalance,
                0, 0,
                address(this),
                now + 60
            );
        }

        // Stake the LP tokens
        _distributePerformanceFeesAndDeposit();
    }

    function deposit() public override {
        uint256 _want = IERC20(want).balanceOf(address(this));
        if (_want > 0) {
            IMasterChef(rewards).deposit(poolId, _want);
        }
    }

    function _notifyJar(uint256 _amount) internal {
        IGenericVault(jar).notifyReward(getFeeDistToken(), _amount);
    }
}

interface IBoostHandler {

  //Returns ADDY earning boost based on user's veADDY, boost should be divided by 1e18
  function getBoost(address _user, address _vaultAddress) external view returns (uint256);

  //Returns ADDY earning boost based on user's veADDY if the user was to stake in vaultAddress, boost is divided by 1e18
  function getBoostForValueStaked(address _user, address _vaultAddress, uint256 valueStaked) external view returns (uint256);

  //Returns the value in USD for which a user's ADDY earnings are doubled
  function getDoubleLimit(address _user) external view returns (uint256 doubleLimit);

  //Returns the total VeAddy from all sources
  function getTotalVeAddy(address _user) external view returns (uint256);

  //Returns the total VeAddy from locking ADDY in the locked ADDY staking contract
  function getVeAddyFromLockedStaking(address _user) external view returns (uint256);

  function setFeeDist(address _feeDist) external;
}
interface IMinter {
    function isMinter(address) view external returns(bool);
    function amountAddyToMint(uint256 ethProfit) view external returns(uint256);
    function mintFor(address user, address asset, uint256 amount) external;

    function addyPerProfitEth() view external returns(uint256);

    function setMinter(address minter, bool canMint) external;
}// Based on https://github.com/iearn-finance/vaults/blob/master/contracts/vaults/yVault.sol


abstract contract VaultBase is IVault, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Address for address;
    using SafeMath for uint256;

    // Info of each user
    struct UserInfo {
        uint256 shares; // User shares
        uint256 rewardDebt; // Reward debt (in terms of WMATIC)
        uint256 lastDepositTime;
        uint256 tokensStaked; // Number of tokens staked, only used to calculate profit on the frontend (different than shares)
    }

    uint256 public constant keepMax = 10000;

    /* ========== STATE VARIABLES ========== */

    // Info of each user
    mapping (address => UserInfo) public userInfo;

    // The total amount of pending rewards available for stakers to claim
    uint256 public override totalPendingReward;
    // Accumulated rewards per share, times 1e12.
    uint256 public accRewardPerShare;
    // The total # of shares issued
    uint256 public override totalShares;
    // Withdrawing before this much time has passed will have a withdrawal penalty
    uint256 public override withdrawPenaltyTime = 3 days;
    // Withdrawal penalty, 100 = 1%
    uint256 public override withdrawPenalty = 50;
    // For vaults that are farming pools with a deposit fee
    uint256 public depositFee = 0;
    //Allowed amount of the token sent to the fee dist each vault can mint ADDY rewards for, default 1000 (1000 WMATIC = roughly 0.65 ETH = 312 ADDY)
    uint256 public override rewardAllocation = 1e18 * 1000;

    // Certain vaults will give up to 10x ADDY rewards
    // Additional usecase for ADDY: lock it to boost the yield of a certain vault
    uint256 private rewardMultiplier = 1000;
    uint256 private constant MULTIPLIER_BASE = 1000;
    uint256 private constant MULTIPLIER_MAX = 10000;
    uint256 private constant BOOST_BASE = 10 ** 18;

    IERC20 public override token;
    address public override strategy;
    IMinter internal minter;
    address public ercFund;
    address public boostHandler;

    constructor(IStrategy _strategy, address _minter, address _ercFund)
        public
    {
        require(address(_strategy) != address(0));
        token = IERC20(_strategy.want());
        strategy = address(_strategy);
        minter = IMinter(_minter);
        ercFund = _ercFund;
    }

    /* ========== VIEW FUNCTIONS ========== */

    // 1000 = 1x multiplier
    function getRewardMultiplier() public override view returns (uint256) {
        return rewardMultiplier;
    }

    function applyRewardMultiplier(uint256 _amount) internal view returns (uint256) {
        return _amount.mul(rewardMultiplier).div(MULTIPLIER_BASE);
    }

    function getBoost(address _user) public override view returns (uint256) {
        if (boostHandler != address(0)) {
            return IBoostHandler(boostHandler).getBoost(_user, address(this));
        }
        return 0;
    }

    //Returns base amount + amount from boost
    function applyBoost(address _user, uint256 _amount) internal view returns (uint256) {
        if (boostHandler != address(0)) {
            return _amount.add(_amount.mul(getBoost(_user)).div(BOOST_BASE));
        }
        return _amount;
    }

    function getRatio() public override view returns (uint256) {
        return balance().mul(1e18).div(totalShares);
    }

    function balance() public override view returns (uint256) {
        return
            token.balanceOf(address(this)).add(
                IStrategy(strategy).balanceOf()
            );
    }

    function balanceOf(address _user) public override view returns (uint256) {
        return userInfo[_user].shares;
    }

    function getPendingReward(address _user) public override view returns (uint256) {
        return userInfo[_user].shares.mul(accRewardPerShare).div(1e12).sub(userInfo[_user].rewardDebt);
    }

    function getLastDepositTime(address _user) public override view returns (uint256) {
        return userInfo[_user].lastDepositTime;
    }

    function getTokensStaked(address _user) public override view returns (uint256) {
        return userInfo[_user].tokensStaked;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function depositAll() external override {
        deposit(token.balanceOf(msg.sender));
    }

    function deposit(uint256 _amount) public override nonReentrant {
        require(msg.sender == tx.origin, "no contracts");
        _claimReward(msg.sender);

        uint256 _pool = balance();
        uint256 _before = token.balanceOf(address(this));
        token.safeTransferFrom(msg.sender, address(this), _amount);
        uint256 _after = token.balanceOf(address(this));
        _amount = _after.sub(_before); // Additional check for deflationary tokens
        uint256 shares = 0;
        if (totalShares == 0) {
            shares = _amount;
        } else {
            shares = (_amount.mul(totalShares)).div(_pool);
        }

        //when farming pools with a deposit fee
        if(depositFee > 0) {
            uint256 fee = shares.mul(depositFee).div(keepMax);
            shares = shares.sub(fee);
        }

        totalShares = totalShares.add(shares);

        UserInfo storage user = userInfo[msg.sender];
        user.shares = user.shares.add(shares);
        user.rewardDebt = user.shares.mul(accRewardPerShare).div(1e12);
        user.lastDepositTime = now;
        user.tokensStaked = user.tokensStaked.add(_amount);

        earn(); 
        emit Deposited(msg.sender, _amount);
    }
 
    function earn() internal {
        uint256 _bal = token.balanceOf(address(this));
        token.safeTransfer(strategy, _bal);
        IStrategy(strategy).deposit();
    }

    // Withdraw all tokens and claim rewards.
    function withdrawAll() external override nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        uint256 _shares = user.shares;
        uint256 r = (balance().mul(_shares)).div(totalShares);

        _claimReward(msg.sender);

        // Check balance
        uint256 b = token.balanceOf(address(this));
        if (b < r) {
            uint256 _withdraw = r.sub(b);
            IStrategy(strategy).withdraw(_withdraw);
            uint256 _after = token.balanceOf(address(this));
            uint256 _diff = _after.sub(b);
            if (_diff < _withdraw) {
                r = b.add(_diff);
            }
        }

        totalShares = totalShares.sub(_shares);

        user.shares = user.shares.sub(_shares);
        user.rewardDebt = user.shares.mul(accRewardPerShare).div(1e12);
        user.tokensStaked = 0;
        // Deduct early withdrawal fee if applicable
        if(user.lastDepositTime.add(withdrawPenaltyTime) >= now) {
            uint256 earlyWithdrawalFee = r.mul(withdrawPenalty).div(keepMax);
            r = r.sub(earlyWithdrawalFee);
            token.safeTransfer(ercFund, earlyWithdrawalFee);
        }

        token.safeTransfer(msg.sender, r);
        emit Withdrawn(msg.sender, r);
    }

    // Withdraw all tokens without caring about rewards in the event that the reward mechanism breaks. 
    // Normal early withdrawal penalties will apply.
    function emergencyWithdraw() public nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        uint256 _shares = user.shares;
        uint256 r = (balance().mul(_shares)).div(totalShares);

        // Check balance
        uint256 b = token.balanceOf(address(this));
        if (b < r) {
            uint256 _withdraw = r.sub(b);
            IStrategy(strategy).withdraw(_withdraw);
            uint256 _after = token.balanceOf(address(this));
            uint256 _diff = _after.sub(b);
            if (_diff < _withdraw) {
                r = b.add(_diff);
            }
        }

        if(_shares <= totalShares) {
            totalShares = totalShares.sub(_shares);
        }
        else {
            totalShares = 0;
        }
        user.shares = 0;
        user.rewardDebt = 0;
        user.tokensStaked = 0;
        // Deduct early withdrawal fee if applicable
        if(user.lastDepositTime.add(withdrawPenaltyTime) >= now) {
            uint256 earlyWithdrawalFee = r.mul(withdrawPenalty).div(keepMax);
            r = r.sub(earlyWithdrawalFee);
            token.safeTransfer(ercFund, earlyWithdrawalFee);
        }

        token.safeTransfer(msg.sender, r);
        emit Withdrawn(msg.sender, r);
    }
    
    function claim() public nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        require(user.shares > 0, "no stake");

        _claimReward(msg.sender);

        user.rewardDebt = user.shares.mul(accRewardPerShare).div(1e12);
    }

    /* ========== INTERNAL FUNCTIONS ========== */

    // Handles claiming the user's pending rewards
    function _claimReward(address _user) internal virtual;

    /* ========== RESTRICTED FUNCTIONS ========== */

    //Vault deployer also needs to register the vault with the new minter
    function setMinter(address newMinter) public onlyOwner {
        require(newMinter != address(0));
        minter = IMinter(newMinter);
    }
    
    //Sets a new boost handler
    //Set boost handler to the zero address in order to disable it
    function setBoostHandler(address _handler) public onlyOwner {
        boostHandler = _handler;
    }

    function setWithdrawPenaltyTime(uint256 _withdrawPenaltyTime) public override onlyOwner {
        require(_withdrawPenaltyTime <= 30 days, "delay too high");
        withdrawPenaltyTime = _withdrawPenaltyTime;
    }

    function setWithdrawPenalty(uint256 _withdrawPenalty) public override onlyOwner {
        require(_withdrawPenalty <= 50, "penalty too high");
        withdrawPenalty = _withdrawPenalty;
    }

    function setRewardMultiplier(uint256 _rewardMultiplier) public override onlyOwner {
        require(_rewardMultiplier <= MULTIPLIER_MAX, "multiplier too high");
        rewardMultiplier = _rewardMultiplier;
    }

    //shouldn't be farming things with a high deposit fee in the first place
    function setPoolDepositFee(uint256 _depositFee) public onlyOwner {
        require(_depositFee <= 1000, "?");
        depositFee = _depositFee;
    }

    //Increase the amount of the token sent to the fee dist the vault is allowed to mint ADDY for
    function increaseRewardAllocation(uint256 _newReward) public override onlyOwner {
        rewardAllocation = rewardAllocation.add(_newReward);
        emit RewardAllocated(_newReward, rewardAllocation);
    }

    /* ========== EVENTS ========== */

    event Deposited(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardAdded(address reward, uint256 amount);
    event Claimed(address indexed user, uint256 amount);
    event RewardAllocated(uint256 newReward, uint256 totalAllocation);
}


contract GenericVault is VaultBase {

    constructor(IStrategy _strategy, address _minter, address _ercFund) 
        public
        VaultBase(_strategy, _minter, _ercFund)
    {
        
    }

    // Handles claiming the user's pending rewards
    function _claimReward(address _user) internal override {
        UserInfo storage user = userInfo[_user];
        if (user.shares > 0) {
            uint256 pendingReward = user.shares.mul(accRewardPerShare).div(1e12).sub(user.rewardDebt);
            if (pendingReward > 0) {
                totalPendingReward = totalPendingReward.sub(pendingReward);
                //Hard cap of 3x rewards after all multipliers
                uint256 rewardCap = pendingReward.mul(3);

                //Apply reward multiplier to the pendingReward that the minter will mint for
                pendingReward = applyRewardMultiplier(pendingReward);

                //Apply boost from locked ADDY 
                pendingReward = applyBoost(_user, pendingReward);

                //If pending reward > the 3x hard cap, then set the pending reward to the 3x hard cap
                if(pendingReward > rewardCap) {
                    pendingReward = rewardCap;
                }
                
                //Make sure the amount of the fee dist token the vault is allowed to mint for is above the amount we're trying to mint for
                //Require statement is there for end users
                require(rewardAllocation >= pendingReward, "Not enough rewards allocated");
                rewardAllocation = rewardAllocation.sub(pendingReward);

                //Minter will mint to MultiFeeDistribution and then stake the minted tokens for the user
                minter.mintFor(_user, IStrategy(strategy).getFeeDistToken(), pendingReward);
                emit Claimed(_user, pendingReward);
            }
        }
    }

    //Strategy calls notifyReward to let the vault know that it earned a certain amount of profit (the performance fee) for gov token stakers
    function notifyReward(address _reward, uint256 _amount) public {
        require(msg.sender == strategy);
        if(_amount == 0) {
            return;
        }

        totalPendingReward = totalPendingReward.add(_amount);
        accRewardPerShare = accRewardPerShare.add(_amount.mul(1e12).div(totalShares)); //shouldn't be adding reward if totalShares == 0 anyway

        emit RewardAdded(_reward, _amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"},{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"jar","type":"address"}],"name":"SetJar","type":"event"},{"inputs":[],"name":"QUICKSWAP_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSHI_ROUTER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"a_b_path","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfWant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getFeeDistToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHarvestable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"jar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keepMax","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvestTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiHarvest","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reward_a_path","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reward_matic_path","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"salvage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_jar","type":"address"}],"name":"setJar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setMultiHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawForSwap","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040526000600255600980546001600160a01b031990811673a5e0829caced8ffdd4de3c43696c57f7d7a678ff908117909255600d80548216730d500b1d8e8ef31e21c99d1db9a6444d3adf1270179055600e80548216732791bca1f2de4661ed88a30c99a7a9449aa84174179055600f8054821673aa9654becca45b5bdfa5ac646c939c62b527d394179055601080548216909217909155601180548216731b02da8cb0d097eb8d57a175b88c7d8b479975061790556012805482167301fe07ce760da7a025e4cf3f950ae236f8e6212017905560138054909116731948abc5400aa1d72223882958da3bec643fb4e51790553480156200010257600080fd5b5060405162002f9638038062002f968339810160408190526200012591620009b1565b601354601254600f546001600160a01b0392831692889281169186911685848483838960006200015462000640565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556001600160a01b038516620001b657600080fd5b6001600160a01b038416620001ca57600080fd5b6001600160a01b038316620001de57600080fd5b6001600160a01b038216620001f257600080fd5b6001600160a01b0381166200020657600080fd5b600380546001600160a01b03199081166001600160a01b03978816179091556006805482169587169590951790945560048054851693861693909317909255600980548416918516919091179055600580548316918416919091179055600a9490945560078054733355743db830ed30ff4089db8b18deeb683f8546908616179055600b805485168c83161790819055600c80549095168b831617909455600e5481169316929092141594506200037d935050505057604080516002808252606082018352909160208301908036833750508151620002ed92601492506020019062000926565b50600f54601480546001600160a01b03909216916000906200030b57fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600e546014805491909216919060019081106200034957fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555062000478565b60408051600380825260808201909252906020820160608036833750508151620003af92601492506020019062000926565b50600f54601480546001600160a01b0390921691600090620003cd57fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600e546014805491909216919060019081106200040b57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508360146002815481106200044957fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b604080516002808252606082018352909160208301908036833750508151620004a992601592506020019062000926565b50836015600081548110620004ba57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550826015600181548110620004f857fe5b60009182526020918290200180546001600160a01b0319166001600160a01b03939093169290921790915560408051600380825260808201909252918201606080368337505081516200055392601692506020019062000926565b50600f54601680546001600160a01b03909216916000906200057157fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600e54601680549190921691906001908110620005af57fe5b600091825260209091200180546001600160a01b0319166001600160a01b03928316179055600d54601680549190921691906002908110620005ed57fe5b60009182526020918290200180546001600160a01b0319166001600160a01b039384161790556013546200063592888116929116906000199062000644811b620014f017901c565b505050505062000c55565b3390565b801580620006d35750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906200067d903090869060040162000a7d565b60206040518083038186803b1580156200069657600080fd5b505afa158015620006ab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006d1919062000a46565b155b620006fb5760405162461bcd60e51b8152600401620006f29062000bac565b60405180910390fd5b620007568363095ea7b360e01b84846040516024016200071d92919062000a97565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b03938416179052906200075b16565b505050565b6060620007b7826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620007f760201b620015ef179092919060201c565b805190915015620007565780806020019051810190620007d8919062000a24565b620007565760405162461bcd60e51b8152600401620006f29062000b62565b606062000808848460008562000812565b90505b9392505050565b606082471015620008375760405162461bcd60e51b8152600401620006f29062000ae5565b6200084285620008e2565b620008615760405162461bcd60e51b8152600401620006f29062000b2b565b60006060866001600160a01b0316858760405162000880919062000a5f565b60006040518083038185875af1925050503d8060008114620008bf576040519150601f19603f3d011682016040523d82523d6000602084013e620008c4565b606091505b509092509050620008d7828286620008e8565b979650505050505050565b3b151590565b60608315620008f95750816200080b565b8251156200090a5782518084602001fd5b8160405162461bcd60e51b8152600401620006f2919062000ab0565b8280548282559060005260206000209081019282156200097e579160200282015b828111156200097e57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000947565b506200098c92915062000990565b5090565b5b808211156200098c5780546001600160a01b031916815560010162000991565b600080600080600060a08688031215620009c9578081fd5b8551620009d68162000c3c565b6020870151909550620009e98162000c3c565b6040870151909450620009fc8162000c3c565b60608701516080880151919450925062000a168162000c3c565b809150509295509295909350565b60006020828403121562000a36578081fd5b815180151581146200080b578182fd5b60006020828403121562000a58578081fd5b5051919050565b6000825162000a7381846020870162000c09565b9190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b600060208252825180602084015262000ad181604085016020870162000c09565b601f01601f19169190910160400192915050565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60005b8381101562000c2657818101518382015260200162000c0c565b8381111562000c36576000848401525b50505050565b6001600160a01b038116811462000c5257600080fd5b50565b6123318062000c656000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063715018a61161011a578063c6223e26116100ad578063db2e21bc1161007c578063db2e21bc1461033c578063ed533d2c14610344578063f2fde38b14610357578063f6f482aa1461036a578063feffbe831461037d576101fb565b8063c6223e2614610311578063ceb0f62614610324578063d09191161461032c578063d0e30db014610334576101fb565b80639d27ab70116100e95780639d27ab70146102e65780639ec5a894146102f9578063be38a4fe14610301578063c1a3d44c14610309576101fb565b8063715018a6146102bb578063722713f7146102c3578063863a03e0146102cb5780638da5cb5b146102de576101fb565b80631f1fcd51116101925780633fc8cef3116101615780633fc8cef31461029b5780634641257d146102a3578063506508f1146102ab5780635f64b55b146102b3576101fb565b80631f1fcd511461026e5780631fe4a686146102765780632e1a7d4d1461027e5780633e0dc34e14610293576101fb565b806311588086116101ce5780631158808614610243578063122fea3b1461024b57806315f1a102146102535780631836edca14610266576101fb565b80630547104d146102005780630975d8d81461021e5780630c24f4fa146102265780630fc63d101461023b575b600080fd5b610208610390565b60405161021591906121ea565b60405180910390f35b610208610395565b61022e61039b565b6040516102159190611ddb565b61022e6103aa565b6102086103b9565b61022e610447565b61022e610261366004611d3f565b610456565b61022e61047d565b61022e61048c565b61022e61049b565b61029161028c366004611d3f565b6104aa565b005b6102086105aa565b61022e6105b0565b6102916105c8565b61022e610d19565b61022e610d28565b610291610d37565b610208610dc0565b6102916102d9366004611c63565b610de0565b61022e610f02565b6102916102f4366004611c63565b610f11565b61022e610f85565b61022e610f94565b610208610fa3565b61020861031f366004611d3f565b611024565b610208611100565b61022e611106565b610291611115565b610291611207565b61022e610352366004611d3f565b611351565b610291610365366004611c63565b61135e565b610291610378366004611c63565b61141e565b61022e61038b366004611d3f565b6114e3565b600090565b61271081565b6011546001600160a01b031681565b600b546001600160a01b031681565b600554600a546040516393f1a40b60e01b815260009283926001600160a01b03909116916393f1a40b916103f19130906004016121f3565b604080518083038186803b15801561040857600080fd5b505afa15801561041c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104409190611d6f565b5091505090565b6009546001600160a01b031681565b6014818154811061046357fe5b6000918252602090912001546001600160a01b0316905081565b600d546001600160a01b031690565b6003546001600160a01b031681565b6006546001600160a01b031681565b6008546001600160a01b031633146104dd5760405162461bcd60e51b81526004016104d4906120be565b60405180910390fd5b6003546040516370a0823160e01b81526000916001600160a01b0316906370a082319061050e903090600401611ddb565b60206040518083038186803b15801561052657600080fd5b505afa15801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e9190611d57565b9050818110156105895761057a6105758383611608565b611635565b915061058682826116a2565b91505b6008546003546105a6916001600160a01b039182169116846116c7565b5050565b600a5481565b737ceb23fd6bc0add59e62ac25578270cff1b9f61981565b333214806105ee57506105d9610f02565b6001600160a01b0316336001600160a01b0316145b8061060357506007546001600160a01b031633145b61061f5760405162461bcd60e51b81526004016104d490612020565b600260015414156106425760405162461bcd60e51b81526004016104d49061215d565b6002600155600d546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610678903090600401611ddb565b60206040518083038186803b15801561069057600080fd5b505afa1580156106a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c89190611d57565b905080156106ed57600654600d546106ed916001600160a01b039182169116836116c7565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161071f91309101611ddb565b60206040518083038186803b15801561073757600080fd5b505afa15801561074b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076f9190611d57565b90506107796116e6565b600480546040516370a0823160e01b81526000926108079285926001600160a01b03909116916370a08231916107b191309101611ddb565b60206040518083038186803b1580156107c957600080fd5b505afa1580156107dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108019190611d57565b90611608565b905080156108ba5760006108ad6127106108a7600660009054906101000a90046001600160a01b03166001600160a01b031663ced72f876040518163ffffffff1660e01b815260040160206040518083038186803b15801561086857600080fd5b505afa15801561087c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a09190611d57565b859061174e565b90611788565b90506108b8816117ba565b505b600b546004546001600160a01b039081169116146109d157600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161090491309101611ddb565b60206040518083038186803b15801561091c57600080fd5b505afa158015610930573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109549190611d57565b905080156109cf576109cf60148054806020026020016040519081016040528092919081815260200182805480156109b557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610997575b50506011548693506001600160a01b031691506118da9050565b505b600b546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610a02903090600401611ddb565b60206040518083038186803b158015610a1a57600080fd5b505afa158015610a2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a529190611d57565b90508015610ad157610ad16015805480602002602001604051908101604052809291908181526020018280548015610ab357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a95575b5050505050610acc60028461178890919063ffffffff16565b6119e8565b600b546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610b02903090600401611ddb565b60206040518083038186803b158015610b1a57600080fd5b505afa158015610b2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b529190611d57565b600c546040516370a0823160e01b81529192506000916001600160a01b03909116906370a0823190610b88903090600401611ddb565b60206040518083038186803b158015610ba057600080fd5b505afa158015610bb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bd89190611d57565b9050600082118015610bea5750600081115b15610d0557600954600b54610c0d916001600160a01b03918216911660006114f0565b600954600b54610c2a916001600160a01b039182169116846114f0565b600954600c54610c48916001600160a01b03918216911660006114f0565b600954600c54610c65916001600160a01b039182169116836114f0565b600954600b54600c5460405162e8e33760e81b81526001600160a01b039384169363e8e3370093610caf93908216929116908790879060009081903090603c420190600401611e09565b606060405180830381600087803b158015610cc957600080fd5b505af1158015610cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d019190611d92565b5050505b610d0d611a01565b50506001805550505050565b6007546001600160a01b031681565b600c546001600160a01b031681565b610d3f611a99565b6001600160a01b0316610d50610f02565b6001600160a01b031614610d765760405162461bcd60e51b81526004016104d490612089565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610ddb610dcd6103b9565b610dd5610fa3565b906116a2565b905090565b610de8611a99565b6001600160a01b0316610df9610f02565b6001600160a01b031614610e1f5760405162461bcd60e51b81526004016104d490612089565b6003546001600160a01b03828116911614801590610e4b57506004546001600160a01b03828116911614155b610e675760405162461bcd60e51b81526004016104d490611f1b565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190610e96903090600401611ddb565b60206040518083038186803b158015610eae57600080fd5b505afa158015610ec2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee69190611d57565b905080156105a6576105a66001600160a01b03831633836116c7565b6000546001600160a01b031690565b610f19611a99565b6001600160a01b0316610f2a610f02565b6001600160a01b031614610f505760405162461bcd60e51b81526004016104d490612089565b6001600160a01b038116610f6357600080fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031681565b6008546001600160a01b031681565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610fd4903090600401611ddb565b60206040518083038186803b158015610fec57600080fd5b505afa158015611000573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddb9190611d57565b6008546000906001600160a01b031633146110515760405162461bcd60e51b81526004016104d4906120be565b61105a82611635565b506003546040516370a0823160e01b81526001600160a01b03909116906370a082319061108b903090600401611ddb565b60206040518083038186803b1580156110a357600080fd5b505afa1580156110b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110db9190611d57565b6008546003549192506110fb916001600160a01b039081169116836116c7565b919050565b60025481565b6010546001600160a01b031681565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611146903090600401611ddb565b60206040518083038186803b15801561115e57600080fd5b505afa158015611172573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111969190611d57565b9050801561120457600554600a54604051631c57762b60e31b81526001600160a01b039092169163e2bbb158916111d191859060040161220a565b600060405180830381600087803b1580156111eb57600080fd5b505af11580156111ff573d6000803e3d6000fd5b505050505b50565b61120f611a99565b6001600160a01b0316611220610f02565b6001600160a01b0316146112465760405162461bcd60e51b81526004016104d490612089565b600554600a54604051632989754760e11b81526001600160a01b0390921691635312ea8e91611277916004016121ea565b600060405180830381600087803b15801561129157600080fd5b505af11580156112a5573d6000803e3d6000fd5b50506003546040516370a0823160e01b8152600093506001600160a01b0390911691506370a08231906112dc903090600401611ddb565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c9190611d57565b9050801561120457600854600354611204916001600160a01b039182169116836116c7565b6016818154811061046357fe5b611366611a99565b6001600160a01b0316611377610f02565b6001600160a01b03161461139d5760405162461bcd60e51b81526004016104d490612089565b6001600160a01b0381166113c35760405162461bcd60e51b81526004016104d490611e9e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611426611a99565b6001600160a01b0316611437610f02565b6001600160a01b03161461145d5760405162461bcd60e51b81526004016104d490612089565b6008546001600160a01b0316156114865760405162461bcd60e51b81526004016104d490611f7a565b6001600160a01b03811661149957600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040517f55c9c1522358ac20ccd3c4887fe1886c26bd0f045ab7fd11acd78680bb77956990600090a250565b6015818154811061046357fe5b8015806115785750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906115269030908690600401611def565b60206040518083038186803b15801561153e57600080fd5b505afa158015611552573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115769190611d57565b155b6115945760405162461bcd60e51b81526004016104d490612194565b6115ea8363095ea7b360e01b84846040516024016115b3929190611e52565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a9d565b505050565b60606115fe8484600085611b2c565b90505b9392505050565b60008282111561162a5760405162461bcd60e51b81526004016104d490611f43565b508082035b92915050565b600554600a54604051630441a3e760e41b81526000926001600160a01b03169163441a3e709161166a9190869060040161220a565b600060405180830381600087803b15801561168457600080fd5b505af1158015611698573d6000803e3d6000fd5b5093949350505050565b6000828201838110156116015760405162461bcd60e51b81526004016104d490611ee4565b6115ea8363a9059cbb60e01b84846040516024016115b3929190611e52565b600554600a54604051630441a3e760e41b81526001600160a01b039092169163441a3e709161171a9160009060040161220a565b600060405180830381600087803b15801561173457600080fd5b505af1158015611748573d6000803e3d6000fd5b50505050565b60008261175d5750600061162f565b8282028284828161176a57fe5b04146116015760405162461bcd60e51b81526004016104d490612048565b60008082116117a95760405162461bcd60e51b81526004016104d490611fe9565b8183816117b257fe5b049392505050565b80156112045761183160168054806020026020016040519081016040528092919081815260200182805480156109b5576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116109975750506011548693506001600160a01b031691506118da9050565b600d546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611862903090600401611ddb565b60206040518083038186803b15801561187a57600080fd5b505afa15801561188e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b29190611d57565b90506118bd81611bed565b600654600d546105a6916001600160a01b039182169116836116c7565b60006001600160a01b0316836001815181106118f257fe5b60200260200101516001600160a01b0316141561190e57600080fd5b6119418160008560008151811061192157fe5b60200260200101516001600160a01b03166114f09092919063ffffffff16565b61195381838560008151811061192157fe5b6001600160a01b0381166338ed1739836000863061197242603c6116a2565b6040518663ffffffff1660e01b8152600401611992959493929190612218565b600060405180830381600087803b1580156119ac57600080fd5b505af11580156119c0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117489190810190611c8a565b6009546105a690839083906001600160a01b03166118da565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611a32903090600401611ddb565b60206040518083038186803b158015611a4a57600080fd5b505afa158015611a5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a829190611d57565b90508015611a9257611a92611115565b5042600255565b3390565b6060611af2826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115ef9092919063ffffffff16565b8051909150156115ea5780806020019051810190611b109190611d1f565b6115ea5760405162461bcd60e51b81526004016104d490612113565b606082471015611b4e5760405162461bcd60e51b81526004016104d490611fa3565b611b5785611c24565b611b735760405162461bcd60e51b81526004016104d4906120dc565b60006060866001600160a01b03168587604051611b909190611dbf565b60006040518083038185875af1925050503d8060008114611bcd576040519150601f19603f3d011682016040523d82523d6000602084013e611bd2565b606091505b5091509150611be2828286611c2a565b979650505050505050565b6008546001600160a01b031663e3247180611c0661047d565b836040518363ffffffff1660e01b81526004016111d1929190611e52565b3b151590565b60608315611c39575081611601565b825115611c495782518084602001fd5b8160405162461bcd60e51b81526004016104d49190611e6b565b600060208284031215611c74578081fd5b81356001600160a01b0381168114611601578182fd5b60006020808385031215611c9c578182fd5b825167ffffffffffffffff811115611cb2578283fd5b8301601f81018513611cc2578283fd5b8051611cd5611cd0826122af565b612288565b8181528381019083850185840285018601891015611cf1578687fd5b8694505b83851015611d13578051835260019490940193918501918501611cf5565b50979650505050505050565b600060208284031215611d30578081fd5b81518015158114611601578182fd5b600060208284031215611d50578081fd5b5035919050565b600060208284031215611d68578081fd5b5051919050565b60008060408385031215611d81578081fd5b505080516020909101519092909150565b600080600060608486031215611da6578081fd5b8351925060208401519150604084015190509250925092565b60008251611dd18184602087016122cf565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039889168152968816602088015260408701959095526060860193909352608085019190915260a084015290921660c082015260e08101919091526101000190565b6001600160a01b03929092168252602082015260400190565b6000602082528251806020840152611e8a8160408501602087016122cf565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252600e908201526d63616e6e6f742073616c7661676560901b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600f908201526e1a985c88185b1c9958591e481cd95d608a1b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600e908201526d1b9bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526004908201526310b530b960e11b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182526001600160a01b0316602082015260400190565b918252602082015260400190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156122675784516001600160a01b031683529383019391830191600101612242565b50506001600160a01b03969096166060850152505050608001529392505050565b60405181810167ffffffffffffffff811182821017156122a757600080fd5b604052919050565b600067ffffffffffffffff8211156122c5578081fd5b5060209081020190565b60005b838110156122ea5781810151838201526020016122d2565b83811115611748575050600091015256fea26469706673582212207596a854c9cfd80bbc1efe2b2d767a5b345f27cc64994544f102730ffdd711f864736f6c634300060c00330000000000000000000000006fa867bbfdd025780a8cfe988475220aff51fb8b0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619000000000000000000000000c168e40227e4ebd8c1cae80f7a55a4f0e6d66c970000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a102072a4c07f06ec3b4900fdc4c7b80b6c57429

Deployed ByteCode Sourcemap

56523:5227:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58526:142;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;56593:39;;;:::i;56990:72::-;;;:::i;:::-;;;;;;;:::i;56655:21::-;;;:::i;51776:253::-;;;:::i;44785:73::-;;;:::i;57241:30::-;;;;;;:::i;:::-;;:::i;58676:98::-;;;:::i;44152:28::-;;;:::i;44581:25::-;;;:::i;46671:378::-;;;;;;:::i;:::-;;:::i;:::-;;51378:21;;;:::i;44236:73::-;;;:::i;59200:2205::-;;;:::i;44658:27::-;;;:::i;56683:21::-;;;:::i;2672:148::-;;;:::i;45983:122::-;;;:::i;52994:302::-;;;;;;:::i;:::-;;:::i;2021:87::-;;;:::i;46361:146::-;;;;;;:::i;:::-;;:::i;44501:31::-;;;:::i;44721:18::-;;;:::i;45786:118::-;;;:::i;47200:307::-;;;;;;:::i;:::-;;:::i;44085:43::-;;;:::i;56907:76::-;;;:::i;61413:202::-;;;:::i;53304:266::-;;;:::i;57310:34::-;;;;;;:::i;:::-;;:::i;2975:244::-;;;;;;:::i;:::-;;:::i;46144:209::-;;;;;;:::i;:::-;;:::i;57278:25::-;;;;;;:::i;:::-;;:::i;58526:142::-;58584:7;58526:142;:::o;56593:39::-;56627:5;56593:39;:::o;56990:72::-;;;-1:-1:-1;;;;;56990:72:0;;:::o;56655:21::-;;;-1:-1:-1;;;;;56655:21:0;;:::o;51776:253::-;51884:7;;51902:6;;51872:52;;-1:-1:-1;;;51872:52:0;;51831:7;;;;-1:-1:-1;;;;;51884:7:0;;;;51872:29;;:52;;51918:4;;51872:52;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;51851:73:0;-1:-1:-1;;51776:253:0;:::o;44785:73::-;;;-1:-1:-1;;;;;44785:73:0;;:::o;57241:30::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57241:30:0;;-1:-1:-1;57241:30:0;:::o;58676:98::-;58760:6;;-1:-1:-1;;;;;58760:6:0;58676:98;:::o;44152:28::-;;;-1:-1:-1;;;;;44152:28:0;;:::o;44581:25::-;;;-1:-1:-1;;;;;44581:25:0;;:::o;46671:378::-;46757:3;;-1:-1:-1;;;;;46757:3:0;46743:10;:17;46735:34;;;;-1:-1:-1;;;46735:34:0;;;;;;;:::i;:::-;;;;;;;;;46806:4;;46799:37;;-1:-1:-1;;;46799:37:0;;46780:16;;-1:-1:-1;;;;;46806:4:0;;46799:22;;:37;;46830:4;;46799:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;46780:56;;46862:7;46851:8;:18;46847:143;;;46896:36;46910:21;:7;46922:8;46910:11;:21::i;:::-;46896:13;:36::i;:::-;46886:46;-1:-1:-1;46957:21:0;46886:46;46969:8;46957:11;:21::i;:::-;46947:31;;46847:143;47028:3;;47009:4;;47002:39;;-1:-1:-1;;;;;47009:4:0;;;;47028:3;47033:7;47002:25;:39::i;:::-;46671:378;;:::o;51378:21::-;;;;:::o;44236:73::-;44267:42;44236:73;:::o;59200:2205::-;45632:10;45646:9;45632:23;;:48;;;45673:7;:5;:7::i;:::-;-1:-1:-1;;;;;45659:21:0;:10;-1:-1:-1;;;;;45659:21:0;;45632:48;:78;;;-1:-1:-1;45698:12:0;;-1:-1:-1;;;;;45698:12:0;45684:10;:26;45632:78;45624:105;;;;-1:-1:-1;;;45624:105:0;;;;;;;:::i;:::-;37487:1:::1;38093:7;;:19;;38085:63;;;;-1:-1:-1::0;;;38085:63:0::1;;;;;;;:::i;:::-;37487:1;38226:7;:18:::0;59393:6:::2;::::0;59386:39:::2;::::0;-1:-1:-1;;;59386:39:0;;59366:17:::2;::::0;-1:-1:-1;;;;;59393:6:0::2;::::0;59386:24:::2;::::0;:39:::2;::::0;59419:4:::2;::::0;59386:39:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;59366:59:::0;-1:-1:-1;59439:13:0;;59436:95:::2;;59497:10;::::0;59476:6:::2;::::0;59469:50:::2;::::0;-1:-1:-1;;;;;59476:6:0;;::::2;::::0;59497:10:::2;59509:9:::0;59469:27:::2;:50::i;:::-;59646:14;::::0;;59639:47:::2;::::0;-1:-1:-1;;;59639:47:0;;59614:22:::2;::::0;-1:-1:-1;;;;;59646:14:0;;::::2;::::0;59639:32:::2;::::0;:47:::2;::::0;59680:4:::2;::::0;59639:47:::2;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;59614:72;;59697:12;:10;:12::i;:::-;59753:14;::::0;;59746:47:::2;::::0;-1:-1:-1;;;59746:47:0;;59720:23:::2;::::0;59746:67:::2;::::0;59798:14;;-1:-1:-1;;;;;59753:14:0;;::::2;::::0;59746:32:::2;::::0;:47:::2;::::0;59787:4:::2;::::0;59746:47:::2;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51:::0;::::2;:67::i;:::-;59720:93:::0;-1:-1:-1;59828:19:0;;59824:195:::2;;59864:17;59884:63;56627:5;59884:50;59913:10;;;;;;;;;-1:-1:-1::0;;;;;59913:10:0::2;-1:-1:-1::0;;;;;59904:27:0::2;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;59884:15:::0;;:19:::2;:50::i;:::-;:54:::0;::::2;:63::i;:::-;59864:83;;59962:45;59997:9;59962:34;:45::i;:::-;59824:195;;60142:6;::::0;60124:14:::2;::::0;-1:-1:-1;;;;;60124:14:0;;::::2;60142:6:::0;::::2;60124:24;60121:278;;60201:14;::::0;;60194:47:::2;::::0;-1:-1:-1;;;60194:47:0;;60165:26:::2;::::0;-1:-1:-1;;;;;60201:14:0;;::::2;::::0;60194:32:::2;::::0;:47:::2;::::0;60235:4:::2;::::0;60194:47:::2;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;60165:76:::0;-1:-1:-1;60260:22:0;;60256:132:::2;;60303:69;60324:13;60303:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;60303:69:0::2;::::0;;;;;::::2;::::0;::::2;;::::0;;::::2;;;;-1:-1:-1::0;;60359:12:0::2;::::0;60339:18;;-1:-1:-1;;;;;;60359:12:0::2;::::0;-1:-1:-1;60303:20:0::2;::::0;-1:-1:-1;60303:69:0:i:2;:::-;60121:278;;60479:6;::::0;60472:39:::2;::::0;-1:-1:-1;;;60472:39:0;;60452:17:::2;::::0;-1:-1:-1;;;;;60479:6:0::2;::::0;60472:24:::2;::::0;:39:::2;::::0;60505:4:::2;::::0;60472:39:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;60452:59:::0;-1:-1:-1;60526:13:0;;60522:94:::2;;60556:48;60577:8;60556:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;-1:-1:-1;;;;;60556:48:0::2;::::0;;;;;::::2;::::0;::::2;;::::0;;::::2;;;;;;;;;60587:16;60601:1;60587:9;:13;;:16;;;;:::i;:::-;60556:20;:48::i;:::-;60679:6;::::0;60672:39:::2;::::0;-1:-1:-1;;;60672:39:0;;60653:16:::2;::::0;-1:-1:-1;;;;;60679:6:0::2;::::0;60672:24:::2;::::0;:39:::2;::::0;60705:4:::2;::::0;60672:39:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;60748:6;::::0;60741:39:::2;::::0;-1:-1:-1;;;60741:39:0;;60653:58;;-1:-1:-1;60722:16:0::2;::::0;-1:-1:-1;;;;;60748:6:0;;::::2;::::0;60741:24:::2;::::0;:39:::2;::::0;60774:4:::2;::::0;60741:39:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;60722:58;;60806:1;60795:8;:12;:28;;;;;60822:1;60811:8;:12;60795:28;60791:524;;;60867:13;::::0;60847:6:::2;::::0;60840:44:::2;::::0;-1:-1:-1;;;;;60847:6:0;;::::2;::::0;60867:13:::2;;60840:26;:44::i;:::-;60926:13;::::0;60906:6:::2;::::0;60899:51:::2;::::0;-1:-1:-1;;;;;60906:6:0;;::::2;::::0;60926:13:::2;60941:8:::0;60899:26:::2;:51::i;:::-;60992:13;::::0;60972:6:::2;::::0;60965:44:::2;::::0;-1:-1:-1;;;;;60972:6:0;;::::2;::::0;60992:13:::2;;60965:26;:44::i;:::-;61051:13;::::0;61031:6:::2;::::0;61024:51:::2;::::0;-1:-1:-1;;;;;61031:6:0;;::::2;::::0;61051:13:::2;61066:8:::0;61024:26:::2;:51::i;:::-;61109:13;::::0;61155:6:::2;::::0;61163::::2;::::0;61092:211:::2;::::0;-1:-1:-1;;;61092:211:0;;-1:-1:-1;;;;;61109:13:0;;::::2;::::0;61092:44:::2;::::0;:211:::2;::::0;61155:6;;::::2;::::0;61163;::::2;::::0;61188:8;;61198;;61109:13:::2;::::0;;;61256:4:::2;::::0;61286:2:::2;61280:3;:8;::::0;61092:211:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;60791:524;61359:38;:36;:38::i;:::-;-1:-1:-1::0;;37443:1:0::1;38405:22:::0;;-1:-1:-1;;;;59200:2205:0:o;44658:27::-;;;-1:-1:-1;;;;;44658:27:0;;:::o;56683:21::-;;;-1:-1:-1;;;;;56683:21:0;;:::o;2672:148::-;2252:12;:10;:12::i;:::-;-1:-1:-1;;;;;2241:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2241:23:0;;2233:68;;;;-1:-1:-1;;;2233:68:0;;;;;;;:::i;:::-;2779:1:::1;2763:6:::0;;2742:40:::1;::::0;-1:-1:-1;;;;;2763:6:0;;::::1;::::0;2742:40:::1;::::0;2779:1;;2742:40:::1;2810:1;2793:19:::0;;-1:-1:-1;;;;;;2793:19:0::1;::::0;;2672:148::o;45983:122::-;46034:7;46061:36;46081:15;:13;:15::i;:::-;46061;:13;:15::i;:::-;:19;;:36::i;:::-;46054:43;;45983:122;:::o;52994:302::-;2252:12;:10;:12::i;:::-;-1:-1:-1;;;;;2241:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2241:23:0;;2233:68;;;;-1:-1:-1;;;2233:68:0;;;;;;;:::i;:::-;53071:4:::1;::::0;-1:-1:-1;;;;;53062:13:0;;::::1;53071:4:::0;::::1;53062:13;::::0;::::1;::::0;:40:::1;;-1:-1:-1::0;53088:14:0::1;::::0;-1:-1:-1;;;;;53079:23:0;;::::1;53088:14:::0;::::1;53079:23;;53062:40;53054:67;;;;-1:-1:-1::0;;;53054:67:0::1;;;;;;;:::i;:::-;53151:38;::::0;-1:-1:-1;;;53151:38:0;;53134:14:::1;::::0;-1:-1:-1;;;;;53151:23:0;::::1;::::0;::::1;::::0;:38:::1;::::0;53183:4:::1;::::0;53151:38:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;53134:55:::0;-1:-1:-1;53204:10:0;;53200:89:::1;;53231:46;-1:-1:-1::0;;;;;53231:26:0;::::1;53258:10;53270:6:::0;53231:26:::1;:46::i;2021:87::-:0;2067:7;2094:6;-1:-1:-1;;;;;2094:6:0;2021:87;:::o;46361:146::-;2252:12;:10;:12::i;:::-;-1:-1:-1;;;;;2241:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2241:23:0;;2233:68;;;;-1:-1:-1;;;2233:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;46442:22:0;::::1;46434:31;;;::::0;::::1;;46476:12;:23:::0;;-1:-1:-1;;;;;;46476:23:0::1;-1:-1:-1::0;;;;;46476:23:0;;;::::1;::::0;;;::::1;::::0;;46361:146::o;44501:31::-;;;-1:-1:-1;;;;;44501:31:0;;:::o;44721:18::-;;;-1:-1:-1;;;;;44721:18:0;;:::o;45786:118::-;45866:4;;45859:37;;-1:-1:-1;;;45859:37:0;;45832:7;;-1:-1:-1;;;;;45866:4:0;;45859:22;;:37;;45890:4;;45859:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;47200:307::-;47342:3;;47287:15;;-1:-1:-1;;;;;47342:3:0;47328:10;:17;47320:34;;;;-1:-1:-1;;;47320:34:0;;;;;;;:::i;:::-;47365:22;47379:7;47365:13;:22::i;:::-;-1:-1:-1;47417:4:0;;47410:37;;-1:-1:-1;;;47410:37:0;;-1:-1:-1;;;;;47417:4:0;;;;47410:22;;:37;;47441:4;;47410:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;47486:3;;47467:4;;47400:47;;-1:-1:-1;47460:39:0;;-1:-1:-1;;;;;47467:4:0;;;;47486:3;47400:47;47460:25;:39::i;:::-;47200:307;;;:::o;44085:43::-;;;;:::o;56907:76::-;;;-1:-1:-1;;;;;56907:76:0;;:::o;61413:202::-;61482:4;;61475:37;;-1:-1:-1;;;61475:37:0;;61459:13;;-1:-1:-1;;;;;61482:4:0;;61475:22;;:37;;61506:4;;61475:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;61459:53;-1:-1:-1;61527:9:0;;61523:85;;61565:7;;61582:6;;61553:43;;-1:-1:-1;;;61553:43:0;;-1:-1:-1;;;;;61565:7:0;;;;61553:28;;:43;;61590:5;;61553:43;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61523:85;61413:202;:::o;53304:266::-;2252:12;:10;:12::i;:::-;-1:-1:-1;;;;;2241:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2241:23:0;;2233:68;;;;-1:-1:-1;;;2233:68:0;;;;;;;:::i;:::-;53373:7:::1;::::0;53400:6:::1;::::0;53361:46:::1;::::0;-1:-1:-1;;;53361:46:0;;-1:-1:-1;;;;;53373:7:0;;::::1;::::0;53361:38:::1;::::0;:46:::1;::::0;::::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;53443:4:0::1;::::0;53436:37:::1;::::0;-1:-1:-1;;;53436:37:0;;53420:13:::1;::::0;-1:-1:-1;;;;;;53443:4:0;;::::1;::::0;-1:-1:-1;53436:22:0::1;::::0;:37:::1;::::0;53467:4:::1;::::0;53436:37:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;53420:53:::0;-1:-1:-1;53488:9:0;;53484:79:::1;;53540:3;::::0;53521:4:::1;::::0;53514:37:::1;::::0;-1:-1:-1;;;;;53521:4:0;;::::1;::::0;53540:3:::1;53545:5:::0;53514:25:::1;:37::i;57310:34::-:0;;;;;;;;;;2975:244;2252:12;:10;:12::i;:::-;-1:-1:-1;;;;;2241:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2241:23:0;;2233:68;;;;-1:-1:-1;;;2233:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;3064:22:0;::::1;3056:73;;;;-1:-1:-1::0;;;3056:73:0::1;;;;;;;:::i;:::-;3166:6;::::0;;3145:38:::1;::::0;-1:-1:-1;;;;;3145:38:0;;::::1;::::0;3166:6;::::1;::::0;3145:38:::1;::::0;::::1;3194:6;:17:::0;;-1:-1:-1;;;;;;3194:17:0::1;-1:-1:-1::0;;;;;3194:17:0;;;::::1;::::0;;;::::1;::::0;;2975:244::o;46144:209::-;2252:12;:10;:12::i;:::-;-1:-1:-1;;;;;2241:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2241:23:0;;2233:68;;;;-1:-1:-1;;;2233:68:0;;;;;;;:::i;:::-;46221:3:::1;::::0;-1:-1:-1;;;;;46221:3:0::1;:17:::0;46213:45:::1;;;;-1:-1:-1::0;;;46213:45:0::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;46277:18:0;::::1;46269:27;;;::::0;::::1;;46307:3;:10:::0;;-1:-1:-1;;;;;;46307:10:0::1;-1:-1:-1::0;;;;;46307:10:0;::::1;::::0;;::::1;::::0;;;46333:12:::1;::::0;::::1;::::0;-1:-1:-1;;46333:12:0::1;46144:209:::0;:::o;57278:25::-;;;;;;;;;;33420:622;33790:10;;;33789:62;;-1:-1:-1;33806:39:0;;-1:-1:-1;;;33806:39:0;;-1:-1:-1;;;;;33806:15:0;;;;;:39;;33830:4;;33837:7;;33806:39;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;33789:62;33781:152;;;;-1:-1:-1;;;33781:152:0;;;;;;;:::i;:::-;33944:90;33964:5;33994:22;;;34018:7;34027:5;33971:62;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;33971:62:0;;;;;;;;;;;;;;-1:-1:-1;;;;;33971:62:0;-1:-1:-1;;;;;;33971:62:0;;;;;;;;;;33944:19;:90::i;:::-;33420:622;;;:::o;27857:195::-;27960:12;27992:52;28014:6;28022:4;28028:1;28031:12;27992:21;:52::i;:::-;27985:59;;27857:195;;;;;;:::o;9109:158::-;9167:7;9200:1;9195;:6;;9187:49;;;;-1:-1:-1;;;9187:49:0;;;;;;;:::i;:::-;-1:-1:-1;9254:5:0;;;9109:158;;;;;:::o;52489:198::-;52620:7;;52638:6;;52608:46;;-1:-1:-1;;;52608:46:0;;52583:7;;-1:-1:-1;;;;;52620:7:0;;52608:29;;:46;;52638:6;52646:7;;52608:46;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;52672:7:0;;52489:198;-1:-1:-1;;;;52489:198:0:o;8647:179::-;8705:7;8737:5;;;8761:6;;;;8753:46;;;;-1:-1:-1;;;8753:46:0;;;;;;;:::i;32761:177::-;32844:86;32864:5;32894:23;;;32919:2;32923:5;32871:58;;;;;;;;;:::i;52747:203::-;52801:7;;52819:6;;52789:40;;-1:-1:-1;;;52789:40:0;;-1:-1:-1;;;;;52801:7:0;;;;52789:29;;:40;;52801:7;;52789:40;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;52747:203::o;9526:220::-;9584:7;9608:6;9604:20;;-1:-1:-1;9623:1:0;9616:8;;9604:20;9647:5;;;9651:1;9647;:5;:1;9671:5;;;;;:10;9663:56;;;;-1:-1:-1;;;9663:56:0;;;;;;;:::i;10224:153::-;10282:7;10314:1;10310;:5;10302:44;;;;-1:-1:-1;;;10302:44:0;;;;;;;:::i;:::-;10368:1;10364;:5;;;;;;;10224:153;-1:-1:-1;;;10224:153:0:o;58818:374::-;58904:13;;58901:284;;58934:64;58955:17;58934:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;58934:64:0;;;;;;;;;;;;;;;-1:-1:-1;;58985:12:0;;58974:9;;-1:-1:-1;;;;;;58985:12:0;;-1:-1:-1;58934:20:0;;-1:-1:-1;58934:64:0:i;:::-;59040:6;;59033:39;;-1:-1:-1;;;59033:39:0;;59013:17;;-1:-1:-1;;;;;59040:6:0;;59033:24;;:39;;59066:4;;59033:39;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;59013:59;;59087:21;59098:9;59087:10;:21::i;:::-;59151:10;;59130:6;;59123:50;;-1:-1:-1;;;;;59130:6:0;;;;59151:10;59163:9;59123:27;:50::i;48478:502::-;48646:1;-1:-1:-1;;;;;48627:21:0;:4;48632:1;48627:7;;;;;;;;;;;;;;-1:-1:-1;;;;;48627:21:0;;;48619:30;;;;;;48692:39;48720:7;48729:1;48699:4;48704:1;48699:7;;;;;;;;;;;;;;-1:-1:-1;;;;;48692:27:0;;;:39;;;;;:::i;:::-;48742:45;48770:7;48779;48749:4;48754:1;48749:7;;;;;;;48742:45;-1:-1:-1;;;;;48800:50:0;;;48865:7;48887:1;48903:4;48930;48950:11;:3;48958:2;48950:7;:11::i;:::-;48800:172;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;48800:172:0;;;;;;;;;;;;:::i;48988:173::-;49139:13;;49103:50;;49124:4;;49130:7;;-1:-1:-1;;;;;49139:13:0;49103:20;:50::i;49955:224::-;50046:4;;50039:37;;-1:-1:-1;;;50039:37:0;;50023:13;;-1:-1:-1;;;;;50046:4:0;;50039:22;;:37;;50070:4;;50039:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;50023:53;-1:-1:-1;50093:9:0;;50089:51;;50119:9;:7;:9::i;:::-;-1:-1:-1;50168:3:0;50150:15;:21;49955:224::o;648:106::-;736:10;648:106;:::o;35066:761::-;35490:23;35516:69;35544:4;35516:69;;;;;;;;;;;;;;;;;35524:5;-1:-1:-1;;;;;35516:27:0;;;:69;;;;;:::i;:::-;35600:17;;35490:95;;-1:-1:-1;35600:21:0;35596:224;;35742:10;35731:30;;;;;;;;;;;;:::i;:::-;35723:85;;;;-1:-1:-1;;;35723:85:0;;;;;;;:::i;28909:530::-;29036:12;29094:5;29069:21;:30;;29061:81;;;;-1:-1:-1;;;29061:81:0;;;;;;;:::i;:::-;29161:18;29172:6;29161:10;:18::i;:::-;29153:60;;;;-1:-1:-1;;;29153:60:0;;;;;;;:::i;:::-;29287:12;29301:23;29328:6;-1:-1:-1;;;;;29328:11:0;29348:5;29356:4;29328:33;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29286:75;;;;29379:52;29397:7;29406:10;29418:12;29379:17;:52::i;:::-;29372:59;28909:530;-1:-1:-1;;;;;;;28909:530:0:o;61623:124::-;61694:3;;-1:-1:-1;;;;;61694:3:0;61680:31;61712:17;:15;:17::i;:::-;61731:7;61680:59;;;;;;;;;;;;;;;;:::i;24939:422::-;25306:20;25345:8;;;24939:422::o;31449:742::-;31564:12;31593:7;31589:595;;;-1:-1:-1;31624:10:0;31617:17;;31589:595;31738:17;;:21;31734:439;;32001:10;31995:17;32062:15;32049:10;32045:2;32041:19;32034:44;31949:148;32144:12;32137:20;;-1:-1:-1;;;32137:20:0;;;;;;;;:::i;1303:241:-1:-;;1407:2;1395:9;1386:7;1382:23;1378:32;1375:2;;;-1:-1;;1413:12;1375:2;72:20;;-1:-1;;;;;24061:54;;24770:35;;24760:2;;-1:-1;;24809:12;1551:392;;1691:2;;1679:9;1670:7;1666:23;1662:32;1659:2;;;-1:-1;;1697:12;1659:2;1748:17;1742:24;1786:18;1778:6;1775:30;1772:2;;;-1:-1;;1808:12;1772:2;1895:22;;281:4;269:17;;265:27;-1:-1;255:2;;-1:-1;;296:12;255:2;336:6;330:13;358:80;373:64;430:6;373:64;:::i;:::-;358:80;:::i;:::-;466:21;;;523:14;;;;498:17;;;612;;;603:27;;;;600:36;-1:-1;597:2;;;-1:-1;;639:12;597:2;-1:-1;665:10;;659:217;684:6;681:1;678:13;659:217;;;1240:13;;752:61;;706:1;699:9;;;;;827:14;;;;855;;659:217;;;-1:-1;1828:99;1653:290;-1:-1;;;;;;;1653:290::o;1950:257::-;;2062:2;2050:9;2041:7;2037:23;2033:32;2030:2;;;-1:-1;;2068:12;2030:2;971:6;965:13;24916:5;23973:13;23966:21;24894:5;24891:32;24881:2;;-1:-1;;24927:12;2214:241;;2318:2;2306:9;2297:7;2293:23;2289:32;2286:2;;;-1:-1;;2324:12;2286:2;-1:-1;1092:20;;2280:175;-1:-1;2280:175::o;2462:263::-;;2577:2;2565:9;2556:7;2552:23;2548:32;2545:2;;;-1:-1;;2583:12;2545:2;-1:-1;1240:13;;2539:186;-1:-1;2539:186::o;2732:399::-;;;2864:2;2852:9;2843:7;2839:23;2835:32;2832:2;;;-1:-1;;2870:12;2832:2;-1:-1;;1240:13;;3033:2;3083:22;;;1240:13;;;;;-1:-1;2826:305::o;3138:535::-;;;;3287:2;3275:9;3266:7;3262:23;3258:32;3255:2;;;-1:-1;;3293:12;3255:2;1246:6;1240:13;3345:74;;3456:2;3510:9;3506:22;1240:13;3464:74;;3575:2;3629:9;3625:22;1240:13;3583:74;;3249:424;;;;;:::o;11053:271::-;;4981:5;22884:12;5092:52;5137:6;5132:3;5125:4;5118:5;5114:16;5092:52;:::i;:::-;5156:16;;;;;11187:137;-1:-1;;11187:137::o;11331:222::-;-1:-1;;;;;24061:54;;;;3923:37;;11458:2;11443:18;;11429:124::o;11560:333::-;-1:-1;;;;;24061:54;;;3923:37;;24061:54;;11879:2;11864:18;;3923:37;11715:2;11700:18;;11686:207::o;11900:1036::-;-1:-1;;;;;24061:54;;;3923:37;;24061:54;;;12404:2;12389:18;;3923:37;12487:2;12472:18;;11004:37;;;;12570:2;12555:18;;11004:37;;;;12661:3;12646:19;;5263:58;;;;24072:42;12738:19;;5263:58;24061:54;;;12837:3;12822:19;;3923:37;12921:3;12906:19;;11004:37;;;;12239:3;12224:19;;12210:726::o;12943:333::-;-1:-1;;;;;24061:54;;;;3923:37;;13262:2;13247:18;;11004:37;13098:2;13083:18;;13069:207::o;13283:310::-;;13430:2;13451:17;13444:47;5478:5;22884:12;23428:6;13430:2;13419:9;13415:18;23416:19;5572:52;5617:6;23456:14;13419:9;23456:14;13430:2;5598:5;5594:16;5572:52;:::i;:::-;24690:7;24674:14;-1:-1;;24670:28;5636:39;;;;23456:14;5636:39;;13401:192;-1:-1;;13401:192::o;13600:416::-;13800:2;13814:47;;;5912:2;13785:18;;;23416:19;5948:34;23456:14;;;5928:55;-1:-1;;;6003:12;;;5996:30;6045:12;;;13771:245::o;14023:416::-;14223:2;14237:47;;;6296:2;14208:18;;;23416:19;6332:29;23456:14;;;6312:50;6381:12;;;14194:245::o;14446:416::-;14646:2;14660:47;;;6632:2;14631:18;;;23416:19;-1:-1;;;23456:14;;;6648:37;6704:12;;;14617:245::o;14869:416::-;15069:2;15083:47;;;6955:2;15054:18;;;23416:19;6991:32;23456:14;;;6971:53;7043:12;;;15040:245::o;15292:416::-;15492:2;15506:47;;;7294:2;15477:18;;;23416:19;-1:-1;;;23456:14;;;7310:38;7367:12;;;15463:245::o;15715:416::-;15915:2;15929:47;;;7618:2;15900:18;;;23416:19;7654:34;23456:14;;;7634:55;-1:-1;;;7709:12;;;7702:30;7751:12;;;15886:245::o;16138:416::-;16338:2;16352:47;;;8002:2;16323:18;;;23416:19;8038:28;23456:14;;;8018:49;8086:12;;;16309:245::o;16561:416::-;16761:2;16775:47;;;8337:2;16746:18;;;23416:19;-1:-1;;;23456:14;;;8353:37;8409:12;;;16732:245::o;16984:416::-;17184:2;17198:47;;;8660:2;17169:18;;;23416:19;8696:34;23456:14;;;8676:55;-1:-1;;;8751:12;;;8744:25;8788:12;;;17155:245::o;17407:416::-;17607:2;17621:47;;;17592:18;;;23416:19;9075:34;23456:14;;;9055:55;9129:12;;;17578:245::o;17830:416::-;18030:2;18044:47;;;9380:1;18015:18;;;23416:19;-1:-1;;;23456:14;;;9395:27;9441:12;;;18001:245::o;18253:416::-;18453:2;18467:47;;;9692:2;18438:18;;;23416:19;9728:31;23456:14;;;9708:52;9779:12;;;18424:245::o;18676:416::-;18876:2;18890:47;;;10030:2;18861:18;;;23416:19;10066:34;23456:14;;;10046:55;-1:-1;;;10121:12;;;10114:34;10167:12;;;18847:245::o;19099:416::-;19299:2;19313:47;;;10418:2;19284:18;;;23416:19;10454:33;23456:14;;;10434:54;10507:12;;;19270:245::o;19522:416::-;19722:2;19736:47;;;10758:2;19707:18;;;23416:19;10794:34;23456:14;;;10774:55;-1:-1;;;10849:12;;;10842:46;10907:12;;;19693:245::o;19945:222::-;11004:37;;;20072:2;20057:18;;20043:124::o;20174:333::-;11004:37;;;-1:-1;;;;;24061:54;20493:2;20478:18;;3923:37;20329:2;20314:18;;20300:207::o;20514:349::-;11004:37;;;20849:2;20834:18;;5263:58;20677:2;20662:18;;20648:215::o;20870:832::-;;21167:3;21156:9;21152:19;11034:5;11011:3;11004:37;21340:2;24293:24;21340:2;21329:9;21325:18;5263:58;21167:3;21377:2;21366:9;21362:18;21355:48;21417:108;4316:5;22884:12;23428:6;23423:3;23416:19;23456:14;21156:9;23456:14;4328:93;;21340:2;4492:5;22738:14;4504:21;;-1:-1;4531:260;4556:6;4553:1;4550:13;4531:260;;;4617:13;;-1:-1;;;;;24061:54;3923:37;;23271:14;;;;3834;;;;24072:42;4571:9;4531:260;;;-1:-1;;;;;;;24061:54;;;;21604:2;21589:18;;3923:37;-1:-1;;;21687:3;21672:19;11004:37;21409:116;21138:564;-1:-1;;;21138:564::o;22049:256::-;22111:2;22105:9;22137:17;;;22212:18;22197:34;;22233:22;;;22194:62;22191:2;;;22269:1;;22259:12;22191:2;22111;22278:22;22089:216;;-1:-1;22089:216::o;22312:304::-;;22471:18;22463:6;22460:30;22457:2;;;-1:-1;;22493:12;22457:2;-1:-1;22538:4;22526:17;;;22591:15;;22394:222::o;24330:268::-;24395:1;24402:101;24416:6;24413:1;24410:13;24402:101;;;24483:11;;;24477:18;24464:11;;;24457:39;24438:2;24431:10;24402:101;;;24518:6;24515:1;24512:13;24509:2;;;-1:-1;;24395:1;24565:16;;24558:27;24379:219::o

Swarm Source

ipfs://7596a854c9cfd80bbc1efe2b2d767a5b345f27cc64994544f102730ffdd711f8
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.